Skip to content

Commit

Permalink
Add EasyMotion
Browse files Browse the repository at this point in the history
  • Loading branch information
mcwitt committed Jan 11, 2024
1 parent 106c454 commit fd0d51e
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions modules/nixos/home-manager/profiles/desktop/xmonad.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import Data.Ratio ((%))
import Graphics.X11.ExtraTypes.XF86
import XMonad
import XMonad.Actions.EasyMotion (selectWindow)
import XMonad.Actions.Minimize (maximizeWindowAndFocus, minimizeWindow, withLastMinimized, withMinimized)
import XMonad.Hooks.DynamicLog (PP (..), dynamicLogWithPP, shorten, wrap)
import XMonad.Hooks.EwmhDesktops (ewmh)
Expand Down Expand Up @@ -53,28 +54,29 @@
`additionalKeysP` [ ("M-j", focusDown),
("M-k", focusUp),
("M-m", focusMaster),
("M-o", selectWindow def >>= (`whenJust` windows . W.focusWindow)),
("M-\\", withFocused minimizeWindow),
("M-S-\\", withLastMinimized maximizeWindowAndFocus),
("M-x", sendMessage $ Toggle MIRROR),
("M-g", spawn "rofi -show-icons -show window"),
("M-p", spawn "rofi -show-icons -show drun"),
("M-S-p", spawn "rofi -show-icons -show run"),
("M-o", spawn "rofi-rbw --keybindings Ctrl-1:type:username:password,Ctrl-2:type:password,Ctrl-3:copy:password,Ctrl-4:type:totp"),
("M-0", spawn "rofi-rbw --keybindings Ctrl-1:type:username:password,Ctrl-2:type:password,Ctrl-3:copy:password,Ctrl-4:type:totp"),
("M-i", spawn "rofi -show ssh"),
("M-;", spawn "rofi -show emoji"),
("M-'", spawn "rofi -show calc -no-show-match -no-sort"),
("M-y", spawn "emacsclient -c -n -e '(switch-to-buffer nil)'"),
("M-u", spawn "chromium-browser"),
("M-s", spawn "dm-tool switch-to-greeter")
]
`additionalKeys` ( first (noModMask,)
<$> [ (xF86XK_MonBrightnessUp, spawn "xbacklight -inc 2"),
(xF86XK_MonBrightnessDown, spawn "xbacklight -dec 2"),
(xF86XK_AudioMute, spawn "amixer -q set Master toggle"),
(xF86XK_AudioLowerVolume, spawn "amixer -q set Master 2%-"),
(xF86XK_AudioRaiseVolume, spawn "amixer -q set Master 2%+")
]
)
`additionalKeys` ( first (noModMask,)
<$> [ (xF86XK_MonBrightnessUp, spawn "xbacklight -inc 2"),
(xF86XK_MonBrightnessDown, spawn "xbacklight -dec 2"),
(xF86XK_AudioMute, spawn "amixer -q set Master toggle"),
(xF86XK_AudioLowerVolume, spawn "amixer -q set Master 2%-"),
(xF86XK_AudioRaiseVolume, spawn "amixer -q set Master 2%+")
]
)
myLayoutHook =
diminish (spacingWithEdge 8)
Expand Down

0 comments on commit fd0d51e

Please sign in to comment.