diff options
author | Yigit Sever | 2024-08-08 10:37:28 +0200 |
---|---|---|
committer | Yigit Sever | 2024-08-08 10:37:28 +0200 |
commit | bf8082002534ef948abda0bd12a30d3e6973f32b (patch) | |
tree | 30979d92981bc2d62763967f9cc9453ec1ebaa1b /.config/fish/functions | |
parent | 2cd5db254b7bf500828c84cd1d00dbf77fed5a0d (diff) | |
download | dotfiles-bf8082002534ef948abda0bd12a30d3e6973f32b.tar.gz dotfiles-bf8082002534ef948abda0bd12a30d3e6973f32b.tar.bz2 dotfiles-bf8082002534ef948abda0bd12a30d3e6973f32b.zip |
fish: wayland/x11 aware wl-copy/xsel
Diffstat (limited to '.config/fish/functions')
-rw-r--r-- | .config/fish/functions/sessiontype.fish | 8 |
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 | |||
3 | function 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}' | ||
8 | end | ||