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. 3
      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. 17
      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

3
config/hypr/configs/Keybinds.conf

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

4
config/hypr/configs/Settings.conf

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

7
config/hypr/scripts/AirplaneMode.sh

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

10
config/hypr/scripts/ChangeBlur.sh

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

6
config/hypr/scripts/ChangeLayout.sh

@ -1,5 +1,7 @@
#!/bin/bash
dunst_notif="$HOME/.config/dunst/images/bell.png"
LAYOUT=$(hyprctl -j getoption general:layout | jq '.str' | sed 's/"//g')
case $LAYOUT in
@ -10,7 +12,7 @@ case $LAYOUT in
hyprctl keyword bind SUPER,J,cyclenext
hyprctl keyword bind SUPER,K,cyclenext,prev
hyprctl keyword bind SUPER,O,togglesplit
notify-send "Dwindle Layout"
dunstify -u low -i "$dunst_notif" "Dwindle Layout"
;;
"dwindle")
hyprctl keyword general:layout master
@ -19,7 +21,7 @@ case $LAYOUT in
hyprctl keyword unbind SUPER,O
hyprctl keyword bind SUPER,J,layoutmsg,cyclenext
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
${SCRIPTSDIR}/Refresh.sh
notify-send "GTK theme set to $selected_theme"
notify-send "Icon theme set to $selected_icon"
dunstify -u low -i "$dunst_notif" "GTK theme set to $selected_theme"
dunstify -u low -i "$dunst_notif" "Icon theme set to $selected_icon"
exit 0

17
config/hypr/scripts/GameMode.sh

@ -1,16 +1,27 @@
#!/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}')
if [ "$HYPRGAMEMODE" = 1 ] ; then
hyprctl --batch "\
keyword animations:enabled 0;\
keyword decoration:drop_shadow 0;\
keyword decoration:blur 0;\
keyword decoration:blur:passes 0;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:rounding 0"
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
fi
hyprctl reload
hyprctl reload

6
config/hypr/scripts/KeyHints.sh

@ -36,7 +36,7 @@ yad --width=$dynamic_width --height=$dynamic_height \
--column=Command: \
--timeout=60 \
--timeout-indicator=bottom \
"ESC" "close this app" "" "=" "SUPER KEY" "(SUPER KEY)" \
"ESC" "close this app" "" "=" "SUPER KEY (Windows Key)" "(SUPER KEY)" \
" enter" "Terminal" "(kitty)" \
" or D" "App Launcher" "(rofi)" \
" T" "Open File Manager" "(Thunar)" \
@ -45,8 +45,9 @@ yad --width=$dynamic_width --height=$dynamic_height \
" W" "Choose wallpaper" "(swww)" \
"CTRL ALT W" "Random wallpaper" "(swww)" \
"CTRL W" "Choose waybar styles" "(waybar styles)" \
" B" "Hide/UnHide Waybar" "waybar" \
"ALT W" "Choose waybar layout" "(waybar layout)" \
"CTRL SHIFT W" "Reload Waybar and Dunst" "" \
"CTRL SHIFT W" "Reload Waybar Dunst Rofi" "" \
" Print" "screenshot" "(grim)" \
" Shift Print" "screenshot region" "(grim + slurp)" \
" Shift S" "screenshot region" "(swappy)" \
@ -57,6 +58,7 @@ yad --width=$dynamic_width --height=$dynamic_height \
" Spacebar" "Toggle Dwindle | Master Layout" "Hyprland Layout" \
" Shift F" "Toggle float" "single window" \
" ALT F" "Toggle all windows to float" "all windows" \
" Shift B" "Toggle Blur" "normal or less blur" \
" SHIFT G" "Gamemode! All animations off" "" \
" H" "Launch this app" "" \
" 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
${SCRIPTSDIR}/PywalDunst.sh &
# Pywal refresh
${SCRIPTSDIR}/PywalSwww.sh &
# Relaunching rainbow borders
sleep 1
${SCRIPTSDIR}/RainbowBorders.sh &

4
config/hypr/scripts/RofiBeats.sh

@ -21,7 +21,7 @@ declare -A menu_options=(
# Function for displaying notifications
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
@ -45,4 +45,4 @@ main() {
}
# 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
dunst_notif="$HOME/.config/dunst/images/bell.png"
# NOTE: find the right device using hyprctl devices
HYPRLAND_DEVICE="asue1209:00-04f3:319f-touchpad"
HYPRLAND_DEVICE="asue1209:00-04f3:319f-touchpad"
if [ -z "$XDG_RUNTIME_DIR" ]; then
export XDG_RUNTIME_DIR=/run/user/$(id -u)
@ -13,7 +14,7 @@ export STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
enable_touchpad() {
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
}
@ -21,7 +22,7 @@ enable_touchpad() {
disable_touchpad() {
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
}

28
config/hypr/scripts/Volume.sh

@ -30,29 +30,35 @@ notify_user() {
# Increase 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
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() {
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
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
}
# Toggle Mic
toggle_mic() {
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
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
}
# Get icons
@ -75,12 +81,18 @@ notify_mic_user() {
# Increase 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
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

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
${SCRIPTSDIR}/PywalSwww.sh &
sleep 1
${SCRIPTSDIR}/Refresh.sh

1
config/hypr/scripts/WallpaperSelect.sh

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

Loading…
Cancel
Save