From ffc6b6e8165518808ff31192920c80ec638ae3bb Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 27 Dec 2021 20:37:30 -0500 Subject: remove a bunch of unused stuff --- Brewfile | 67 -- Makefile | 1 - Makefile.hornet | 6 - Makefile.st-doy2 | 20 - Makefile.tozt | 2 - agignore | 7 - .../complex_modifications/command-escape.json | 54 -- .../assets/complex_modifications/number-row.json | 390 -------- .../complex_modifications/other-remapping.json | 200 ---- .../complex_modifications/terminal-overrides.json | 140 --- config/karabiner/karabiner.json | 1018 -------------------- .../Spoons/ReloadConfiguration.spoon/docs.json | 90 -- .../Spoons/ReloadConfiguration.spoon/init.lua | 49 - hammerspoon/Spoons/SpeedMenu.spoon/docs.json | 39 - hammerspoon/Spoons/SpeedMenu.spoon/init.lua | 111 --- hammerspoon/init.lua | 156 --- hammerspoon/src/spaces | 1 - mpdscribble/mpdscribble.conf.tmpl | 7 - procmail/mark_as_read | 20 - procmailrc | 12 - skhdrc | 22 - yabairc | 19 - 22 files changed, 2431 deletions(-) delete mode 100644 Brewfile delete mode 100644 Makefile.st-doy2 delete mode 100644 agignore delete mode 100644 config/karabiner/assets/complex_modifications/command-escape.json delete mode 100644 config/karabiner/assets/complex_modifications/number-row.json delete mode 100644 config/karabiner/assets/complex_modifications/other-remapping.json delete mode 100644 config/karabiner/assets/complex_modifications/terminal-overrides.json delete mode 100644 config/karabiner/karabiner.json delete mode 100644 hammerspoon/Spoons/ReloadConfiguration.spoon/docs.json delete mode 100644 hammerspoon/Spoons/ReloadConfiguration.spoon/init.lua delete mode 100644 hammerspoon/Spoons/SpeedMenu.spoon/docs.json delete mode 100644 hammerspoon/Spoons/SpeedMenu.spoon/init.lua delete mode 100644 hammerspoon/init.lua delete mode 160000 hammerspoon/src/spaces delete mode 100644 mpdscribble/mpdscribble.conf.tmpl delete mode 100644 procmail/mark_as_read delete mode 100644 procmailrc delete mode 100755 skhdrc delete mode 100755 yabairc diff --git a/Brewfile b/Brewfile deleted file mode 100644 index fda8c13..0000000 --- a/Brewfile +++ /dev/null @@ -1,67 +0,0 @@ -tap "homebrew/bundle" -tap "homebrew/cask" -tap "homebrew/core" -tap "wata727/tflint" -brew "openssl" -brew "readline" -brew "python" -brew "awscli" -brew "bash" -brew "bash-completion" -brew "bazel" -brew "binutils" -brew "cloc" -brew "cmake" -brew "coreutils" -brew "curl" -brew "diffutils" -brew "exa" -brew "findutils" -brew "flake8" -brew "fortune" -brew "fzf" -brew "git" -brew "gnu-sed", args: ["with-default-names"] -brew "gsl" -brew "htop" -brew "hyperfine" -brew "jq" -brew "less" -brew "libu2f-host" -brew "libxml2" -brew "libxmlsec1" -brew "libxslt" -brew "mongodb" -brew "mtr" -brew "ncdu" -brew "node" -brew "parallel" -brew "postgresql" -brew "ruby-build" -brew "rbenv" -brew "rbspy" -brew "rename" -brew "rsync" -brew "ruby" -brew "rustup-init" -brew "shellcheck" -brew "smartmontools" -brew "ssss" -brew "task" -brew "tealdeer" -brew "telnet" -brew "terraform" -brew "the_silver_searcher" -brew "thrift" -brew "tig" -brew "tmux" -brew "vim" -brew "watchman" -brew "wget" -brew "wireshark", link: false -brew "yamllint" -brew "yarn" -brew "zsh" -brew "wata727/tflint/tflint" -cask "amethyst" -cask "wireshark" diff --git a/Makefile b/Makefile index eaa3a72..89a4bdc 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ endif INSTALL := \ $(INSTALL) \ .abook/abookrc \ - .agignore \ .bash_profile \ .bashrc \ .config/git/config \ diff --git a/Makefile.hornet b/Makefile.hornet index 3b2ef25..2963fe4 100644 --- a/Makefile.hornet +++ b/Makefile.hornet @@ -10,7 +10,6 @@ INSTALL := \ .config/perspektiv/config.toml \ .mbsyncrc \ .mbsyncloop \ - .mpdscribble \ .notmuch-config \ .ssh/authorized_keys \ .xbindkeysrc \ @@ -35,7 +34,6 @@ INSTALL_CUSTOM := \ BUILD := \ config/alacritty/alacritty.yml \ - mpdscribble/mpdscribble.conf \ mbsyncloop install :: @@ -70,7 +68,3 @@ config/darksky/api : config/darksky mbsyncloop: mbsyncrc @sed 's/^PassCmd.*/PassCmd "head -n1 \/run\/user\/1000\/mbsyncloop"/' mbsyncrc > mbsyncloop - -mpdscribble/mpdscribble.conf : mpdscribble/mpdscribble.conf.tmpl - pass="$$(rbw get last.fm doyster)" &&\ - perl -E'while () { if (/^password =/) { say "password = $$ARGV[0]" } else { print } }' "$$pass" < $< > $@ diff --git a/Makefile.st-doy2 b/Makefile.st-doy2 deleted file mode 100644 index e7bd455..0000000 --- a/Makefile.st-doy2 +++ /dev/null @@ -1,20 +0,0 @@ -INSTALL := \ - .config/alacritty/alacritty.yml \ - .config/karabiner \ - .hammerspoon \ - .skhdrc \ - .yabairc - -EMPTYDIRS := \ - -INSTALL_CUSTOM := \ - -BUILD := \ - config/alacritty/alacritty.yml \ - hammerspoon/hs/_asm/undocumented/spaces/internal.so - -config/alacritty/alacritty.yml : config/alacritty/alacritty.yml.st-doy2 - $(LN) $(notdir $<) $@ - -hammerspoon/hs/_asm/undocumented/spaces/internal.so : - cd hammerspoon/src/spaces && PREFIX=$(HOME)/conf/hammerspoon make install diff --git a/Makefile.tozt b/Makefile.tozt index b028300..94da815 100644 --- a/Makefile.tozt +++ b/Makefile.tozt @@ -1,6 +1,4 @@ INSTALL := \ - .procmailrc \ - .procmail \ .ssh/authorized_keys EMPTYDIRS := \ diff --git a/agignore b/agignore deleted file mode 100644 index 8c348f8..0000000 --- a/agignore +++ /dev/null @@ -1,7 +0,0 @@ -node_modules/ -*.min.css -*.min.js -*.d -*.pdf -*.map -/.git/ diff --git a/config/karabiner/assets/complex_modifications/command-escape.json b/config/karabiner/assets/complex_modifications/command-escape.json deleted file mode 100644 index f00158c..0000000 --- a/config/karabiner/assets/complex_modifications/command-escape.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "title": "Map Command to Escape when pressed alone", - "rules": [ - { - "description": "Map command to escape", - "manipulators": [ - { - "type": "basic", - "from": { - "key_code": "left_command", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "left_command", - "lazy": true - } - ], - "to_if_alone": [ - { - "key_code": "escape" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "right_command", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "right_command", - "lazy": true - } - ], - "to_if_alone": [ - { - "key_code": "escape" - } - ] - } - ] - } - ] -} diff --git a/config/karabiner/assets/complex_modifications/number-row.json b/config/karabiner/assets/complex_modifications/number-row.json deleted file mode 100644 index f56166b..0000000 --- a/config/karabiner/assets/complex_modifications/number-row.json +++ /dev/null @@ -1,390 +0,0 @@ -{ - "title": "Exchange numbers and symbols", - "rules": [ - { - "description": "Exchange numbers and symbols (1234567890 and !@#$%^&*())", - "manipulators": [ - { - "type": "basic", - "from": { - "key_code": "1", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "1", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "2", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "2", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "3", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "3", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "4", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "4", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "5", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "5", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "6", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "6", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "7", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "7", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "8", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "8", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "9", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "9", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "0", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "0", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "1", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "1" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "2", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "2" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "3", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "3" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "4", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "4" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "5", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "5" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "6", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "6" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "7", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "7" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "8", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "8" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "9", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "9" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "0", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "0" - } - ] - } - ] - } - ] -} diff --git a/config/karabiner/assets/complex_modifications/other-remapping.json b/config/karabiner/assets/complex_modifications/other-remapping.json deleted file mode 100644 index b817219..0000000 --- a/config/karabiner/assets/complex_modifications/other-remapping.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "title": "Other keyboard remappings", - "rules": [ - { - "description": "Other keyboard remappings", - "manipulators": [ - { - "type": "basic", - "from": { - "key_code": "grave_accent_and_tilde", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "grave_accent_and_tilde", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "grave_accent_and_tilde", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "grave_accent_and_tilde" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "hyphen", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "hyphen", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "hyphen", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "hyphen" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "open_bracket", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "open_bracket", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "open_bracket", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "open_bracket" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "close_bracket", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "close_bracket", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "close_bracket", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "close_bracket" - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "backslash", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "backslash", - "modifiers": [ - "left_shift" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "backslash", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "backslash" - } - ] - } - ] - } - ] -} diff --git a/config/karabiner/assets/complex_modifications/terminal-overrides.json b/config/karabiner/assets/complex_modifications/terminal-overrides.json deleted file mode 100644 index 594d9e6..0000000 --- a/config/karabiner/assets/complex_modifications/terminal-overrides.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "title": "Terminal overrides", - "rules": [ - { - "description": "Swap command and control in terminal applications", - "manipulators": [ - { - "type": "basic", - "from": { - "key_code": "left_command", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "left_control", - "lazy": true - } - ], - "to_if_alone": [ - { - "key_code": "escape" - } - ], - "conditions": [ - { - "type": "frontmost_application_if", - "bundle_identifiers": [ - "^com\\.apple\\.Terminal$", - "^com\\.googlecode\\.iterm2$", - "^co\\.zeit\\.hyperterm$", - "^co\\.zeit\\.hyper$", - "^io\\.alacritty$", - "^net\\.kovidgoyal\\.kitty$" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "left_control", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "left_command", - "lazy": true - } - ], - "conditions": [ - { - "type": "frontmost_application_if", - "bundle_identifiers": [ - "^com\\.apple\\.Terminal$", - "^com\\.googlecode\\.iterm2$", - "^co\\.zeit\\.hyperterm$", - "^co\\.zeit\\.hyper$", - "^io\\.alacritty$", - "^net\\.kovidgoyal\\.kitty$" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "right_command", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "right_control", - "lazy": true - } - ], - "to_if_alone": [ - { - "key_code": "escape" - } - ], - "conditions": [ - { - "type": "frontmost_application_if", - "bundle_identifiers": [ - "^com\\.apple\\.Terminal$", - "^com\\.googlecode\\.iterm2$", - "^co\\.zeit\\.hyperterm$", - "^co\\.zeit\\.hyper$", - "^io\\.alacritty$", - "^net\\.kovidgoyal\\.kitty$" - ] - } - ] - }, - { - "type": "basic", - "from": { - "key_code": "right_control", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "right_command", - "lazy": true - } - ], - "conditions": [ - { - "type": "frontmost_application_if", - "bundle_identifiers": [ - "^com\\.apple\\.Terminal$", - "^com\\.googlecode\\.iterm2$", - "^co\\.zeit\\.hyperterm$", - "^co\\.zeit\\.hyper$", - "^io\\.alacritty$", - "^net\\.kovidgoyal\\.kitty$" - ] - } - ] - } - ] - } - ] -} diff --git a/config/karabiner/karabiner.json b/config/karabiner/karabiner.json deleted file mode 100644 index 9bf0cbb..0000000 --- a/config/karabiner/karabiner.json +++ /dev/null @@ -1,1018 +0,0 @@ -{ - "global": { - "check_for_updates_on_startup": true, - "show_in_menu_bar": true, - "show_profile_name_in_menu_bar": false - }, - "profiles": [ - { - "complex_modifications": { - "parameters": { - "basic.simultaneous_threshold_milliseconds": 50, - "basic.to_delayed_action_delay_milliseconds": 500, - "basic.to_if_alone_timeout_milliseconds": 500, - "basic.to_if_held_down_threshold_milliseconds": 200 - }, - "rules": [ - { - "description": "Swap command and control in terminal applications", - "manipulators": [ - { - "conditions": [ - { - "bundle_identifiers": [ - "^com\\.apple\\.Terminal$", - "^com\\.googlecode\\.iterm2$", - "^co\\.zeit\\.hyperterm$", - "^co\\.zeit\\.hyper$", - "^io\\.alacritty$", - "^net\\.kovidgoyal\\.kitty$" - ], - "type": "frontmost_application_if" - } - ], - "from": { - "key_code": "left_command", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "left_control", - "lazy": true - } - ], - "to_if_alone": [ - { - "key_code": "escape" - } - ], - "type": "basic" - }, - { - "conditions": [ - { - "bundle_identifiers": [ - "^com\\.apple\\.Terminal$", - "^com\\.googlecode\\.iterm2$", - "^co\\.zeit\\.hyperterm$", - "^co\\.zeit\\.hyper$", - "^io\\.alacritty$", - "^net\\.kovidgoyal\\.kitty$" - ], - "type": "frontmost_application_if" - } - ], - "from": { - "key_code": "left_control", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "left_command", - "lazy": true - } - ], - "type": "basic" - }, - { - "conditions": [ - { - "bundle_identifiers": [ - "^com\\.apple\\.Terminal$", - "^com\\.googlecode\\.iterm2$", - "^co\\.zeit\\.hyperterm$", - "^co\\.zeit\\.hyper$", - "^io\\.alacritty$", - "^net\\.kovidgoyal\\.kitty$" - ], - "type": "frontmost_application_if" - } - ], - "from": { - "key_code": "right_command", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "right_control", - "lazy": true - } - ], - "to_if_alone": [ - { - "key_code": "escape" - } - ], - "type": "basic" - }, - { - "conditions": [ - { - "bundle_identifiers": [ - "^com\\.apple\\.Terminal$", - "^com\\.googlecode\\.iterm2$", - "^co\\.zeit\\.hyperterm$", - "^co\\.zeit\\.hyper$", - "^io\\.alacritty$", - "^net\\.kovidgoyal\\.kitty$" - ], - "type": "frontmost_application_if" - } - ], - "from": { - "key_code": "right_control", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "right_command", - "lazy": true - } - ], - "type": "basic" - } - ] - }, - { - "description": "Map command to escape", - "manipulators": [ - { - "from": { - "key_code": "left_command", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "left_command", - "lazy": true - } - ], - "to_if_alone": [ - { - "key_code": "escape" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "right_command", - "modifiers": { - "optional": [ - "any" - ] - } - }, - "to": [ - { - "key_code": "right_command", - "lazy": true - } - ], - "to_if_alone": [ - { - "key_code": "escape" - } - ], - "type": "basic" - } - ] - }, - { - "description": "Exchange numbers and symbols (1234567890 and !@#$%^&*())", - "manipulators": [ - { - "from": { - "key_code": "1", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "1", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "2", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "2", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "3", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "3", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "4", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "4", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "5", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "5", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "6", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "6", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "7", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "7", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "8", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "8", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "9", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "9", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "0", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "0", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "1", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "1" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "2", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "2" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "3", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "3" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "4", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "4" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "5", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "5" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "6", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "6" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "7", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "7" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "8", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "8" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "9", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "9" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "0", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "0" - } - ], - "type": "basic" - } - ] - }, - { - "description": "Other keyboard remappings", - "manipulators": [ - { - "from": { - "key_code": "grave_accent_and_tilde", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "grave_accent_and_tilde", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "grave_accent_and_tilde", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "grave_accent_and_tilde" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "hyphen", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "hyphen", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "hyphen", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "hyphen" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "open_bracket", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "open_bracket", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "open_bracket", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "open_bracket" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "close_bracket", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "close_bracket", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "close_bracket", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "close_bracket" - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "backslash", - "modifiers": { - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "backslash", - "modifiers": [ - "left_shift" - ] - } - ], - "type": "basic" - }, - { - "from": { - "key_code": "backslash", - "modifiers": { - "mandatory": [ - "shift" - ], - "optional": [ - "caps_lock" - ] - } - }, - "to": [ - { - "key_code": "backslash" - } - ], - "type": "basic" - } - ] - } - ] - }, - "devices": [ - { - "disable_built_in_keyboard_if_exists": false, - "fn_function_keys": [], - "identifiers": { - "is_keyboard": true, - "is_pointing_device": false, - "product_id": 361, - "vendor_id": 1241 - }, - "ignore": false, - "manipulate_caps_lock_led": false, - "simple_modifications": [ - { - "from": { - "key_code": "left_command" - }, - "to": { - "key_code": "left_option" - } - }, - { - "from": { - "key_code": "left_option" - }, - "to": { - "key_code": "left_command" - } - }, - { - "from": { - "key_code": "right_command" - }, - "to": { - "key_code": "right_option" - } - }, - { - "from": { - "key_code": "right_option" - }, - "to": { - "key_code": "right_command" - } - } - ] - }, - { - "disable_built_in_keyboard_if_exists": false, - "fn_function_keys": [], - "identifiers": { - "is_keyboard": true, - "is_pointing_device": false, - "product_id": 2082, - "vendor_id": 6134 - }, - "ignore": false, - "manipulate_caps_lock_led": false, - "simple_modifications": [ - { - "from": { - "key_code": "left_alt" - }, - "to": { - "key_code": "left_command" - } - }, - { - "from": { - "key_code": "left_gui" - }, - "to": { - "key_code": "left_option" - } - }, - { - "from": { - "key_code": "right_alt" - }, - "to": { - "key_code": "right_option" - } - }, - { - "from": { - "key_code": "right_gui" - }, - "to": { - "key_code": "right_command" - } - } - ] - } - ], - "fn_function_keys": [ - { - "from": { - "key_code": "f1" - }, - "to": { - "consumer_key_code": "mute" - } - }, - { - "from": { - "key_code": "f2" - }, - "to": { - "consumer_key_code": "volume_decrement" - } - }, - { - "from": { - "key_code": "f3" - }, - "to": { - "consumer_key_code": "volume_increment" - } - }, - { - "from": { - "key_code": "f4" - }, - "to": { - "key_code": "vk_none" - } - }, - { - "from": { - "key_code": "f5" - }, - "to": { - "consumer_key_code": "display_brightness_decrement" - } - }, - { - "from": { - "key_code": "f6" - }, - "to": { - "consumer_key_code": "display_brightness_increment" - } - }, - { - "from": { - "key_code": "f7" - }, - "to": { - "key_code": "vk_none" - } - }, - { - "from": { - "key_code": "f8" - }, - "to": { - "key_code": "f8" - } - }, - { - "from": { - "key_code": "f9" - }, - "to": { - "key_code": "vk_none" - } - }, - { - "from": { - "key_code": "f10" - }, - "to": { - "key_code": "f18" - } - }, - { - "from": { - "key_code": "f11" - }, - "to": { - "key_code": "vk_none" - } - }, - { - "from": { - "key_code": "f12" - }, - "to": { - "key_code": "vk_none" - } - } - ], - "name": "Default profile", - "selected": true, - "simple_modifications": [ - { - "from": { - "consumer_key_code": "fastforward" - }, - "to": { - "key_code": "vk_none" - } - }, - { - "from": { - "consumer_key_code": "play_or_pause" - }, - "to": { - "key_code": "vk_none" - } - }, - { - "from": { - "consumer_key_code": "rewind" - }, - "to": { - "key_code": "vk_none" - } - }, - { - "from": { - "key_code": "caps_lock" - }, - "to": { - "key_code": "fn" - } - } - ], - "virtual_hid_keyboard": { - "caps_lock_delay_milliseconds": 0, - "country_code": 0, - "keyboard_type": "ansi" - } - } - ] -} diff --git a/hammerspoon/Spoons/ReloadConfiguration.spoon/docs.json b/hammerspoon/Spoons/ReloadConfiguration.spoon/docs.json deleted file mode 100644 index 50c62f2..0000000 --- a/hammerspoon/Spoons/ReloadConfiguration.spoon/docs.json +++ /dev/null @@ -1,90 +0,0 @@ -[ - { - "Command": [], - "Constant": [], - "Constructor": [], - "Deprecated": [], - "Field": [], - "Function": [], - "Method": [ - { - "def": "ReloadConfiguration:bindHotkeys(mapping)", - "desc": "Binds hotkeys for ReloadConfiguration", - "doc": "Binds hotkeys for ReloadConfiguration\n\nParameters:\n * mapping - A table containing hotkey modifier/key details for the following items:\n * reloadConfiguration - This will cause the configuration to be reloaded", - "name": "bindHotkeys", - "parameters": [ - " * mapping - A table containing hotkey modifier/key details for the following items:", - " * reloadConfiguration - This will cause the configuration to be reloaded" - ], - "signature": "ReloadConfiguration:bindHotkeys(mapping)", - "stripped_doc": "", - "type": "Method" - }, - { - "def": "ReloadConfiguration:start()", - "desc": "Start ReloadConfiguration", - "doc": "Start ReloadConfiguration\n\nParameters:\n * None", - "name": "start", - "parameters": [ - " * None" - ], - "signature": "ReloadConfiguration:start()", - "stripped_doc": "", - "type": "Method" - } - ], - "Variable": [ - { - "def": "ReloadConfiguration.watch_paths", - "desc": "List of directories to watch for changes, defaults to hs.configdir", - "doc": "List of directories to watch for changes, defaults to hs.configdir", - "name": "watch_paths", - "signature": "ReloadConfiguration.watch_paths", - "stripped_doc": "", - "type": "Variable" - } - ], - "desc": "Adds a hotkey to reload the hammerspoon configuration, and a pathwatcher to automatically reload on changes.", - "doc": "Adds a hotkey to reload the hammerspoon configuration, and a pathwatcher to automatically reload on changes.\n\nDownload: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ReloadConfiguration.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ReloadConfiguration.spoon.zip)", - "items": [ - { - "def": "ReloadConfiguration:bindHotkeys(mapping)", - "desc": "Binds hotkeys for ReloadConfiguration", - "doc": "Binds hotkeys for ReloadConfiguration\n\nParameters:\n * mapping - A table containing hotkey modifier/key details for the following items:\n * reloadConfiguration - This will cause the configuration to be reloaded", - "name": "bindHotkeys", - "parameters": [ - " * mapping - A table containing hotkey modifier/key details for the following items:", - " * reloadConfiguration - This will cause the configuration to be reloaded" - ], - "signature": "ReloadConfiguration:bindHotkeys(mapping)", - "stripped_doc": "", - "type": "Method" - }, - { - "def": "ReloadConfiguration:start()", - "desc": "Start ReloadConfiguration", - "doc": "Start ReloadConfiguration\n\nParameters:\n * None", - "name": "start", - "parameters": [ - " * None" - ], - "signature": "ReloadConfiguration:start()", - "stripped_doc": "", - "type": "Method" - }, - { - "def": "ReloadConfiguration.watch_paths", - "desc": "List of directories to watch for changes, defaults to hs.configdir", - "doc": "List of directories to watch for changes, defaults to hs.configdir", - "name": "watch_paths", - "signature": "ReloadConfiguration.watch_paths", - "stripped_doc": "", - "type": "Variable" - } - ], - "name": "ReloadConfiguration", - "stripped_doc": "\nDownload: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ReloadConfiguration.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ReloadConfiguration.spoon.zip)", - "submodules": [], - "type": "Module" - } -] \ No newline at end of file diff --git a/hammerspoon/Spoons/ReloadConfiguration.spoon/init.lua b/hammerspoon/Spoons/ReloadConfiguration.spoon/init.lua deleted file mode 100644 index bb83f67..0000000 --- a/hammerspoon/Spoons/ReloadConfiguration.spoon/init.lua +++ /dev/null @@ -1,49 +0,0 @@ ---- === ReloadConfiguration === ---- ---- Adds a hotkey to reload the hammerspoon configuration, and a pathwatcher to automatically reload on changes. ---- ---- Download: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ReloadConfiguration.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/ReloadConfiguration.spoon.zip) - -local obj = {} -obj.__index = obj - --- Metadata -obj.name = "ReloadConfiguration" -obj.version = "1.0" -obj.author = "Jon Lorusso " -obj.homepage = "https://github.com/Hammerspoon/Spoons" -obj.license = "MIT - https://opensource.org/licenses/MIT" - - ---- ReloadConfiguration.watch_paths ---- Variable ---- List of directories to watch for changes, defaults to hs.configdir -obj.watch_paths = { hs.configdir } - ---- ReloadConfiguration:bindHotkeys(mapping) ---- Method ---- Binds hotkeys for ReloadConfiguration ---- ---- Parameters: ---- * mapping - A table containing hotkey modifier/key details for the following items: ---- * reloadConfiguration - This will cause the configuration to be reloaded -function obj:bindHotkeys(mapping) - local def = { reloadConfiguration = hs.fnutils.partial(hs.reload, self) } - hs.spoons.bindHotkeysToSpec(def, mapping) -end - ---- ReloadConfiguration:start() ---- Method ---- Start ReloadConfiguration ---- ---- Parameters: ---- * None -function obj:start() - self.watchers = {} - for _,dir in pairs(self.watch_paths) do - self.watchers[dir] = hs.pathwatcher.new(dir, hs.reload):start() - end - return self -end - -return obj diff --git a/hammerspoon/Spoons/SpeedMenu.spoon/docs.json b/hammerspoon/Spoons/SpeedMenu.spoon/docs.json deleted file mode 100644 index f57b965..0000000 --- a/hammerspoon/Spoons/SpeedMenu.spoon/docs.json +++ /dev/null @@ -1,39 +0,0 @@ -[ - { - "Command": [], - "Constant": [], - "Constructor": [], - "Deprecated": [], - "Field": [], - "Function": [], - "Method": [ - { - "def": "SpeedMenu:rescan()", - "desc": "Redetect the active interface, darkmode …And redraw everything.", - "doc": "Redetect the active interface, darkmode …And redraw everything.\n", - "name": "rescan", - "signature": "SpeedMenu:rescan()", - "stripped_doc": "", - "type": "Method" - } - ], - "Variable": [], - "desc": "Menubar netspeed meter", - "doc": "Menubar netspeed meter\n\nDownload: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/SpeedMenu.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/SpeedMenu.spoon.zip)", - "items": [ - { - "def": "SpeedMenu:rescan()", - "desc": "Redetect the active interface, darkmode …And redraw everything.", - "doc": "Redetect the active interface, darkmode …And redraw everything.\n", - "name": "rescan", - "signature": "SpeedMenu:rescan()", - "stripped_doc": "", - "type": "Method" - } - ], - "name": "SpeedMenu", - "stripped_doc": "\nDownload: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/SpeedMenu.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/SpeedMenu.spoon.zip)", - "submodules": [], - "type": "Module" - } -] \ No newline at end of file diff --git a/hammerspoon/Spoons/SpeedMenu.spoon/init.lua b/hammerspoon/Spoons/SpeedMenu.spoon/init.lua deleted file mode 100644 index d4ecdac..0000000 --- a/hammerspoon/Spoons/SpeedMenu.spoon/init.lua +++ /dev/null @@ -1,111 +0,0 @@ ---- === SpeedMenu === ---- ---- Menubar netspeed meter ---- ---- Download: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/SpeedMenu.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/SpeedMenu.spoon.zip) - -local obj={} -obj.__index = obj - --- Metadata -obj.name = "SpeedMenu" -obj.version = "1.0" -obj.author = "ashfinal " -obj.homepage = "https://github.com/Hammerspoon/Spoons" -obj.license = "MIT - https://opensource.org/licenses/MIT" - -function obj:init() - self.menubar = hs.menubar.new() - obj:rescan() -end - -local function data_diff() - local in_seq = hs.execute(obj.instr) - local out_seq = hs.execute(obj.outstr) - local in_diff = in_seq - obj.inseq - local out_diff = out_seq - obj.outseq - if in_diff/1024 > 1024 then - obj.kbin = string.format("%6.2f", in_diff/1024/1024) .. ' mb/s' - else - obj.kbin = string.format("%6.2f", in_diff/1024) .. ' kb/s' - end - if out_diff/1024 > 1024 then - obj.kbout = string.format("%6.2f", out_diff/1024/1024) .. ' mb/s' - else - obj.kbout = string.format("%6.2f", out_diff/1024) .. ' kb/s' - end - local disp_str = '⥄ ' .. obj.kbout .. '\n⥂ ' .. obj.kbin - if obj.darkmode then - obj.disp_str = hs.styledtext.new(disp_str, {font={size=9.0, color={hex="#FFFFFF"}}}) - else - obj.disp_str = hs.styledtext.new(disp_str, {font={size=9.0, color={hex="#000000"}}}) - end - obj.menubar:setTitle(obj.disp_str) - obj.inseq = in_seq - obj.outseq = out_seq -end - ---- SpeedMenu:rescan() ---- Method ---- Redetect the active interface, darkmode …And redraw everything. ---- - -function obj:rescan() - obj.interface = hs.network.primaryInterfaces() - obj.darkmode = hs.osascript.applescript('tell application "System Events"\nreturn dark mode of appearance preferences\nend tell') - local menuitems_table = {} - if obj.interface then - -- Inspect active interface and create menuitems - local interface_detail = hs.network.interfaceDetails(obj.interface) - if interface_detail.AirPort then - local ssid = interface_detail.AirPort.SSID - table.insert(menuitems_table, { - title = "SSID: " .. ssid, - tooltip = "Copy SSID to clipboard", - fn = function() hs.pasteboard.setContents(ssid) end - }) - end - if interface_detail.IPv4 then - local ipv4 = interface_detail.IPv4.Addresses[1] - table.insert(menuitems_table, { - title = "IPv4: " .. ipv4, - tooltip = "Copy IPv4 to clipboard", - fn = function() hs.pasteboard.setContents(ipv4) end - }) - end - if interface_detail.IPv6 then - local ipv6 = interface_detail.IPv6.Addresses[1] - table.insert(menuitems_table, { - title = "IPv6: " .. ipv6, - tooltip = "Copy IPv6 to clipboard", - fn = function() hs.pasteboard.setContents(ipv6) end - }) - end - local macaddr = hs.execute('ifconfig ' .. obj.interface .. ' | grep ether | awk \'{print $2}\'') - table.insert(menuitems_table, { - title = "MAC Addr: " .. macaddr, - tooltip = "Copy MAC Address to clipboard", - fn = function() hs.pasteboard.setContents(macaddr) end - }) - -- Start watching the netspeed delta - obj.instr = 'netstat -ibn | grep -e ' .. obj.interface .. ' -m 1 | awk \'{print $7}\'' - obj.outstr = 'netstat -ibn | grep -e ' .. obj.interface .. ' -m 1 | awk \'{print $10}\'' - - obj.inseq = hs.execute(obj.instr) - obj.outseq = hs.execute(obj.outstr) - - if obj.timer then - obj.timer:stop() - obj.timer = nil - end - obj.timer = hs.timer.doEvery(1, data_diff) - end - table.insert(menuitems_table, { - title = "Rescan Network Interfaces", - fn = function() obj:rescan() end - }) - obj.menubar:setTitle("⚠︎") - obj.menubar:setMenu(menuitems_table) -end - -return obj diff --git a/hammerspoon/init.lua b/hammerspoon/init.lua deleted file mode 100644 index 3b38695..0000000 --- a/hammerspoon/init.lua +++ /dev/null @@ -1,156 +0,0 @@ -hs.loadSpoon("ReloadConfiguration") -spoon.ReloadConfiguration:start() - -hs.loadSpoon("SpeedMenu") - -spaces = require("hs._asm.undocumented.spaces") - --- apparently hs.eventtap.keyStroke doesn't always work, this is more reliable --- https://github.com/Hammerspoon/hammerspoon/issues/1984#issuecomment-455317739 -doKeyStroke = function(modifiers, character) - if type(modifiers) == 'table' then - local event = hs.eventtap.event - - for _, modifier in pairs(modifiers) do - event.newKeyEvent(modifier, true):post() - end - - event.newKeyEvent(character, true):post() - event.newKeyEvent(character, false):post() - - for i = #modifiers, 1, -1 do - event.newKeyEvent(modifiers[i], false):post() - end - end -end - -hs.hotkey.bind({"alt"}, "d", function() - hs.caffeinate.lockScreen() -end) - -hs.hotkey.bind({"alt"}, "f", function() - hs.window.focusedWindow():toggleFullScreen() -end) - -hs.hotkey.bind({"alt"}, "q", function() - hs.window.focusedWindow():close() -end) - -hs.hotkey.bind({"alt"}, "r", function() - doKeyStroke({"cmd"}, "space") -end) - -hs.hotkey.bind({"alt"}, "[", function() - doKeyStroke({"ctrl"}, "left") -end) - -hs.hotkey.bind({"alt"}, "]", function() - doKeyStroke({"ctrl"}, "right") -end) - -hs.hotkey.bind({"cmd"}, "u", function() - doKeyStroke({"cmd"}, "delete") -end) - -hs.hotkey.bind({"cmd"}, "a", function() - doKeyStroke({"cmd"}, "left") -end) - -hs.hotkey.bind({"cmd"}, "e", function() - doKeyStroke({"cmd"}, "right") -end) - -for i = 1, 6 do - hs.hotkey.bind({"alt"}, tostring(i), function() - id = spaces.layout()[spaces.mainScreenUUID()][i] - spaces.changeToSpace(id) - end) - hs.hotkey.bind({"alt", "shift"}, tostring(i), function() - id = spaces.layout()[spaces.mainScreenUUID()][i] - hs.window.focusedWindow():spacesMoveTo(id) - end) -end - -extra_bindings = { - ["Alacritty"] = hs.hotkey.modal.new(), - ["Google Chrome"] = hs.hotkey.modal.new(), -} - -slack_cmd_k_watcher = nil -extra_bindings["Alacritty"]:bind({"ctrl"}, "k", function() - slack_cmd_k_watcher = hs.application.watcher.new(function(name, event_type, app) - if event_type == hs.application.watcher.activated then - if app:name() == "Slack" then - hs.timer.doAfter(0.001, function() - doKeyStroke({"cmd"}, "k") - end) - slack_cmd_k_watcher:stop() - slack_cmd_k_watcher = nil - end - end - end) - slack_cmd_k_watcher:start() - hs.application.get("Slack"):mainWindow():focus() -end) - -extra_bindings["Google Chrome"]:bind({"cmd"}, "h", function() - doKeyStroke({"cmd"}, "left") -end) - -extra_bindings["Google Chrome"]:bind({"cmd"}, "l", function() - doKeyStroke({"cmd"}, "right") -end) - --- doesn't seem to work? --- extra_bindings["Google Chrome"]:bind({"cmd", "shift"}, "i", function() --- doKeyStroke({"cmd", "option"}, "i") --- end) - -current_app_name = nil - -function enter_bindings(name) - if extra_bindings[name] then - extra_bindings[name]:enter() - current_app_name = name - end -end - -function exit_bindings(name) - if extra_bindings[name] then - extra_bindings[name]:exit() - current_app_name = nil - end -end - --- the application watcher receives notifications about new apps being --- activated before the old apps are deactivated, so we can't rely on --- deactivated events. this should be fine because there should always be an --- active app (at the very least, Finder) -current_application_watcher = hs.application.watcher.new(function(name, event_type, app) - if event_type == hs.application.watcher.activated then - if current_app_name ~= app:name() then - exit_bindings(current_app_name) - enter_bindings(app:name()) - end - end -end) -enter_bindings(hs.application.frontmostApplication():name()) -current_application_watcher:start() - -cpu_usage_bar = hs.menubar.new() -cpu_timer = hs.timer.doEvery(1, function() - hs.host.cpuUsage(function(cpu) - local cpuUsage = cpu["overall"]["active"] - cpu_usage_bar:setTitle(math.floor(cpuUsage + 0.5) .. "%") - end) -end) - -power_usage_bar = hs.menubar.new() -power_timer = hs.timer.doEvery(5, function() - local watts = hs.execute("/Users/doy/.bin/st-doy2/power-usage") - power_usage_bar:setTitle(string.gsub(watts, "\n", "") .. "W") -end) - -hs.caffeinate.set("systemIdle", true, true) - -hs.alert("Hammerspoon config reloaded") diff --git a/hammerspoon/src/spaces b/hammerspoon/src/spaces deleted file mode 160000 index f48e7d7..0000000 --- a/hammerspoon/src/spaces +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f48e7d7487d2352099a9917429ffc93e6e5088bd diff --git a/mpdscribble/mpdscribble.conf.tmpl b/mpdscribble/mpdscribble.conf.tmpl deleted file mode 100644 index c216dfc..0000000 --- a/mpdscribble/mpdscribble.conf.tmpl +++ /dev/null @@ -1,7 +0,0 @@ -username = doyster -password = -verbose = 5 -log = - -cache = ~/.cache/mpd/mpdscribble.cache -musicdir = ~/media/audio/copy -host = localhost diff --git a/procmail/mark_as_read b/procmail/mark_as_read deleted file mode 100644 index bd853f8..0000000 --- a/procmail/mark_as_read +++ /dev/null @@ -1,20 +0,0 @@ -:0 -{ - :0c: - $folder - - :0 - * LASTFOLDER ?? /\/[^/]+$ - { tail=$MATCH } - - file_read_base="${folder}cur/${tail}" - file_new=$LASTFOLDER - # pretty hackish, but what can you do - file_cur="${file_read_base}*" - file_read="${file_read_base}:2,S" - TRAP="mv $file_new $file_read 2>/dev/null || mv $file_cur $file_read 2>/dev/null" - - HOST -} - -# vim:ft=procmail: diff --git a/procmailrc b/procmailrc deleted file mode 100644 index 658dfd4..0000000 --- a/procmailrc +++ /dev/null @@ -1,12 +0,0 @@ -# spam {{{ -:0 -* ^X-Spam-Flag: YES -{ - folder=$SPAM - SWITCHRC=$HOME/.procmail/mark_as_read -} -# }}} -# local {{{ -INCLUDERC=$PMDIR/local.rc -# }}} -# vim:ft=procmail:fdm=marker diff --git a/skhdrc b/skhdrc deleted file mode 100755 index 40eccb7..0000000 --- a/skhdrc +++ /dev/null @@ -1,22 +0,0 @@ -alt - h : yabai -m window --focus west -alt - j : yabai -m window --focus south -alt - k : yabai -m window --focus north -alt - l : yabai -m window --focus east - -shift + alt - h : yabai -m window --swap west -shift + alt - j : yabai -m window --swap south -shift + alt - k : yabai -m window --swap north -shift + alt - l : yabai -m window --swap east - -cmd + alt - h : yabai -m window --warp west -cmd + alt - j : yabai -m window --warp south -cmd + alt - k : yabai -m window --warp north -cmd + alt - l : yabai -m window --warp east - -cmd + alt - a : yabai -m space --balance -cmd + alt - s : yabai -m window --toggle split - -alt - space : yabai -m window --toggle float - -alt - b : open /Applications/Google\ Chrome.app --new --args --new-window about:home -alt - o : open -n /Applications/Alacritty.app/ diff --git a/yabairc b/yabairc deleted file mode 100755 index da2b5f4..0000000 --- a/yabairc +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env sh -set -eu - -yabai -m config focus_follows_mouse autofocus -yabai -m config window_topmost on -yabai -m config split_ratio 0.50 -yabai -m config auto_balance off -yabai -m config mouse_modifier fn -yabai -m config mouse_action1 move -yabai -m config mouse_action2 resize - -yabai -m config layout bsp -yabai -m config top_padding 2 -yabai -m config bottom_padding 2 -yabai -m config left_padding 2 -yabai -m config right_padding 2 -yabai -m config window_gap 2 - -echo "yabai configuration loaded.." -- cgit v1.2.3