From f33d720cb67c3b7c35f57475bc7370af3b223b77 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 8 Jan 2025 22:31:54 +0900 Subject: fix waybar-wallust colors not applying battery not charging waybar animation changes to reduce cpu usage as per wiki --- config/hypr/scripts/Refresh.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh index f5f91c34..1aa63378 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -27,7 +27,7 @@ ags -q sleep 1 #Restart waybar -waybar & +waybar && killall -SIGUSR2 waybar # added since wallust sometimes not applying # relaunch swaync sleep 0.5 @@ -43,4 +43,5 @@ if file_exists "${UserScripts}/RainbowBorders.sh"; then fi + exit 0 \ No newline at end of file -- cgit v1.2.3 From 565f20ac7513792bd4b0bd3c78eac9de90fbb6a0 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Fri, 10 Jan 2025 18:13:29 +0900 Subject: tweaked refresh.sh cause wallust color does not apply to waybar sometimes --- config/hypr/scripts/Refresh.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh index 1aa63378..78f76702 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -22,13 +22,11 @@ for _prs in "${_ps[@]}"; do fi done +killall -SIGUSR2 waybar # added since wallust sometimes not applying + # quit ags ags -q -sleep 1 -#Restart waybar -waybar && killall -SIGUSR2 waybar # added since wallust sometimes not applying - # relaunch swaync sleep 0.5 swaync > /dev/null 2>&1 & @@ -36,6 +34,16 @@ swaync > /dev/null 2>&1 & # relaunch ags ags & +# Kill waybar (yet again) # added since wallust sometimes not applying +if pidof waybar >/dev/null; then + pkill waybar +fi + + +sleep 1 +#Restart waybar +waybar & + # Relaunching rainbow borders if the script exists sleep 1 if file_exists "${UserScripts}/RainbowBorders.sh"; then -- cgit v1.2.3 From 22a7c6a47cda11a78727e9c903841b2f3273f52c Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 12 Jan 2025 11:45:20 +0900 Subject: fixed switching of multiple keyboard layout [Fix](https://github.com/JaKooLit/Ubuntu-Hyprland/issues/33) --- config/hypr/scripts/SwitchKeyboardLayout.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/SwitchKeyboardLayout.sh b/config/hypr/scripts/SwitchKeyboardLayout.sh index 76c06574..2d265e28 100755 --- a/config/hypr/scripts/SwitchKeyboardLayout.sh +++ b/config/hypr/scripts/SwitchKeyboardLayout.sh @@ -80,7 +80,7 @@ change_layout() { fi echo "Switching layout for $name to $new_layout..." - hyprctl switchxkblayout "$name" next + hyprctl switchxkblayout "$name" "$next_index" if [ $? -ne 0 ]; then echo "Error while switching layout for $name." >&2 error_found=true -- cgit v1.2.3 From 5df8cb82ccb01fefbd70aa059a326925b9ea98d6 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 12 Jan 2025 12:50:56 +0900 Subject: some changes on scripts which depends on rofi. Downside is only way to close the rofi is pressing esc button. However, you can execute immediately the script. ie., rofi menu is opened, by pressing Super W, it will execute wallpaper menu immediately. --- config/hypr/UserScripts/QuickEdit.sh | 5 +++++ config/hypr/UserScripts/RofiBeats.sh | 6 ++++++ config/hypr/UserScripts/RofiCalc.sh | 1 - config/hypr/UserScripts/WallpaperEffects.sh | 1 - config/hypr/UserScripts/WallpaperSelect.sh | 1 - config/hypr/UserScripts/ZshChangeTheme.sh | 5 +++++ config/hypr/configs/Keybinds.conf | 3 ++- config/hypr/scripts/ClipManager.sh | 5 +++++ config/hypr/scripts/KeyBinds.sh | 5 +++++ config/hypr/scripts/RofiEmoji.sh | 6 ++++++ config/hypr/scripts/RofiSearch.sh | 2 +- config/hypr/scripts/WaybarLayout.sh | 2 +- config/hypr/scripts/WaybarStyles.sh | 2 +- 13 files changed, 37 insertions(+), 7 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/UserScripts/QuickEdit.sh b/config/hypr/UserScripts/QuickEdit.sh index ed5a4e1c..29ce3506 100755 --- a/config/hypr/UserScripts/QuickEdit.sh +++ b/config/hypr/UserScripts/QuickEdit.sh @@ -51,4 +51,9 @@ main() { $tty -e $edit "$file" } +# Check if rofi is already running +if pidof rofi > /dev/null; then + pkill rofi +fi + main diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index cde7eccf..e615aadb 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -94,6 +94,12 @@ play_online_music() { # Check if an online music process is running and send a notification, otherwise run the main function pkill mpv && notify-send -u low -i "$iDIR/music.png" "Music stopped" || { +# Check if rofi is already running +if pidof rofi > /dev/null; then + pkill rofi +fi + + # Prompt the user to choose between local and online music user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle Play from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi -p "Select music source") diff --git a/config/hypr/UserScripts/RofiCalc.sh b/config/hypr/UserScripts/RofiCalc.sh index 355130de..cef80b81 100755 --- a/config/hypr/UserScripts/RofiCalc.sh +++ b/config/hypr/UserScripts/RofiCalc.sh @@ -8,7 +8,6 @@ rofi_config="$HOME/.config/rofi/config-calc.rasi" # Kill Rofi if already running before execution if pgrep -x "rofi" >/dev/null; then pkill rofi - exit 0 fi # main function diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index 9c872457..9a9d289c 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -95,7 +95,6 @@ main() { # Check if rofi is already running and kill it if pidof rofi > /dev/null; then pkill rofi - exit 0 fi main diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index d74933a3..8daa4f28 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -97,7 +97,6 @@ main() { # Check if rofi is already running if pidof rofi > /dev/null; then pkill rofi - sleep 1 # Allow some time for rofi to close fi main diff --git a/config/hypr/UserScripts/ZshChangeTheme.sh b/config/hypr/UserScripts/ZshChangeTheme.sh index 57fbf37d..662a36bb 100755 --- a/config/hypr/UserScripts/ZshChangeTheme.sh +++ b/config/hypr/UserScripts/ZshChangeTheme.sh @@ -48,4 +48,9 @@ main() { fi } +# Check if rofi is already running +if pidof rofi > /dev/null; then + pkill rofi +fi + main diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 6ab51bd5..019ca11d 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -37,7 +37,8 @@ bind = $mainMod, W, exec, $UserScripts/WallpaperSelect.sh # Select wallpaper to bind = $mainMod SHIFT, W, exec, $UserScripts/WallpaperEffects.sh # Wallpaper Effects by imagemagick bind = CTRL ALT, W, exec, $UserScripts/WallpaperRandom.sh # Random wallpapers bind = $mainMod ALT, O, exec, hyprctl setprop active opaque toggle # disable opacity on active window -bind = $mainMod SHIFT, K, exec, pkill rofi || $scriptsDir/KeyBinds.sh # search keybinds via rofi +bind = $mainMod SHIFT, K, exec, $scriptsDir/KeyBinds.sh # search keybinds via rofi + # Waybar / Bar related bind = $mainMod, B, exec, pkill -SIGUSR1 waybar # Toggle hide/show waybar bind = $mainMod CTRL, B, exec, $scriptsDir/WaybarStyles.sh # Waybar Styles Menu diff --git a/config/hypr/scripts/ClipManager.sh b/config/hypr/scripts/ClipManager.sh index ddce2999..13f90a9e 100755 --- a/config/hypr/scripts/ClipManager.sh +++ b/config/hypr/scripts/ClipManager.sh @@ -6,6 +6,11 @@ # CTRL Del to delete an entry # ALT Del to wipe clipboard contents +# Check if rofi is already running +if pidof rofi > /dev/null; then + pkill rofi +fi + while true; do result=$( rofi -i -dmenu \ diff --git a/config/hypr/scripts/KeyBinds.sh b/config/hypr/scripts/KeyBinds.sh index 4aca73d9..9e01a7c3 100755 --- a/config/hypr/scripts/KeyBinds.sh +++ b/config/hypr/scripts/KeyBinds.sh @@ -5,6 +5,11 @@ # Kill yad to not interfere with this binds pkill yad || true +# Check if rofi is already running +if pidof rofi > /dev/null; then + pkill rofi +fi + # Define the config files KEYBINDS_CONF="$HOME/.config/hypr/configs/Keybinds.conf" USER_KEYBINDS_CONF="$HOME/.config/hypr/UserConfigs/UserKeybinds.conf" diff --git a/config/hypr/scripts/RofiEmoji.sh b/config/hypr/scripts/RofiEmoji.sh index 6bf6a5ab..fa27a341 100755 --- a/config/hypr/scripts/RofiEmoji.sh +++ b/config/hypr/scripts/RofiEmoji.sh @@ -2,6 +2,11 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Rofi Emoticons. Not my own. Cant remember the source +# Check if rofi is already running +if pidof rofi > /dev/null; then + pkill rofi +fi + sed '1,/^# # DATA # #$/d' "$0" | \ rofi -i -dmenu -config ~/.config/rofi/config-emoji.rasi | \ awk -F'\t' '{print $1}' | \ @@ -10,6 +15,7 @@ wl-copy exit + # # DATA # # 😀 face face | grin | grinning face 😃 face with big eyes face | grinning face with big eyes | mouth | open | smile diff --git a/config/hypr/scripts/RofiSearch.sh b/config/hypr/scripts/RofiSearch.sh index 9b7e4bd4..ccc73016 100755 --- a/config/hypr/scripts/RofiSearch.sh +++ b/config/hypr/scripts/RofiSearch.sh @@ -9,7 +9,7 @@ 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 + #exit 0 fi # Open rofi with a dmenu and pass the selected item to xdg-open for Google search diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh index 36cbeb10..738d34f4 100755 --- a/config/hypr/scripts/WaybarLayout.sh +++ b/config/hypr/scripts/WaybarLayout.sh @@ -50,7 +50,7 @@ main() { # Kill Rofi if already running before execution if pgrep -x "rofi" >/dev/null; then pkill rofi - exit 0 + #exit 0 fi main diff --git a/config/hypr/scripts/WaybarStyles.sh b/config/hypr/scripts/WaybarStyles.sh index 95a348ba..096e4d7c 100755 --- a/config/hypr/scripts/WaybarStyles.sh +++ b/config/hypr/scripts/WaybarStyles.sh @@ -44,7 +44,7 @@ main() { # Kill Rofi if already running before execution if pgrep -x "rofi" >/dev/null; then pkill rofi - exit 0 + #exit 0 fi main -- cgit v1.2.3