aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2023-12-17 16:15:04 +0900
committerGitHub <noreply@github.com>2023-12-17 16:15:04 +0900
commitf6cac04f24927419aba506e7bb51dd085f8aa8c2 (patch)
tree650e29a07cb52ff7973361f92968ece49ea19066 /config/hypr/scripts
parent948d1db075ec815983628ebf467d0d49bbe1b5e4 (diff)
parent338f213dd13ba560a08440d66302c96eea59d6de (diff)
Merge pull request #78 from JaKooLit/Development
some small tweaks
Diffstat (limited to 'config/hypr/scripts')
-rwxr-xr-xconfig/hypr/scripts/AirplaneMode.sh7
-rwxr-xr-xconfig/hypr/scripts/ChangeBlur.sh10
-rwxr-xr-xconfig/hypr/scripts/ChangeLayout.sh6
-rwxr-xr-xconfig/hypr/scripts/DarkLight.sh4
-rwxr-xr-xconfig/hypr/scripts/GameMode.sh17
-rwxr-xr-xconfig/hypr/scripts/KeyHints.sh6
-rwxr-xr-xconfig/hypr/scripts/Refresh.sh3
-rwxr-xr-xconfig/hypr/scripts/RofiBeats.sh4
-rwxr-xr-xconfig/hypr/scripts/TouchPad.sh9
-rwxr-xr-xconfig/hypr/scripts/Volume.sh28
-rwxr-xr-xconfig/hypr/scripts/Wallpaper.sh1
-rwxr-xr-xconfig/hypr/scripts/WallpaperSelect.sh1
12 files changed, 65 insertions, 31 deletions
diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh
index 35fe5db5..dc9a5956 100755
--- a/config/hypr/scripts/AirplaneMode.sh
+++ b/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
diff --git a/config/hypr/scripts/ChangeBlur.sh b/config/hypr/scripts/ChangeBlur.sh
index 247265f2..46d8a1f8 100755
--- a/config/hypr/scripts/ChangeBlur.sh
+++ b/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
diff --git a/config/hypr/scripts/ChangeLayout.sh b/config/hypr/scripts/ChangeLayout.sh
index 6cb342fa..28b72035 100755
--- a/config/hypr/scripts/ChangeLayout.sh
+++ b/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"
;;
*) ;;
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh
index 0978c530..628baa41 100755
--- a/config/hypr/scripts/DarkLight.sh
+++ b/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
diff --git a/config/hypr/scripts/GameMode.sh b/config/hypr/scripts/GameMode.sh
index ecdcfb8b..50aed7cf 100755
--- a/config/hypr/scripts/GameMode.sh
+++ b/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
diff --git a/config/hypr/scripts/KeyHints.sh b/config/hypr/scripts/KeyHints.sh
index 6017140a..b2c506f9 100755
--- a/config/hypr/scripts/KeyHints.sh
+++ b/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" "" \
diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh
index 0d91de8d..c9ad2a66 100755
--- a/config/hypr/scripts/Refresh.sh
+++ b/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 &
diff --git a/config/hypr/scripts/RofiBeats.sh b/config/hypr/scripts/RofiBeats.sh
index f7d7074a..e0cc6f74 100755
--- a/config/hypr/scripts/RofiBeats.sh
+++ b/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
diff --git a/config/hypr/scripts/TouchPad.sh b/config/hypr/scripts/TouchPad.sh
index 09dc563a..8f633ee0 100755
--- a/config/hypr/scripts/TouchPad.sh
+++ b/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
}
diff --git a/config/hypr/scripts/Volume.sh b/config/hypr/scripts/Volume.sh
index a51999df..6a50cb77 100755
--- a/config/hypr/scripts/Volume.sh
+++ b/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
diff --git a/config/hypr/scripts/Wallpaper.sh b/config/hypr/scripts/Wallpaper.sh
index c203ce25..e670dc6b 100755
--- a/config/hypr/scripts/Wallpaper.sh
+++ b/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
diff --git a/config/hypr/scripts/WallpaperSelect.sh b/config/hypr/scripts/WallpaperSelect.sh
index 16790bdd..61049e5b 100755
--- a/config/hypr/scripts/WallpaperSelect.sh
+++ b/config/hypr/scripts/WallpaperSelect.sh
@@ -80,6 +80,5 @@ fi
main
-${SCRIPTSDIR}/PywalSwww.sh &
sleep 1
${SCRIPTSDIR}/Refresh.sh
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage