window switcher

This commit is contained in:
tristan 2023-05-04 15:11:15 +01:00
parent 1c65490076
commit 3c1a415953
2 changed files with 24 additions and 1 deletions

View file

@ -12,6 +12,8 @@ let
chafa = "${pkgs.chafa}/bin/chafa";
exiftool = "${pkgs.exiftool}/bin/exiftool";
wc = "${pkgs.coreutils}/bin/wc";
jq = "${pkgs.jq}/bin/jq";
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
xargs = "${pkgs.findutils}/bin/xargs";
menu = "${pkgs.wofi}/bin/wofi --dmenu";
fileman = "${pkgs.pcmanfm}/bin/pcmanfm";
@ -71,6 +73,13 @@ let
*) [ -e "$repo" ] && my-editor $repo ;;
esac
'');
switch-window = (pkgs.writeShellScriptBin "switch-window" ''
${my-deps.hyprctl} clients -j | \
${my-deps.jq} '.[] | .title' -r | \
${my-deps.menu} | \
${my-deps.xargs} -I_ ${my-deps.hyprctl} dispatch focuswindow title:"_"
'');
};
lf-sixel = pkgs.callPackage ../../custom/lf-sixel/. { };
@ -177,6 +186,7 @@ in
bind = SUPER, M, exec, ${ my-deps.terminal } -e ncmpcpp
bind = SUPER, O, exec, pcmanfm
bind = SUPER, C, exec, ${ my-scripts.open-code }/bin/open-code
bind = SUPER, TAB, exec, ${ my-scripts.switch-window }/bin/switch-window
bind = SUPER, G, exec, ${ pkgs.hyprpicker }/bin/hyprpicker | wl-copy && notify-send "Copied Colour" "$(wl-paste)"
bind = SUPER, EQUAL, exec, hyprctl keyword misc:cursor_zoom_factor 2
bind = SUPER, MINUS, exec, hyprctl keyword misc:cursor_zoom_factor 1