diff options
| author | Ja.KooLit <jimmielovejay@gmail.com> | 2024-05-09 23:12:25 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-09 23:12:25 +0900 |
| commit | a3994cc8edd41fa42dfe1a6f22754dcdcc3d1e51 (patch) | |
| tree | d7c3a5611522f5c485614fbd62334a28e5b74253 /config/hypr | |
| parent | 472661662b29ec932f017e44a36a63b0dc61ac38 (diff) | |
| parent | 42430346d8e9bd491f349a12e28f2d8299ae601b (diff) | |
Merge branch 'development' into main
Diffstat (limited to 'config/hypr')
| -rw-r--r-- | config/hypr/UserConfigs/WindowRules.conf | 1 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperAutoChange.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperSelect.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/PywalSwww.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/RofiSearch.sh | 11 |
5 files changed, 17 insertions, 7 deletions
diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/UserConfigs/WindowRules.conf index c07094bf..bdbd551d 100644 --- a/config/hypr/UserConfigs/WindowRules.conf +++ b/config/hypr/UserConfigs/WindowRules.conf @@ -20,7 +20,6 @@ windowrule = float, ^(file-roller|org.gnome.FileRoller)$ # archive manager #windowrule = workspace 6 silent,^(gamescope)$ windowrule = center,^(pavucontrol) -windowrule = float, org.gnome.SystemMonitor # windowrule v2 move to workspace windowrulev2 = workspace 1, class:^([Tt]hunderbird)$ diff --git a/config/hypr/UserScripts/WallpaperAutoChange.sh b/config/hypr/UserScripts/WallpaperAutoChange.sh index e52b7e90..9e0e1cbe 100755 --- a/config/hypr/UserScripts/WallpaperAutoChange.sh +++ b/config/hypr/UserScripts/WallpaperAutoChange.sh @@ -9,6 +9,8 @@ pywal_refresh=$HOME/.config/hypr/scripts/RefreshNoWaybar.sh +focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') + if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then echo "Usage: $0 <dir containing images>" @@ -29,7 +31,7 @@ while true; do done \ | sort -n | cut -d':' -f2- \ | while read -r img; do - swww img "$img" + swww img -o $focused_monitor "$img" $pywal_refresh sleep $INTERVAL diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index de9c6546..2616014d 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -4,6 +4,8 @@ SCRIPTSDIR="$HOME/.config/hypr/scripts" +focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') + # WALLPAPERS PATH wallDIR="$HOME/Pictures/wallpapers" @@ -67,7 +69,7 @@ main() { done if [[ $pic_index -ne -1 ]]; then - swww img "${wallDIR}/${PICS[$pic_index]}" $SWWW_PARAMS + swww img -o $focused_monitor "${wallDIR}/${PICS[$pic_index]}" $SWWW_PARAMS else echo "Image not found." exit 1 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" 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={} |
