aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/UserScripts')
-rwxr-xr-xconfig/hypr/UserScripts/QuickEdit.sh3
-rwxr-xr-xconfig/hypr/UserScripts/RofiBeats.sh12
-rwxr-xr-xconfig/hypr/UserScripts/RofiCalc.sh6
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperEffects.sh15
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperSelect.sh3
-rwxr-xr-xconfig/hypr/UserScripts/ZshChangeTheme.sh6
6 files changed, 22 insertions, 23 deletions
diff --git a/config/hypr/UserScripts/QuickEdit.sh b/config/hypr/UserScripts/QuickEdit.sh
index e0af9dce..c71fb166 100755
--- a/config/hypr/UserScripts/QuickEdit.sh
+++ b/config/hypr/UserScripts/QuickEdit.sh
@@ -9,6 +9,7 @@ tty=kitty
# Paths to configuration directories
configs="$HOME/.config/hypr/configs"
UserConfigs="$HOME/.config/hypr/UserConfigs"
+rofi_theme="~/.config/rofi/config-edit.rasi"
# Function to display the menu options
menu() {
@@ -29,7 +30,7 @@ EOF
# Main function to handle menu selection
main() {
- choice=$(menu | rofi -i -dmenu -config ~/.config/rofi/config-compact.rasi | cut -d. -f1)
+ choice=$(menu | rofi -i -dmenu -config $rofi_theme | cut -d. -f1)
# Map choices to corresponding files
case $choice in
diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh
index 380f6b29..58241256 100755
--- a/config/hypr/UserScripts/RofiBeats.sh
+++ b/config/hypr/UserScripts/RofiBeats.sh
@@ -2,11 +2,11 @@
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# For Rofi Beats to play online Music or Locally save media files
-# Directory local music folder
+# Variables
mDIR="$HOME/Music/"
-
-# Directory for icons
iDIR="$HOME/.config/swaync/icons"
+rofi_theme="~/.config/rofi/config-rofi-Beats.rasi"
+rofi_theme_1="~/.config/rofi/config-rofi-Beats-menu.rasi"
# Online Stations. Edit as required
declare -A online_music=(
@@ -47,7 +47,7 @@ play_local_music() {
populate_local_music
# Prompt the user to select a song
- choice=$(printf "%s\n" "${filenames[@]}" | rofi -i -dmenu -config ~/.config/rofi/config-rofi-Beats.rasi)
+ choice=$(printf "%s\n" "${filenames[@]}" | rofi -i -dmenu -config $rofi_theme)
if [ -z "$choice" ]; then
exit 1
@@ -77,7 +77,7 @@ shuffle_local_music() {
# Main function for playing online music
play_online_music() {
- choice=$(printf "%s\n" "${!online_music[@]}" | rofi -i -dmenu -config ~/.config/rofi/config-rofi-Beats.rasi)
+ choice=$(printf "%s\n" "${!online_music[@]}" | rofi -i -dmenu -config $rofi_theme)
if [ -z "$choice" ]; then
exit 1
@@ -101,7 +101,7 @@ fi
# Prompt the user to choose between local and online music
-user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle Play from Music Folder" | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats-menu.rasi)
+user_choice=$(printf "Play from Online Stations\nPlay from Music Folder\nShuffle Play from Music Folder" | rofi -dmenu -config $rofi_theme_1)
case "$user_choice" in
"Play from Music Folder")
diff --git a/config/hypr/UserScripts/RofiCalc.sh b/config/hypr/UserScripts/RofiCalc.sh
index cef80b81..7bef4b6c 100755
--- a/config/hypr/UserScripts/RofiCalc.sh
+++ b/config/hypr/UserScripts/RofiCalc.sh
@@ -3,7 +3,7 @@
# /* Calculator (using qalculate) and rofi */
# /* Submitted by: https://github.com/JosephArmas */
-rofi_config="$HOME/.config/rofi/config-calc.rasi"
+rofi_theme="$HOME/.config/rofi/config-calc.rasi"
# Kill Rofi if already running before execution
if pgrep -x "rofi" >/dev/null; then
@@ -15,8 +15,8 @@ fi
while true; do
result=$(
rofi -i -dmenu \
- -config "$rofi_config" \
- -mesg "$result = $calc_result"
+ -config $rofi_theme \
+ -mesg "$result = $calc_result"
)
if [ $? -ne 0 ]; then
diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh
index 215fdf6f..2573f5e0 100755
--- a/config/hypr/UserScripts/WallpaperEffects.sh
+++ b/config/hypr/UserScripts/WallpaperEffects.sh
@@ -8,6 +8,7 @@ wallpaper_current="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current"
wallpaper_output="$HOME/.config/hypr/wallpaper_effects/.wallpaper_modified"
SCRIPTSDIR="$HOME/.config/hypr/scripts"
focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}')
+rofi_theme="~/.config/rofi/config-wallpaper-effect.rasi"
# Directory for swaync
iDIR="$HOME/.config/swaync/images"
@@ -45,9 +46,7 @@ declare -A effects=(
# Function to apply no effects
no-effects() {
swww img -o "$focused_monitor" "$wallpaper_current" $SWWW_PARAMS &&
- # Wait for swww command to complete
wait $!
- # Run other commands after swww
wallust run "$wallpaper_current" -s &&
wait $!
# Refresh rofi, waybar, wallust palettes
@@ -67,7 +66,7 @@ main() {
[[ "$effect" != "No Effects" ]] && options+=("$effect")
done
- choice=$(printf "%s\n" "${options[@]}" | LC_COLLATE=C sort | rofi -dmenu -i -config ~/.config/rofi/config-wallpaper-effect.rasi)
+ choice=$(printf "%s\n" "${options[@]}" | LC_COLLATE=C sort | rofi -dmenu -i -config $rofi_theme)
# Process user choice
if [[ -n "$choice" ]]; then
@@ -77,16 +76,14 @@ main() {
# Apply selected effect
notify-send -u normal -i "$iDIR/ja.png" "Applying:" "$choice effects"
eval "${effects[$choice]}"
- # Wait for effects to be applied
+
sleep 1
- # Execute swww command after image conversion
swww img -o "$focused_monitor" "$wallpaper_output" $SWWW_PARAMS &
- # Wait for swww command to complete
+
sleep 2
- # Wait for other commands to finish
+
wallust run "$wallpaper_output" -s &
- # Wait for other commands to finish
- sleep 0.5
+ sleep 1
# Refresh rofi, waybar, wallust palettes
"${SCRIPTSDIR}/Refresh.sh"
notify-send -u low -i "$iDIR/ja.png" "$choice" "effects applied"
diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh
index 19bb145d..61253cb3 100755
--- a/config/hypr/UserScripts/WallpaperSelect.sh
+++ b/config/hypr/UserScripts/WallpaperSelect.sh
@@ -13,6 +13,7 @@ iDIR="$HOME/.config/swaync/images"
iDIRi="$HOME/.config/swaync/icons"
# variables
+rofi_theme="~/.config/rofi/config-wallpaper.rasi"
focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}')
# swww transition config
FPS=60
@@ -33,7 +34,7 @@ RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}"
RANDOM_PIC_NAME=". random"
# Rofi command
-rofi_command="rofi -i -show -dmenu -config ~/.config/rofi/config-wallpaper.rasi"
+rofi_command="rofi -i -show -dmenu -config $rofi_theme"
# Sorting Wallpapers
menu() {
diff --git a/config/hypr/UserScripts/ZshChangeTheme.sh b/config/hypr/UserScripts/ZshChangeTheme.sh
index edfc2ecd..d43b6ff9 100755
--- a/config/hypr/UserScripts/ZshChangeTheme.sh
+++ b/config/hypr/UserScripts/ZshChangeTheme.sh
@@ -8,15 +8,16 @@
themes_dir="$HOME/.oh-my-zsh/themes"
file_extension=".zsh-theme"
-# Directory for swaync
+# Variables
iDIR="$HOME/.config/swaync/images"
+rofi_theme="~/.config/rofi/config-zsh-theme.rasi"
themes_array=($(find "$themes_dir" -type f -name "*$file_extension" -exec basename {} \; | sed -e "s/$file_extension//"))
# Add "Random" option to the beginning of the array
themes_array=("Random" "${themes_array[@]}")
-rofi_command="rofi -i -dmenu -config ~/.config/rofi/config-zsh-theme.rasi"
+rofi_command="rofi -i -dmenu -config $rofi_theme"
menu() {
for theme in "${themes_array[@]}"; do
@@ -29,7 +30,6 @@ main() {
# if nothing selected, script won't change anything
if [ -z "$choice" ]; then
- notify-send -u low -i "$iDIR/ja.png" "No theme selected." "No changes made!"
exit 0
fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage