Browse Source

1.) Added ChangeBlur keybinds (Super Shift B), same added in Keyhints.sh (Super H)

2.) Increased Blur Settings
3.) Tweaked and Cleaned up scripts, some small tweak only like adding a bell icon
- > Gamemode toggle (Super Shift G) will now reload previous wallpaper once back to normal modified
- > The pywalSwww.sh is integrated in Refresh.sh to update rofi background
pull/78/head
Ja.KooLit 2 years ago
parent
commit
c4c2716c25
  1. 1
      config/hypr/configs/Keybinds.conf
  2. 4
      config/hypr/configs/Settings.conf
  3. 7
      config/hypr/scripts/AirplaneMode.sh
  4. 10
      config/hypr/scripts/ChangeBlur.sh
  5. 6
      config/hypr/scripts/ChangeLayout.sh
  6. 4
      config/hypr/scripts/DarkLight.sh
  7. 15
      config/hypr/scripts/GameMode.sh
  8. 6
      config/hypr/scripts/KeyHints.sh
  9. 3
      config/hypr/scripts/Refresh.sh
  10. 4
      config/hypr/scripts/RofiBeats.sh
  11. 9
      config/hypr/scripts/TouchPad.sh
  12. 28
      config/hypr/scripts/Volume.sh
  13. 1
      config/hypr/scripts/Wallpaper.sh
  14. 1
      config/hypr/scripts/WallpaperSelect.sh

1
config/hypr/configs/Keybinds.conf

@ -36,6 +36,7 @@ bind = $mainMod CTRL, S, exec, $scriptsDir/RofiBeats.sh
bind = $mainMod ALT, E, exec, $scriptsDir/RofiEmoji.sh bind = $mainMod ALT, E, exec, $scriptsDir/RofiEmoji.sh
bind = $mainMod, H, exec, $scriptsDir/KeyHints.sh bind = $mainMod, H, exec, $scriptsDir/KeyHints.sh
bind = $mainMod, E, exec, $scriptsDir/QuickEdit.sh bind = $mainMod, E, exec, $scriptsDir/QuickEdit.sh
bind = $mainMod SHIFT, B, exec, $scriptsDir/ChangeBlur.sh # Toggle blur settings
bind = $mainMod, B, exec, killall -SIGUSR1 waybar # Toggle hide/show waybar bind = $mainMod, B, exec, killall -SIGUSR1 waybar # Toggle hide/show waybar
bind = $mainMod SHIFT, G, exec, $scriptsDir/GameMode.sh bind = $mainMod SHIFT, G, exec, $scriptsDir/GameMode.sh
bind = CTRL SHIFT, W, exec, $scriptsDir/Refresh.sh bind = CTRL SHIFT, W, exec, $scriptsDir/Refresh.sh

4
config/hypr/configs/Settings.conf

@ -59,8 +59,8 @@ decoration {
blur { blur {
enabled = true enabled = true
size = 4 size = 6
passes = 1 passes = 2
ignore_opacity = true ignore_opacity = true
new_optimizations = true new_optimizations = true
} }

7
config/hypr/scripts/AirplaneMode.sh

@ -1,9 +1,12 @@
#!/bin/bash #!/bin/bash
dunstify -u low -i "$dunst_notif"
wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')" wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')"
if [ "$wifi" == "enabled" ]; then if [ "$wifi" == "enabled" ]; then
rfkill block all & rfkill block all &
dunstify -t 1000 'airplane mode: active' dunstify -u normal -i "$dunst_notif" -t 1000 'airplane mode: active'
else else
rfkill unblock all & rfkill unblock all &
dunstify -t 1000 'airplane mode: inactive' dunstify -u normal -i "$dunst_notif" -t 1000 'airplane mode: inactive'
fi fi

10
config/hypr/scripts/ChangeBlur.sh

@ -1,13 +1,15 @@
#!/bin/bash #!/bin/bash
dunst_notif="$HOME/.config/dunst/images/bell.png"
STATE=$(hyprctl -j getoption decoration:blur:passes | jq ".int") STATE=$(hyprctl -j getoption decoration:blur:passes | jq ".int")
if [ "${STATE}" == "2" ]; then if [ "${STATE}" == "2" ]; then
hyprctl keyword decoration:blur:size 3 hyprctl keyword decoration:blur:size 2
hyprctl keyword decoration:blur:passes 1 hyprctl keyword decoration:blur:passes 1
notify-send "Less blur" dunstify -u low -i "$dunst_notif" "Less blur"
else else
hyprctl keyword decoration:blur:size 7.8 hyprctl keyword decoration:blur:size 6
hyprctl keyword decoration:blur:passes 2 hyprctl keyword decoration:blur:passes 2
notify-send "Normal blur" dunstify -u low -i "$dunst_notif" "Normal blur"
fi fi

