#!/usr/bin/env bash ## Author : Aditya Shakya (adi1090x) ## Github : @adi1090x # ## Rofi : Launcher (Modi Drun, Run, File Browser, Window) # ## Available Styles # ## style-1 style-2 style-3 style-4 style-5 ## style-6 style-7 style-8 style-9 style-10 dir="$HOME/.config/rofi.custom/notifications" theme='style-4' dunstctl close-all ## Run while selected=$(~/.config/rofi.custom/notifications/dunst-json.sh | rofi \ -dmenu \ -sep '|' \ -p '' \ -kb-delete-entry "" \ -kb-remove-char-forward "" \ -kb-custom-1 "Delete" \ -kb-custom-2 "Shift+Delete" \ -theme ${dir}/${theme}.rasi) status=$? if [[ "$status" == 10 && "$selected" != "" ]]; then dunstctl history-rm $(echo $selected | sed -r 's/^([0-9]+): .*/\1/') elif [[ "$status" == 11 ]]; then dunstctl history-clear fi [[ "$status" == 10 ]] do :; done