aboutsummaryrefslogtreecommitdiff
path: root/home/shell/fish/login.fish
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-02-20 19:08:57 -0800
committerFranck Cuny <franck@fcuny.net>2023-02-21 12:59:08 -0800
commit1fe21928c76b04775f40b49b74ba91ebec1be40e (patch)
tree063e1ede6fa4c7ed84e51b20164aae13b2e38da0 /home/shell/fish/login.fish
parentfeat(home/pass): add passage (diff)
downloadinfra-1fe21928c76b04775f40b49b74ba91ebec1be40e.tar.gz
feat(home/fish): move fish's code to external files
It's easier to edit / debug / test the code that way. This also add a new function (`find-ssh-agent') to find or start a new ssh agent when a shell is started.
Diffstat (limited to '')
-rw-r--r--home/shell/fish/login.fish10
1 files changed, 10 insertions, 0 deletions
diff --git a/home/shell/fish/login.fish b/home/shell/fish/login.fish
new file mode 100644
index 0000000..8f29553
--- /dev/null
+++ b/home/shell/fish/login.fish
@@ -0,0 +1,10 @@
+# disable greeting
+set -U fish_greeting ''
+
+# set up ssh-agent
+find-ssh-agent
+
+# start sway
+if test -z "$DISPLAY"; and test (tty) = "/dev/tty1"
+ exec sway
+end