Skip to content

Instantly share code, notes, and snippets.

View iberianpig's full-sized avatar

Kohei Yamada iberianpig

View GitHub Profile
@iberianpig
iberianpig / WaylandUbuntu19.10-AppTitle
Created July 26, 2020 14:10 — forked from rbreaves/WaylandUbuntu19.10-AppTitle
Grab wmclass name or Window Name/Title under Wayland with Gnome 3.x
# Single Command, runs 2 calls to gdbus to get the currently active Window from Gnome 3.x
# Escaped so you can copy and paste into terminal directly
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\)[`gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\).findIndex\(a\=\>a.meta_window.has_focus\(\)===true\) | cut -d"'" -f 2`].get_meta_window\(\).get_wm_class\(\) | cut -d'"' -f 2
# Unescaped version, will not run
# Broken down into 2 commands.
# Call to Gnome to get the array location of the active Application
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m \
namespace :model_from_schema do
desc 'Generate model files from db schema'
task gen: :environment do
module ModelGenerator
Models = {}
module Evaluator
module_function
def create_table(table_name, *)
@iberianpig
iberianpig / change_finger_count.sh
Last active December 11, 2024 06:35
Change finger count for default gestures in Gnome Wayland (require login/logout after executing this script.)
function gnome-wayland-change-finger-count() {
local finger_count=$1
case "${finger_count}" in
3|4|5)
echo "changing finger count to ${finger_count}"
# check if the file we want to customize is in the gresource list
if gresource list /usr/lib/gnome-shell/libgnome-shell.so | grep -q 'swipetracker.js'; then
# create a folder to hold your custom overlays
mkdir -p ~/.gnome-shell-custom-overlays/ui
@iberianpig
iberianpig / Gemfile.local
Last active July 26, 2023 10:43
Gemfile.local outside of version control
custom_gemfile = <<~GEMFILE
gem "solargraph", require: false
gem 'solargraph-rails', require: false
# gem 'rails', path: '~/.ghq/github.com/rails/rails'
# gem 'activerecord', path: '~/.ghq/github.com/rails/rails/activerecord'
gem 'actionpack', path: '~/.ghq/github.com/rails/rails/actionpack'
gem 'activesupport', path: '~/.ghq/github.com/rails/rails/activesupport'
gem 'debug'
GEMFILE