From 548ade37e52f92b70dfe08a53942ef1ac57b3ea7 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 16 Mar 2025 15:50:27 +0900 Subject: initial mpvpaper support --- config/hypr/UserConfigs/Startup_Apps.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config/hypr/UserConfigs') diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf index 00b5bde2..bdc0b447 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 "no-audio --loop" "$livewallpaper" + +# wallpaper random #exec-once = $SwwwRandom $wallDIR # random wallpaper switcher every 30 minutes # Startup -- cgit v1.2.3 From c6fd8089f1e6dcd5cd6c1bc638d22ca74fb8fadd Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 18 Mar 2025 14:18:27 +0900 Subject: Added WindowRules-new.conf in preparation for deprecation of windowrule v2 --- config/hypr/UserConfigs/WindowRules-new.conf | 217 +++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 config/hypr/UserConfigs/WindowRules-new.conf (limited to 'config/hypr/UserConfigs') diff --git a/config/hypr/UserConfigs/WindowRules-new.conf b/config/hypr/UserConfigs/WindowRules-new.conf new file mode 100644 index 00000000..59871559 --- /dev/null +++ b/config/hypr/UserConfigs/WindowRules-new.conf @@ -0,0 +1,217 @@ +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# For window rules and layerrules +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more + +# NOTES: Vaxry announced the deprecation of windowrulev2. Probably it will take effect on Hyprland v0.47.3. +# This is just to prepare for that. + +# 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)$ +windowrule = tag +notif, class:^(swaync-control-center|swaync-notification-window|swaync-client|class)$ +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 title:^([Ww]aytrogen)$ +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, class:(electron), title:(Add Folder to Workspace) +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 + +# 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, + +#layerrule = ignorezero, overview +#layerrule = blur, overview \ No newline at end of file -- cgit v1.2.3 From d1942b1206b8debe1d8672a756750b9ff4f4e802 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 18 Mar 2025 18:39:27 +0900 Subject: Improved rofi Search.sh without using /tmp file --- config/hypr/UserConfigs/01-UserDefaults.conf | 2 +- config/hypr/scripts/RofiSearch.sh | 30 ++++++++++++++++++---------- 2 files changed, 21 insertions(+), 11 deletions(-) (limited to 'config/hypr/UserConfigs') 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/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 -- cgit v1.2.3 From 53ad9ed8bddcc53793cd0756d61796a5f9bb6259 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 18 Mar 2025 21:59:02 +0900 Subject: updated windowrule-new.conf --- config/hypr/UserConfigs/WindowRules-new.conf | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'config/hypr/UserConfigs') diff --git a/config/hypr/UserConfigs/WindowRules-new.conf b/config/hypr/UserConfigs/WindowRules-new.conf index 59871559..05593108 100644 --- a/config/hypr/UserConfigs/WindowRules-new.conf +++ b/config/hypr/UserConfigs/WindowRules-new.conf @@ -17,7 +17,11 @@ windowrule = tag +browser, class:^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstabl 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)$ @@ -59,7 +63,6 @@ windowrule = tag +file-manager, class:^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm- windowrule = tag +file-manager, class:^(app.drey.Warp)$ # wallpaper tags -windowrule = tag +wallpaper title:^([Ww]aytrogen)$ windowrule = tag +wallpaper, class:^([Ww]aytrogen)$ # multimedia tags @@ -139,26 +142,29 @@ windowrule = float, class:^([Ff]erdium)$ windowrule = float, title:^(Picture-in-Picture)$ #windowrule = float, title:^(Firefox)$ - -#windowrule - float popups and dialogue +# 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, class:(electron), title:(Add Folder to Workspace) + 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* -- cgit v1.2.3 From 2d927892e5354abb14b9738d895b7084452886e2 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 20 Mar 2025 22:06:47 +0900 Subject: updated startup apps.conf and WallpaperSelect.sh as it seems that it is also uncommented the lower part exec-once - swww --- config/hypr/UserConfigs/Startup_Apps.conf | 2 +- config/hypr/UserScripts/WallpaperSelect.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'config/hypr/UserConfigs') diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf index bdc0b447..702f9a90 100644 --- a/config/hypr/UserConfigs/Startup_Apps.conf +++ b/config/hypr/UserConfigs/Startup_Apps.conf @@ -11,7 +11,7 @@ $livewallpaper="" # wallpaper stuff exec-once = swww-daemon --format xrgb -#exec-once = mpvpaper * -o "no-audio --loop" "$livewallpaper" +#exec-once = mpvpaper '*' -o "load-scripts=no no-audio --loop" $livewallpaper # wallpaper random #exec-once = $SwwwRandom $wallDIR # random wallpaper switcher every 30 minutes diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 34e44353..b5943586 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -139,7 +139,7 @@ modify_startup_config() { # 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/^/\#/' "$startup_config" + 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) @@ -149,7 +149,8 @@ modify_startup_config() { 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*//;' "$startup_config" + 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)." -- cgit v1.2.3 From bc223cd808f330c7cd6ded76640cc8cb6d64a068 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 24 Mar 2025 13:15:01 +0900 Subject: adjusted copy.sh so proper window rule will be set depending on Hyprland version. Bumped to v2.3.15 --- config/hypr/UserConfigs/WindowRules-new.conf | 3 +- config/hypr/v2.3.15 | 5 +++ config/hypr/v2.3.15-dev | 5 --- copy.sh | 63 ++++++++++++++++++---------- 4 files changed, 47 insertions(+), 29 deletions(-) create mode 100644 config/hypr/v2.3.15 delete mode 100644 config/hypr/v2.3.15-dev (limited to 'config/hypr/UserConfigs') diff --git a/config/hypr/UserConfigs/WindowRules-new.conf b/config/hypr/UserConfigs/WindowRules-new.conf index 05593108..ed40e842 100644 --- a/config/hypr/UserConfigs/WindowRules-new.conf +++ b/config/hypr/UserConfigs/WindowRules-new.conf @@ -2,8 +2,7 @@ # For window rules and layerrules # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -# NOTES: Vaxry announced the deprecation of windowrulev2. Probably it will take effect on Hyprland v0.47.3. -# This is just to prepare for that. +# 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 diff --git a/config/hypr/v2.3.15 b/config/hypr/v2.3.15 new file mode 100644 index 00000000..31b3414d --- /dev/null +++ b/config/hypr/v2.3.15 @@ -0,0 +1,5 @@ +### https://github.com/JaKooLit ### +## https://github.com/JaKooLit/Hyprland-Dots +## This is to have a reference of which version would be + +## note that this will always be higher than the released versions \ No newline at end of file diff --git a/config/hypr/v2.3.15-dev b/config/hypr/v2.3.15-dev deleted file mode 100644 index 31b3414d..00000000 --- a/config/hypr/v2.3.15-dev +++ /dev/null @@ -1,5 +0,0 @@ -### https://github.com/JaKooLit ### -## https://github.com/JaKooLit/Hyprland-Dots -## This is to have a reference of which version would be - -## note that this will always be higher than the released versions \ No newline at end of file diff --git a/copy.sh b/copy.sh index 2ec21f46..7975aea9 100755 --- a/copy.sh +++ b/copy.sh @@ -124,18 +124,28 @@ fi printf "\n%.0s" {1..1} +# Extract Hyprland version (first occurrence of x.y.z after "Hyprland") +version_output=$(hyprctl version | awk '/^Hyprland/ {print $2}') + +# Check if version is 0.48.0 or higher +if [[ "$(printf '%s\n' "0.48.0" "$version_output" | sort -V | head -n1)" == "0.48.0" ]]; then + + mv config/hypr/UserConfigs/WindowRules.conf config/hypr/UserConfigs/WindowRules-old.conf + mv config/hypr/UserConfigs/WindowRules-new.conf config/hypr/UserConfigs/WindowRules.conf + + echo "$NOTE - Window Rule set up for Hyprland $version_output" +fi + +printf "\n%.0s" {1..1} + # Function to detect keyboard layout using localectl or setxkbmap detect_layout() { - if command -v localectl >/dev/null 2>&1; then - layout=$(localectl status --no-pager | awk '/X11 Layout/ {print $3}') - if [ -n "$layout" ]; then - echo "$layout" - fi - elif command -v setxkbmap >/dev/null 2>&1; then + if which localectl >/dev/null 2>&1; then + layout=$(localectl status --no-pager | grep 'X11 Layout' | awk '{print $3}') + [ -n "$layout" ] && echo "$layout" + elif which setxkbmap >/dev/null 2>&1; then layout=$(setxkbmap -query | grep layout | awk '{print $2}') - if [ -n "$layout" ]; then - echo "$layout" - fi + [ -n "$layout" ] && echo "$layout" fi } @@ -144,8 +154,9 @@ layout=$(detect_layout) if [ "$layout" = "(unset)" ]; then while true; do - printf "\n%.0s" {1..1} - print_color $WARNING " + printf "\n" + + print_color "$WARNING" " █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ STOP AND READ █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ @@ -165,8 +176,10 @@ ${MAGENTA} NOTE:${RESET} • You can also set more than 2 keyboard layouts • For example: ${YELLOW}us, kr, gb, ru${RESET} " - printf "\n%.0s" {1..1} - read -p "${CAT} - Please enter the correct keyboard layout: " new_layout + printf "\n" + + printf "%s - Please enter the correct keyboard layout: " "$CAT" + read new_layout if [ -n "$new_layout" ]; then layout="$new_layout" @@ -177,14 +190,17 @@ ${MAGENTA} NOTE:${RESET} done fi -printf "${NOTE} Detecting keyboard layout to prepare proper Hyprland Settings\n" +printf "\n" +printf "%s Detecting keyboard layout to prepare proper Hyprland Settings\n" "$NOTE" # Prompt the user to confirm whether the detected layout is correct while true; do - printf "${INFO} Current keyboard layout is ${MAGENTA}$layout${RESET}\n" - read -p "${CAT} Is this correct? [y/n] " keyboard_layout + printf "%s Current keyboard layout is %s%s%s\n" "$INFO" "$MAGENTA" "$layout" "$RESET" - case $keyboard_layout in + printf "%s Is this correct? [y/n] " "$CAT" + read keyboard_layout + + case "$keyboard_layout" in [yY]) awk -v layout="$layout" '/kb_layout/ {$0 = " kb_layout = " layout} 1' config/hypr/UserConfigs/UserSettings.conf > temp.conf mv temp.conf config/hypr/UserConfigs/UserSettings.conf @@ -192,8 +208,10 @@ while true; do echo "${NOTE} kb_layout ${MAGENTA}$layout${RESET} configured in settings." 2>&1 | tee -a "$LOG" break ;; [nN]) - printf "\n%.0s" {1..2} - print_color $WARNING " + printf "\n" + printf "\n" + + print_color "$WARNING" " █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ STOP AND READ █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ @@ -213,9 +231,10 @@ ${MAGENTA} NOTE:${RESET} • You can also set more than 2 keyboard layouts • For example: ${YELLOW}us, kr, gb, ru${RESET} " - printf "\n%.0s" {1..1} - - read -p "${CAT} - Please enter the correct keyboard layout: " new_layout + printf "\n" + + printf "%s - Please enter the correct keyboard layout: " "$CAT" + read new_layout awk -v new_layout="$new_layout" '/kb_layout/ {$0 = " kb_layout = " new_layout} 1' config/hypr/UserConfigs/UserSettings.conf > temp.conf mv temp.conf config/hypr/UserConfigs/UserSettings.conf -- cgit v1.2.3