From afd1476f938898b20b7069d0dde16f697cc04cea Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Mon, 13 Nov 2023 13:37:27 +0100 Subject: [PATCH] Add -replace to all rofi launchers --- hypr/scripts/keybindings.sh | 2 +- hypr/scripts/screenshot.sh | 2 +- hypr/scripts/wallpaper.sh | 2 +- qtile/scripts/powermenu.sh | 2 +- qtile/scripts/wayland/screenshot.sh | 2 +- qtile/scripts/wayland/wallpaper.sh | 2 +- qtile/scripts/x11/screenshot.sh | 2 +- qtile/scripts/x11/wallpaper.sh | 2 +- scripts/cliphist.sh | 4 ++-- waybar/modules.json | 2 +- waybar/themeswitcher.sh | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hypr/scripts/keybindings.sh b/hypr/scripts/keybindings.sh index 4b3e438..af7c7a7 100755 --- a/hypr/scripts/keybindings.sh +++ b/hypr/scripts/keybindings.sh @@ -22,4 +22,4 @@ keybinds=$(echo "$keybinds" | sed 's/$mainMod/SUPER/g'| sed 's/,\([^,]*\)$/ = \ # ----------------------------------------------------- # Show keybindings in rofi # ----------------------------------------------------- -rofi -dmenu -p "Keybinds" -config ~/dotfiles/rofi/config-compact.rasi <<< "$keybinds" \ No newline at end of file +rofi -dmenu -replace -p "Keybinds" -config ~/dotfiles/rofi/config-compact.rasi <<< "$keybinds" \ No newline at end of file diff --git a/hypr/scripts/screenshot.sh b/hypr/scripts/screenshot.sh index 3231d6c..5e617ad 100755 --- a/hypr/scripts/screenshot.sh +++ b/hypr/scripts/screenshot.sh @@ -17,7 +17,7 @@ option3="Fullscreen (delay 3 sec)" options="$option2\n$option3" -choice=$(echo -e "$options" | rofi -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -i -no-show-icons -l 2 -width 30 -p "Take Screenshot") +choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-screenshot.rasi -i -no-show-icons -l 2 -width 30 -p "Take Screenshot") case $choice in $option2) diff --git a/hypr/scripts/wallpaper.sh b/hypr/scripts/wallpaper.sh index e115bc1..316b726 100755 --- a/hypr/scripts/wallpaper.sh +++ b/hypr/scripts/wallpaper.sh @@ -22,7 +22,7 @@ case $1 in # Select wallpaper with rofi "select") - selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi) + selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-wallpaper.rasi) if [ ! "$selected" ]; then echo "No wallpaper selected" exit diff --git a/qtile/scripts/powermenu.sh b/qtile/scripts/powermenu.sh index 9177ea2..ca23ffb 100755 --- a/qtile/scripts/powermenu.sh +++ b/qtile/scripts/powermenu.sh @@ -25,7 +25,7 @@ options="$option1\n" options="$options$option2\n" options="$options$option3\n$option4" -choice=$(echo -e "$options" | rofi -dmenu -config ~/dotfiles/rofi/config-power.rasi -i -no-show-icons -l 4 -width 30 -p "Powermenu") +choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-power.rasi -i -no-show-icons -l 4 -width 30 -p "Powermenu") case $choice in $option1) diff --git a/qtile/scripts/wayland/screenshot.sh b/qtile/scripts/wayland/screenshot.sh index 3231d6c..5e617ad 100755 --- a/qtile/scripts/wayland/screenshot.sh +++ b/qtile/scripts/wayland/screenshot.sh @@ -17,7 +17,7 @@ option3="Fullscreen (delay 3 sec)" options="$option2\n$option3" -choice=$(echo -e "$options" | rofi -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -i -no-show-icons -l 2 -width 30 -p "Take Screenshot") +choice=$(echo -e "$options" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-screenshot.rasi -i -no-show-icons -l 2 -width 30 -p "Take Screenshot") case $choice in $option2) diff --git a/qtile/scripts/wayland/wallpaper.sh b/qtile/scripts/wayland/wallpaper.sh index 23783ad..8489f72 100755 --- a/qtile/scripts/wayland/wallpaper.sh +++ b/qtile/scripts/wayland/wallpaper.sh @@ -22,7 +22,7 @@ case $1 in # Select wallpaper with rofi "select") - selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi) + selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-wallpaper.rasi) if [ ! "$selected" ]; then echo "No wallpaper selected" exit diff --git a/qtile/scripts/x11/screenshot.sh b/qtile/scripts/x11/screenshot.sh index 37f7e6a..71bc9bb 100755 --- a/qtile/scripts/x11/screenshot.sh +++ b/qtile/scripts/x11/screenshot.sh @@ -18,7 +18,7 @@ option3="Fullscreen (delay 3 sec)" options="$option2\n$option3\n$option1" -choice=$(echo -e "$options" | rofi -i -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -width 30 -l 3 -p "Take Screenshot") +choice=$(echo -e "$options" | rofi -i -dmenu -replace -config ~/dotfiles/rofi/config-screenshot.rasi -width 30 -l 3 -p "Take Screenshot") case $choice in $option1) diff --git a/qtile/scripts/x11/wallpaper.sh b/qtile/scripts/x11/wallpaper.sh index 32c9f7c..a0144a2 100755 --- a/qtile/scripts/x11/wallpaper.sh +++ b/qtile/scripts/x11/wallpaper.sh @@ -22,7 +22,7 @@ case $1 in # Select wallpaper with rofi "select") - selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi) + selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-wallpaper.rasi) if [ ! "$selected" ]; then echo "No wallpaper selected" exit diff --git a/scripts/cliphist.sh b/scripts/cliphist.sh index 1a40ec9..341e7ff 100755 --- a/scripts/cliphist.sh +++ b/scripts/cliphist.sh @@ -10,7 +10,7 @@ # ----------------------------------------------------- case $1 in - d) cliphist list | rofi -dmenu -config ~/dotfiles/rofi/config-cliphist.rasi | cliphist delete + d) cliphist list | rofi -dmenu -replace -config ~/dotfiles/rofi/config-cliphist.rasi | cliphist delete ;; w) if [ `echo -e "Clear\nCancel" | rofi -dmenu -config ~/dotfiles/rofi/config-short.rasi` == "Clear" ] ; then @@ -18,6 +18,6 @@ case $1 in fi ;; - *) cliphist list | rofi -dmenu -config ~/dotfiles/rofi/config-cliphist.rasi | cliphist decode | wl-copy + *) cliphist list | rofi -dmenu -replace -config ~/dotfiles/rofi/config-cliphist.rasi | cliphist decode | wl-copy ;; esac diff --git a/waybar/modules.json b/waybar/modules.json index 1cf8486..f724c90 100644 --- a/waybar/modules.json +++ b/waybar/modules.json @@ -167,7 +167,7 @@ // Rofi Application Launcher "custom/appmenu": { "format": "Apps", - "on-click": "rofi -show drun", + "on-click": "rofi -show drun -replace", "on-click-right": "~/dotfiles/hypr/scripts/keybindings.sh", "tooltip": false }, diff --git a/waybar/themeswitcher.sh b/waybar/themeswitcher.sh index 401194b..60d0352 100755 --- a/waybar/themeswitcher.sh +++ b/waybar/themeswitcher.sh @@ -44,7 +44,7 @@ done # Show rofi dialog # ----------------------------------------------------- listNames=${listNames::-2} -choice=$(echo -e "$listNames" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi -no-show-icons -width 30 -p "Themes" -format i) +choice=$(echo -e "$listNames" | rofi -dmenu -replace -config ~/dotfiles/rofi/config-wallpaper.rasi -no-show-icons -width 30 -p "Themes" -format i) # ----------------------------------------------------- # Set new theme by writing the theme information to ~/.cache/.themestyle.sh