diff --git a/config/sxhkd/sxhkdrc b/config/sxhkd/sxhkdrc index 8bbfe504..930d09cd 100644 --- a/config/sxhkd/sxhkdrc +++ b/config/sxhkd/sxhkdrc @@ -32,19 +32,19 @@ super + e emacsclient --eval "(emacs-everywhere)" super + space - $DOTFILES/bin/rofi/appmenu + $DOTFILES_BIN/rofi/appmenu super + Tab - $DOTFILES/bin/rofi/windowmenu + $DOTFILES_BIN/rofi/windowmenu super + p - $DOTFILES/bin/rofi/bwmenu + $DOTFILES_BIN/rofi/bwmenu super + shift + p - $DOTFILES/bin/rofi/bwmenu -r + $DOTFILES_BIN/rofi/bwmenu -r super + slash - $DOTFILES/bin/rofi/filemenu -x + $DOTFILES_BIN/rofi/filemenu -x super + Escape pkill -USR1 -x sxhkd @@ -59,11 +59,10 @@ super + {_,ctrl + }f super + {_,ctrl +}{h,j,k,l} - $DOTFILES/bin/bspwm/focus {_,-m }{west,south,north,east} + $DOTFILES_BIN/bspwm/focus {_,-m }{west,south,north,east} super + shift + {_,ctrl +}{h,j,k,l} - $DOTFILES/bin/bspwm/swap {_,-m }{west,south,north,east} - + $DOTFILES_BIN/bspwm/swap {_,-m }{west,south,north,east} ## Resize by preselection super + alt + {1-9} diff --git a/default.nix b/default.nix index 053e41b8..af2d6694 100644 --- a/default.nix +++ b/default.nix @@ -11,7 +11,11 @@ with lib.my; # Common config for all nixos machines; and to ensure the flake operates # soundly - environment.variables.DOTFILES = dotFilesDir; + environment.variables.DOTFILES = findFirst pathExists dotFilesDir [ + "${config.user.home}/.config/dotfiles" + "/etc/dotfiles" + ]; + environment.variables.DOTFILES_BIN = "$DOTFILES/bin"; # Configure nix and nixpkgs environment.variables.NIXPKGS_ALLOW_UNFREE = "1"; diff --git a/modules/desktop/apps/rofi.nix b/modules/desktop/apps/rofi.nix index 8f26efe0..dade0e96 100644 --- a/modules/desktop/apps/rofi.nix +++ b/modules/desktop/apps/rofi.nix @@ -37,32 +37,32 @@ in { name = "rofi-browsermenu"; desktopName = "Open Bookmark in Browser"; icon = "bookmark-new-symbolic"; - exec = "${binDir}/rofi/browsermenu"; + exec = "$DOTFILES_BIN/rofi/browsermenu"; }) (makeDesktopItem { name = "rofi-browsermenu-history"; desktopName = "Open Browser History"; icon = "accessories-clock"; - exec = "${binDir}/rofi/browsermenu history"; + exec = "$DOTFILES_BIN/rofi/browsermenu history"; }) (makeDesktopItem { name = "rofi-filemenu"; desktopName = "Open Directory in Terminal"; icon = "folder"; - exec = "${binDir}/rofi/filemenu"; + exec = "$DOTFILES_BIN/rofi/filemenu"; }) (makeDesktopItem { name = "rofi-filemenu-scratch"; desktopName = "Open Directory in Scratch Terminal"; icon = "folder"; - exec = "${binDir}/rofi/filemenu -x"; + exec = "$DOTFILES_BIN/rofi/filemenu -x"; }) (makeDesktopItem { name = "lock-display"; desktopName = "Lock screen"; icon = "system-lock-screen"; - exec = "${binDir}/zzz"; + exec = "$DOTFILES_BIN/zzz"; }) ]; }; diff --git a/modules/options.nix b/modules/options.nix index 5193de2e..2688742f 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -72,7 +72,7 @@ with lib.my; # must already begin with pre-existing PATH. Also, can't use binDir here, # because it contains a nix store path. - env.PATH = [ "$XDG_CONFIG_HOME/dotfiles/bin" "$XDG_BIN_HOME" "$PATH" ]; + env.PATH = [ "$DOTFILES_BIN" "$XDG_BIN_HOME" "$PATH" ]; environment.extraInit = concatStringsSep "\n"