From 95380aae5c4a953286c8a15bdfecd037b066922f Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sat, 4 Jan 2025 22:43:43 +0900 Subject: tweaks on keybinds so easier to search using rofi --- config/hypr/configs/Keybinds.conf | 50 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'config/hypr/configs/Keybinds.conf') diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 75406822..1abe96e7 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -16,28 +16,28 @@ bind = $mainMod, F, fullscreen bind = $mainMod SHIFT, Q, exec, $scriptsDir/KillActiveProcess.sh bind = $mainMod SHIFT, F, togglefloating, bind = $mainMod ALT, F, exec, hyprctl dispatch workspaceopt allfloat -bind = CTRL ALT, L, exec, $scriptsDir/LockScreen.sh -bind = CTRL ALT, P, exec, $scriptsDir/Wlogout.sh +bind = CTRL ALT, L, exec, $scriptsDir/LockScreen.sh # screen lock +bind = CTRL ALT, P, exec, $scriptsDir/Wlogout.sh # power menu # FEATURES / EXTRAS -bind = $mainMod, H, exec, $scriptsDir/KeyHints.sh # Small help file +bind = $mainMod, H, exec, $scriptsDir/KeyHints.sh # help file bind = $mainMod ALT, R, exec, $scriptsDir/Refresh.sh # Refresh waybar, swaync, rofi -bind = $mainMod ALT, E, exec, $scriptsDir/RofiEmoji.sh # emoji -bind = $mainMod, S, exec, $scriptsDir/RofiSearch.sh # Google search from Rofi +bind = $mainMod ALT, E, exec, $scriptsDir/RofiEmoji.sh # emoji menu +bind = $mainMod, S, exec, $scriptsDir/RofiSearch.sh # Google search using rofi bind = $mainMod SHIFT, B, exec, $scriptsDir/ChangeBlur.sh # Toggle blur settings -bind = $mainMod SHIFT, G, exec, $scriptsDir/GameMode.sh # animations ON/OFF +bind = $mainMod SHIFT, G, exec, $scriptsDir/GameMode.sh # Toggle animations ON/OFF bind = $mainMod ALT, L, exec, $scriptsDir/ChangeLayout.sh # Toggle Master or Dwindle Layout bind = $mainMod ALT, V, exec, $scriptsDir/ClipManager.sh # Clipboard Manager -bind = $mainMod SHIFT, N, exec, swaync-client -t -sw # swayNC panel +bind = $mainMod SHIFT, N, exec, swaync-client -t -sw # swayNC notification panel # FEATURES / EXTRAS (UserScripts) bind = $mainMod, E, exec, $UserScripts/QuickEdit.sh # Quick Edit Hyprland Settings -bind = $mainMod SHIFT, M, exec, $UserScripts/RofiBeats.sh # online music +bind = $mainMod SHIFT, M, exec, $UserScripts/RofiBeats.sh # online music using rofi bind = $mainMod, W, exec, $UserScripts/WallpaperSelect.sh # Select wallpaper to apply -bind = $mainMod SHIFT, W, exec, $UserScripts/WallpaperEffects.sh # Wallpaper Effects by imagemagickWW +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 to active window -bind = $mainMod SHIFT, K, exec, $scriptsDir/KeyBinds.sh # searchable keybinds +bind = $mainMod ALT, O, exec, hyprctl setprop active opaque toggle # disable opacity on active window +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 @@ -58,38 +58,38 @@ bind = $mainMod CTRL, Return, layoutmsg, swapwithmaster bind = $mainMod, M, exec, hyprctl dispatch splitratio 0.3 # group -bind = $mainMod, G, togglegroup -bind = $mainMod CTRL, tab, changegroupactive #change focus to another window +bind = $mainMod, G, togglegroup # toggle group +bind = $mainMod CTRL, tab, changegroupactive # change focus to another window # Cycle windows if floating bring to top bind = ALT, tab, cyclenext bind = ALT, tab, bringactivetotop # Special Keys / Hot Keys -bindel = , xf86audioraisevolume, exec, $scriptsDir/Volume.sh --inc #volume up -bindel = , xf86audiolowervolume, exec, $scriptsDir/Volume.sh --dec #volume down -bindl = , xf86AudioMicMute, exec, $scriptsDir/Volume.sh --toggle-mic #mute mic -bindl = , xf86audiomute, exec, $scriptsDir/Volume.sh --toggle +bindel = , xf86audioraisevolume, exec, $scriptsDir/Volume.sh --inc # volume up +bindel = , xf86audiolowervolume, exec, $scriptsDir/Volume.sh --dec # volume down +bindl = , xf86AudioMicMute, exec, $scriptsDir/Volume.sh --toggle-mic # mic mute +bindl = , xf86audiomute, exec, $scriptsDir/Volume.sh --toggle # mute bindl = , xf86Sleep, exec, systemctl suspend # sleep button -bindl = , xf86Rfkill, exec, $scriptsDir/AirplaneMode.sh #Airplane mode +bindl = , xf86Rfkill, exec, $scriptsDir/AirplaneMode.sh # Airplane mode # media controls using keyboards bindl = , xf86AudioPlayPause, exec, $scriptsDir/MediaCtrl.sh --pause bindl = , xf86AudioPause, exec, $scriptsDir/MediaCtrl.sh --pause bindl = , xf86AudioPlay, exec, $scriptsDir/MediaCtrl.sh --pause -bindl = , xf86AudioNext, exec, $scriptsDir/MediaCtrl.sh --nxt +bindl = , xf86AudioNext, exec, $scriptsDir/MediaCtrl.sh --nxt bindl = , xf86AudioPrev, exec, $scriptsDir/MediaCtrl.sh --prv bindl = , xf86audiostop, exec, $scriptsDir/MediaCtrl.sh --stop # Screenshot keybindings NOTE: You may need to press Fn key as well -bind = $mainMod, Print, exec, $scriptsDir/ScreenShot.sh --now -bind = $mainMod SHIFT, Print, exec, $scriptsDir/ScreenShot.sh --area -bind = $mainMod CTRL, Print, exec, $scriptsDir/ScreenShot.sh --in5 #screenshot in 5 secs -bind = $mainMod CTRL SHIFT, Print, exec, $scriptsDir/ScreenShot.sh --in10 #screenshot in 10 secs -bind = ALT, Print, exec, $scriptsDir/ScreenShot.sh --active #take screenshot of active window +bind = $mainMod, Print, exec, $scriptsDir/ScreenShot.sh --now # screenshot +bind = $mainMod SHIFT, Print, exec, $scriptsDir/ScreenShot.sh --area # screenshot (area) +bind = $mainMod CTRL, Print, exec, $scriptsDir/ScreenShot.sh --in5 # screenshot (5 secs delay) +bind = $mainMod CTRL SHIFT, Print, exec, $scriptsDir/ScreenShot.sh --in10 # screenshot (10 secs delay) +bind = ALT, Print, exec, $scriptsDir/ScreenShot.sh --active # screenshot (active window only) # screenshot with swappy (another screenshot tool) -bind = $mainMod SHIFT, S, exec, $scriptsDir/ScreenShot.sh --swappy +bind = $mainMod SHIFT, S, exec, $scriptsDir/ScreenShot.sh --swappy #screenshot (swappy) # Resize windows binde = $mainMod SHIFT, left, resizeactive,-50 0 -- cgit v1.2.3 From a9b123e634cf1ff741f394a301632934aceba8ba Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 9 Jan 2025 21:49:49 +0900 Subject: - Searchable keybinds correction. Pressing `SUPER SHIFT K` again will close rofi --- config/hypr/configs/Keybinds.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/hypr/configs/Keybinds.conf') diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 1abe96e7..6ab51bd5 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -37,7 +37,7 @@ 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, $scriptsDir/KeyBinds.sh # search keybinds via rofi +bind = $mainMod SHIFT, K, exec, pkill rofi || $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 -- 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/configs/Keybinds.conf') 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