From 39ba3c402f2e86c3d7296fe6925f1bd896d0959e Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 9 May 2024 13:50:51 +0900 Subject: [PATCH 1/4] Wallpaper Select and Auto wallpaper change Script updated to be able to set wallpaper on focused monitor only. NOTE: you need awk --- config/hypr/UserScripts/WallpaperAutoChange.sh | 4 +++- config/hypr/UserScripts/WallpaperSelect.sh | 4 +++- config/hypr/scripts/PywalSwww.sh | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config/hypr/UserScripts/WallpaperAutoChange.sh b/config/hypr/UserScripts/WallpaperAutoChange.sh index e52b7e9..9e0e1cb 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 " @@ -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 de9c654..2616014 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 30a4d98..9f7b15b 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" From c87156b914746a4e23164929952fd605f8fefd09 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 9 May 2024 19:28:59 +0900 Subject: [PATCH 2/4] added Pywal - Transparent waybar style --- .../[Pywal Transparent] Crystal Clear.css | 208 ++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 config/waybar/style/[Pywal Transparent] Crystal Clear.css diff --git a/config/waybar/style/[Pywal Transparent] Crystal Clear.css b/config/waybar/style/[Pywal Transparent] Crystal Clear.css new file mode 100644 index 0000000..9d6502f --- /dev/null +++ b/config/waybar/style/[Pywal Transparent] Crystal Clear.css @@ -0,0 +1,208 @@ +/* ----------- 💫 https://github.com/JaKooLit 💫 -------- */ +/* ..........................................*/ +/* .......Pywal - Transparent............... */ +/* ......................................... */ +/* --- 👍 designed by https://github.com/Krautt 👍 --- */ + +@import '../../.cache/wal/colors-waybar.css'; + +@define-color critical #ff0000; /* critical color */ +@define-color warning #f3f809; /* warning color */ +@define-color text @color2; /* text color */ +@define-color text-alt @color7; /* text alternative color */ +@define-color bg @color7; /* background color */ + +*{ + font-family: "JetBrains Mono Nerd Font"; + font-weight: bold; + min-height: 0; + /* set font-size to 100% if font scaling is set to 1.00 using nwg-look */ + font-size: 97%; + font-feature-settings: '"zero", "ss01", "ss02", "ss03", "ss04", "ss05", "cv31"'; + padding: 1px; +} + +window#waybar { + background:transparent; + border-radius: 1px; + color: @text; +} + +window#waybar.hidden { + opacity: 0.5; +} +window#waybar.empty { + background-color: transparent; +} + +window#waybar.empty #window { + padding: 0px; + border: 0px; + background-color: transparent; +} + + +/*-----module groups----*/ +.modules-right { + +} + +.modules-center { + +} + +.modules-left { + +} + +#workspaces button { + color: @text-alt; + box-shadow: none; + text-shadow: none; + padding: 0px; + border-radius: 9px; + padding-left: 4px; + padding-right: 4px; + animation: gradient_f 20s ease-in infinite; + transition: all 0.5s cubic-bezier(.55,-0.68,.48,1.682); +} + +#taskbar button.active, +#workspaces button.active { + color: @text; + border-radius: 15px 15px 15px 15px; + padding-left: 8px; + padding-right: 8px; + animation: gradient_f 20s ease-in infinite; + transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682); +} + +#workspaces button.focused { + color: @text-alt; +} + +#workspaces button.urgent { + color: @warning; + border-radius: 10px; +} + +#taskbar button:hover, +#workspaces button:hover { + color: @text; + border-radius: 15px; + padding-left: 2px; + padding-right: 2px; + animation: gradient_f 20s ease-in infinite; + transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682); +} + +#backlight, +#battery, +#bluetooth, +#clock, +#cpu, +#disk, +#idle_inhibitor, +#keyboard-state, +#memory, +#mode, +#mpris, +#network, +#pulseaudio, +#temperature, +#tray, +#window, +#wireplumber, +#workspaces, +#custom-cycle_wall, +#custom-hint, +#custom-keyboard, +#custom-light_dark, +#custom-lock, +#custom-menu, +#custom-power_vertical, +#custom-power, +#custom-swaync, +#custom-spotify, +#custom-updater, +#custom-weather, +#custom-weather.clearNight, +#custom-weather.cloudyFoggyDay, +#custom-weather.cloudyFoggyNight, +#custom-weather.default +#custom-weather.rainyDay, +#custom-weather.rainyNight, +#custom-weather.severe, +#custom-weather.showyIcyDay, +#custom-weather.snowyIcyNight, +#custom-weather.sunnyDay { + padding-top: 3px; + padding-bottom: 3px; + padding-right: 6px; + padding-left: 6px; +} + +#temperature.critical { + background-color: #ff0000; +} + +@keyframes blink { + to { + color: #000000; + } +} + +#battery.critical:not(.charging) { + color: @critical; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#pulseaudio-slider slider { + min-width: 0px; + min-height: 0px; + opacity: 0; + background-image: none; + border: none; + box-shadow: none; +} + +#pulseaudio-slider trough { + min-width: 80px; + min-height: 10px; + border-radius: 5px; + background-color: black; +} + +#pulseaudio-slider highlight { + min-height: 10px; + border-radius: 5px; + background-color: wheat; +} + +#backlight-slider slider { + min-width: 0px; + min-height: 0px; + opacity: 0; + background-image: none; + border: none; + box-shadow: none; +} + +#backlight-slider trough { + min-width: 80px; + min-height: 10px; + border-radius: 5px; + background-color: black; +} + +#backlight-slider highlight { + min-width: 10px; + border-radius: 5px; + background-color: wheat; +} + + \ No newline at end of file From cd3766fb4053cd7ac3b0b54e36b856d31a8cde4d Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 9 May 2024 21:00:26 +0900 Subject: [PATCH 3/4] small cleanup WindowRules.conf --- config/hypr/UserConfigs/WindowRules.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/UserConfigs/WindowRules.conf index c07094b..bdbd551 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)$ From 42430346d8e9bd491f349a12e28f2d8299ae601b Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 9 May 2024 21:23:36 +0900 Subject: [PATCH 4/4] updated rofi search to close first if opened --- config/hypr/scripts/RofiSearch.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/config/hypr/scripts/RofiSearch.sh b/config/hypr/scripts/RofiSearch.sh index 1314845..9b7e4bd 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={}