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"; chafa = "${pkgs.chafa}/bin/chafa";
exiftool = "${pkgs.exiftool}/bin/exiftool"; exiftool = "${pkgs.exiftool}/bin/exiftool";
wc = "${pkgs.coreutils}/bin/wc"; wc = "${pkgs.coreutils}/bin/wc";
jq = "${pkgs.jq}/bin/jq";
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
xargs = "${pkgs.findutils}/bin/xargs"; xargs = "${pkgs.findutils}/bin/xargs";
menu = "${pkgs.wofi}/bin/wofi --dmenu"; menu = "${pkgs.wofi}/bin/wofi --dmenu";
fileman = "${pkgs.pcmanfm}/bin/pcmanfm"; fileman = "${pkgs.pcmanfm}/bin/pcmanfm";
@ -71,6 +73,13 @@ let
*) [ -e "$repo" ] && my-editor $repo ;; *) [ -e "$repo" ] && my-editor $repo ;;
esac 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/. { }; lf-sixel = pkgs.callPackage ../../custom/lf-sixel/. { };
@ -177,6 +186,7 @@ in
bind = SUPER, M, exec, ${ my-deps.terminal } -e ncmpcpp bind = SUPER, M, exec, ${ my-deps.terminal } -e ncmpcpp
bind = SUPER, O, exec, pcmanfm bind = SUPER, O, exec, pcmanfm
bind = SUPER, C, exec, ${ my-scripts.open-code }/bin/open-code 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, 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, EQUAL, exec, hyprctl keyword misc:cursor_zoom_factor 2
bind = SUPER, MINUS, exec, hyprctl keyword misc:cursor_zoom_factor 1 bind = SUPER, MINUS, exec, hyprctl keyword misc:cursor_zoom_factor 1

View file

@ -1,6 +1,6 @@
# https://search.nixos.org/options # https://search.nixos.org/options
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
networking.hostName = "zenix"; networking.hostName = "zenix";
@ -23,5 +23,18 @@
}; };
}; };
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
# gamer time
"steam"
"steam-run"
"steam-original"
];
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
} }