From bf8082002534ef948abda0bd12a30d3e6973f32b Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 8 Aug 2024 10:37:28 +0200 Subject: fish: wayland/x11 aware wl-copy/xsel --- .config/fish/functions/sessiontype.fish | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .config/fish/functions/sessiontype.fish (limited to '.config/fish/functions') 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 @@ +# https://unix.stackexchange.com/questions/202891/how-to-know-whether-wayland-or-x11-is-being-used/371164#comment573431_325972 + +function sessiontype + # https://unix.stackexchange.com/questions/202891/how-to-know-whether-wayland-or-x11-is-being-used/371164#comment573431_325972 + # have to run it first? + loginctl > /dev/null + loginctl show-session (loginctl | awk '/tty/ {print $1}') -p Type | awk -F= '{print $2}' +end -- cgit v1.2.3-70-g09d2