about summary refs log tree commit diff
path: root/home/shell
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-03-31 16:55:42 -0700
committerFranck Cuny <franck@fcuny.net>2023-03-31 16:55:42 -0700
commitab0ef5c987b7f179725032d920ac75b66aa194e1 (patch)
treedacf7b6c1d4a06728e3e7a4cbbc8bea68f2bf131 /home/shell
parentmodules/sendsms: gate the unit with a file (diff)
downloadworld-ab0ef5c987b7f179725032d920ac75b66aa194e1.tar.gz
home/sway: start sway and ssh-agent properly
I only need to run sway and the ssh-agent on a workstation (desktop or
laptop). Start these two processes when the window manager starts.
Diffstat (limited to 'home/shell')
-rw-r--r--home/shell/zsh/default.nix8
-rw-r--r--home/shell/zsh/ssh-agent.zsh3
-rw-r--r--home/shell/zsh/sway.zsh3
3 files changed, 0 insertions, 14 deletions
diff --git a/home/shell/zsh/default.nix b/home/shell/zsh/default.nix
index 6bf11ab..3734fc3 100644
--- a/home/shell/zsh/default.nix
+++ b/home/shell/zsh/default.nix
@@ -36,15 +36,7 @@ in
 
       defaultKeymap = "emacs";
 
-      # the order matters for sway.zsh: I want to load it first
-      # to start the session if I log on a machine where it's
-      # available.
-      # it can't be loaded with `initExtraFirst` because the session
-      # variables from home-manager are not set yet otherwise (and I
-      # need them for things like firefox or emacs).
       initExtra = lib.concatMapStrings builtins.readFile [
-        ./ssh-agent.zsh
-        ./sway.zsh
         ./completion-style.zsh
         ./options.zsh
         ./prompt.zsh
diff --git a/home/shell/zsh/ssh-agent.zsh b/home/shell/zsh/ssh-agent.zsh
deleted file mode 100644
index 1e5d81c..0000000
--- a/home/shell/zsh/ssh-agent.zsh
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ $(ps ax | grep "[s]sh-agent" | wc -l) -eq 0 ] ; then
-  eval $(ssh-agent -s -a ${XDG_RUNTIME_DIR}/ssh-agent.sock) > /dev/null
-fi
diff --git a/home/shell/zsh/sway.zsh b/home/shell/zsh/sway.zsh
deleted file mode 100644
index 69d5103..0000000
--- a/home/shell/zsh/sway.zsh
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
-    exec sway
-fi