6
config/hypr/scripts/ChangeLayout.sh

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
dunst_notif="$HOME/.config/dunst/images/bell.png"
LAYOUT=$(hyprctl -j getoption general:layout | jq '.str' | sed 's/"//g') LAYOUT=$(hyprctl -j getoption general:layout | jq '.str' | sed 's/"//g')
case $LAYOUT in case $LAYOUT in
@ -10,7 +12,7 @@ case $LAYOUT in
hyprctl keyword bind SUPER,J,cyclenext hyprctl keyword bind SUPER,J,cyclenext
hyprctl keyword bind SUPER,K,cyclenext,prev hyprctl keyword bind SUPER,K,cyclenext,prev
hyprctl keyword bind SUPER,O,togglesplit hyprctl keyword bind SUPER,O,togglesplit
notify-send "Dwindle Layout" dunstify -u low -i "$dunst_notif" "Dwindle Layout"
;; ;;
"dwindle") "dwindle")
hyprctl keyword general:layout master hyprctl keyword general:layout master
@ -19,7 +21,7 @@ case $LAYOUT in
hyprctl keyword unbind SUPER,O hyprctl keyword unbind SUPER,O
hyprctl keyword bind SUPER,J,layoutmsg,cyclenext hyprctl keyword bind SUPER,J,layoutmsg,cyclenext
hyprctl keyword bind SUPER,K,layoutmsg,cycleprev hyprctl keyword bind SUPER,K,layoutmsg,cycleprev
notify-send "Master Layout" dunstify -u low -i "$dunst_notif" "Master Layout"
;; ;;
*) ;; *) ;;

4
config/hypr/scripts/DarkLight.sh

@ -149,8 +149,8 @@ ${SCRIPTSDIR}/PywalSwww.sh &
sleep 2 sleep 2
${SCRIPTSDIR}/Refresh.sh ${SCRIPTSDIR}/Refresh.sh
notify-send "GTK theme set to $selected_theme" dunstify -u low -i "$dunst_notif" "GTK theme set to $selected_theme"
notify-send "Icon theme set to $selected_icon" dunstify -u low -i "$dunst_notif" "Icon theme set to $selected_icon"
exit 0 exit 0

15
config/hypr/scripts/GameMode.sh

@ -1,16 +1,27 @@
#!/bin/bash #!/bin/bash
dunst_notif="$HOME/.config/dunst/images/bell.png"
SCRIPTSDIR="$HOME/.config/hypr/scripts"
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==2{print $2}') HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==2{print $2}')
if [ "$HYPRGAMEMODE" = 1 ] ; then if [ "$HYPRGAMEMODE" = 1 ] ; then
hyprctl --batch "\ hyprctl --batch "\
keyword animations:enabled 0;\ keyword animations:enabled 0;\
keyword decoration:drop_shadow 0;\ keyword decoration:drop_shadow 0;\
keyword decoration:blur 0;\ keyword decoration:blur:passes 0;\
keyword general:gaps_in 0;\ keyword general:gaps_in 0;\
keyword general:gaps_out 0;\ keyword general:gaps_out 0;\
keyword general:border_size 1;\ keyword general:border_size 1;\
keyword decoration:rounding 0" keyword decoration:rounding 0"
swww kill swww kill
notify-send "animations off" dunstify -u low -i "$dunst_notif" "animations off"
exit
else
swww init && swww img "$HOME/.config/rofi/.current_wallpaper"
sleep 0.5
${SCRIPTSDIR}/RefreshNoWaybar.sh
dunstify -u low -i "$dunst_notif" "Animations turned on"
exit exit
fi fi
hyprctl reload hyprctl reload

6
config/hypr/scripts/KeyHints.sh

