diff options
| author | Ja.KooLit <jimmielovejay@gmail.com> | 2024-05-01 12:15:49 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-01 12:15:49 +0900 |
| commit | 41c3de1b08d253a8b9a78f7c15ee1eb2ac1d9395 (patch) | |
| tree | 7b406b2f4c32ead3fa939513d0bf7e92113d2edd /config/hypr/UserScripts | |
| parent | 8cda78812d9c70d83fff37d19c1d8362e07efb10 (diff) | |
| parent | f0fafb2890419a07616e71463e89aea26be62091 (diff) | |
Merge pull request #225 from JaKooLit/development
V2.2.9 released
Diffstat (limited to 'config/hypr/UserScripts')
| -rwxr-xr-x | config/hypr/UserScripts/RofiBeats.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/Sounds.sh | 69 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperSelect.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/ZshChangeTheme.sh | 2 |
4 files changed, 3 insertions, 72 deletions
diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index 315bcf54..e3c79587 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -28,7 +28,7 @@ notification() { # Main function main() { - choice=$(printf "%s\n" "${!menu_options[@]}" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats.rasi -i -p "") + choice=$(printf "%s\n" "${!menu_options[@]}" | rofi -i -dmenu -config ~/.config/rofi/config-rofi-Beats.rasi -p "") if [ -z "$choice" ]; then exit 1 diff --git a/config/hypr/UserScripts/Sounds.sh b/config/hypr/UserScripts/Sounds.sh deleted file mode 100755 index fb8a1f57..00000000 --- a/config/hypr/UserScripts/Sounds.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## -# This script is used to play system sounds. - -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/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 8aa9bdd8..de9c6546 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -25,7 +25,7 @@ RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}" RANDOM_PIC_NAME="${#PICS[@]}. random" # Rofi command -rofi_command="rofi -show -dmenu -config ~/.config/rofi/config-wallpaper.rasi" +rofi_command="rofi -i -show -dmenu -config ~/.config/rofi/config-wallpaper.rasi" menu() { for i in "${!PICS[@]}"; do diff --git a/config/hypr/UserScripts/ZshChangeTheme.sh b/config/hypr/UserScripts/ZshChangeTheme.sh index 7057ed2e..46d2249e 100755 --- a/config/hypr/UserScripts/ZshChangeTheme.sh +++ b/config/hypr/UserScripts/ZshChangeTheme.sh @@ -5,7 +5,7 @@ file_extension=".zsh-theme" themes_array=($(find "$themes_dir" -type f -name "*$file_extension" -exec basename {} \; | sed -e "s/$file_extension//")) -rofi_command="rofi -dmenu -config ~/.config/rofi/config-zsh-theme.rasi" +rofi_command="rofi -i -dmenu -config ~/.config/rofi/config-zsh-theme.rasi" menu() { for theme in "${themes_array[@]}"; do |
