diff --git a/dotfiles/config/xmonad/xmonad.hs b/dotfiles/config/xmonad/xmonad.hs index eb85c0fd..620d59d2 100644 --- a/dotfiles/config/xmonad/xmonad.hs +++ b/dotfiles/config/xmonad/xmonad.hs @@ -1097,6 +1097,7 @@ addKeys conf@XConfig { modMask = modm } = , ((hyper, xK_r), spawn "rofi-systemd") , ((hyper, xK_9), spawn "start_synergy.sh") , ((hyper, xK_slash), spawn "toggle_taffybar") + , ((hyper, xK_backslash), spawn "$HOME/dotfiles/dotfiles/lib/functions/mpg341cx_input toggle") , ((hyper, xK_space), spawn "skippy-xd") , ((hyper, xK_i), spawn "rofi_select_input.hs") , ((hyper, xK_o), spawn "rofi_paswitch") diff --git a/dotfiles/hammerspoon/init.lua b/dotfiles/hammerspoon/init.lua index b1e91e63..13695692 100644 --- a/dotfiles/hammerspoon/init.lua +++ b/dotfiles/hammerspoon/init.lua @@ -240,6 +240,17 @@ local function toggleAutoColumns() end end +local function toggleMonitorInput() + hs.task.new("/bin/zsh", function(exitCode) + if exitCode ~= 0 then + notify("Monitor input toggle failed") + end + end, { + "-lc", + "export PATH=\"$HOME/.nix-profile/bin:/run/current-system/sw/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH\"; \"$HOME/dotfiles/dotfiles/lib/functions/mpg341cx_input\" toggle", + }):start() +end + wf:subscribe({ hs.window.filter.windowCreated, hs.window.filter.windowDestroyed, @@ -252,6 +263,7 @@ wf:subscribe({ hs.hotkey.bind(hyper, "c", tileFocusedScreen) hs.hotkey.bind(hyper, "v", toggleAutoColumns) +hs.hotkey.bind(hyper, "\\", toggleMonitorInput) hs.hotkey.bind(hyper, "a", function() focusWindow("left") @@ -358,6 +370,7 @@ end) bindRgui("c", tileFocusedScreen) bindRgui("v", toggleAutoColumns) +bindRgui("\\", toggleMonitorInput) bindRgui("m", function() placeFocused(1, 1, 1)