@ -36,7 +36,7 @@ yad --width=$dynamic_width --height=$dynamic_height \
--column=Command: \ --column=Command: \
--timeout=60 \ --timeout=60 \
--timeout-indicator=bottom \ --timeout-indicator=bottom \
"ESC" "close this app" "" "=" "SUPER KEY" "(SUPER KEY)" \ "ESC" "close this app" "" "=" "SUPER KEY (Windows Key)" "(SUPER KEY)" \
" enter" "Terminal" "(kitty)" \ " enter" "Terminal" "(kitty)" \
" or D" "App Launcher" "(rofi)" \ " or D" "App Launcher" "(rofi)" \
" T" "Open File Manager" "(Thunar)" \ " T" "Open File Manager" "(Thunar)" \
@ -45,8 +45,9 @@ yad --width=$dynamic_width --height=$dynamic_height \
" W" "Choose wallpaper" "(swww)" \ " W" "Choose wallpaper" "(swww)" \
"CTRL ALT W" "Random wallpaper" "(swww)" \ "CTRL ALT W" "Random wallpaper" "(swww)" \
"CTRL W" "Choose waybar styles" "(waybar styles)" \ "CTRL W" "Choose waybar styles" "(waybar styles)" \
" B" "Hide/UnHide Waybar" "waybar" \
"ALT W" "Choose waybar layout" "(waybar layout)" \ "ALT W" "Choose waybar layout" "(waybar layout)" \
"CTRL SHIFT W" "Reload Waybar and Dunst" "" \ "CTRL SHIFT W" "Reload Waybar Dunst Rofi" "" \
" Print" "screenshot" "(grim)" \ " Print" "screenshot" "(grim)" \
" Shift Print" "screenshot region" "(grim + slurp)" \ " Shift Print" "screenshot region" "(grim + slurp)" \
" Shift S" "screenshot region" "(swappy)" \ " Shift S" "screenshot region" "(swappy)" \
@ -57,6 +58,7 @@ yad --width=$dynamic_width --height=$dynamic_height \
" Spacebar" "Toggle Dwindle | Master Layout" "Hyprland Layout" \ " Spacebar" "Toggle Dwindle | Master Layout" "Hyprland Layout" \
" Shift F" "Toggle float" "single window" \ " Shift F" "Toggle float" "single window" \
" ALT F" "Toggle all windows to float" "all windows" \ " ALT F" "Toggle all windows to float" "all windows" \
" Shift B" "Toggle Blur" "normal or less blur" \
" SHIFT G" "Gamemode! All animations off" "" \ " SHIFT G" "Gamemode! All animations off" "" \
" H" "Launch this app" "" \ " H" "Launch this app" "" \
" E" "View or EDIT Keybinds, Settings, Monitor" "" \ " E" "View or EDIT Keybinds, Settings, Monitor" "" \

3
config/hypr/scripts/Refresh.sh

@ -18,6 +18,9 @@ sleep 0.1
# Relaunch dunst with pywal-borders # Relaunch dunst with pywal-borders
${SCRIPTSDIR}/PywalDunst.sh & ${SCRIPTSDIR}/PywalDunst.sh &
# Pywal refresh
${SCRIPTSDIR}/PywalSwww.sh &
# Relaunching rainbow borders # Relaunching rainbow borders
sleep 1 sleep 1
${SCRIPTSDIR}/RainbowBorders.sh & ${SCRIPTSDIR}/RainbowBorders.sh &

4
config/hypr/scripts/RofiBeats.sh

@ -21,7 +21,7 @@ declare -A menu_options=(
# Function for displaying notifications # Function for displaying notifications
notification() { notification() {
dunstify -h string:x-canonical-private-synchronous:sys-notify -u normal -i "$iDIR/music.png" "Playing now: $@" dunstify -u normal -i "$iDIR/music.png" "Playing now: $@"
} }
# Main function # Main function
@ -45,4 +45,4 @@ main() {
} }
# Check if an online music process is running and send a notification, otherwise run the main function # Check if an online music process is running and send a notification, otherwise run the main function
pkill -f http && dunstify -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/music.png" "Online Music stopped" || main pkill -f http && dunstify -u low -i "$iDIR/music.png" "Online Music stopped" || main

9
config/hypr/scripts/TouchPad.sh

