aboutsummaryrefslogtreecommitdiff
path: root/conf.d/05gui.fish
diff options
context:
space:
mode:
authorDeposite Pirate2025-10-04 21:23:21 +0200
committerDeposite Pirate2025-10-04 21:23:21 +0200
commit0e5db78149230f467e0bde810a45baba3de1209f (patch)
tree36d5fc9404775d175d8e6ac804aaaff1f0306c44 /conf.d/05gui.fish
parent70eeab33fbc6a91c0e73ffee3eb7d2899532a8e9 (diff)
Add aliases for desktop notifications
modified: conf.d/05gui.fish
Diffstat (limited to 'conf.d/05gui.fish')
-rw-r--r--conf.d/05gui.fish21
1 files changed, 12 insertions, 9 deletions
diff --git a/conf.d/05gui.fish b/conf.d/05gui.fish
index de14a01..ff03cc7 100644
--- a/conf.d/05gui.fish
+++ b/conf.d/05gui.fish
@@ -1,14 +1,17 @@
if status is-interactive; and not fish_is_root_user
-if set -q DISPLAY; and command -q xclip
- alias ccpy 'xclip -i -selection clipboard'
- alias cpst 'xclip -o -selection clipboard'
-else if set -q WAYLAND_DISPLAY; and command -q wl-copy; and command -q wl-paste
- alias ccpy 'wl-copy'
- alias cpst 'wl-paste'
-else if test (uname) = 'Darwin'; and command -q pbcopy; and command -q pbpaste
- alias ccpy 'pbcopy'
- alias cpst 'pbpaste'
+if set -q DISPLAY
+ alias_if xclip ccpy -i -selection clipboard
+ alias_if xclip cpst -o -selection clipboard
+ alias_if notify-send notify
+else if set -q WAYLAND_DISPLAY
+ alias_if wl-copy ccpy
+ alias_if wl-paste cpst
+ alias_if notify notify-send
+else if test (uname) = 'Darwin'
+ alias_if pbcopy ccpy
+ alias_if pbpaste cpst
+ alias_if osascript notify -e
end
end