home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4a82372b0402a995c76268d6eb76a3cbdace7e74
parent 230b103e941e713f7e42783615b863977fdebb6f
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Thu,  7 Oct 2021 18:43:57 +0200

users/vincent: add emacs-in-folder script

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Musers/vincent/desktop/i3.nix | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/users/vincent/desktop/i3.nix b/users/vincent/desktop/i3.nix @@ -4,7 +4,7 @@ with lib; let # FIXME(change this at some point) powermenu = pkgs.writeScript "powermenu.sh" '' - #!${pkgs.stdenv.shell} + #!/usr/bin/env bash MENU="$(${pkgs.rofi}/bin/rofi -sep "|" -dmenu -i -p 'System' -location 3 -xoffset -10 -yoffset 32 -width 20 -hide-scrollbar -line-padding 4 -padding 20 -lines 5 <<< "Suspend|Hibernate|Reboot|Shutdown")" case "$MENU" in *Suspend) systemctl suspend;; @@ -13,6 +13,10 @@ let *Shutdown) systemctl -i poweroff esac ''; + emacs-in-folder = pkgs.writeScript "emacs-in-folder" '' + #!/usr/bin/env bash + fd . -d 3 --type d ~/src | rofi -dmenu | xargs -I {} zsh -i -c "cd {}; emacs ." + ''; lockCommand = "${pkgs.betterlockscreen}/bin/betterlockscreen -l dim"; in { @@ -186,6 +190,7 @@ in "Mod4+Return" = "exec alacritty"; "Mod4+Shift+Return" = "exec emacsclient -c"; "Mod4+Control+Return" = "exec emacs"; + "Mod4+Control+Shift+Return" = "exec ${emacs-in-folder}"; }; gaps = { inner = 0;