diff options
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/ChangeLayoutMenu.sh | 42 | ||||
| -rwxr-xr-x | config/hypr/scripts/ClipManager.sh | 17 | ||||
| -rwxr-xr-x | config/hypr/scripts/DarkLight-swaybg.sh | 57 | ||||
| -rwxr-xr-x | config/hypr/scripts/DarkLight.sh | 26 | ||||
| -rwxr-xr-x | config/hypr/scripts/Help.sh | 3 | ||||
| -rwxr-xr-x | config/hypr/scripts/KeyHints.sh | 38 | ||||
| -rwxr-xr-x | config/hypr/scripts/Polkit-NixOS.sh | 19 | ||||
| -rwxr-xr-x | config/hypr/scripts/PortalHyprland.sh | 8 | ||||
| -rwxr-xr-x | config/hypr/scripts/PywalSwww.sh | 29 | ||||
| -rwxr-xr-x | config/hypr/scripts/QuickEdit.sh | 32 | ||||
| -rwxr-xr-x | config/hypr/scripts/Refresh.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/RofiBeats.sh (renamed from config/hypr/scripts/WofiBeats.sh) | 20 | ||||
| -rwxr-xr-x | config/hypr/scripts/RofiEmoji.sh (renamed from config/hypr/scripts/WofiEmoji.sh) | 11 | ||||
| -rwxr-xr-x | config/hypr/scripts/Wallpaper.sh | 6 | ||||
| -rwxr-xr-x | config/hypr/scripts/WallpaperSelect.sh | 31 | ||||
| -rwxr-xr-x | config/hypr/scripts/WaybarStyles.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/Weather.py | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/Wofi.sh | 11 | ||||
| -rwxr-xr-x | config/hypr/scripts/WofiBig.sh | 11 |
19 files changed, 151 insertions, 218 deletions
diff --git a/config/hypr/scripts/ChangeLayoutMenu.sh b/config/hypr/scripts/ChangeLayoutMenu.sh index 52e6aa34..bebe0c0f 100755 --- a/config/hypr/scripts/ChangeLayoutMenu.sh +++ b/config/hypr/scripts/ChangeLayoutMenu.sh @@ -5,27 +5,6 @@ CONFIG="$HOME/.config/waybar/configs" WCONFIG="$HOME/.config/waybar/config" -#wofi configs -CONFIGB="$HOME/.config/wofi/WofiBig/config" -STYLE="$HOME/.config/wofi/style.css" -COLORS="$HOME/.config/wofi/colors" -WOFICONFIGS="$HOME/.config/wofi/configs" -WOFICONFIG="$HOME/.config/wofi/config" - -# wofi window config (in %) -WIDTH=12 -HEIGHT=40 - -## Wofi Command -wofi_command="wofi --show dmenu \ - --prompt choose... - --conf $CONFIGB --style $STYLE --color $COLORS \ - --width=$WIDTH% --height=$HEIGHT% \ - --cache-file=/dev/null \ - --hide-scroll --no-actions \ - --matching=fuzzy" - - menu(){ printf "1. default\n" printf "2. plasma-style\n" @@ -44,59 +23,46 @@ printf "14. no panel" } main() { - choice=$(menu | ${wofi_command} | cut -d. -f1) + choice=$(menu | rofi -dmenu -config ~/.config/rofi/config-long.rasi | cut -d. -f1) case $choice in 1) ln -sf "$CONFIG/config-default" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-default" "$WOFICONFIG" ;; 2) ln -sf "$CONFIG/config-plasma" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-plasma" "$WOFICONFIG" ;; 3) ln -sf "$CONFIG/config-gnome" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-gnome" "$WOFICONFIG" ;; 4) ln -sf "$CONFIG/config-simple" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-default" "$WOFICONFIG" ;; 5) ln -sf "$CONFIG/config-simple2" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-default" "$WOFICONFIG" ;; 6) ln -sf "$CONFIG/config-dual" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-default" "$WOFICONFIG" ;; 7) ln -sf "$CONFIG/config-left" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-default" "$WOFICONFIG" ;; 8) ln -sf "$CONFIG/config-right" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-default" "$WOFICONFIG" ;; 9) ln -sf "$CONFIG/config-dual-TL" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-default" "$WOFICONFIG" ;; 10) ln -sf "$CONFIG/config-dual-TR" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-default" "$WOFICONFIG" ;; 11) ln -sf "$CONFIG/config-dual-BL" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-default" "$WOFICONFIG" ;; 12) ln -sf "$CONFIG/config-dual-BR" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-default" "$WOFICONFIG" ;; 13) ln -sf "$CONFIG/config-all" "$WCONFIG" - ln -sf "$WOFICONFIGS/config-default" "$WOFICONFIG" ;; 14) if pgrep -x "waybar" >/dev/null; then @@ -109,9 +75,9 @@ main() { esac } -# Check if wofi is already running -if pidof wofi >/dev/null; then - pkill wofi +# Check if rofi is already running +if pidof rofi >/dev/null; then + pkill rofi exit 0 else main diff --git a/config/hypr/scripts/ClipManager.sh b/config/hypr/scripts/ClipManager.sh index a171b39c..eb717eaa 100755 --- a/config/hypr/scripts/ClipManager.sh +++ b/config/hypr/scripts/ClipManager.sh @@ -1,14 +1,9 @@ #!/bin/bash +# +# Clipboard Manager -# WOFI STYLES -CONFIG="$HOME/.config/wofi/WofiBig/config" -STYLE="$HOME/.config/wofi/style.css" -COLORS="$HOME/.config/wofi/colors" - -if [[ ! $(pidof wofi) ]]; then - cliphist list | wofi --show dmenu --prompt 'Search...' \ - --conf ${CONFIG} --style ${STYLE} --color ${COLORS} \ - --width=600 --height=400 | cliphist decode | wl-copy +if [[ ! $(pidof rofi) ]]; then + cliphist list | rofi -dmenu -config ~/.config/rofi/config-long.rasi | cliphist decode | wl-copy else - pkill wofi -fi
\ No newline at end of file + pkill rofi +fi diff --git a/config/hypr/scripts/DarkLight-swaybg.sh b/config/hypr/scripts/DarkLight-swaybg.sh deleted file mode 100755 index ad8aa199..00000000 --- a/config/hypr/scripts/DarkLight-swaybg.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -set -x -# Define the path -wallpaper_path="$HOME/Pictures/wallpapers/Dynamic-Wallpapers" -hypr_config_path="$HOME/.config/hypr" -waybar_config="$HOME/.config/waybar" -dunst_config="$HOME/.config/dunst" -wofi_config="$HOME/.config/wofi" - -# Tokyo Night -light_gtk_theme="Tokyonight-Light-B" -dark_gtk_theme="Tokyonight-Dark-B" -light_icon_theme="TokyoNight-SE" -dark_icon_theme="TokyoNight-SE" - -# Define functions for notifying user and updating symlinks -notify_user() { - notify-send -h string:x-canonical-private-synchronous:sys-notify -u normal "Switching to $1 mode" -} - -# Determine the current wallpaper mode by checking a configuration file -if [ "$(cat ~/.wallpaper_mode)" = "light" ]; then - current_mode="light" - next_mode="dark" -else - current_mode="dark" - next_mode="light" -fi -path_param=$(echo $next_mode | sed 's/.*/\u&/') - -notify_user "$next_mode" -ln -sf "${waybar_config}/style/style-${next_mode}.css" "${waybar_config}/style.css" -ln -sf "${dunst_config}/styles/dunstrc-${next_mode}" "${dunst_config}/styles/dunstrc" -ln -sf "${wofi_config}/styles/style-${next_mode}.css" "${wofi_config}/style.css" - -gtk_theme="${next_mode}_gtk_theme" -icon_theme="${next_mode}_icon_theme" - -gsettings set org.gnome.desktop.interface gtk-theme "${!gtk_theme}" -gsettings set org.gnome.desktop.interface icon-theme "${!icon_theme}" - -# Find the next wallpaper if one exists -current_wallpaper="$(cat ~/.current_wallpaper)" -next_wallpaper="${current_wallpaper/_"$current_mode"/_"$next_mode"}" - -if ! [ -f "$next_wallpaper" ]; then - next_wallpaper="$(find "${wallpaper_path/"${path_param}"}" -type f -iname "*_"${next_mode}".jpg" -print0 | shuf -n1 -z | xargs -0)" -fi - -swaybg -m fill -i "${next_wallpaper}" & - -# Update the configuration file to reflect the new wallpaper mode and current wallpaper -echo "$next_mode" > ~/.wallpaper_mode -echo "$next_wallpaper" > ~/.current_wallpaper - -sleep 2 -exec ~/.config/hypr/scripts/Refresh.sh &
\ No newline at end of file diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index 86c1f111..f20dc337 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -5,7 +5,10 @@ wallpaper_path="$HOME/Pictures/wallpapers/Dynamic-Wallpapers" hypr_config_path="$HOME/.config/hypr" waybar_config="$HOME/.config/waybar" dunst_config="$HOME/.config/dunst" -wofi_config="$HOME/.config/wofi" + +dark_rofi_pywal="$HOME/.cache/wal/colors-rofi-dark.rasi" +light_rofi_pywal="$HOME/.cache/wal/colors-rofi-light.rasi" + # Tokyo Night light_gtk_theme="Tokyonight-Light-B" @@ -28,7 +31,7 @@ notify_user() { } # Determine the current wallpaper mode by checking a configuration file -if [ "$(cat ~/.wallpaper_mode)" = "light" ]; then +if [ "$(cat ~/.cache/.wallpaper_mode)" = "light" ]; then current_mode="light" next_mode="dark" else @@ -38,9 +41,15 @@ fi path_param=$(echo $next_mode | sed 's/.*/\u&/') notify_user "$next_mode" -ln -sf "${waybar_config}/style/style-${next_mode}.css" "${waybar_config}/style.css" -ln -sf "${dunst_config}/styles/dunstrc-${next_mode}" "${dunst_config}/dunstrc" -ln -sf "${wofi_config}/styles/style-${next_mode}.css" "${wofi_config}/style.css" +ln -sf "${waybar_config}/style/style-pywal.css" "${waybar_config}/style.css" +ln -sf "${dunst_config}/styles/dunstrc-${next_mode}" "${dunst_config}/styles/dunstrc" + +# Symlink for rofi theme +if [ "$next_mode" = "dark" ]; then + ln -sf $dark_rofi_pywal "$HOME/.config/rofi/pywal-color/pywal-theme.rasi" +else + ln -sf $light_rofi_pywal "$HOME/.config/rofi/pywal-color/pywal-theme.rasi" +fi gtk_theme="${next_mode}_gtk_theme" icon_theme="${next_mode}_icon_theme" @@ -49,7 +58,7 @@ gsettings set org.gnome.desktop.interface gtk-theme "${!gtk_theme}" gsettings set org.gnome.desktop.interface icon-theme "${!icon_theme}" # Find the next wallpaper if one exists -current_wallpaper="$(cat ~/.current_wallpaper)" +current_wallpaper="$(cat ~/.cache/.current_wallpaper)" next_wallpaper="${current_wallpaper/_"$current_mode"/_"$next_mode"}" if ! [ -f "$next_wallpaper" ]; then @@ -59,8 +68,9 @@ fi $swww "${next_wallpaper}" $effect # Update the configuration file to reflect the new wallpaper mode and current wallpaper -echo "$next_mode" > ~/.wallpaper_mode -echo "$next_wallpaper" > ~/.current_wallpaper +echo "$next_mode" > ~/.cache/.wallpaper_mode +echo "$next_wallpaper" > ~/.cache/.current_wallpaper +exec ~/.config/hypr/scripts/PywalSwww.sh & sleep 2 exec ~/.config/hypr/scripts/Refresh.sh &
\ No newline at end of file diff --git a/config/hypr/scripts/Help.sh b/config/hypr/scripts/Help.sh index 565e7e52..38bcdec8 100755 --- a/config/hypr/scripts/Help.sh +++ b/config/hypr/scripts/Help.sh @@ -1,2 +1,3 @@ #!/bin/bash -foot -e vim ~/.config/hypr/HelpFile.md + +mousepad ~/.config/hypr/HelpFile.md diff --git a/config/hypr/scripts/KeyHints.sh b/config/hypr/scripts/KeyHints.sh new file mode 100755 index 00000000..d95c16e1 --- /dev/null +++ b/config/hypr/scripts/KeyHints.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +yad --width=1000 --height=900 \ +--center \ +--title="Keybindings" \ +--no-buttons \ +--list \ +--column=Key: \ +--column=Description: \ +--column=Command: \ +--timeout=30 \ +--timeout-indicator=bottom \ +"ESC" "close this app" "" "=" "SUPER KEY" "(SUPER KEY)" \ +" enter" "Terminal" "(kitty)" \ +" D" "App Launcher" "(rofi)" \ +" T" "Open File Manager" "(Thunar)" \ +" Q or Shift Q " "close focused app" "(kill)" \ +" Alt V" "Clipboard Manager" "(cliphist)" \ +" CTRL W" "Choose wallpaper" "(swww)" \ +" W" "Random wallpaper" "(swww)" \ +" ALT W" "Choose waybar layout" "(waybar layout)" \ +" SHIFT W" "cycle waybar styles" "(waybar styles)" \ +" Print" "screenshot" "(grim)" \ +" Shift Print" "screenshot region" "(grim + slurp)" \ +" Shift S" "screenshot region" "(swappy)" \ +"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" \ +" Spacebar" "Toggle Dwindle | Master Layout" "Hyprland Layout" \ +" Shift F" "Toggle all windows to float" "" \ +" SHIFT H" "Launch a small Help File" "" \ +" H" "Launch this app" "" \ +" E" "View or EDIT Keybinds, Settings, Monitor" "" \ +"" "" "" \ +"" "This window will auto-close in 30 secs" ""\ + + diff --git a/config/hypr/scripts/Polkit-NixOS.sh b/config/hypr/scripts/Polkit-NixOS.sh new file mode 100755 index 00000000..ef5e74fd --- /dev/null +++ b/config/hypr/scripts/Polkit-NixOS.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# 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") + + # 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 diff --git a/config/hypr/scripts/PortalHyprland.sh b/config/hypr/scripts/PortalHyprland.sh index 0142e774..70a994ed 100755 --- a/config/hypr/scripts/PortalHyprland.sh +++ b/config/hypr/scripts/PortalHyprland.sh @@ -1,9 +1,9 @@ #!/bin/bash sleep 1 -pkill xdg-desktop-portal-hyprland -pkill xdg-desktop-portal-wlr -pkill xdg-desktop-portal-gnome -pkill xdg-desktop-portal +killall xdg-desktop-portal-hyprland +killall xdg-desktop-portal-wlr +killall xdg-desktop-portal-gnome +killall xdg-desktop-portal sleep 1 /usr/lib/xdg-desktop-portal-hyprland & /usr/libexec/xdg-desktop-portal-hyprland & diff --git a/config/hypr/scripts/PywalSwww.sh b/config/hypr/scripts/PywalSwww.sh new file mode 100755 index 00000000..1532878a --- /dev/null +++ b/config/hypr/scripts/PywalSwww.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Define the path to the swww cache directory +cache_dir="$HOME/.cache/swww/" + +# Get a list of monitor outputs +monitor_outputs=($(ls "$cache_dir")) + +# Loop through monitor outputs +for output in "${monitor_outputs[@]}"; do + # Construct the full path to the cache file + cache_file="$cache_dir$output" + + # Check if the cache file exists for the current monitor output + if [ -f "$cache_file" ]; then + # Get the wallpaper path from the cache file + wallpaper_path=$(cat "$cache_file") + + # Copy the wallpaper to the location Rofi can access + cp "$wallpaper_path" "$HOME/.config/rofi/.current_wallpaper" + + break # Exit the loop after processing the first found monitor output + fi +done + + +# execute pywal + +wal -i $wallpaper_path
\ No newline at end of file diff --git a/config/hypr/scripts/QuickEdit.sh b/config/hypr/scripts/QuickEdit.sh index 87380858..36213c54 100755 --- a/config/hypr/scripts/QuickEdit.sh +++ b/config/hypr/scripts/QuickEdit.sh @@ -1,25 +1,7 @@ #!/bin/bash -# WOFI STYLES -CONFIG="$HOME/.config/wofi/WofiBig/config" -STYLE="$HOME/.config/wofi/style.css" -COLORS="$HOME/.config/wofi/colors" - hyprDir="$HOME/.config/hypr/configs" -# wofi window config (in %) -WIDTH=10 -HEIGHT=20 - -## Wofi Command -wofi_command="wofi --show dmenu \ - --prompt choose to view or edit... - --conf $CONFIG --style $STYLE --color $COLORS \ - --width=$WIDTH% --height=$HEIGHT% \ - --cache-file=/dev/null \ - --hide-scroll --no-actions \ - --matching=fuzzy" - menu(){ printf "1. view Env-variables\n" printf "2. view Rules\n" @@ -30,25 +12,25 @@ menu(){ } main() { - choice=$(menu | ${wofi_command} | cut -d. -f1) + choice=$(menu | rofi -dmenu -config ~/.config/rofi/config-compact.rasi | cut -d. -f1) case $choice in 1) - foot -e vim "$hyprDir/ENVariables.conf" + kitty -e nano "$hyprDir/ENVariables.conf" ;; 2) - foot -e vim "$hyprDir/WindowRules.conf" + kitty -e nano "$hyprDir/WindowRules.conf" ;; 3) - foot -e vim "$hyprDir/Execs.conf" + kitty -e nano "$hyprDir/Execs.conf" ;; 4) - foot -e vim "$hyprDir/Keybinds.conf" + kitty -e nano "$hyprDir/Keybinds.conf" ;; 5) - foot -e vim "$hyprDir/Monitors.conf" + kitty -e nano "$hyprDir/Monitors.conf" ;; 6) - foot -e vim "$hyprDir/Settings.conf" + kitty -e nano "$hyprDir/Settings.conf" ;; *) ;; diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh index 0d32ba6f..8b9597d1 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -3,7 +3,7 @@ SCRIPTSDIR=$HOME/.config/hypr/scripts # Kill already running process -_ps=(waybar mako dunst wofi) +_ps=(waybar mako dunst rofi) for _prs in "${_ps[@]}"; do if [[ $(pidof ${_prs}) ]]; then pkill ${_prs} diff --git a/config/hypr/scripts/WofiBeats.sh b/config/hypr/scripts/RofiBeats.sh index 0a3b5739..37c1bba6 100755 --- a/config/hypr/scripts/WofiBeats.sh +++ b/config/hypr/scripts/RofiBeats.sh @@ -1,22 +1,7 @@ #!/bin/bash ## Files -CONFIG="$HOME/.config/wofi/WofiBig/config" -STYLE="$HOME/.config/wofi/style.css" -COLORS="$HOME/.config/wofi/colors" -iDIR="$HOME/.config/dunst/icons" - -# wofi window config (in %) -WIDTH=12 -HEIGHT=30 -## Wofi Command -wofi_command="wofi --show dmenu \ - --prompt choose... - --conf $CONFIG --style $STYLE --color $COLORS \ - --width=$WIDTH% --height=$HEIGHT% \ - --cache-file=/dev/null \ - --hide-scroll --no-actions \ - --matching=fuzzy" +iDIR="$HOME/.config/dunst/icons" notification(){ notify-send -h string:x-canonical-private-synchronous:sys-notify -u normal -i "$iDIR/music.png" "Playing now: " "$@" @@ -34,7 +19,8 @@ printf "8. Youtube Remix\n" printf "9. Korean Drama OST" } main() { -choice=$(menu | ${wofi_command} | cut -d. -f1) +choice=$(menu | rofi -dmenu -config ~/.config/rofi/config-rofi-Beats.rasi | cut -d. -f1) + case $choice in 1) notification "Lofi Girl ☕️🎶"; diff --git a/config/hypr/scripts/WofiEmoji.sh b/config/hypr/scripts/RofiEmoji.sh index 88c1b199..4540f577 100755 --- a/config/hypr/scripts/WofiEmoji.sh +++ b/config/hypr/scripts/RofiEmoji.sh @@ -1,16 +1,7 @@ #!/bin/bash -# WOFI STYLES -CONFIG="$HOME/.config/wofi/WofiBig/config" -STYLE="$HOME/.config/wofi/style.css" -COLORS="$HOME/.config/wofi/colors" - -# wofi window config (in %) -WIDTH=40 -HEIGHT=40 - sed '1,/^### DATA ###$/d' $0 | -wofi --show dmenu -i --conf ${CONFIG} --style ${STYLE} --color ${COLORS} --width=$WIDTH% --height=$HEIGHT% | +rofi -dmenu | cut -d ' ' -f 1 | tr -d '\n' | wl-copy exit diff --git a/config/hypr/scripts/Wallpaper.sh b/config/hypr/scripts/Wallpaper.sh index db186269..20c367cc 100755 --- a/config/hypr/scripts/Wallpaper.sh +++ b/config/hypr/scripts/Wallpaper.sh @@ -45,4 +45,8 @@ case "$1" in *) change_current ;; -esac
\ No newline at end of file +esac + +exec $HOME/.config/hypr/scripts/PywalSwww.sh & +sleep 1 +exec $HOME/.config/hypr/scripts/Refresh.sh
\ No newline at end of file diff --git a/config/hypr/scripts/WallpaperSelect.sh b/config/hypr/scripts/WallpaperSelect.sh index fbe65d39..f56f6df7 100755 --- a/config/hypr/scripts/WallpaperSelect.sh +++ b/config/hypr/scripts/WallpaperSelect.sh @@ -8,10 +8,6 @@ FPS=30 TYPE="simple" DURATION=3 -# wofi window config (in %) -WIDTH=10 -HEIGHT=30 - SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION" PICS=($(ls ${DIR} | grep -e ".jpg$" -e ".jpeg$" -e ".png$" -e ".gif$")) @@ -20,24 +16,13 @@ PICS=($(ls ${DIR} | grep -e ".jpg$" -e ".jpeg$" -e ".png$" -e ".gif$")) RANDOM_PIC=${PICS[ $RANDOM % ${#PICS[@]} ]} RANDOM_PIC_NAME="${#PICS[@]}. random" -# WOFI STYLES -CONFIG="$HOME/.config/wofi/WofiBig/config" -STYLE="$HOME/.config/wofi/style.css" -COLORS="$HOME/.config/wofi/colors" - # to check if swaybg is running if [[ $(pidof swaybg) ]]; then pkill swaybg fi -## Wofi Command -wofi_command="wofi --show dmenu \ - --prompt choose... - --conf $CONFIG --style $STYLE --color $COLORS \ - --width=$WIDTH% --height=$HEIGHT% \ - --cache-file=/dev/null \ - --hide-scroll --no-actions \ - --matching=fuzzy" +## Rofi Command +rofi_command="rofi -dmenu -config ~/.config/rofi/config-short.rasi" menu(){ # Here we are looping in the PICS array that is composed of all images in the $DIR folder @@ -56,7 +41,7 @@ menu(){ swww query || swww init main() { - choice=$(menu | ${wofi_command}) + choice=$(menu | ${rofi_command}) # no choice case if [[ -z $choice ]]; then return; fi @@ -71,14 +56,18 @@ main() { swww img ${DIR}/${PICS[$pic_index]} $SWWW_PARAMS } -# Check if wofi is already running -if pidof wofi >/dev/null; then - pkill wofi +# Check if rofi is already running +if pidof rofi >/dev/null; then + pkill rofi exit 0 else main fi +exec $HOME/.config/hypr/scripts/PywalSwww.sh & + +exec $HOME/.config/hypr/scripts/Refresh.sh + # Uncomment to launch something if a choice was made # if [[ -n "$choice" ]]; then # Restart Waybar diff --git a/config/hypr/scripts/WaybarStyles.sh b/config/hypr/scripts/WaybarStyles.sh index 3bfb3681..b6819ed5 100755 --- a/config/hypr/scripts/WaybarStyles.sh +++ b/config/hypr/scripts/WaybarStyles.sh @@ -17,7 +17,9 @@ elif [ "$THEMEIS" == "mauve" ]; then elif [ "$THEMEIS" == "light" ]; then SWITCHTO="-dark" elif [ "$THEMEIS" == "dark" ]; then - SWITCHTO="-uline" + SWITCHTO="-uline" +elif [ "$THEMEIS" == "uline" ]; then + SWITCHTO="-pywal" else SWITCHTO="-default" fi diff --git a/config/hypr/scripts/Weather.py b/config/hypr/scripts/Weather.py index a364f7e1..154c1589 100755 --- a/config/hypr/scripts/Weather.py +++ b/config/hypr/scripts/Weather.py @@ -61,7 +61,7 @@ WEATHER_CODES = { data = {} -weather = requests.get("https://wttr.in/{city}?format=j1").json() +weather = requests.get(f"https://wttr.in/{city}?format=j1").json() def format_time(time): diff --git a/config/hypr/scripts/Wofi.sh b/config/hypr/scripts/Wofi.sh deleted file mode 100755 index 9b78bee0..00000000 --- a/config/hypr/scripts/Wofi.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -CONFIG="$HOME/.config/wofi/config" -STYLE="$HOME/.config/wofi/style.css" -COLORS="$HOME/.config/wofi/colors" - -if [[ ! $(pidof wofi) ]]; then - wofi --show drun --prompt 'Search...' --conf ${CONFIG} --style ${STYLE} --color ${COLORS} -else - pkill wofi -fi diff --git a/config/hypr/scripts/WofiBig.sh b/config/hypr/scripts/WofiBig.sh deleted file mode 100755 index 31d98900..00000000 --- a/config/hypr/scripts/WofiBig.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -CONFIG="$HOME/.config/wofi/WofiBig/config" -STYLE="$HOME/.config/wofi/style.css" -COLORS="$HOME/.config/wofi/colors" - -if [[ ! $(pidof wofi) ]]; then - wofi --show drun --prompt 'Search...' --conf ${CONFIG} --style ${STYLE} --color ${COLORS} -else - pkill wofi -fi |