@ -1,8 +1,9 @@
#!/bin/bash #!/bin/bash
# NOTE: find the right device using hyprctl devices dunst_notif="$HOME/.config/dunst/images/bell.png"
HYPRLAND_DEVICE="asue1209:00-04f3:319f-touchpad" # NOTE: find the right device using hyprctl devices
HYPRLAND_DEVICE="asue1209:00-04f3:319f-touchpad"
if [ -z "$XDG_RUNTIME_DIR" ]; then if [ -z "$XDG_RUNTIME_DIR" ]; then
export XDG_RUNTIME_DIR=/run/user/$(id -u) export XDG_RUNTIME_DIR=/run/user/$(id -u)
@ -13,7 +14,7 @@ export STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
enable_touchpad() { enable_touchpad() {
printf "true" > "$STATUS_FILE" printf "true" > "$STATUS_FILE"
notify-send -u normal "Enabling Touchpad" dunstify -u low -i "$dunst_notif" "Enabling Touchpad"
hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" true hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" true
} }
@ -21,7 +22,7 @@ enable_touchpad() {
disable_touchpad() { disable_touchpad() {
printf "false" > "$STATUS_FILE" printf "false" > "$STATUS_FILE"
notify-send -u normal "Disabling Touchpad" dunstify -u low -i "$dunst_notif" "Disabling Touchpad"
hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" false hyprctl keyword "device:$HYPRLAND_DEVICE:enabled" false
} }

28
config/hypr/scripts/Volume.sh

@ -30,29 +30,35 @@ notify_user() {
# Increase Volume # Increase Volume
inc_volume() { inc_volume() {
pamixer -i 5 && notify_user if [ "$(pamixer --get-mute)" == "true" ]; then
pamixer -u && notify_user
fi
pamixer -i 5 && notify_user
} }
# Decrease Volume # Decrease Volume
dec_volume() { dec_volume() {
pamixer -d 5 && notify_user if [ "$(pamixer --get-mute)" == "true" ]; then
pamixer -u && notify_user
fi
pamixer -d 5 && notify_user
} }
# Toggle Mute # Toggle Mute
toggle_mute() { toggle_mute() {
if [ "$(pamixer --get-mute)" == "false" ]; then if [ "$(pamixer --get-mute)" == "false" ]; then
pamixer -m && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF" pamixer -m && dunstify -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF"
elif [ "$(pamixer --get-mute)" == "true" ]; then elif [ "$(pamixer --get-mute)" == "true" ]; then
pamixer -u && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$(get_icon)" "Volume Switched ON" pamixer -u && dunstify -u low -i "$(get_icon)" "Volume Switched ON"
fi fi
} }
# Toggle Mic # Toggle Mic
toggle_mic() { toggle_mic() {
if [ "$(pamixer --default-source --get-mute)" == "false" ]; then if [ "$(pamixer --default-source --get-mute)" == "false" ]; then
pamixer --default-source -m && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF" pamixer --default-source -m && dunstify -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF"
elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then
pamixer -u --default-source u && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/microphone.png" "Microphone Switched ON" pamixer -u --default-source u && dunstify -u low -i "$iDIR/microphone.png" "Microphone Switched ON"
fi fi
} }
# Get icons # Get icons
@ -75,12 +81,18 @@ notify_mic_user() {
# Increase MIC Volume # Increase MIC Volume
inc_mic_volume() { inc_mic_volume() {
pamixer --default-source -i 5 && notify_mic_user if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
pamixer --default-source -u && notify_mic_user
fi
pamixer --default-source -i 5 && notify_mic_user
} }
# Decrease MIC Volume # Decrease MIC Volume
dec_mic_volume() { dec_mic_volume() {
pamixer --default-source -d 5 && notify_mic_user if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
pamixer --default-source -u && notify_mic_user
fi
pamixer --default-source -d 5 && notify_mic_user
} }
# Execute accordingly # Execute accordingly

1
config/hypr/scripts/Wallpaper.sh

@ -18,7 +18,6 @@ SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration
swww query || swww init && swww img ${RANDOMPICS} $SWWW_PARAMS swww query || swww init && swww img ${RANDOMPICS} $SWWW_PARAMS
${SCRIPTSDIR}/PywalSwww.sh &
sleep 1 sleep 1
${SCRIPTSDIR}/Refresh.sh ${SCRIPTSDIR}/Refresh.sh

1
config/hypr/scripts/WallpaperSelect.sh

@ -80,6 +80,5 @@ fi
main main
${SCRIPTSDIR}/PywalSwww.sh &
sleep 1 sleep 1
${SCRIPTSDIR}/Refresh.sh ${SCRIPTSDIR}/Refresh.sh

Loading…
Cancel
Save