From f46b0962be687a8b51dcf913885f10dbdfb1bdc3 Mon Sep 17 00:00:00 2001 From: Tristan Date: Mon, 24 Apr 2023 12:25:30 +0100 Subject: [PATCH] open code shortcut --- system/global/home.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/global/home.nix b/system/global/home.nix index 369740f..940bd1d 100644 --- a/system/global/home.nix +++ b/system/global/home.nix @@ -53,6 +53,11 @@ let light -A 10 ${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-up -t 1000 ''); + + open-code = (pkgs.writeShellScriptBin "open-code" '' + code_dir=~/Documents/code + ls $code_dir/ | ${my-deps.menu} | ${my-deps.xargs} -I_ code $code_dir/_ + ''); }; lf-sixel = pkgs.callPackage ../../custom/lf-sixel/. { }; @@ -153,6 +158,7 @@ in bind = SUPER, M, exec, ${ my-deps.terminal } -e ncmpcpp bind = SUPER, E, exec, ${ my-deps.terminal } -e neomutt bind = SUPER, O, exec, pcmanfm + bind = SUPER, C, exec, ${ my-scripts.open-code }/bin/open-code bind = SUPER, h, movefocus,l bind = SUPER, l, movefocus,r