summaryrefslogtreecommitdiffstats
path: root/.config/fish/functions
diff options
context:
space:
mode:
Diffstat (limited to '.config/fish/functions')
-rw-r--r--.config/fish/functions/sessiontype.fish8
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/fish/functions/sessiontype.fish b/.config/fish/functions/sessiontype.fish
new file mode 100644
index 0000000..33830ca
--- /dev/null
+++ b/.config/fish/functions/sessiontype.fish
@@ -0,0 +1,8 @@
1# https://unix.stackexchange.com/questions/202891/how-to-know-whether-wayland-or-x11-is-being-used/371164#comment573431_325972
2
3function sessiontype
4 # https://unix.stackexchange.com/questions/202891/how-to-know-whether-wayland-or-x11-is-being-used/371164#comment573431_325972
5 # have to run it first?
6 loginctl > /dev/null
7 loginctl show-session (loginctl | awk '/tty/ {print $1}') -p Type | awk -F= '{print $2}'
8end