diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2025-03-24 14:22:56 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-24 14:22:56 +0900 |
| commit | a3c975e70db5a914646cd58d58062193d025cb1b (patch) | |
| tree | 733159945f72b385944499dbae5977afc792f300 /config/hypr | |
| parent | c1f0fc471b082f59aae939c3343312e09320ca36 (diff) | |
| parent | 093e599a3411eaf3db6ebee31b8c91f8bc9e2faf (diff) | |
Merge pull request #645 from JaKooLit/development
Development to main
Diffstat (limited to 'config/hypr')
20 files changed, 596 insertions, 170 deletions
diff --git a/config/hypr/Monitor_Profiles/README b/config/hypr/Monitor_Profiles/README index b2e218c5..86075d77 100644 --- a/config/hypr/Monitor_Profiles/README +++ b/config/hypr/Monitor_Profiles/README @@ -3,7 +3,12 @@ # Create a unique file name i.e. Mirror, or Office, Scale, etc etc # tip: You can easily create a profile using nwg-displays -# after which, you can copy the ~/.config/hypr/monitors.conf file in this directory +# after creating a profile using nwg-displays, copy the ~/.config/hypr/monitors.conf file to this directory with a unique file name +# suggest not to call it default -# Note, after selecting Profiles wanted, it will copy contents into ~/.config/hypr/monitors.conf + +# Note, after selecting Profiles wanted via Rofi (SUPER SHIFT E), previous content of ~/.config/hypr/monitors.conf will be backed up and named as Previous_Profile.conf + +# Monitor profile should be loaded automatically once selected by KooL Rofi Settings ROfi Menu, unless you disabled the auto-reload function on Hyprland settings. +# However, if it does not load, kindly log out and re-login. This seem apparent if you are using a Virtual Environment. diff --git a/config/hypr/UserConfigs/01-UserDefaults.conf b/config/hypr/UserConfigs/01-UserDefaults.conf index 6949d277..ae510f82 100644 --- a/config/hypr/UserConfigs/01-UserDefaults.conf +++ b/config/hypr/UserConfigs/01-UserDefaults.conf @@ -10,7 +10,7 @@ # script will take the default EDITOR and nano as fallback $edit=${EDITOR:-nano} -# This two is for UserKeybinds.conf +# These two are for UserKeybinds.conf & Waybar Modules $term = kitty # Terminal $files = thunar # File Manager diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf index 00b5bde2..702f9a90 100644 --- a/config/hypr/UserConfigs/Startup_Apps.conf +++ b/config/hypr/UserConfigs/Startup_Apps.conf @@ -7,9 +7,13 @@ $UserScripts = $HOME/.config/hypr/UserScripts $wallDIR=$HOME/Pictures/wallpapers $lock = $scriptsDir/LockScreen.sh $SwwwRandom = $UserScripts/WallpaperAutoChange.sh +$livewallpaper="" -# wallpaper stuff / More wallpaper options below +# wallpaper stuff exec-once = swww-daemon --format xrgb +#exec-once = mpvpaper '*' -o "load-scripts=no no-audio --loop" $livewallpaper + +# wallpaper random #exec-once = $SwwwRandom $wallDIR # random wallpaper switcher every 30 minutes # Startup diff --git a/config/hypr/UserConfigs/WindowRules-new.conf b/config/hypr/UserConfigs/WindowRules-new.conf new file mode 100644 index 00000000..ed40e842 --- /dev/null +++ b/config/hypr/UserConfigs/WindowRules-new.conf @@ -0,0 +1,222 @@ +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# For window rules and layerrules +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more + +# NOTES: This is only for Hyprland > 0.48. If you use copy.sh, no need to do anything + +# note for ja: This should NOT be implemented on Debian and Ubuntu + +# windowrule - tags - add apps under appropriate tag to use the same settings +# browser tags +windowrule = tag +browser, class:^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr|[Ff]irefox-bin)$ +windowrule = tag +browser, class:^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$ +windowrule = tag +browser, class:^(chrome-.+-Default)$ # Chrome PWAs +windowrule = tag +browser, class:^([Cc]hromium)$ +windowrule = tag +browser, class:^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstable))$ +windowrule = tag +browser, class:^(Brave-browser(-beta|-dev|-unstable)?)$ +windowrule = tag +browser, class:^([Tt]horium-browser|[Cc]achy-browser)$ +windowrule = tag +browser, class:^(zen-alpha|zen)$ + +# notif tags +windowrule = tag +notif, class:^(swaync-control-center|swaync-notification-window|swaync-client|class)$ + +# KooL settings tag +windowrule = tag +KooL_Cheat, title:^(KooL Quick Cheat Sheet)$ +windowrule = tag +KooL_Settings, title:^(KooL Hyprland Settings)$ +windowrule = tag +KooL-Settings, class:^(nwg-displays|nwg-look)$ + +# terminal tags +windowrule = tag +terminal, class:^(Alacritty|kitty|kitty-dropterm)$ + +# email tags +windowrule = tag +email, class:^([Tt]hunderbird|org.gnome.Evolution)$ +windowrule = tag +email, class:^(eu.betterbird.Betterbird)$ + +# project tags +windowrule = tag +projects, class:^(codium|codium-url-handler|VSCodium)$ +windowrule = tag +projects, class:^(VSCode|code-url-handler)$ +windowrule = tag +projects, class:^(jetbrains-.+)$ # JetBrains IDEs + +# screenshare tags +windowrule = tag +screenshare, class:^(com.obsproject.Studio)$ + +# IM tags +windowrule = tag +im, class:^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$ +windowrule = tag +im, class:^([Ff]erdium)$ +windowrule = tag +im, class:^([Ww]hatsapp-for-linux)$ +windowrule = tag +im, class:^(ZapZap|com.rtosta.zapzap)$ +windowrule = tag +im, class:^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop)$ +windowrule = tag +im, class:^(teams-for-linux)$ + +# game tags +windowrule = tag +games, class:^(gamescope)$ +windowrule = tag +games, class:^(steam_app_\d+)$ + +# gamestore tags +windowrule = tag +gamestore, class:^([Ss]team)$ +windowrule = tag +gamestore, title:^([Ll]utris)$ +windowrule = tag +gamestore, class:^(com.heroicgameslauncher.hgl)$ + +# file-manager tags +windowrule = tag +file-manager, class:^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$ +windowrule = tag +file-manager, class:^(app.drey.Warp)$ + +# wallpaper tags +windowrule = tag +wallpaper, class:^([Ww]aytrogen)$ + +# multimedia tags +windowrule = tag +multimedia, class:^([Aa]udacious)$ + +# multimedia-video tags +windowrule = tag +multimedia_video, class:^([Mm]pv|vlc)$ + +# settings tags +windowrule = tag +settings, title:^(ROG Control)$ +windowrule = tag +settings, class:^(wihotspot(-gui)?)$ # wifi hotspot +windowrule = tag +settings, class:^([Bb]aobab|org.gnome.[Bb]aobab)$ # Disk usage analyzer +windowrule = tag +settings, class:^(gnome-disks|wihotspot(-gui)?)$ +windowrule = tag +settings, title:(Kvantum Manager) +windowrule = tag +settings, class:^(file-roller|org.gnome.FileRoller)$ # archive manager +windowrule = tag +settings, class:^(nm-applet|nm-connection-editor|blueman-manager)$ +windowrule = tag +settings, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$ +windowrule = tag +settings, class:^(qt5ct|qt6ct|[Yy]ad)$ +windowrule = tag +settings, class:(xdg-desktop-portal-gtk) +windowrule = tag +settings, class:^(org.kde.polkit-kde-authentication-agent-1)$ +windowrule = tag +settings, class:^([Rr]ofi)$ + +# viewer tags +windowrule = tag +viewer, class:^(gnome-system-monitor|org.gnome.SystemMonitor|io.missioncenter.MissionCenter)$ # system monitor +windowrule = tag +viewer, class:^(evince)$ # document viewer +windowrule = tag +viewer, class:^(eog|org.gnome.Loupe)$ # image viewer + +# Some special override rules +windowrule = noblur, tag:multimedia_video* +windowrule = opacity 1.0, tag:multimedia_video* + +# POSITION +# windowrule = center,floating:1 # warning, it cause even the menu to float and center. +windowrule = center, tag:KooL_Cheat* +windowrule = center, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*) +windowrule = center, title:^(ROG Control)$ +windowrule = center, tag:KooL-Settings* +windowrule = center, title:^(Keybindings)$ +windowrule = center, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$ +windowrule = center, class:^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ +windowrule = center, class:^([Ff]erdium)$ +windowrule = move 72% 7%,title:^(Picture-in-Picture)$ +#windowrule = move 72% 7%,title:^(Firefox)$ + +# windowrule to avoid idle for fullscreen apps +#windowrule = idleinhibit fullscreen, class:^(*)$ +#windowrule = idleinhibit fullscreen, title:^(*)$ +windowrule = idleinhibit fullscreen, fullscreen:1 + +# windowrule move to workspace +windowrule = workspace 1, tag:email* +windowrule = workspace 2, tag:browser* +#windowrule = workspace 3, class:^([Tt]hunar)$ +#windowrule = workspace 3, tag:projects* +windowrule = workspace 5, tag:gamestore* +windowrule = workspace 7, tag:im* +windowrule = workspace 8, tag:games* + +# windowrule move to workspace (silent) +windowrule = workspace 4 silent, tag:screenshare* +windowrule = workspace 6 silent, class:^(virt-manager)$ +windowrule = workspace 6 silent, class:^(.virt-manager-wrapped)$ +windowrule = workspace 9 silent, tag:multimedia* + +# FLOAT +windowrule = float, tag:KooL_Cheat* +windowrule = float, tag:wallpaper* +windowrule = float, tag:settings* +windowrule = float, tag:viewer* +windowrule = float, tag:KooL-Settings* +windowrule = float, class:([Zz]oom|onedriver|onedriver-launcher)$ +windowrule = float, class:(org.gnome.Calculator), title:(Calculator) +windowrule = float, class:^(mpv|com.github.rafostar.Clapper)$ +windowrule = float, class:^([Qq]alculate-gtk)$ +#windowrule = float, class:^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ +windowrule = float, class:^([Ff]erdium)$ +windowrule = float, title:^(Picture-in-Picture)$ +#windowrule = float, title:^(Firefox)$ + +# windowrule - ######### float popups and dialogue ####### +windowrule = float, title:^(Authentication Required)$ +windowrule = center, title:^(Authentication Required)$ +windowrule = float, class:(codium|codium-url-handler|VSCodium), title:negative:(.*codium.*|.*VSCodium.*) +windowrule = float, class:^(com.heroicgameslauncher.hgl)$, title:negative:(Heroic Games Launcher) +windowrule = float, class:^([Ss]team)$, title:negative:^([Ss]team)$ +windowrule = float, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*) + +windowrule = float, title:^(Add Folder to Workspace)$ +windowrule = size 70% 60%, title:^(Add Folder to Workspace)$ +windowrule = center, title:^(Add Folder to Workspace)$ + +windowrule = float, title:^(Save As)$ +windowrule = size 70% 60%, title:^(Save As)$ +windowrule = center, title:^(Save As)$ + +windowrule = float, initialTitle:(Open Files) +windowrule = size 70% 60%, initialTitle:(Open Files) + +windowrule = float, title:^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background +windowrule = center, title:^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background +windowrule = size 16% 12%, title:^(SDDM Background)$ #KooL's Dots YAD for setting SDDM background +# END of float popups and dialogue ####### + +# OPACITY +windowrule = opacity 0.9 0.7, tag:browser* +windowrule = opacity 0.9 0.8, tag:projects* +windowrule = opacity 0.94 0.86, tag:im* +windowrule = opacity 0.94 0.86, tag:multimedia* +windowrule = opacity 0.9 0.8, tag:file-manager* +windowrule = opacity 0.8 0.7, tag:terminal* +windowrule = opacity 0.8 0.7, tag:settings* +windowrule = opacity 0.82 0.75, tag:viewer* +windowrule = opacity 0.9 0.7, tag:wallpaper* +windowrule = opacity 0.8 0.7, class:^(gedit|org.gnome.TextEditor|mousepad)$ +windowrule = opacity 0.9 0.8, class:^(deluge)$ +windowrule = opacity 0.9 0.8, class:^(im.riot.Riot)$ # Element matrix client +windowrule = opacity 0.9 0.8, class:^(seahorse)$ # gnome-keyring gui +windowrule = opacity 0.95 0.75, title:^(Picture-in-Picture)$ + +# SIZE +windowrule = size 65% 90%, tag:KooL_Cheat* +windowrule = size 70% 70%, tag:wallpaper* +windowrule = size 70% 70%, tag:settings* +windowrule = size 60% 70%, class:^([Ww]hatsapp-for-linux|ZapZap|com.rtosta.zapzap)$ +windowrule = size 60% 70%, class:^([Ff]erdium)$ + +#windowrule = size 25% 25%, title:^(Picture-in-Picture)$ +#windowrule = size 25% 25%, title:^(Firefox)$ + +# PINNING +windowrule = pin, title:^(Picture-in-Picture)$ +#windowrule = pin,title:^(Firefox)$ + +# windowrule - extras +windowrule = keepaspectratio, title:^(Picture-in-Picture)$ + +# BLUR & FULLSCREEN +windowrule = noblur, tag:games* +windowrule = fullscreen, tag:games* + +#windowrule = bordercolor rgb(EE4B55) rgb(880808), fullscreen:1 +#windowrule = bordercolor rgb(282737) rgb(1E1D2D), floating:1 +#windowrule = opacity 0.8 0.8, pinned:1 + +# LAYER RULES +layerrule = blur, rofi +layerrule = ignorezero, rofi +layerrule = blur, notifications +layerrule = ignorezero, notifications +#layerrule = ignorealpha 0.5, tag:notif* + +#layerrule = ignorezero, class:^([Rr]ofi)$ +#layerrule = blur, class:^([Rr]ofi)$ +#layerrule = unset,class:^([Rr]ofi)$ +#layerrule = ignorezero, <rofi> + +#layerrule = ignorezero, overview +#layerrule = blur, overview
\ No newline at end of file diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index b134c8a2..781e9f64 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -1,6 +1,6 @@ #!/bin/bash # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## -# For Rofi Beats to play online Music or Locally save media files +# For Rofi Beats to play online Music or Locally saved media files # Variables mDIR="$HOME/Music/" @@ -41,7 +41,7 @@ populate_local_music() { # Function for displaying notifications notification() { - notify-send -u normal -i "$iDIR/music.png" " Now Playing:" " $@" + notify-send -u normal -i "$iDIR/music.png" "Now Playing:" "$@" } # Main function for playing local music @@ -60,8 +60,6 @@ play_local_music() { if [ "${filenames[$i]}" = "$choice" ]; then notification "$choice" - - # Play the selected local music file using mpv mpv --playlist-start="$i" --loop-playlist --vid=no "${local_music[@]}" break @@ -95,18 +93,30 @@ play_online_music() { mpv --shuffle --vid=no "$link" } +# Function to stop music and kill mpv processes +stop_music() { + mpv_pids=$(pgrep -x mpv) -# Check if an online music process is running and send a notification, otherwise run the main function -pkill mpv && notify-send -u low -i "$iDIR/music.png" "Music stopped" || { + if [ -n "$mpv_pids" ]; then + # Get the PID of the mpv process used by mpvpaper (using the unique argument added) + mpvpaper_pid=$(ps aux | grep -- 'unique-wallpaper-process' | grep -v 'grep' | awk '{print $2}') -# Check if rofi is already running -if pidof rofi > /dev/null; then - pkill rofi -fi + for pid in $mpv_pids; do + if ! echo "$mpvpaper_pid" | grep -q "$pid"; then + kill -9 $pid || true + fi + done + notify-send -u low -i "$iDIR/music.png" "Music stopped" || true + fi +} +# Check if music is already playing +if pgrep -x "mpv" > /dev/null; then + stop_music +else + user_choice=$(printf "Play from Online Stations\nPlay from Music directory\nShuffle Play from Music directory" | rofi -dmenu -config $rofi_theme_1) -# Prompt the user to choose between local and online music -user_choice=$(printf "Play from Online Stations\nPlay from Music directory\nShuffle Play from Music directory" | rofi -dmenu -config $rofi_theme_1) + echo "User choice: $user_choice" case "$user_choice" in "Play from Music directory") @@ -119,7 +129,6 @@ user_choice=$(printf "Play from Online Stations\nPlay from Music directory\nShuf shuffle_local_music ;; *) - echo "Invalid choice" ;; esac -} +fi
\ No newline at end of file diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index 7b1cf00b..b1d1a4b1 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -76,6 +76,11 @@ main() { # Apply selected effect notify-send -u normal -i "$iDIR/ja.png" "Applying:" "$choice effects" eval "${effects[$choice]}" + + # intial kill process + for pid in swaybg mpvpaper; do + killall -SIGUSR1 "$pid" + done sleep 1 swww img -o "$focused_monitor" "$wallpaper_output" $SWWW_PARAMS & diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index cf677f9c..b5943586 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) # WALLPAPERS PATH @@ -12,42 +12,57 @@ wallpaper_current="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" iDIR="$HOME/.config/swaync/images" iDIRi="$HOME/.config/swaync/icons" +# swww transition config +FPS=60 +TYPE="any" +DURATION=2 +BEZIER=".43,1.19,1,.4" +SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION --transition-bezier $BEZIER" + # Check if package bc exists if ! command -v bc &>/dev/null; then -notify-send -i "$iDIR/ja.png" "bc missing" "Install package bc first" -exit 1 + notify-send -i "$iDIR/error.png" "bc missing" "Install package bc first" + exit 1 fi -# variables +# Variables rofi_theme="$HOME/.config/rofi/config-wallpaper.rasi" focused_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name') +# Ensure focused_monitor is detected +if [[ -z "$focused_monitor" ]]; then + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Could not detect focused monitor" + exit 1 +fi + # Monitor details scale_factor=$(hyprctl monitors -j | jq -r --arg mon "$focused_monitor" '.[] | select(.name == $mon) | .scale') monitor_height=$(hyprctl monitors -j | jq -r --arg mon "$focused_monitor" '.[] | select(.name == $mon) | .height') icon_size=$(echo "scale=1; ($monitor_height * 3) / ($scale_factor * 150)" | bc) - -# Apply limit adjusted_icon_size=$(echo "$icon_size" | awk '{if ($1 < 15) $1 = 20; if ($1 > 25) $1 = 25; print $1}') - -# Setting the rofi override with the adjusted icon size rofi_override="element-icon{size:${adjusted_icon_size}%;}" -# swww transition config -FPS=60 -TYPE="any" -DURATION=2 -BEZIER=".43,1.19,1,.4" -SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION --transition-bezier $BEZIER" +# Kill existing wallpaper daemons for video +kill_wallpaper_for_video() { + swww kill 2>/dev/null + pkill mpvpaper 2>/dev/null + pkill swaybg 2>/dev/null + pkill hyprpaper 2>/dev/null +} -# Check if swaybg is running -if pidof swaybg > /dev/null; then - pkill swaybg -fi +# Kill existing wallpaper daemons for image +kill_wallpaper_for_image() { + pkill mpvpaper 2>/dev/null + pkill swaybg 2>/dev/null + pkill hyprpaper 2>/dev/null +} -# Retrieve image files using null delimiter to handle spaces in filenames -mapfile -d '' PICS < <(find -L "${wallDIR}" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.pnm" -o -iname "*.tga" -o -iname "*.tiff" -o -iname "*.webp" -o -iname "*.bmp" -o -iname "*.farbfeld" -o -iname "*.png" -o -iname "*.gif" \) -print0) +# Retrieve wallpapers (both images & videos) +mapfile -d '' PICS < <(find -L "${wallDIR}" -type f \( \ + -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.gif" -o \ + -iname "*.bmp" -o -iname "*.tiff" -o -iname "*.webp" -o \ + -iname "*.mp4" -o -iname "*.mkv" -o -iname "*.mov" -o -iname "*.webm" \) -print0) RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}" RANDOM_PIC_NAME=". random" @@ -57,112 +72,168 @@ rofi_command="rofi -i -show -dmenu -config $rofi_theme -theme-str $rofi_override # Sorting Wallpapers menu() { - # Sort the PICS array IFS=$'\n' sorted_options=($(sort <<<"${PICS[*]}")) - - # Place ". random" at the beginning with the random picture as an icon + printf "%s\x00icon\x1f%s\n" "$RANDOM_PIC_NAME" "$RANDOM_PIC" - + for pic_path in "${sorted_options[@]}"; do pic_name=$(basename "$pic_path") - - # Displaying .gif to indicate animated images - if [[ ! "$pic_name" =~ \.gif$ ]]; then - printf "%s\x00icon\x1f%s\n" "$(echo "$pic_name" | cut -d. -f1)" "$pic_path" + if [[ "$pic_name" =~ \.gif$ ]]; then + cache_gif_image="$HOME/.cache/gif_preview/${pic_name}.png" + if [[ ! -f "$cache_gif_image" ]]; then + mkdir -p "$HOME/.cache/gif_preview" + magick "$pic_path[0]" -resize 1920x1080 "$cache_gif_image" + fi + printf "%s\x00icon\x1f%s\n" "$pic_name" "$cache_gif_image" + elif [[ "$pic_name" =~ \.(mp4|mkv|mov|webm|MP4|MKV|MOV|WEBM)$ ]]; then + cache_preview_image="$HOME/.cache/video_preview/${pic_name}.png" + if [[ ! -f "$cache_preview_image" ]]; then + mkdir -p "$HOME/.cache/video_preview" + ffmpeg -v error -y -i "$pic_path" -ss 00:00:01.000 -vframes 1 "$cache_preview_image" + fi + printf "%s\x00icon\x1f%s\n" "$pic_name" "$cache_preview_image" else - printf "%s\n" "$pic_name" + printf "%s\x00icon\x1f%s\n" "$(echo "$pic_name" | cut -d. -f1)" "$pic_path" fi done } -# initiate swww if not running -swww query || swww-daemon --format xrgb +# Offer SDDM Sequioa Wallpaper Option (only for non-video wallpapers) +set_sddm_wallpaper() { + sleep 1 + sddm_sequoia="/usr/share/sddm/themes/sequoia_2" + + if [ -d "$sddm_sequoia" ]; then + + # Check if yad is running to avoid multiple notifications + if pidof yad >/dev/null; then + killall yad + fi + + if yad --info --text="Set current wallpaper as SDDM background?\n\nNOTE: This only applies to SEQUOIA SDDM Theme" \ + --text-align=left \ + --title="SDDM Background" \ + --timeout=5 \ + --timeout-indicator=right \ + --button="yes:0" \ + --button="no:1"; then + + # Check if terminal exists + if ! command -v "$terminal" &>/dev/null; then + notify-send -i "$iDIR/error.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background" + exit 1 + fi + + # Open terminal to enter password + $terminal -e bash -c "echo 'Enter your password to set wallpaper as SDDM Background'; \ + sudo cp -r $wallpaper_current '$sddm_sequoia/backgrounds/default' && \ + notify-send -i '$iDIR/ja.png' 'SDDM' 'Background SET'" + fi + fi +} + +modify_startup_config() { + local selected_file="$1" + local startup_config="$HOME/.config/hypr/UserConfigs/Startup_Apps.conf" + + # Check if it's a live wallpaper (video) + if [[ "$selected_file" =~ \.(mp4|mkv|mov|webm)$ ]]; then + # For video wallpapers: + sed -i '/^\s*exec-once\s*=\s*swww-daemon\s*--format\s*xrgb\s*$/s/^/\#/' "$startup_config" + sed -i '/^\s*#\s*exec-once\s*=\s*mpvpaper\s*.*$/s/^#\s*//;' "$startup_config" + + # Update the livewallpaper variable with the selected video path (using $HOME) + selected_file="${selected_file/#$HOME/\$HOME}" # Replace /home/user with $HOME + sed -i "s|^\$livewallpaper=.*|\$livewallpaper=\"$selected_file\"|" "$startup_config" -# Choice of wallpapers + echo "Configured for live wallpaper (video)." + else + # For image wallpapers: + sed -i '/^\s*#\s*exec-once\s*=\s*swww-daemon\s*--format\s*xrgb\s*$/s/^\s*#\s*//;' "$startup_config" + + sed -i '/^\s*exec-once\s*=\s*mpvpaper\s*.*$/s/^/\#/' "$startup_config" + + echo "Configured for static wallpaper (image)." + fi +} + +# Apply Image Wallpaper +apply_image_wallpaper() { + local image_path="$1" + + kill_wallpaper_for_image + + if ! pgrep -x "swww-daemon" >/dev/null; then + echo "Starting swww-daemon..." + swww-daemon --format xrgb & + fi + + swww img -o "$focused_monitor" "$image_path" $SWWW_PARAMS + + # Run additional scripts + "$SCRIPTSDIR/WallustSwww.sh" + sleep 2 + "$SCRIPTSDIR/Refresh.sh" + sleep 1 + + set_sddm_wallpaper +} + +apply_video_wallpaper() { + local video_path="$1" + + # Check if mpvpaper is installed + if ! command -v mpvpaper &>/dev/null; then + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "mpvpaper not found" + return 1 + fi + kill_wallpaper_for_video + + # Apply video wallpaper using mpvpaper + mpvpaper '*' -o "load-scripts=no no-audio --loop" "$video_path" & +} + +# Main function main() { choice=$(menu | $rofi_command) - choice=$(echo "$choice" | xargs) RANDOM_PIC_NAME=$(echo "$RANDOM_PIC_NAME" | xargs) - # No choice case if [[ -z "$choice" ]]; then echo "No choice selected. Exiting." exit 0 fi - # Random choice case + # Handle random selection correctly if [[ "$choice" == "$RANDOM_PIC_NAME" ]]; then - swww img -o "$focused_monitor" "$RANDOM_PIC" $SWWW_PARAMS; - sleep 2 - "$SCRIPTSDIR/WallustSwww.sh" - sleep 0.5 - "$SCRIPTSDIR/Refresh.sh" - exit 0 + choice=$(basename "$RANDOM_PIC") fi - pic_index=-1 - for i in "${!PICS[@]}"; do - filename=$(basename "${PICS[$i]}") - if [[ "$filename" == "$choice"* ]]; then - pic_index=$i - break - fi - done + choice_basename=$(basename "$choice" | sed 's/\(.*\)\.[^.]*$/\1/') - if [[ $pic_index -ne -1 ]]; then - swww img -o "$focused_monitor" "${PICS[$pic_index]}" $SWWW_PARAMS - else - echo "Image not found." + # Search for the selected file in the wallpapers directory, including subdirectories + selected_file=$(find "$wallDIR" -iname "$choice_basename.*" -print -quit) + + if [[ -z "$selected_file" ]]; then + echo "File not found. Selected choice: $choice" exit 1 fi + # Modify the Startup_Apps.conf file based on wallpaper type + modify_startup_config "$selected_file" + + # **CHECK FIRST** if it's a video or an image **before calling any function** + if [[ "$selected_file" =~ \.(mp4|mkv|mov|webm|MP4|MKV|MOV|WEBM)$ ]]; then + apply_video_wallpaper "$selected_file" + else + apply_image_wallpaper "$selected_file" + fi } # Check if rofi is already running -if pidof rofi > /dev/null; then +if pidof rofi >/dev/null; then pkill rofi fi main -wait $! -"$SCRIPTSDIR/WallustSwww.sh" && - -wait $! -sleep 2 -"$SCRIPTSDIR/Refresh.sh" - -sleep 1 -# Check if user selected a wallpaper -if [[ -n "$choice" ]]; then - sddm_sequoia="/usr/share/sddm/themes/sequoia_2" - if [ -d "$sddm_sequoia" ]; then - - # Check if yad is running to avoid multiple yad notification - if pidof yad > /dev/null; then - killall yad - fi - - if yad --info --text="Set current wallpaper as SDDM background?\n\nNOTE: This only applies to SEQUOIA SDDM Theme" \ - --text-align=left \ - --title="SDDM Background" \ - --timeout=5 \ - --timeout-indicator=right \ - --button="yad-yes:0" \ - --button="yad-no:1" \ - ; then - - # Check if terminal exists - if ! command -v "$terminal" &>/dev/null; then - notify-send -i "$iDIR/ja.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background" - exit 1 - fi - - # Open terminal to enter password - $terminal -e bash -c "echo 'Enter your password to set wallpaper as SDDM Background'; \ - sudo cp -r $wallpaper_current '$sddm_sequoia/backgrounds/default' && \ - notify-send -i '$iDIR/ja.png' 'SDDM' 'Background SET'" - fi - fi -fi
\ No newline at end of file diff --git a/config/hypr/UserScripts/ZshChangeTheme.sh b/config/hypr/UserScripts/ZshChangeTheme.sh index 4919a890..cffaf5cb 100755 --- a/config/hypr/UserScripts/ZshChangeTheme.sh +++ b/config/hypr/UserScripts/ZshChangeTheme.sh @@ -10,7 +10,7 @@ iDIR="$HOME/.config/swaync/images" rofi_theme="$HOME/.config/rofi/config-zsh-theme.rasi" if [ -n "$(grep -i nixos < /etc/os-release)" ]; then - notify-send -i "$iDIR/ja.png" "NOT Supported" "Sorry NixOS does not support this KooL feature" + notify-send -i "$iDIR/note.png" "NOT Supported" "Sorry NixOS does not support this KooL feature" exit 1 fi @@ -57,7 +57,7 @@ main() { sed -i "s/^$var_name=.*/$var_name=\"$theme_to_set\"/" "$zsh_path" notify-send -i "$iDIR/ja.png" "OMZ theme" "applied. restart your terminal" else - notify-send -i "$iDIR/ja.png" "Error:" "~.zshrc file not found!" + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "~.zshrc file not found!" fi } diff --git a/config/hypr/scripts/ChangeBlur.sh b/config/hypr/scripts/ChangeBlur.sh index 46aaad68..895987a4 100755 --- a/config/hypr/scripts/ChangeBlur.sh +++ b/config/hypr/scripts/ChangeBlur.sh @@ -2,16 +2,16 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Script for changing blurs on the fly -notif="$HOME/.config/swaync/images/ja.png" +notif="$HOME/.config/swaync/images" 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" + notify-send -e -u low -i "$notif/note.png" " Less Blur" else hyprctl keyword decoration:blur:size 5 hyprctl keyword decoration:blur:passes 2 - notify-send -e -u low -i "$notif" " Normal Blur" + notify-send -e -u low -i "$notif/ja.png" " Normal Blur" fi diff --git a/config/hypr/scripts/Distro_update.sh b/config/hypr/scripts/Distro_update.sh index c687ba0c..b0b1446b 100755 --- a/config/hypr/scripts/Distro_update.sh +++ b/config/hypr/scripts/Distro_update.sh @@ -3,11 +3,11 @@ # Simple bash script to check and will try to update your system # Local Paths -iDIR="$HOME/.config/swaync/images/ja.png" +iDIR="$HOME/.config/swaync/images" # Check for required tools (kitty) if ! command -v kitty &> /dev/null; then - notify-send -i $iDIR "Need Kitty:" "Kitty terminal not found. Please install Kitty terminal." + notify-send -i "$iDIR/error.png" "Need Kitty:" "Kitty terminal not found. Please install Kitty terminal." exit 1 fi @@ -16,25 +16,25 @@ if command -v paru &> /dev/null || command -v yay &> /dev/null; then # Arch-based if command -v paru &> /dev/null; then kitty -T update paru -Syu - notify-send -i $iDIR -u low 'Arch-based system' 'has been updated.' + notify-send -i "$iDIR/ja.png" -u low 'Arch-based system' 'has been updated.' else kitty -T update yay -Syu - notify-send -i $iDIR -u low 'Arch-based system' 'has been updated.' + notify-send -i "$iDIR/ja.png" -u low 'Arch-based system' 'has been updated.' fi elif command -v dnf &> /dev/null; then # Fedora-based kitty -T update sudo dnf update --refresh -y - notify-send -i $iDIR -u low 'Fedora system' 'has been updated.' + notify-send -i "$iDIR/ja.png" -u low 'Fedora system' 'has been updated.' elif command -v apt &> /dev/null; then # Debian-based (Debian, Ubuntu, etc.) kitty -T update sudo apt update && sudo apt upgrade -y - notify-send -i $iDIR -u low 'Debian/Ubuntu system' 'has been updated.' + notify-send -i "$iDIR/ja.png" -u low 'Debian/Ubuntu system' 'has been updated.' elif command -v zypper &> /dev/null; then # openSUSE-based kitty -T update sudo zypper dup -y - notify-send -i $iDIR -u low 'openSUSE system' 'has been updated.' + notify-send -i "$iDIR/ja.png" -u low 'openSUSE system' 'has been updated.' else # Unsupported distro - notify-send -i $iDIR -u critical "Unsupported system" "This script does not support your distribution." + notify-send -i "$iDIR/error.png" -u critical "Unsupported system" "This script does not support your distribution." exit 1 fi diff --git a/config/hypr/scripts/Kitty_themes.sh b/config/hypr/scripts/Kitty_themes.sh new file mode 100755 index 00000000..31c19a1d --- /dev/null +++ b/config/hypr/scripts/Kitty_themes.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# Kitty Themes Source https://github.com/dexpota/kitty-themes # + +# Define directories and variables +kitty_themes_DiR="$HOME/.config/kitty/kitty-themes" # Kitty Themes Directory +theme_path="$kitty_themes_DiR/$theme.conf" +kitty_config="$HOME/.config/kitty/kitty.conf" +iDIR="$HOME/.config/swaync/images" +rofi_theme="$HOME/.config/rofi/config-kitty-theme.rasi" + +# Check if the Kitty Themes directory exists +if [ ! -d "$kitty_themes_DiR" ]; then + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Unable to locate Kitty Themes directory. Exiting....." + exit 1 +fi + +# List the kitty-theme files from the themes directory +theme=$(ls "$kitty_themes_DiR"/*.conf | xargs -n 1 basename | sed 's/\.conf$//' | rofi -dmenu -config $rofi_theme) + +# Check if no theme was selected, and exit if empty +if [ -z "$theme" ]; then + notify-send -u low -i "$iDIR/note.png" "No kitty theme" "selected. Exiting....." + exit 1 +fi + +# Uncomment the line that includes the kitty themes if it's commented +if grep -q '#include ./kitty-themes/' "$kitty_config"; then + sed -i "s|#include ./kitty-themes/|include ./kitty-themes/$theme.conf|g" "$kitty_config" + + notify-send -u low -i "$iDIR/ja.png" "$theme" "Kitty Theme Loaded" + + for pid_kitty in $(pidof kitty); do + kill -SIGUSR1 "$pid_kitty" + done +else + # If the line is already uncommented, just add the chosen theme + sed -i "s|include ./kitty-themes/.*|include ./kitty-themes/$theme.conf|g" "$kitty_config" + + notify-send -u low -i "$iDIR/ja.png" "$theme" "Kitty Theme Loaded" + + for pid_kitty in $(pidof kitty); do + kill -SIGUSR1 "$pid_kitty" + done +fi diff --git a/config/hypr/scripts/KooLsDotsUpdate.sh b/config/hypr/scripts/KooLsDotsUpdate.sh index 4996da82..f4b8814a 100755 --- a/config/hypr/scripts/KooLsDotsUpdate.sh +++ b/config/hypr/scripts/KooLsDotsUpdate.sh @@ -4,13 +4,13 @@ # Local Paths local_dir="$HOME/.config/hypr" -iDIR="$HOME/.config/swaync/images/ja.png" +iDIR="$HOME/.config/swaync/images/" local_version=$(ls $local_dir/v* 2>/dev/null | sort -V | tail -n 1 | sed 's/.*v\(.*\)/\1/') KooL_Dots_DIR="$HOME/Hyprland-Dots" # exit if cannot find local version if [ -z "$local_version" ]; then - notify-send -i $iDIR "ERROR "!?!?!!"" "Unable to find KooL's dots version . exiting.... " + notify-send -i "$iDIR/error.png" "ERROR "!?!?!!"" "Unable to find KooL's dots version . exiting.... " exit 1 fi @@ -28,12 +28,12 @@ fi # Comparing local and github versions if [ "$(echo -e "$github_version\n$local_version" | sort -V | head -n 1)" = "$github_version" ]; then - notify-send -i $iDIR "KooL Hyprland:" "No update available" + notify-send -i "$iDIR/note.png" "KooL Hyprland:" "No update available" exit 0 else # update available notify_cmd_base="notify-send -t 10000 -A action1=Update -A action2=NO -h string:x-canonical-private-synchronous:shot-notify" - notify_cmd_shot="${notify_cmd_base} -i $iDIR" + notify_cmd_shot="${notify_cmd_base} -i $iDIR/ja.png" response=$($notify_cmd_shot "KooL Hyprland:" "Update available! Update now?") @@ -41,7 +41,7 @@ else "action1") if [ -d $KooL_Dots_DIR ]; then if ! command -v kitty &> /dev/null; then - notify-send -i $iDIR "Need Kitty:" "Kitty terminal not found. Please install Kitty terminal." + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Kitty terminal not found. Please install Kitty terminal." exit 1 fi kitty -e bash -c " @@ -49,12 +49,12 @@ else git stash && git pull && ./copy.sh && - notify-send -u critical -i $iDIR 'Update Completed:' 'Kindly log out and relogin to take effect' + notify-send -u critical -i "$iDIR/ja.png" 'Update Completed:' 'Kindly log out and relogin to take effect' " else if ! command -v kitty &> /dev/null; then - notify-send -i $iDIR "Need Kitty:" "Kitty terminal not found. Please install Kitty terminal." + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Kitty terminal not found. Please install Kitty terminal." exit 1 fi kitty -e bash -c " @@ -62,7 +62,7 @@ else cd $KooL_Dots_DIR && chmod +x copy.sh && ./copy.sh && - notify-send -u critical -i $iDIR 'Update Completed:' 'Kindly log out and relogin to take effect' + notify-send -u critical -i "$iDIR/ja.png" 'Update Completed:' 'Kindly log out and relogin to take effect' " fi ;; diff --git a/config/hypr/scripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh index cee44c8f..e43749bf 100755 --- a/config/hypr/scripts/Kool_Quick_Settings.sh +++ b/config/hypr/scripts/Kool_Quick_Settings.sh @@ -32,6 +32,7 @@ view/edit Decorations view/edit Animations view/edit Laptop Keybinds view/edit Default Keybinds +Choose Kitty Terminal Theme Configure Monitors (nwg-displays) Configure Workspace Rules (nwg-displays) GTK Settings (nwg-look) @@ -62,33 +63,34 @@ main() { "view/edit Animations") file="$UserConfigs/UserAnimations.conf" ;; "view/edit Laptop Keybinds") file="$UserConfigs/Laptops.conf" ;; "view/edit Default Keybinds") file="$configs/Keybinds.conf" ;; + "Choose Kitty Terminal Theme") $scriptsDir/Kitty_themes.sh ;; "Configure Monitors (nwg-displays)") if ! command -v nwg-displays &>/dev/null; then - notify-send -i "$iDIR/ja.png" "E-R-R-O-R" "Install nwg-displays first" + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Install nwg-displays first" exit 1 fi nwg-displays ;; "Configure Workspace Rules (nwg-displays)") if ! command -v nwg-displays &>/dev/null; then - notify-send -i "$iDIR/ja.png" "E-R-R-O-R" "Install nwg-displays first" + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Install nwg-displays first" exit 1 fi nwg-displays ;; "GTK Settings (nwg-look)") if ! command -v nwg-look &>/dev/null; then - notify-send -i "$iDIR/ja.png" "E-R-R-O-R" "Install nwg-look first" + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Install nwg-look first" exit 1 fi nwg-look ;; "QT Apps Settings (qt6ct)") if ! command -v qt6ct &>/dev/null; then - notify-send -i "$iDIR/ja.png" "E-R-R-O-R" "Install qt6ct first" + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Install qt6ct first" exit 1 fi qt6ct ;; "QT Apps Settings (qt5ct)") if ! command -v qt5ct &>/dev/null; then - notify-send -i "$iDIR/ja.png" "E-R-R-O-R" "Install qt5ct first" + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Install qt5ct first" exit 1 fi qt5ct ;; diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh index 3bd22463..2d7887a5 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -24,7 +24,6 @@ done # added since wallust sometimes not applying killall -SIGUSR2 waybar -killall -SIGUSR2 swaync # quit ags & relaunch ags #ags -q && ags & @@ -41,6 +40,8 @@ waybar & # relaunch swaync sleep 0.5 swaync > /dev/null 2>&1 & +# reload swaync +swaync-client --reload-config # Relaunching rainbow borders if the script exists sleep 1 diff --git a/config/hypr/scripts/RefreshNoWaybar.sh b/config/hypr/scripts/RefreshNoWaybar.sh index 85332a32..e5a0835e 100755 --- a/config/hypr/scripts/RefreshNoWaybar.sh +++ b/config/hypr/scripts/RefreshNoWaybar.sh @@ -31,6 +31,9 @@ done # Wallust refresh ${SCRIPTSDIR}/WallustSwww.sh & +# reload swaync +swaync-client --reload-config + # Relaunching rainbow borders if the script exists sleep 1 if file_exists "${UserScripts}/RainbowBorders.sh"; then diff --git a/config/hypr/scripts/RofiSearch.sh b/config/hypr/scripts/RofiSearch.sh index aa20546d..4218bed3 100755 --- a/config/hypr/scripts/RofiSearch.sh +++ b/config/hypr/scripts/RofiSearch.sh @@ -2,13 +2,26 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # For Searching via web browsers -# Modify this config file for default search engine -config_file="$HOME/.config/hypr/UserConfigs/01-UserDefaults.conf" +# Define the path to the config file +config_file=$HOME/.config/hypr/UserConfigs/01-UserDefaults.conf -tmp_config_file=$(mktemp) -sed 's/^\$//g; s/ = /=/g' "$config_file" > "$tmp_config_file" -source "$tmp_config_file" -# ##################################### # +# Check if the config file exists +if [[ ! -f "$config_file" ]]; then + echo "Error: Configuration file not found!" + exit 1 +fi + +# Process the config file in memory, removing the $ and fixing spaces +config_content=$(sed 's/\$//g' "$config_file" | sed 's/ = /=/') + +# Source the modified content directly from the variable +eval "$config_content" + +# Check if $term is set correctly +if [[ -z "$Search_Engine" ]]; then + echo "Error: \$Search_Engine is not set in the configuration file!" + exit 1 +fi # Rofi theme and message rofi_theme="$HOME/.config/rofi/config-search.rasi" @@ -20,7 +33,4 @@ if pgrep -x "rofi" >/dev/null; then fi # Open Rofi and pass the selected query to xdg-open for Google search -echo "" | rofi -dmenu -config "$rofi_theme" -mesg "$msg" | xargs -I{} xdg-open $Search_Engine - -# Clean up temporary file after sourcing -rm "$tmp_config_file"
\ No newline at end of file +echo "" | rofi -dmenu -config "$rofi_theme" -mesg "$msg" | xargs -I{} xdg-open $Search_Engine
\ No newline at end of file diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index 852be4b0..90e2dfd2 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -18,7 +18,7 @@ active_window_path="${dir}/${active_window_file}" notify_cmd_base="notify-send -t 10000 -A action1=Open -A action2=Delete -h string:x-canonical-private-synchronous:shot-notify" notify_cmd_shot="${notify_cmd_base} -i ${iDIR}/picture.png " notify_cmd_shot_win="${notify_cmd_base} -i ${iDIR}/picture.png " -notify_cmd_NOT="notify-send -u low -i ${iDoR}/ja.png " +notify_cmd_NOT="notify-send -u low -i ${iDoR}/note.png " # notify and view screenshot notify_view() { @@ -109,6 +109,8 @@ shotwin() { shotarea() { tmpfile=$(mktemp) grim -g "$(slurp)" - >"$tmpfile" + + # Copy with saving if [[ -s "$tmpfile" ]]; then wl-copy <"$tmpfile" mv "$tmpfile" "$dir/$file" @@ -128,7 +130,13 @@ shotactive() { shotswappy() { tmpfile=$(mktemp) - grim -g "$(slurp)" - >"$tmpfile" && notify_view "swappy" + grim -g "$(slurp)" - >"$tmpfile" + + # Copy without saving + if [[ -s "$tmpfile" ]]; then + wl-copy <"$tmpfile" + notify_view "swappy" + fi } if [[ ! -d "$dir" ]]; then @@ -153,4 +161,4 @@ else echo -e "Available Options : --now --in5 --in10 --win --area --active --swappy" fi -exit 0
\ No newline at end of file +exit 0 diff --git a/config/hypr/scripts/WaybarScripts.sh b/config/hypr/scripts/WaybarScripts.sh new file mode 100755 index 00000000..32b43f02 --- /dev/null +++ b/config/hypr/scripts/WaybarScripts.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# This file used on waybar modules sourcing defaults set in $HOME/.config/hypr/UserConfigs/01-UserDefaults.conf + +# Define the path to the config file +config_file=$HOME/.config/hypr/UserConfigs/01-UserDefaults.conf + +# Check if the config file exists +if [[ ! -f "$config_file" ]]; then + echo "Error: Configuration file not found!" + exit 1 +fi + +# Process the config file in memory, removing the $ and fixing spaces +config_content=$(sed 's/\$//g' "$config_file" | sed 's/ = /=/') + +# Source the modified content directly from the variable +eval "$config_content" + +# Check if $term is set correctly +if [[ -z "$term" ]]; then + echo "Error: \$term is not set in the configuration file!" + exit 1 +fi + +# Execute accordingly based on the passed argument +if [[ "$1" == "--btop" ]]; then + $term --title btop sh -c 'btop' +elif [[ "$1" == "--nvtop" ]]; then + $term --title nvtop sh -c 'nvtop' +elif [[ "$1" == "--nmtui" ]]; then + $term nmtui +elif [[ "$1" == "--term" ]]; then + $term & +else + echo "Usage: $0 [--btop | --nvtop | --nmtui | --term]" + echo "--btop : Open btop in a new term" + echo "--nvtop : Open nvtop in a new term" + echo "--nmtui : Open nmtui in a new term" + echo "--term : Launch a term window" +fi diff --git a/config/hypr/v2.3.14 b/config/hypr/v2.3.15 index 31b3414d..31b3414d 100644 --- a/config/hypr/v2.3.14 +++ b/config/hypr/v2.3.15 diff --git a/config/hypr/wallust/wallust-hyprland.conf b/config/hypr/wallust/wallust-hyprland.conf index 92bcfc7c..c7c1debe 100644 --- a/config/hypr/wallust/wallust-hyprland.conf +++ b/config/hypr/wallust/wallust-hyprland.conf @@ -1,21 +1,21 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # /* wallust template - colors-hyprland */ -$background = rgb(1E1516) -$foreground = rgb(ACF2F1) -$color0 = rgb(463C3D) -$color1 = rgb(181916) -$color2 = rgb(073122) -$color3 = rgb(073122) -$color4 = rgb(0E455E) -$color5 = rgb(0D942F) -$color6 = rgb(0DA4A1) -$color7 = rgb(80E4E2) -$color8 = rgb(59A09E) -$color9 = rgb(20211D) -$color10 = rgb(09422D) -$color11 = rgb(09422D) -$color12 = rgb(135C7D) -$color13 = rgb(11C63F) -$color14 = rgb(11DAD6) -$color15 = rgb(80E4E2) +$background = rgb(010102) +$foreground = rgb(FDF8FE) +$color0 = rgb(313131) +$color1 = rgb(09050C) +$color2 = rgb(221647) +$color3 = rgb(2C1A40) +$color4 = rgb(5E3887) +$color5 = rgb(7344A6) +$color6 = rgb(BAB0BD) +$color7 = rgb(F3ECF5) +$color8 = rgb(AAA5AC) +$color9 = rgb(0B0711) +$color10 = rgb(2D1D5F) +$color11 = rgb(3B2355) +$color12 = rgb(7D4AB4) +$color13 = rgb(9A5BDD) +$color14 = rgb(F8EAFC) +$color15 = rgb(F3ECF5) |
