aboutsummaryrefslogtreecommitdiff
path: root/config/fish/config.fish
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-10-05 00:24:10 +0200
committerWilliam Hergès <william@herges.fr>2025-10-05 00:24:10 +0200
commit287a44b97ef5e5211ba12ecea0881520e316079e (patch)
treec4aebe796cdb59bac1a8690dcc065ce13c15728c /config/fish/config.fish
parent6451c946c9e25d430cb8062d7009b151d9eb5151 (diff)
feat(fish): ask which wm starts
Diffstat (limited to 'config/fish/config.fish')
-rw-r--r--config/fish/config.fish28
1 files changed, 27 insertions, 1 deletions
diff --git a/config/fish/config.fish b/config/fish/config.fish
index f335a9e..663b11d 100644
--- a/config/fish/config.fish
+++ b/config/fish/config.fish
@@ -1,7 +1,30 @@
+function start_wm
+ echo "Quel WM lancer ?"
+ echo "- 0 TTY"
+ echo "- 1 Sway"
+ echo "- 2 niri"
+ while read --nchars 1 -l response
+ or return 1 # if the read was aborted with ctrl-c/ctrl-d
+ switch $response
+ case 0
+ break
+ case 1
+ dbus-run-session -- sway
+ break
+ case 2
+ dbus-run-session -- niri --session
+ break
+ case '*'
+ echo Invalid input
+ continue
+ end
+ end
+end
+
if status is-interactive
# Commands to run in interactive sessions can go here
if tty | string match "/dev/tty1"
- $HOME/start
+ start_wm
end
end
@@ -10,5 +33,8 @@ set --export BUN_INSTALL "$HOME/.bun"
set --export GOPATH "$HOME/go"
set --export PATH $BUN_INSTALL/bin $GOPATH/bin $HOME/.local/bin $PATH
+# void
+set --export XBPS_DISTDIR "$HOME/.void-packages"
+
# gpg
export GPG_TTY=$(tty)