From 39ba3c402f2e86c3d7296fe6925f1bd896d0959e Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 9 May 2024 13:50:51 +0900 Subject: Wallpaper Select and Auto wallpaper change Script updated to be able to set wallpaper on focused monitor only. NOTE: you need awk --- config/hypr/scripts/PywalSwww.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/PywalSwww.sh b/config/hypr/scripts/PywalSwww.sh index 30a4d980..9f7b15b5 100755 --- a/config/hypr/scripts/PywalSwww.sh +++ b/config/hypr/scripts/PywalSwww.sh @@ -11,8 +11,8 @@ monitor_outputs=($(ls "$cache_dir")) # Initialize a flag to determine if the ln command was executed ln_success=false -# Get first valid monitor -current_monitor=$(hyprctl -j monitors | jq -r '.[0].name') +# Get current focused monitor +current_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') echo $current_monitor # Construct the full path to the cache file cache_file="$cache_dir$current_monitor" -- cgit v1.2.3 From 42430346d8e9bd491f349a12e28f2d8299ae601b Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 9 May 2024 21:23:36 +0900 Subject: updated rofi search to close first if opened --- config/hypr/scripts/RofiSearch.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/RofiSearch.sh b/config/hypr/scripts/RofiSearch.sh index 13148455..9b7e4bd4 100755 --- a/config/hypr/scripts/RofiSearch.sh +++ b/config/hypr/scripts/RofiSearch.sh @@ -3,8 +3,15 @@ # Original Submitted by https://github.com/LeventKaanOguz # Opens rofi in dmenu mod and waits for input. Then pushes the input to the query of the URL. -# rofi_config="$HOME/.config/rofi/config-search.rasi" + +# Kill Rofi if already running before execution +if pgrep -x "rofi" >/dev/null; then + pkill rofi + exit 0 +fi + +# Open rofi with a dmenu and pass the selected item to xdg-open for Google search +echo "" | rofi -dmenu -config "$rofi_config" -p "Search:" | xargs -I{} xdg-open "https://www.google.com/search?q={}" -echo "" | rofi -dmenu -config "$rofi_config" -p "Search:" | xargs -I{} xdg-open https://www.google.com/search?q={} -- cgit v1.2.3