diff options
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/ClipManager.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/DarkLight.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/GameMode.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/KeyHints.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/PywalSwww.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/RofiEmoji.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/ScreenShot.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/Sounds.sh | 70 | ||||
| -rwxr-xr-x | config/hypr/scripts/Volume.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/WaybarLayout.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/WaybarStyles.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/Wlogout.sh | 4 |
12 files changed, 84 insertions, 12 deletions
diff --git a/config/hypr/scripts/ClipManager.sh b/config/hypr/scripts/ClipManager.sh index f93005bc..ddce2999 100755 --- a/config/hypr/scripts/ClipManager.sh +++ b/config/hypr/scripts/ClipManager.sh @@ -8,7 +8,7 @@ while true; do result=$( - rofi -dmenu \ + rofi -i -dmenu \ -kb-custom-1 "Control-Delete" \ -kb-custom-2 "Alt-Delete" \ -config ~/.config/rofi/config-clipboard.rasi < <(cliphist list) diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index 50b01644..6c9f610f 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -17,7 +17,7 @@ light_rofi_pywal="$HOME/.cache/wal/colors-rofi-light.rasi" pkill swaybg # Initialize swww if needed -swww query || swww init +swww query || swww-daemon # Set swww options swww="swww img" diff --git a/config/hypr/scripts/GameMode.sh b/config/hypr/scripts/GameMode.sh index 74051403..37afe066 100755 --- a/config/hypr/scripts/GameMode.sh +++ b/config/hypr/scripts/GameMode.sh @@ -20,7 +20,7 @@ if [ "$HYPRGAMEMODE" = 1 ] ; then notify-send -e -u low -i "$notif" "gamemode enabled. All animations off" exit else - swww init && swww img "$HOME/.config/rofi/.current_wallpaper" + swww-daemon && swww img "$HOME/.config/rofi/.current_wallpaper" & sleep 0.1 ${SCRIPTSDIR}/PywalSwww.sh sleep 0.5 diff --git a/config/hypr/scripts/KeyHints.sh b/config/hypr/scripts/KeyHints.sh index 796084b8..d45f2e7e 100755 --- a/config/hypr/scripts/KeyHints.sh +++ b/config/hypr/scripts/KeyHints.sh @@ -39,11 +39,13 @@ yad --width=$dynamic_width --height=$dynamic_height \ --timeout-indicator=bottom \ "ESC" "close this app" "" "=" "SUPER KEY (Windows Key)" "(SUPER KEY)" \ " enter" "Terminal" "(kitty)" \ -" or D" "App Launcher" "(rofi)" \ +" SHIFT enter" "DropDown Terminal" "(kitty-pyprland)" \ +" D" "App Launcher" "(rofi)" \ " T" "Open File Manager" "(Thunar)" \ " S" "Google Search" "(rofi)" \ " Q" "close active window" "(not kill)" \ " Shift Q " "closes a specified window" "(window)" \ +" Z" "Desktop Zoom" "(pyprland)" \ " Alt V" "Clipboard Manager" "(cliphist)" \ " W" "Choose wallpaper" "(Wallpaper Menu)" \ "CTRL ALT W" "Random wallpaper" "(via swww)" \ diff --git a/config/hypr/scripts/PywalSwww.sh b/config/hypr/scripts/PywalSwww.sh index fe067611..30a4d980 100755 --- a/config/hypr/scripts/PywalSwww.sh +++ b/config/hypr/scripts/PywalSwww.sh @@ -34,5 +34,5 @@ if [ "$ln_success" = true ]; then # wal -i "$wallpaper_path" echo 'about to execute wal' # execute pywal skipping tty and terminal changes - wal -i "$wallpaper_path" -s -t & + wal -i "$wallpaper_path" -s -t -n -e & fi diff --git a/config/hypr/scripts/RofiEmoji.sh b/config/hypr/scripts/RofiEmoji.sh index 4c51ee8a..cf6bec55 100755 --- a/config/hypr/scripts/RofiEmoji.sh +++ b/config/hypr/scripts/RofiEmoji.sh @@ -3,7 +3,7 @@ # Rofi Emoticons. Not my own. Cant remember the source sed '1,/^# # DATA # #$/d' $0 | -rofi -dmenu -config ~/.config/rofi/config-long.rasi| +rofi -i -dmenu -config ~/.config/rofi/config-long.rasi| cut -d ' ' -f 1 | tr -d '\n' | wl-copy exit diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index 309114dc..d2ee51a2 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -3,7 +3,7 @@ # Screenshots scripts iDIR="$HOME/.config/swaync/icons" -sDIR="$HOME/.config/hypr/UserScripts" +sDIR="$HOME/.config/hypr/scripts" notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png" time=$(date "+%d-%b_%H-%M-%S") diff --git a/config/hypr/scripts/Sounds.sh b/config/hypr/scripts/Sounds.sh new file mode 100755 index 00000000..a749114c --- /dev/null +++ b/config/hypr/scripts/Sounds.sh @@ -0,0 +1,70 @@ +#!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# This script is used to play system sounds. +# Script is used by Volume.Sh and ScreenShots.sh + +theme="freedesktop" # Set the theme for the system sounds. +mute=false # Set to true to mute the system sounds. + +# Mute individual sounds here. +muteScreenshots=false +muteVolume=false + +# Exit if the system sounds are muted. +if [[ "$mute" = true ]]; then + exit 0 +fi + +# Choose the sound to play. +if [[ "$1" == "--screenshot" ]]; then + if [[ "$muteScreenshots" = true ]]; then + exit 0 + fi + soundoption="screen-capture.*" +elif [[ "$1" == "--volume" ]]; then + if [[ "$muteVolume" = true ]]; then + exit 0 + fi + soundoption="audio-volume-change.*" +else + echo -e "Available sounds: --screenshot, --volume" + exit 0 +fi + +# Set the directory defaults for system sounds. +if [ -d "/run/current-system/sw/share/sounds" ]; then + systemDIR="/run/current-system/sw/share/sounds" # NixOS +else + systemDIR="/usr/share/sounds" +fi +userDIR="$HOME/.local/share/sounds" +defaultTheme="freedesktop" + +# Prefer the user's theme, but use the system's if it doesn't exist. +sDIR="$systemDIR/$defaultTheme" +if [ -d "$userDIR/$theme" ]; then + sDIR="$userDIR/$theme" +elif [ -d "$systemDIR/$theme" ]; then + sDIR="$systemDIR/$theme" +fi + +# Get the theme that it inherits. +iTheme=$(cat "$sDIR/index.theme" | grep -i "inherits" | cut -d "=" -f 2) +iDIR="$sDIR/../$iTheme" + +# Find the sound file and play it. +sound_file=$(find $sDIR/stereo -name "$soundoption" -print -quit) +if ! test -f "$sound_file"; then + sound_file=$(find $iDIR/stereo -name "$soundoption" -print -quit) + if ! test -f "$sound_file"; then + sound_file=$(find $userDIR/$defaultTheme/stereo -name "$soundoption" -print -quit) + if ! test -f "$sound_file"; then + sound_file=$(find $systemDIR/$defaultTheme/stereo -name "$soundoption" -print -quit) + if ! test -f "$sound_file"; then + echo "Error: Sound file not found." + exit 1 + fi + fi + fi +fi +pw-play "$sound_file"
\ No newline at end of file diff --git a/config/hypr/scripts/Volume.sh b/config/hypr/scripts/Volume.sh index d2fef87e..19868caf 100755 --- a/config/hypr/scripts/Volume.sh +++ b/config/hypr/scripts/Volume.sh @@ -3,7 +3,7 @@ # Scripts for volume controls for audio and mic iDIR="$HOME/.config/swaync/icons" -sDIR="$HOME/.config/hypr/UserScripts" +sDIR="$HOME/.config/hypr/scripts" # Get Volume get_volume() { diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh index a70953bb..03029889 100755 --- a/config/hypr/scripts/WaybarLayout.sh +++ b/config/hypr/scripts/WaybarLayout.sh @@ -38,7 +38,7 @@ restart_waybar_if_needed() { # Main function main() { - choice=$(menu | rofi -dmenu -config "$rofi_config") + choice=$(menu | rofi -i -dmenu -config "$rofi_config") if [[ -z "$choice" ]]; then echo "No option selected. Exiting." diff --git a/config/hypr/scripts/WaybarStyles.sh b/config/hypr/scripts/WaybarStyles.sh index 4cd484b0..2e994780 100755 --- a/config/hypr/scripts/WaybarStyles.sh +++ b/config/hypr/scripts/WaybarStyles.sh @@ -40,7 +40,7 @@ restart_waybar_if_needed() { # Main function main() { - choice=$(menu | rofi -dmenu -config "$rofi_config") + choice=$(menu | rofi -i -dmenu -config "$rofi_config") if [[ -z "$choice" ]]; then echo "No option selected. Exiting." diff --git a/config/hypr/scripts/Wlogout.sh b/config/hypr/scripts/Wlogout.sh index 1987e285..58e1fd68 100755 --- a/config/hypr/scripts/Wlogout.sh +++ b/config/hypr/scripts/Wlogout.sh @@ -8,8 +8,8 @@ A_2160=680 B_2160=750 A_1440=500 B_1440=550 -A_1080=300 -B_1080=380 +A_1080=400 +B_1080=400 A_720=50 B_720=50 |
