notification: change redundant hardcoded mako

This commit is contained in:
FollieHiyuki 2021-02-26 03:52:18 +03:00
parent 57a1938531
commit 439829da61
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
5 changed files with 31 additions and 9 deletions

View File

@ -87,6 +87,7 @@ cp -rfv ./home/.local/share/fonts/ ~/.local/share/fonts/
# Scripts
cp -rfv ./home/.local/bin/ ~/.local/bin/
# The bloated dotfiles itself
cp -rfv ./home/.rtorrent.rc ~/.rtorrent.rc
cp -rfv ./home/.config/alacritty/ ~/.config/alacritty/
cp -rfv ./home/.config/amfora/ ~/.config/amfora/
cp -rfv ./home/.config/anime-downloader/ ~/.config/anime-downloader/

View File

@ -12,7 +12,7 @@
"file_format": "{anime_title}/{anime_title}_{ep_no}",
"force_download": false,
"player": "mpv",
"provider": "4anime",
"provider": "anime8",
"quality": "1080p",
"skip_download": false,
"url": false
@ -120,7 +120,7 @@
"360p"
],
"log_level": "INFO",
"provider": "4anime",
"provider": "anime8",
"quality": "1080p"
}
}

View File

@ -3,6 +3,13 @@
MUSIC_DIR=$HOME/Music/
COVER=/tmp/cover.jpg
if command -v mako >/dev/null
then
notification=mako
else
notification=dunst
fi
{
file="$(mpc --format %file% current -p 6600)"
album_dir="${file%/*}"
@ -20,6 +27,6 @@ COVER=/tmp/cover.jpg
notify-send -u low -i ${COVER} " Now Playing" "$(mpc --format '%title% \n%artist% - %album%' current)"
fi
else
notify-send -u low -i $HOME/.config/dunst/headphones.png " Now Playing" "$(mpc --format '%title% \n%artist% - %album%' current)"
notify-send -u low -i $HOME/.config/${notification}/headphones.png " Now Playing" "$(mpc --format '%title% \n%artist% - %album%' current)"
fi
} &

View File

@ -1,5 +1,12 @@
#!/bin/sh
if command -v mako >/dev/null
then
notification=mako
else
notification=dunst
fi
case $1 in
--wofi)
clipman pick --tool wofi -T'-p "Clipboard " -i -O default'
@ -11,7 +18,7 @@ case $1 in
clipman pick --tool fzf -T'--no-multi -e'
;;
--clear)
clipman clear --all && notify-send -i $HOME/.config/mako/clipboard.png "Clipboard cleared"
clipman clear --all && notify-send -i $HOME/.config/${notification}/clipboard.png "Clipboard cleared"
;;
*)
;;

View File

@ -3,15 +3,22 @@
mkdir -p ~/Screenshots
SAVEPATH="$HOME/Screenshots/$(date +'%Y-%m-%d-%H%M%S_grim.png')"
if command -v mako >/dev/null
then
notification=mako
else
notification=dunst
fi
case $1 in
--full)
grim "${SAVEPATH}"
notify-send -i $HOME/.config/mako/photograph.png "Screenshot taken..."
notify-send -i $HOME/.config/${notification}/photograph.png "Screenshot taken..."
;;
--region)
GEOMETRY=$(slurp)
grim -g "${GEOMETRY}" "${SAVEPATH}"
notify-send -i $HOME/.config/mako/photograph.png "Screenshot taken..."
notify-send -i $HOME/.config/${notification}/photograph.png "Screenshot taken..."
;;
--full-optional)
grim - | swappy -f -
@ -22,12 +29,12 @@ case $1 in
;;
--full-copy)
grim - | wl-copy
notify-send -i $HOME/.config/mako/photograph.png "Screenshot copied..."
notify-send -i $HOME/.config/${notification}/photograph.png "Screenshot copied..."
;;
--region-copy)
GEOMETRY=$(slurp)
grim -g "${GEOMETRY}" - | wl-copy
notify-send -i $HOME/.config/mako/photograph.png "Screenshot copied..."
notify-send -i $HOME/.config/${notification}/photograph.png "Screenshot copied..."
;;
*)
;;