diff --git a/config/hypr/UserScripts/Sounds.sh b/config/hypr/UserScripts/Sounds.sh
index 0d2bfff..d5d5bc9 100755
--- a/config/hypr/UserScripts/Sounds.sh
+++ b/config/hypr/UserScripts/Sounds.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# This script is used to play system sounds.
theme="freedesktop" # Set the theme for the system sounds.
diff --git a/config/hypr/UserScripts/WallpaperAutoChange.sh b/config/hypr/UserScripts/WallpaperAutoChange.sh
index 56f2ee0..c98c7bb 100755
--- a/config/hypr/UserScripts/WallpaperAutoChange.sh
+++ b/config/hypr/UserScripts/WallpaperAutoChange.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# source https://wiki.archlinux.org/title/Hyprland#Using_a_script_to_change_wallpaper_every_X_minutes
# This script will randomly go through the files of a directory, setting it
@@ -9,10 +9,10 @@
pywal_refresh=$HOME/.config/hypr/scripts/RefreshNoWaybar.sh
-if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then
- echo "Usage:
+if [[ $# -lt 1 ]] || [[ ! -d $1 ]]; then
+ echo "Usage:
$0
"
- exit 1
+ exit 1
fi
# Edit below to control the images transition
@@ -23,15 +23,15 @@ export SWWW_TRANSITION_TYPE=simple
INTERVAL=1800
while true; do
- find "$1" \
- | while read -r img; do
- echo "$((RANDOM % 1000)):$img"
- done \
- | sort -n | cut -d':' -f2- \
- | while read -r img; do
- swww img "$img"
- $pywal_refresh
- sleep $INTERVAL
-
- done
+ find "$1" |
+ while read -r img; do
+ echo "$((RANDOM % 1000)):$img"
+ done |
+ sort -n | cut -d':' -f2- |
+ while read -r img; do
+ swww img "$img"
+ $pywal_refresh
+ sleep $INTERVAL
+
+ done
done
diff --git a/config/hypr/UserScripts/WallpaperRandom.sh b/config/hypr/UserScripts/WallpaperRandom.sh
index f8cc54f..139696b 100755
--- a/config/hypr/UserScripts/WallpaperRandom.sh
+++ b/config/hypr/UserScripts/WallpaperRandom.sh
@@ -1,13 +1,12 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Script for Random Wallpaper ( CTRL ALT W)
wallDIR="$HOME/Pictures/wallpapers"
scriptsDir="$HOME/.config/hypr/scripts"
PICS=($(find ${wallDIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" \)))
-RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]}
-
+RANDOMPICS=${PICS[$RANDOM % ${#PICS[@]}]}
# Transition config
FPS=60
@@ -16,11 +15,8 @@ DURATION=1
BEZIER=".43,1.19,1,.4"
SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION --transition-bezier $BEZIER"
-
swww query || swww init && swww img ${RANDOMPICS} $SWWW_PARAMS
-
${scriptsDir}/PywalSwww.sh
sleep 1
-${scriptsDir}/Refresh.sh
-
+${scriptsDir}/Refresh.sh
diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh
index 663fb54..748f224 100755
--- a/config/hypr/UserScripts/WallpaperSelect.sh
+++ b/config/hypr/UserScripts/WallpaperSelect.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# This script for selecting wallpapers (SUPER W)
SCRIPTSDIR="$HOME/.config/hypr/scripts"
@@ -15,8 +15,8 @@ BEZIER=".43,1.19,1,.4"
SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION"
# Check if swaybg is running
-if pidof swaybg > /dev/null; then
- pkill swaybg
+if pidof swaybg >/dev/null; then
+ pkill swaybg
fi
# Retrieve image files
@@ -28,56 +28,56 @@ RANDOM_PIC_NAME="${#PICS[@]}. random"
rofi_command="rofi -show -dmenu -config ~/.config/rofi/config-wallpaper.rasi"
menu() {
- for i in "${!PICS[@]}"; do
- # Displaying .gif to indicate animated images
- if [[ -z $(echo "${PICS[$i]}" | grep .gif$) ]]; then
- printf "$(echo "${PICS[$i]}" | cut -d. -f1)\x00icon\x1f${wallDIR}/${PICS[$i]}\n"
- else
- printf "${PICS[$i]}\n"
- fi
- done
-
- printf "$RANDOM_PIC_NAME\n"
+ for i in "${!PICS[@]}"; do
+ # Displaying .gif to indicate animated images
+ if [[ -z $(echo "${PICS[$i]}" | grep .gif$) ]]; then
+ printf "$(echo "${PICS[$i]}" | cut -d. -f1)\x00icon\x1f${wallDIR}/${PICS[$i]}\n"
+ else
+ printf "${PICS[$i]}\n"
+ fi
+ done
+
+ printf "$RANDOM_PIC_NAME\n"
}
swww query || swww init
main() {
- choice=$(menu | ${rofi_command})
+ choice=$(menu | ${rofi_command})
- # No choice case
- if [[ -z $choice ]]; then
- exit 0
- fi
+ # No choice case
+ if [[ -z $choice ]]; then
+ exit 0
+ fi
- # Random choice case
- if [ "$choice" = "$RANDOM_PIC_NAME" ]; then
- swww img "${wallDIR}/${RANDOM_PIC}" $SWWW_PARAMS
- exit 0
- fi
-
- # Find the index of the selected file
- pic_index=-1
- for i in "${!PICS[@]}"; do
- filename=$(basename "${PICS[$i]}")
- if [[ "$filename" == "$choice"* ]]; then
- pic_index=$i
- break
+ # Random choice case
+ if [ "$choice" = "$RANDOM_PIC_NAME" ]; then
+ swww img "${wallDIR}/${RANDOM_PIC}" $SWWW_PARAMS
+ exit 0
+ fi
+
+ # Find the index of the selected file
+ pic_index=-1
+ for i in "${!PICS[@]}"; do
+ filename=$(basename "${PICS[$i]}")
+ if [[ "$filename" == "$choice"* ]]; then
+ pic_index=$i
+ break
+ fi
+ done
+
+ if [[ $pic_index -ne -1 ]]; then
+ swww img "${wallDIR}/${PICS[$pic_index]}" $SWWW_PARAMS
+ else
+ echo "Image not found."
+ exit 1
fi
- done
-
- if [[ $pic_index -ne -1 ]]; then
- swww img "${wallDIR}/${PICS[$pic_index]}" $SWWW_PARAMS
- else
- echo "Image not found."
- exit 1
- fi
}
# Check if rofi is already running
-if pidof rofi > /dev/null; then
- pkill rofi
- exit 0
+if pidof rofi >/dev/null; then
+ pkill rofi
+ exit 0
fi
main
diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh
index 1176c80..3298e8a 100755
--- a/config/hypr/scripts/AirplaneMode.sh
+++ b/config/hypr/scripts/AirplaneMode.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
-# Airplane Mode. Turning on or off all wifi using rfkill.
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
+# Airplane Mode. Turning on or off all wifi using rfkill.
notif="$HOME/.config/swaync/images/bell.png"
diff --git a/config/hypr/scripts/Brightness.sh b/config/hypr/scripts/Brightness.sh
index 04987ab..69dfb30 100755
--- a/config/hypr/scripts/Brightness.sh
+++ b/config/hypr/scripts/Brightness.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Script for Monitor backlights (if supported) using brightnessctl
iDIR="$HOME/.config/swaync/icons"
@@ -7,47 +7,47 @@ notification_timeout=1000
# Get brightness
get_backlight() {
- echo $(brightnessctl -m | cut -d, -f4)
+ echo $(brightnessctl -m | cut -d, -f4)
}
# Get icons
get_icon() {
- current=$(get_backlight | sed 's/%//')
- if [ "$current" -le "20" ]; then
- icon="$iDIR/brightness-20.png"
- elif [ "$current" -le "40" ]; then
- icon="$iDIR/brightness-40.png"
- elif [ "$current" -le "60" ]; then
- icon="$iDIR/brightness-60.png"
- elif [ "$current" -le "80" ]; then
- icon="$iDIR/brightness-80.png"
- else
- icon="$iDIR/brightness-100.png"
- fi
+ current=$(get_backlight | sed 's/%//')
+ if [ "$current" -le "20" ]; then
+ icon="$iDIR/brightness-20.png"
+ elif [ "$current" -le "40" ]; then
+ icon="$iDIR/brightness-40.png"
+ elif [ "$current" -le "60" ]; then
+ icon="$iDIR/brightness-60.png"
+ elif [ "$current" -le "80" ]; then
+ icon="$iDIR/brightness-80.png"
+ else
+ icon="$iDIR/brightness-100.png"
+ fi
}
# Notify
notify_user() {
- notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Brightness : $current%"
+ notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Brightness : $current%"
}
# Change brightness
change_backlight() {
- brightnessctl set "$1" && get_icon && notify_user
+ brightnessctl set "$1" && get_icon && notify_user
}
# Execute accordingly
case "$1" in
- "--get")
- get_backlight
- ;;
- "--inc")
- change_backlight "+10%"
- ;;
- "--dec")
- change_backlight "10%-"
- ;;
- *)
- get_backlight
- ;;
-esac
\ No newline at end of file
+"--get")
+ get_backlight
+ ;;
+"--inc")
+ change_backlight "+10%"
+ ;;
+"--dec")
+ change_backlight "10%-"
+ ;;
+*)
+ get_backlight
+ ;;
+esac
diff --git a/config/hypr/scripts/BrightnessKbd.sh b/config/hypr/scripts/BrightnessKbd.sh
index f96c6e0..ffda785 100755
--- a/config/hypr/scripts/BrightnessKbd.sh
+++ b/config/hypr/scripts/BrightnessKbd.sh
@@ -1,51 +1,51 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Script for keyboard backlights (if supported) using brightnessctl
iDIR="$HOME/.config/swaync/icons"
# Get keyboard brightness
get_kbd_backlight() {
- echo $(brightnessctl -d '*::kbd_backlight' -m | cut -d, -f4)
+ echo $(brightnessctl -d '*::kbd_backlight' -m | cut -d, -f4)
}
# Get icons
get_icon() {
- current=$(get_kbd_backlight | sed 's/%//')
- if [ "$current" -le "20" ]; then
- icon="$iDIR/brightness-20.png"
- elif [ "$current" -le "40" ]; then
- icon="$iDIR/brightness-40.png"
- elif [ "$current" -le "60" ]; then
- icon="$iDIR/brightness-60.png"
- elif [ "$current" -le "80" ]; then
- icon="$iDIR/brightness-80.png"
- else
- icon="$iDIR/brightness-100.png"
- fi
+ current=$(get_kbd_backlight | sed 's/%//')
+ if [ "$current" -le "20" ]; then
+ icon="$iDIR/brightness-20.png"
+ elif [ "$current" -le "40" ]; then
+ icon="$iDIR/brightness-40.png"
+ elif [ "$current" -le "60" ]; then
+ icon="$iDIR/brightness-60.png"
+ elif [ "$current" -le "80" ]; then
+ icon="$iDIR/brightness-80.png"
+ else
+ icon="$iDIR/brightness-100.png"
+ fi
}
# Notify
notify_user() {
- notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Keyboard Brightness : $current%"
+ notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Keyboard Brightness : $current%"
}
# Change brightness
change_kbd_backlight() {
- brightnessctl -d *::kbd_backlight set "$1" && get_icon && notify_user
+ brightnessctl -d *::kbd_backlight set "$1" && get_icon && notify_user
}
# Execute accordingly
case "$1" in
- "--get")
- get_kbd_backlight
- ;;
- "--inc")
- change_kbd_backlight "+30%"
- ;;
- "--dec")
- change_kbd_backlight "30%-"
- ;;
- *)
- get_kbd_backlight
- ;;
+"--get")
+ get_kbd_backlight
+ ;;
+"--inc")
+ change_kbd_backlight "+30%"
+ ;;
+"--dec")
+ change_kbd_backlight "30%-"
+ ;;
+*)
+ get_kbd_backlight
+ ;;
esac
diff --git a/config/hypr/scripts/ChangeBlur.sh b/config/hypr/scripts/ChangeBlur.sh
index 8ad0dd4..3e54183 100755
--- a/config/hypr/scripts/ChangeBlur.sh
+++ b/config/hypr/scripts/ChangeBlur.sh
@@ -1,17 +1,17 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
-## Script for changing blurs on the fly
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
+# Script for changing blurs on the fly
notif="$HOME/.config/swaync/images/bell.png"
STATE=$(hyprctl -j getoption decoration:blur:passes | jq ".int")
if [ "${STATE}" == "2" ]; then
- hyprctl keyword decoration:blur:size 2
- hyprctl keyword decoration:blur:passes 1
- notify-send -e -u low -i "$notif" "Less blur"
+ hyprctl keyword decoration:blur:size 2
+ hyprctl keyword decoration:blur:passes 1
+ notify-send -e -u low -i "$notif" "Less blur"
else
- hyprctl keyword decoration:blur:size 5
- hyprctl keyword decoration:blur:passes 2
- notify-send -e -u low -i "$notif" "Normal blur"
+ hyprctl keyword decoration:blur:size 5
+ hyprctl keyword decoration:blur:passes 2
+ notify-send -e -u low -i "$notif" "Normal blur"
fi
diff --git a/config/hypr/scripts/ChangeLayout.sh b/config/hypr/scripts/ChangeLayout.sh
index 5981024..ba434e3 100755
--- a/config/hypr/scripts/ChangeLayout.sh
+++ b/config/hypr/scripts/ChangeLayout.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# for changing Hyprland Layouts (Master or Dwindle) on the fly
notif="$HOME/.config/swaync/images/bell.png"
@@ -8,23 +8,23 @@ LAYOUT=$(hyprctl -j getoption general:layout | jq '.str' | sed 's/"//g')
case $LAYOUT in
"master")
- hyprctl keyword general:layout dwindle
- hyprctl keyword unbind SUPER,J
- hyprctl keyword unbind SUPER,K
- hyprctl keyword bind SUPER,J,cyclenext
- hyprctl keyword bind SUPER,K,cyclenext,prev
- hyprctl keyword bind SUPER,O,togglesplit
- notify-send -e -u low -i "$notif" "Dwindle Layout"
- ;;
+ hyprctl keyword general:layout dwindle
+ hyprctl keyword unbind SUPER,J
+ hyprctl keyword unbind SUPER,K
+ hyprctl keyword bind SUPER,J,cyclenext
+ hyprctl keyword bind SUPER,K,cyclenext,prev
+ hyprctl keyword bind SUPER,O,togglesplit
+ notify-send -e -u low -i "$notif" "Dwindle Layout"
+ ;;
"dwindle")
- hyprctl keyword general:layout master
- hyprctl keyword unbind SUPER,J
- hyprctl keyword unbind SUPER,K
- hyprctl keyword unbind SUPER,O
- hyprctl keyword bind SUPER,J,layoutmsg,cyclenext
- hyprctl keyword bind SUPER,K,layoutmsg,cycleprev
- notify-send -e -u low -i "$notif" "Master Layout"
- ;;
+ hyprctl keyword general:layout master
+ hyprctl keyword unbind SUPER,J
+ hyprctl keyword unbind SUPER,K
+ hyprctl keyword unbind SUPER,O
+ hyprctl keyword bind SUPER,J,layoutmsg,cyclenext
+ hyprctl keyword bind SUPER,K,layoutmsg,cycleprev
+ notify-send -e -u low -i "$notif" "Master Layout"
+ ;;
*) ;;
esac
diff --git a/config/hypr/scripts/ClipManager.sh b/config/hypr/scripts/ClipManager.sh
index 682174f..9c8eeff 100755
--- a/config/hypr/scripts/ClipManager.sh
+++ b/config/hypr/scripts/ClipManager.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Clipboard Manager. This script uses cliphist, rofi, and wl-copy.
# Actions:
@@ -15,26 +15,25 @@ while true; do
)
case "$?" in
- 1)
- exit
- ;;
- 0)
- case "$result" in
- "")
- continue
- ;;
- *)
- cliphist decode <<<"$result" | wl-copy
- exit
- ;;
- esac
- ;;
- 10)
- cliphist delete <<<"$result"
+ 1)
+ exit
+ ;;
+ 0)
+ case "$result" in
+ "")
+ continue
;;
- 11)
- cliphist wipe
+ *)
+ cliphist decode <<<"$result" | wl-copy
+ exit
;;
+ esac
+ ;;
+ 10)
+ cliphist delete <<<"$result"
+ ;;
+ 11)
+ cliphist wipe
+ ;;
esac
done
-
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh
index 885c7c6..59a570f 100755
--- a/config/hypr/scripts/DarkLight.sh
+++ b/config/hypr/scripts/DarkLight.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# For Dark and Light switching
# Note: Scripts are looking for keywords Light or Dark except for wallpapers as the are in a separate folders
@@ -36,7 +36,7 @@ fi
# Function to update theme mode for the next cycle
update_theme_mode() {
- echo "$next_mode" > ~/.cache/.theme_mode
+ echo "$next_mode" >~/.cache/.theme_mode
}
# Function to notify user
@@ -64,14 +64,13 @@ set_waybar_style() {
set_waybar_style "$next_mode"
notify_user "$next_mode"
-
# swaync color change
if [ "$next_mode" = "Dark" ]; then
sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.8);/' "${swaync_style}"
- sed -i '/@define-color noti-bg-alt/s/#.*;/#111111;/' "${swaync_style}"
+ sed -i '/@define-color noti-bg-alt/s/#.*;/#111111;/' "${swaync_style}"
else
sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.9);/' "${swaync_style}"
- sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${swaync_style}"
+ sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${swaync_style}"
fi
# Set Dynamic Wallpaper for Dark or Light Mode
@@ -84,7 +83,6 @@ fi
# Update wallpaper using swww command
$swww "${next_wallpaper}" $effect
-
# Set Kvantum Manager theme & QT5/QT6 settings
if [ "$next_mode" = "Dark" ]; then
kvantum_theme="Tokyo-Night"
@@ -148,7 +146,7 @@ set_custom_gtk_theme() {
gsettings set $theme_setting "$selected_theme"
# Flatpak GTK apps (themes)
- if command -v flatpak &> /dev/null; then
+ if command -v flatpak &>/dev/null; then
flatpak --user override --filesystem=$HOME/.themes
sleep 0.5
flatpak --user override --env=GTK_THEME="$selected_theme"
@@ -165,13 +163,13 @@ set_custom_gtk_theme() {
fi
echo "Selected icon theme for $mode mode: $selected_icon"
gsettings set $icon_setting "$selected_icon"
-
- ## QT5ct icon_theme
+
+ # QT5ct icon_theme
sed -i "s|^icon_theme=.*$|icon_theme=$selected_icon|" "$HOME/.config/qt5ct/qt5ct.conf"
sed -i "s|^icon_theme=.*$|icon_theme=$selected_icon|" "$HOME/.config/qt6ct/qt6ct.conf"
# Flatpak GTK apps (icons)
- if command -v flatpak &> /dev/null; then
+ if command -v flatpak &>/dev/null; then
flatpak --user override --filesystem=$HOME/.icons
sleep 0.5
flatpak --user override --env=ICON_THEME="$selected_icon"
@@ -191,10 +189,9 @@ sleep 0.5
# Run remaining scripts
${SCRIPTSDIR}/PywalSwww.sh
sleep 1
-${SCRIPTSDIR}/Refresh.sh
+${SCRIPTSDIR}/Refresh.sh
# Display notifications for theme and icon changes
notify-send -u normal -i "$notif" "Themes in $next_mode Mode"
exit 0
-
diff --git a/config/hypr/scripts/GameMode.sh b/config/hypr/scripts/GameMode.sh
index 2806450..f1e2353 100755
--- a/config/hypr/scripts/GameMode.sh
+++ b/config/hypr/scripts/GameMode.sh
@@ -1,13 +1,12 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Game Mode. Turning off all animations
notif="$HOME/.config/swaync/images/bell.png"
SCRIPTSDIR="$HOME/.config/hypr/scripts"
-
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
-if [ "$HYPRGAMEMODE" = 1 ] ; then
+if [ "$HYPRGAMEMODE" = 1 ]; then
hyprctl --batch "\
keyword animations:enabled 0;\
keyword decoration:drop_shadow 0;\
@@ -16,15 +15,15 @@ if [ "$HYPRGAMEMODE" = 1 ] ; then
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:rounding 0"
- swww kill
+ swww kill
notify-send -e -u low -i "$notif" "gamemode enabled. All animations off"
exit
else
- swww init && swww img "$HOME/.config/rofi/.current_wallpaper"
- sleep 0.1
- ${SCRIPTSDIR}/PywalSwww.sh
- sleep 0.5
- ${SCRIPTSDIR}/Refresh.sh
+ swww init && swww img "$HOME/.config/rofi/.current_wallpaper"
+ sleep 0.1
+ ${SCRIPTSDIR}/PywalSwww.sh
+ sleep 0.5
+ ${SCRIPTSDIR}/Refresh.sh
notify-send -e -u normal -i "$notif" "gamemode disabled. All animations normal"
exit
fi
diff --git a/config/hypr/scripts/KeyHints.sh b/config/hypr/scripts/KeyHints.sh
index 5b79cf0..b8f30aa 100755
--- a/config/hypr/scripts/KeyHints.sh
+++ b/config/hypr/scripts/KeyHints.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Keyhints. Idea got from Garuda Hyprland
# Detect monitor resolution and scale
@@ -37,37 +37,34 @@ yad --width=$dynamic_width --height=$dynamic_height \
--column=Description: \
--column=Command: \
--timeout-indicator=bottom \
-"ESC" "close this app" "" "=" "SUPER KEY (Windows Key)" "(SUPER KEY)" \
-" enter" "Terminal" "(kitty)" \
-" or D" "App Launcher" "(rofi)" \
-" T" "Open File Manager" "(Thunar)" \
-" Q" "close active window" "(not kill)" \
-" Shift Q " "closes a specified window" "(window)" \
-" Alt V" "Clipboard Manager" "(cliphist)" \
-" W" "Choose wallpaper" "(Wallpaper Menu)" \
-"CTRL ALT W" "Random wallpaper" "(via swww)" \
-" B" "Hide/UnHide Waybar" "waybar" \
-" CTRL B" "Choose waybar styles" "(waybar styles)" \
-" ALT B" "Choose waybar layout" "(waybar layout)" \
-" ALT R" "Reload Waybar swaync Rofi" "CHECK NOTIFICATION FIRST!!!" \
-" SHIFT N" "Launch Notification Panel" "swaync Notification Center" \
-" Print" "screenshot" "(grim)" \
-" Shift Print" "screenshot region" "(grim + slurp)" \
-" Shift S" "screenshot region" "(swappy)" \
-"ALT Print" "Screenshot active window" "active window only" \
-"CTRL ALT P" "power-menu" "(wlogout)" \
-"CTRL ALT L" "screen lock" "(swaylock)" \
-"CTRL ALT Del" "Hyprland Exit" "(SAVE YOUR WORK!!!)" \
-" F" "Fullscreen" "Toggles to full screen" \
-" ALT L" "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 or ON" "toggle" \
-" H" "Launch this app" "" \
-" E" "View or EDIT Keybinds, Settings, Monitor" "" \
-"" "" "" \
-"More tips:" "https://github.com/JaKooLit/Hyprland-Dots/wiki" ""\
-
-
-
+ "ESC" "close this app" "" "=" "SUPER KEY (Windows Key)" "(SUPER KEY)" \
+ " enter" "Terminal" "(kitty)" \
+ " or D" "App Launcher" "(rofi)" \
+ " T" "Open File Manager" "(Thunar)" \
+ " Q" "close active window" "(not kill)" \
+ " Shift Q " "closes a specified window" "(window)" \
+ " Alt V" "Clipboard Manager" "(cliphist)" \
+ " W" "Choose wallpaper" "(Wallpaper Menu)" \
+ "CTRL ALT W" "Random wallpaper" "(via swww)" \
+ " B" "Hide/UnHide Waybar" "waybar" \
+ " CTRL B" "Choose waybar styles" "(waybar styles)" \
+ " ALT B" "Choose waybar layout" "(waybar layout)" \
+ " ALT R" "Reload Waybar swaync Rofi" "CHECK NOTIFICATION FIRST!!!" \
+ " SHIFT N" "Launch Notification Panel" "swaync Notification Center" \
+ " Print" "screenshot" "(grim)" \
+ " Shift Print" "screenshot region" "(grim + slurp)" \
+ " Shift S" "screenshot region" "(swappy)" \
+ "ALT Print" "Screenshot active window" "active window only" \
+ "CTRL ALT P" "power-menu" "(wlogout)" \
+ "CTRL ALT L" "screen lock" "(swaylock)" \
+ "CTRL ALT Del" "Hyprland Exit" "(SAVE YOUR WORK!!!)" \
+ " F" "Fullscreen" "Toggles to full screen" \
+ " ALT L" "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 or ON" "toggle" \
+ " H" "Launch this app" "" \
+ " E" "View or EDIT Keybinds, Settings, Monitor" "" \
+ "" "" "" \
+ "More tips:" "https://github.com/JaKooLit/Hyprland-Dots/wiki" ""
diff --git a/config/hypr/scripts/LockScreen.sh b/config/hypr/scripts/LockScreen.sh
index 1e67678..1c18bbb 100755
--- a/config/hypr/scripts/LockScreen.sh
+++ b/config/hypr/scripts/LockScreen.sh
@@ -1,7 +1,9 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# For Swaylock
CONFIG="$HOME/.config/swaylock/config"
-sleep 0.5s; swaylock --config ${CONFIG} & disown
+sleep 0.5s
+swaylock --config ${CONFIG} &
+disown
diff --git a/config/hypr/scripts/MediaCtrl.sh b/config/hypr/scripts/MediaCtrl.sh
index d9855e4..bb0f49e 100755
--- a/config/hypr/scripts/MediaCtrl.sh
+++ b/config/hypr/scripts/MediaCtrl.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Playerctl
music_icon="$HOME/.config/swaync/icons/music.png"
@@ -42,20 +42,20 @@ show_music_notification() {
# Get media control action from command line argument
case "$1" in
- "--nxt")
- play_next
- ;;
- "--prv")
- play_previous
- ;;
- "--pause")
- toggle_play_pause
- ;;
- "--stop")
- stop_playback
- ;;
- *)
- echo "Usage: $0 [--nxt|--prv|--pause|--stop]"
- exit 1
- ;;
+"--nxt")
+ play_next
+ ;;
+"--prv")
+ play_previous
+ ;;
+"--pause")
+ toggle_play_pause
+ ;;
+"--stop")
+ stop_playback
+ ;;
+*)
+ echo "Usage: $0 [--nxt|--prv|--pause|--stop]"
+ exit 1
+ ;;
esac
diff --git a/config/hypr/scripts/Polkit-NixOS.sh b/config/hypr/scripts/Polkit-NixOS.sh
index 048c1b0..202ff14 100755
--- a/config/hypr/scripts/Polkit-NixOS.sh
+++ b/config/hypr/scripts/Polkit-NixOS.sh
@@ -1,21 +1,21 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# For NixOS starting of polkit-gnome. Dec 2023, the settings stated in NixOS wiki does not work so have to manual start it
# Find all polkit-gnome executables in the Nix store
polkit_gnome_paths=$(find /nix/store -name 'polkit-gnome-authentication-agent-1' -type f 2>/dev/null)
for polkit_gnome_path in $polkit_gnome_paths; do
- # Extract the directory containing the executable
- polkit_gnome_dir=$(dirname "$polkit_gnome_path")
+ # Extract the directory containing the executable
+ polkit_gnome_dir=$(dirname "$polkit_gnome_path")
- # Check if the executable is valid and exists
- if [ -x "$polkit_gnome_dir/polkit-gnome-authentication-agent-1" ]; then
- # Start the Polkit-GNOME Authentication Agent
- "$polkit_gnome_dir/polkit-gnome-authentication-agent-1" &
- exit 0
- fi
+ # Check if the executable is valid and exists
+ if [ -x "$polkit_gnome_dir/polkit-gnome-authentication-agent-1" ]; then
+ # Start the Polkit-GNOME Authentication Agent
+ "$polkit_gnome_dir/polkit-gnome-authentication-agent-1" &
+ exit 0
+ fi
done
# If no valid executable is found, report an error
-echo "No valid Polkit-GNOME Authentication Agent executable found."
\ No newline at end of file
+echo "No valid Polkit-GNOME Authentication Agent executable found."
diff --git a/config/hypr/scripts/Polkit.sh b/config/hypr/scripts/Polkit.sh
index 07b1211..4b40894 100755
--- a/config/hypr/scripts/Polkit.sh
+++ b/config/hypr/scripts/Polkit.sh
@@ -1,30 +1,30 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# This is for polkits, it will start from top and will stop if the top is executed
# Polkit possible paths files to check
polkit=(
- "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
- "/usr/lib/polkit-kde-authentication-agent-1"
- "/usr/lib/polkit-gnome-authentication-agent-1"
- "/usr/libexec/polkit-gnome-authentication-agent-1"
- "/usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1"
- "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1"
+ "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
+ "/usr/lib/polkit-kde-authentication-agent-1"
+ "/usr/lib/polkit-gnome-authentication-agent-1"
+ "/usr/libexec/polkit-gnome-authentication-agent-1"
+ "/usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1"
+ "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1"
)
-executed=false # Flag to track if a file has been executed
+executed=false # Flag to track if a file has been executed
# Loop through the list of files
for file in "${polkit[@]}"; do
- if [ -e "$file" ]; then
- echo "File $file found, executing command..."
- exec "$file"
- executed=true
- break
- fi
+ if [ -e "$file" ]; then
+ echo "File $file found, executing command..."
+ exec "$file"
+ executed=true
+ break
+ fi
done
# If none of the files were found, you can add a fallback command here
if [ "$executed" == false ]; then
- echo "None of the specified files were found. Install a Polkit"
+ echo "None of the specified files were found. Install a Polkit"
fi
diff --git a/config/hypr/scripts/PortalHyprland.sh b/config/hypr/scripts/PortalHyprland.sh
index 389ec73..f478631 100755
--- a/config/hypr/scripts/PortalHyprland.sh
+++ b/config/hypr/scripts/PortalHyprland.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# For manually starting xdg-desktop-portal
sleep 1
@@ -13,4 +13,3 @@ sleep 1
sleep 2
/usr/lib/xdg-desktop-portal-hyprland &
/usr/libexec/xdg-desktop-portal &
-
diff --git a/config/hypr/scripts/PywalSwww.sh b/config/hypr/scripts/PywalSwww.sh
index 4ed7448..e632ce8 100755
--- a/config/hypr/scripts/PywalSwww.sh
+++ b/config/hypr/scripts/PywalSwww.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Pywal Colors for current wallpaper
# Define the path to the swww cache directory
@@ -24,7 +24,7 @@ if [ -f "$cache_file" ]; then
echo $wallpaper_path
# Copy the wallpaper to the location Rofi can access
if ln -sf "$wallpaper_path" "$HOME/.config/rofi/.current_wallpaper"; then
- ln_success=true # Set the flag to true upon successful execution
+ ln_success=true # Set the flag to true upon successful execution
fi
fi
@@ -32,7 +32,7 @@ fi
if [ "$ln_success" = true ]; then
# execute pywal
# wal -i "$wallpaper_path"
- echo 'about to execute wal'
+ echo 'about to execute wal'
# execute pywal skipping tty and terminal changes
wal -i "$wallpaper_path" -s -t &
fi
diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh
index a585eb8..071078d 100755
--- a/config/hypr/scripts/Refresh.sh
+++ b/config/hypr/scripts/Refresh.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Scripts for refreshing waybar, rofi, swaync, pywal colors
SCRIPTSDIR=$HOME/.config/hypr/scripts
@@ -8,9 +8,9 @@ UserScripts=$HOME/.config/hypr/UserScripts
# Define file_exists function
file_exists() {
if [ -e "$1" ]; then
- return 0 # File exists
+ return 0 # File exists
else
- return 1 # File does not exist
+ return 1 # File does not exist
fi
}
@@ -28,7 +28,7 @@ waybar &
# relaunch swaync
sleep 0.5
-swaync > /dev/null 2>&1 &
+swaync >/dev/null 2>&1 &
# Relaunching rainbow borders if the script exists
sleep 1
@@ -39,4 +39,4 @@ fi
# for cava-pywal (note, need to manually restart cava once wallpaper changes)
ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config" || true
-exit 0
\ No newline at end of file
+exit 0
diff --git a/config/hypr/scripts/RefreshNoWaybar.sh b/config/hypr/scripts/RefreshNoWaybar.sh
index f0c3d56..53753e4 100755
--- a/config/hypr/scripts/RefreshNoWaybar.sh
+++ b/config/hypr/scripts/RefreshNoWaybar.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Modified version of Refresh but no waybar refresh
# Used by automatic wallpaper change
@@ -11,9 +11,9 @@ UserScripts=$HOME/.config/hypr/UserScripts
# Define file_exists function
file_exists() {
if [ -e "$1" ]; then
- return 0 # File exists
+ return 0 # File exists
else
- return 1 # File does not exist
+ return 1 # File does not exist
fi
}
@@ -37,4 +37,4 @@ fi
# for cava-pywal (note, need to manually restart cava once wallpaper changes)
ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config" || true
-exit 0
\ No newline at end of file
+exit 0
diff --git a/config/hypr/scripts/RofiEmoji.sh b/config/hypr/scripts/RofiEmoji.sh
index 4182a5a..959a049 100755
--- a/config/hypr/scripts/RofiEmoji.sh
+++ b/config/hypr/scripts/RofiEmoji.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Rofi Emoticons. Not my own. Cant remember the source
sed '1,/^### DATA ###$/d' $0 |
@@ -7,7 +7,7 @@ rofi -dmenu -config ~/.config/rofi/config-long.rasi|
cut -d ' ' -f 1 | tr -d '\n' | wl-copy
exit
-### DATA ###
+# ### DATA ###
😀 grinning face face smile happy joy :D grin
😃 grinning face with big eyes face happy joy haha :D :) smile funny
😄 grinning face with smiling eyes face happy joy funny haha laugh like :D :) smile
diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh
index f35f929..13c4581 100755
--- a/config/hypr/scripts/ScreenShot.sh
+++ b/config/hypr/scripts/ScreenShot.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Screenshots scripts
iDIR="$HOME/.config/swaync/icons"
@@ -24,7 +24,7 @@ notify_view() {
${notify_cmd_shot} "Screenshot of '${active_window_class}' not Saved"
fi
elif [[ "$1" == "swappy" ]]; then
- ${notify_cmd_shot} "Screenshot Captured."
+ ${notify_cmd_shot} "Screenshot Captured."
else
local check_file="$dir/$file"
if [[ -e "$check_file" ]]; then
@@ -36,53 +36,51 @@ notify_view() {
fi
}
-
-
# countdown
countdown() {
- for sec in $(seq $1 -1 1); do
- notify-send -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec"
- sleep 1
- done
+ for sec in $(seq $1 -1 1); do
+ notify-send -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec"
+ sleep 1
+ done
}
# take shots
shotnow() {
- cd ${dir} && grim - | tee "$file" | wl-copy
- sleep 2
- notify_view
+ cd ${dir} && grim - | tee "$file" | wl-copy
+ sleep 2
+ notify_view
}
shot5() {
- countdown '5'
- sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
- sleep 1
- notify_view
-
+ countdown '5'
+ sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
+ sleep 1
+ notify_view
+
}
shot10() {
- countdown '10'
- sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
- notify_view
+ countdown '10'
+ sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
+ notify_view
}
shotwin() {
- w_pos=$(hyprctl activewindow | grep 'at:' | cut -d':' -f2 | tr -d ' ' | tail -n1)
- w_size=$(hyprctl activewindow | grep 'size:' | cut -d':' -f2 | tr -d ' ' | tail -n1 | sed s/,/x/g)
- cd ${dir} && grim -g "$w_pos $w_size" - | tee "$file" | wl-copy
- notify_view
+ w_pos=$(hyprctl activewindow | grep 'at:' | cut -d':' -f2 | tr -d ' ' | tail -n1)
+ w_size=$(hyprctl activewindow | grep 'size:' | cut -d':' -f2 | tr -d ' ' | tail -n1 | sed s/,/x/g)
+ cd ${dir} && grim -g "$w_pos $w_size" - | tee "$file" | wl-copy
+ notify_view
}
shotarea() {
- tmpfile=$(mktemp)
- grim -g "$(slurp)" - >"$tmpfile"
- if [[ -s "$tmpfile" ]]; then
- wl-copy <"$tmpfile"
- mv "$tmpfile" "$dir/$file"
- fi
- rm "$tmpfile"
- notify_view
+ tmpfile=$(mktemp)
+ grim -g "$(slurp)" - >"$tmpfile"
+ if [[ -s "$tmpfile" ]]; then
+ wl-copy <"$tmpfile"
+ mv "$tmpfile" "$dir/$file"
+ fi
+ rm "$tmpfile"
+ notify_view
}
shotactive() {
@@ -91,38 +89,37 @@ shotactive() {
active_window_path="${dir}/${active_window_file}"
hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -g - "${active_window_path}"
- sleep 1
- notify_view "active"
+ sleep 1
+ notify_view "active"
}
shotswappy() {
- tmpfile=$(mktemp)
- grim -g "$(slurp)" - >"$tmpfile" && "${sDIR}/Sounds.sh" --screenshot && notify_view "swappy"
- swappy -f - <"$tmpfile"
- rm "$tmpfile"
+ tmpfile=$(mktemp)
+ grim -g "$(slurp)" - >"$tmpfile" && "${sDIR}/Sounds.sh" --screenshot && notify_view "swappy"
+ swappy -f - <"$tmpfile"
+ rm "$tmpfile"
}
-
if [[ ! -d "$dir" ]]; then
- mkdir -p "$dir"
+ mkdir -p "$dir"
fi
if [[ "$1" == "--now" ]]; then
- shotnow
+ shotnow
elif [[ "$1" == "--in5" ]]; then
- shot5
+ shot5
elif [[ "$1" == "--in10" ]]; then
- shot10
+ shot10
elif [[ "$1" == "--win" ]]; then
- shotwin
+ shotwin
elif [[ "$1" == "--area" ]]; then
- shotarea
+ shotarea
elif [[ "$1" == "--active" ]]; then
- shotactive
+ shotactive
elif [[ "$1" == "--swappy" ]]; then
- shotswappy
+ shotswappy
else
- echo -e "Available Options : --now --in5 --in10 --win --area --active --swappy"
+ echo -e "Available Options : --now --in5 --in10 --win --area --active --swappy"
fi
exit 0
diff --git a/config/hypr/scripts/SwitchKeyboardLayout.sh b/config/hypr/scripts/SwitchKeyboardLayout.sh
index 90451c6..65b0846 100755
--- a/config/hypr/scripts/SwitchKeyboardLayout.sh
+++ b/config/hypr/scripts/SwitchKeyboardLayout.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# This is for changing kb_layouts. Set kb_layouts in $settings_file
layout_f="$HOME/.cache/kb_layout"
@@ -8,38 +8,38 @@ notif="$HOME/.config/swaync/images/bell.png"
# Check if ~/.cache/kb_layout exists and create it with a default layout from Settings.conf if not found
if [ ! -f "$layout_f" ]; then
- default_layout=$(grep 'kb_layout=' "$settings_file" | cut -d '=' -f 2 | cut -d ',' -f 1 2>/dev/null)
- if [ -z "$default_layout" ]; then
- default_layout="us" # Default to 'us' layout if Settings.conf or 'kb_layout' is not found
- fi
- echo "$default_layout" > "$layout_f"
+ default_layout=$(grep 'kb_layout=' "$settings_file" | cut -d '=' -f 2 | cut -d ',' -f 1 2>/dev/null)
+ if [ -z "$default_layout" ]; then
+ default_layout="us" # Default to 'us' layout if Settings.conf or 'kb_layout' is not found
+ fi
+ echo "$default_layout" >"$layout_f"
fi
current_layout=$(cat "$layout_f")
# Read keyboard layout settings from Settings.conf
if [ -f "$settings_file" ]; then
- kb_layout_line=$(grep 'kb_layout=' "$settings_file" | cut -d '=' -f 2)
- IFS=',' read -ra layout_mapping <<< "$kb_layout_line"
+ kb_layout_line=$(grep 'kb_layout=' "$settings_file" | cut -d '=' -f 2)
+ IFS=',' read -ra layout_mapping <<<"$kb_layout_line"
fi
layout_count=${#layout_mapping[@]}
# Find the index of the current layout in the mapping
for ((i = 0; i < layout_count; i++)); do
- if [ "$current_layout" == "${layout_mapping[i]}" ]; then
- current_index=$i
- break
- fi
+ if [ "$current_layout" == "${layout_mapping[i]}" ]; then
+ current_index=$i
+ break
+ fi
done
# Calculate the index of the next layout
-next_index=$(( (current_index + 1) % layout_count ))
+next_index=$(((current_index + 1) % layout_count))
new_layout="${layout_mapping[next_index]}"
# Update the keyboard layout
hyprctl keyword input:kb_layout "$new_layout"
-echo "$new_layout" > "$layout_f"
+echo "$new_layout" >"$layout_f"
# Notification for the new keyboard layout
-notify-send -u low -i "$notif" "new KB_Layout: $new_layout"
\ No newline at end of file
+notify-send -u low -i "$notif" "new KB_Layout: $new_layout"
diff --git a/config/hypr/scripts/TouchPad.sh b/config/hypr/scripts/TouchPad.sh
index 47ad48f..cb6263e 100755
--- a/config/hypr/scripts/TouchPad.sh
+++ b/config/hypr/scripts/TouchPad.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# For disabling touchpad.
Touchpad_Device="asue1209:00-04f3:319f-touchpad"
@@ -9,16 +9,16 @@ XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
toggle_touchpad() {
- if [ ! -f "$STATUS_FILE" ] || [ "$(cat "$STATUS_FILE")" = "false" ]; then
- echo "true" > "$STATUS_FILE"
- action="enabled"
- else
- echo "false" > "$STATUS_FILE"
- action="disabled"
- fi
+ if [ ! -f "$STATUS_FILE" ] || [ "$(cat "$STATUS_FILE")" = "false" ]; then
+ echo "true" >"$STATUS_FILE"
+ action="enabled"
+ else
+ echo "false" >"$STATUS_FILE"
+ action="disabled"
+ fi
- notify-send -u low -i "$notif" "Touchpad $action"
- hyprctl keyword "device:$Touchpad_Device:enabled" "$(cat "$STATUS_FILE")"
+ notify-send -u low -i "$notif" "Touchpad $action"
+ hyprctl keyword "device:$Touchpad_Device:enabled" "$(cat "$STATUS_FILE")"
}
toggle_touchpad
diff --git a/config/hypr/scripts/Volume.sh b/config/hypr/scripts/Volume.sh
index 8c5af5d..f35c78c 100755
--- a/config/hypr/scripts/Volume.sh
+++ b/config/hypr/scripts/Volume.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
-# Scripts for volume controls for audio and mic
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
+# Scripts for volume controls for audio and mic
iDIR="$HOME/.config/swaync/icons"
sDIR="$HOME/.config/hypr/UserScripts"
@@ -57,20 +57,20 @@ dec_volume() {
# Toggle Mute
toggle_mute() {
- if [ "$(pamixer --get-mute)" == "false" ]; then
- pamixer -m && notify-send -e -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF"
- elif [ "$(pamixer --get-mute)" == "true" ]; then
- pamixer -u && notify-send -e -u low -i "$(get_icon)" "Volume Switched ON"
- fi
+ if [ "$(pamixer --get-mute)" == "false" ]; then
+ pamixer -m && notify-send -e -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF"
+ elif [ "$(pamixer --get-mute)" == "true" ]; then
+ pamixer -u && notify-send -e -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 -e -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 -e -u low -i "$iDIR/microphone.png" "Microphone Switched ON"
- fi
+ if [ "$(pamixer --default-source --get-mute)" == "false" ]; then
+ pamixer --default-source -m && notify-send -e -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 -e -u low -i "$iDIR/microphone.png" "Microphone Switched ON"
+ fi
}
# Get Mic Icon
get_mic_icon() {
@@ -117,23 +117,23 @@ dec_mic_volume() {
# Execute accordingly
if [[ "$1" == "--get" ]]; then
- get_volume
+ get_volume
elif [[ "$1" == "--inc" ]]; then
- inc_volume
+ inc_volume
elif [[ "$1" == "--dec" ]]; then
- dec_volume
+ dec_volume
elif [[ "$1" == "--toggle" ]]; then
- toggle_mute
+ toggle_mute
elif [[ "$1" == "--toggle-mic" ]]; then
- toggle_mic
+ toggle_mic
elif [[ "$1" == "--get-icon" ]]; then
- get_icon
+ get_icon
elif [[ "$1" == "--get-mic-icon" ]]; then
- get_mic_icon
+ get_mic_icon
elif [[ "$1" == "--mic-inc" ]]; then
- inc_mic_volume
+ inc_mic_volume
elif [[ "$1" == "--mic-dec" ]]; then
- dec_mic_volume
+ dec_mic_volume
else
- get_volume
+ get_volume
fi
diff --git a/config/hypr/scripts/WaybarCava.sh b/config/hypr/scripts/WaybarCava.sh
index bf9e743..611f97c 100755
--- a/config/hypr/scripts/WaybarCava.sh
+++ b/config/hypr/scripts/WaybarCava.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Not my own work. This was added through Github PR. Credit to original author
diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh
index 31146b5..93db683 100755
--- a/config/hypr/scripts/WaybarLayout.sh
+++ b/config/hypr/scripts/WaybarLayout.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Script for waybar layout or configs
set -euo pipefail
@@ -31,7 +31,7 @@ apply_config() {
restart_waybar_if_needed() {
if pgrep -x "waybar" >/dev/null; then
pkill waybar
- sleep 0.1 # Delay for Waybar to completely terminate
+ sleep 0.1 # Delay for Waybar to completely terminate
fi
"${SCRIPTSDIR}/Refresh.sh" &
}
@@ -46,12 +46,12 @@ main() {
fi
case $choice in
- "no panel")
- pgrep -x "waybar" && pkill waybar || true
- ;;
- *)
- apply_config "$choice"
- ;;
+ "no panel")
+ pgrep -x "waybar" && pkill waybar || true
+ ;;
+ *)
+ apply_config "$choice"
+ ;;
esac
}
diff --git a/config/hypr/scripts/WaybarStyles.sh b/config/hypr/scripts/WaybarStyles.sh
index bbcb6ea..3fcecc8 100755
--- a/config/hypr/scripts/WaybarStyles.sh
+++ b/config/hypr/scripts/WaybarStyles.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Script for waybar styles
set -euo pipefail
@@ -19,7 +19,7 @@ menu() {
options+=("$(basename "$file" .css)")
fi
done < <(find "$waybar_styles" -maxdepth 1 -type f -name '*.css' -exec basename {} \; | sort)
-
+
printf '%s\n' "${options[@]}"
}
@@ -33,7 +33,7 @@ apply_style() {
restart_waybar_if_needed() {
if pgrep -x "waybar" >/dev/null; then
pkill waybar
- sleep 0.1 # Delay for Waybar to completely terminate
+ sleep 0.1 # Delay for Waybar to completely terminate
fi
"${SCRIPTSDIR}/Refresh.sh" &
}
diff --git a/config/hypr/scripts/Wlogout.sh b/config/hypr/scripts/Wlogout.sh
index 4c53c38..6f86f46 100755
--- a/config/hypr/scripts/Wlogout.sh
+++ b/config/hypr/scripts/Wlogout.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# wlogout (Power, Screen Lock, Suspend, etc)
@@ -14,7 +14,7 @@ A_720=50
B_720=50
# Check if wlogout is already running
-if pgrep -x "wlogout" > /dev/null; then
+if pgrep -x "wlogout" >/dev/null; then
pkill -x "wlogout"
exit 0
fi
@@ -41,4 +41,4 @@ elif ((resolution > 720)); then
else
wlogout &
echo "Setting default parameters for resolution <= 720p"
-fi
\ No newline at end of file
+fi