diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2024-08-14 00:48:44 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-14 00:48:44 +0900 |
| commit | ac062ecf708b28d10cc3275fcf9e18c736d568f4 (patch) | |
| tree | d80f5d1f469304bd625b4a8fd2c49085e24f3285 /config/hypr | |
| parent | f9ff441fe41e4af112411b4bef55bca98c2f7474 (diff) | |
| parent | 69a7793deddb102d9643d5ee047bde81ba25bcbd (diff) | |
Merge pull request #402 from JaKooLit/main
Main to AGS-Dev
Diffstat (limited to 'config/hypr')
| -rw-r--r-- | config/hypr/UserConfigs/ENVariables.conf | 5 | ||||
| -rw-r--r-- | config/hypr/UserConfigs/Monitors.conf | 25 | ||||
| -rw-r--r-- | config/hypr/UserConfigs/UserSettings.conf | 17 | ||||
| -rw-r--r-- | config/hypr/UserConfigs/WindowRules.conf | 68 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/QuickEdit.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperEffects.sh | 105 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperSelect.sh | 45 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/Weather.py | 4 | ||||
| -rw-r--r-- | config/hypr/configs/Keybinds.conf | 2 | ||||
| -rw-r--r-- | config/hypr/hyprlock-1080p.conf | 150 | ||||
| -rw-r--r-- | config/hypr/hyprlock.conf | 26 | ||||
| -rwxr-xr-x | config/hypr/initial-boot.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/PortalHyprland.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/Refresh.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/SwitchKeyboardLayout.sh | 25 | ||||
| -rwxr-xr-x | config/hypr/scripts/WaybarLayout.sh | 10 | ||||
| -rwxr-xr-x | config/hypr/scripts/WaybarStyles.sh | 9 | ||||
| -rw-r--r-- | config/hypr/v2.3.2 (renamed from config/hypr/v2.3.1) | 0 |
18 files changed, 329 insertions, 170 deletions
diff --git a/config/hypr/UserConfigs/ENVariables.conf b/config/hypr/UserConfigs/ENVariables.conf index 679a94e0..2ec6b4ea 100644 --- a/config/hypr/UserConfigs/ENVariables.conf +++ b/config/hypr/UserConfigs/ENVariables.conf @@ -19,7 +19,6 @@ env = XDG_SESSION_TYPE,wayland # toolkit-specific scale # env = GDK_SCALE,2 - # firefox env = MOZ_ENABLE_WAYLAND,1 @@ -39,9 +38,9 @@ env = ELECTRON_OZONE_PLATFORM_HINT,auto #env = __VK_LAYER_NV_optimus,NVIDIA_only #env = WLR_DRM_NO_ATOMIC,1 - # FOR VM and POSSIBLY NVIDIA -#env = WLR_NO_HARDWARE_CURSORS,1 # On hyprland >v0.41, now configured on variable cursor section +# LIBGL_ALWAYS_SOFTWARE software mesa rendering +#env = LIBGL_ALWAYS_SOFTWARE,1 #env = WLR_RENDERER_ALLOW_SOFTWARE,1 # nvidia firefox (for hardware acceleration on FF)? diff --git a/config/hypr/UserConfigs/Monitors.conf b/config/hypr/UserConfigs/Monitors.conf index 36781f99..f4b313d7 100644 --- a/config/hypr/UserConfigs/Monitors.conf +++ b/config/hypr/UserConfigs/Monitors.conf @@ -5,7 +5,6 @@ # https://wiki.hyprland.org/Configuring/Monitors/ # Configure your Display resolution, offset, scale and Monitors here, use `hyprctl monitors` to get the info. - # Monitors monitor=,preferred,auto,1 @@ -13,16 +12,17 @@ monitor=,preferred,auto,1 # Created this inorder for the monitor display to not wake up if not intended. # See here: https://github.com/hyprwm/Hyprland/issues/4090 +# Some examples #monitor = eDP-1, preferred, auto, 1 #monitor = eDP-1, 2560x1440@165, 0x0, 1 #own screen #monitor = DP-3, 1920x1080@240, auto, 1 #monitor = DP-1, preferred, auto, 1 #monitor = HDMI-A-1, preferred,auto,1 -# QEMU-KVM or any virtual box +# QEMU-KVM, virtual box or vmware #monitor = Virtual-1, 1920x1080@60,auto,1 -# Hi Refresh Rate +# High Refresh Rate #monitor=,highrr,auto,1 # High Resolution @@ -31,18 +31,21 @@ monitor=,preferred,auto,1 # to disable a monitor #monitor=name,disable -# Mirror +# Mirror samples #monitor=DP-3,1920x1080@60,0x0,1,mirror,DP-2 #monitor=,preferred,auto,1,mirror,eDP-1 - - -# Example : -#monitor=eDP-1,2560x1440@165,0x0,1 -#workspace=HDMI-A-1,1 #monitor=HDMI-A-1,2560x1440@144,0x0,1,mirror,eDP-1 -#workspace=HDMI-A-2,2 + +# 10 bit monitor support - See wiki https://wiki.hyprland.org/Configuring/Monitors/#10-bit-support - See NOTES below +# NOTE: Colors registered in Hyprland (e.g. the border color) do not support 10 bit. +# NOTE: Some applications do not support screen capture with 10 bit enabled. (Screen captures like OBS may render black screen) +# monitor=,preferred,auto,1,bitdepth,10 #monitor=eDP-1,transform,0 #monitor=eDP-1,addreserved,10,10,10,49 -#workspace=eDP-1,1 + +# workspaces - Monitor rules +# https://wiki.hyprland.org/Configuring/Workspace-Rules/ +# SUPER E - Workspace-Rules +# See ~/.config/hypr/UserConfigs/WorkspaceRules.conf diff --git a/config/hypr/UserConfigs/UserSettings.conf b/config/hypr/UserConfigs/UserSettings.conf index 47f88ed5..c7b17fec 100644 --- a/config/hypr/UserConfigs/UserSettings.conf +++ b/config/hypr/UserConfigs/UserSettings.conf @@ -8,9 +8,6 @@ # Sourcing colors generated by wallust source = $HOME/.config/hypr/wallust/wallust-hyprland.conf -# blurls = waybar -# blurls = rofi - dwindle { pseudotile = yes preserve_split = yes @@ -18,7 +15,7 @@ dwindle { } master { - new_status = master #from Hyprland >v0.41.2 + new_status = master new_on_top = 1 mfact = 0.5 } @@ -148,7 +145,7 @@ misc { enable_swallow = true swallow_regex = ^(kitty)$ focus_on_activate = false - no_direct_scanout = true #for fullscreen games + #no_direct_scanout = true #for fullscreen games - deprecated initial_workspace_tracking = 0 middle_click_paste = false } @@ -164,9 +161,15 @@ xwayland { force_zero_scaling = true } -# cursor section for Hyprland >= v0.41.0 +# render section for Hyprland >= v0.42.0 +render { + explicit_sync = 2 + explicit_sync_kms = 2 + direct_scanout = false +} + cursor { no_hardware_cursors = false enable_hyprcursor = true - warp_on_change_workspace = true # for -git or Hyprland >v0.41.1 + warp_on_change_workspace = true } diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/UserConfigs/WindowRules.conf index 602531e1..8aba98ba 100644 --- a/config/hypr/UserConfigs/WindowRules.conf +++ b/config/hypr/UserConfigs/WindowRules.conf @@ -5,8 +5,8 @@ #windowrule = fullscreen,gamescope #windowrule = workspace 6 silent,^(gamescope)$ -# windowrule center -windowrule = center,^(pavucontrol|org.pulseaudio.pavucontrol) +# windowrule Position +windowrule = center,^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol) windowrule = center,^([Ww]hatsapp-for-linux)$ windowrule = center,^([Ff]erdium)$ @@ -15,6 +15,8 @@ windowrule = center,^([Ff]erdium)$ # windowrulev2 = center,floating:1 # warning, it cause even the menu to float and center. windowrulev2 = center, class:([Tt]hunar), title:(File Operation Progress) windowrulev2 = center, class:([Tt]hunar), title:(Confirm to replace files) +windowrulev2 = move 72% 7%,title:^(Picture-in-Picture)$ +#windowrulev2 = move 72% 7%,title:^(Firefox)$ # windowrule v2 to avoid idle for fullscreen apps windowrulev2 = idleinhibit fullscreen, class:^(*)$ @@ -25,13 +27,12 @@ windowrulev2 = idleinhibit fullscreen, fullscreen:1 windowrulev2 = workspace 1, class:^([Tt]hunderbird)$ windowrulev2 = workspace 2, class:^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr)$ windowrulev2 = workspace 2, class:^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstable)?)$ +windowrulev2 = workspace 2, class:^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$ #windowrulev2 = workspace 3, class:^([Tt]hunar)$ windowrulev2 = workspace 4, class:^(com.obsproject.Studio)$ windowrulev2 = workspace 5, class:^([Ss]team)$ windowrulev2 = workspace 5, class:^([Ll]utris)$ -windowrulev2 = workspace 7, class:^([Dd]iscord)$ -windowrulev2 = workspace 7, class:^([Ww]ebCord)$ -windowrulev2 = workspace 7, class:^([Vv]esktop)$ +windowrulev2 = workspace 7, class:^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$ windowrulev2 = workspace 7, class:^([Ff]erdium)$ windowrulev2 = workspace 7, class:^([Ww]hatsapp-for-linux)$ @@ -48,13 +49,14 @@ windowrulev2 = float, class:(xdg-desktop-portal-gtk) windowrulev2 = float, class:(org.gnome.Calculator), title:(Calculator) windowrulev2 = float, class:(codium|codium-url-handler|VSCodium), title:(Add Folder to Workspace) windowrulev2 = float, class:^([Rr]ofi)$ -windowrulev2 = float, class:^(eog)$ -windowrulev2 = float, class:^(pavucontrol|org.pulseaudio.pavucontrol)$ -windowrulev2 = float, class:^(nwg-look|qt5ct|qt6ct|mpv)$ +windowrulev2 = float, class:^(eog|org.gnome.Loupe)$ # image viewer +windowrulev2 = float, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$ +windowrulev2 = float, class:^(nwg-look|qt5ct|qt6ct)$ +windowrulev2 = float, class:^(mpv|com.github.rafostar.Clapper)$ windowrulev2 = float, class:^(nm-applet|nm-connection-editor|blueman-manager)$ windowrulev2 = float, class:^(gnome-system-monitor|org.gnome.SystemMonitor)$ # system monitor windowrulev2 = float, class:^(yad)$ # icon browser -windowrulev2 = float, class:^(wihotspot-gui)$ # wifi hotspot +windowrulev2 = float, class:^(wihotspot(-gui)?)$ # wifi hotspot windowrulev2 = float, class:^(evince)$ # document viewer windowrulev2 = float, class:^(file-roller|org.gnome.FileRoller)$ # archive manager windowrulev2 = float, class:^([Bb]aobab|org.gnome.[Bb]aobab)$ # Disk usage analyzer @@ -63,6 +65,8 @@ windowrulev2 = float, class:^([Ss]team)$,title:^((?![Ss]team).*|[Ss]team [Ss]ett windowrulev2 = float, class:^([Qq]alculate-gtk)$ windowrulev2 = float, class:^([Ww]hatsapp-for-linux)$ windowrulev2 = float, class:^([Ff]erdium)$ +windowrulev2 = float, title:^(Picture-in-Picture)$ +#windowrulev2 = float, title:^(Firefox)$ # windowrule v2 - opacity #enable as desired windowrulev2 = opacity 0.9 0.6, class:^([Rr]ofi)$ @@ -72,24 +76,22 @@ windowrulev2 = opacity 0.9 0.6, class:^([Tt]horium-browser)$ windowrulev2 = opacity 0.9 0.8, class:^([Mm]icrosoft-edge(-stable|-beta|-dev|-unstable)?)$ windowrulev2 = opacity 0.9 0.8, class:^(google-chrome(-beta|-dev|-unstable)?)$ windowrulev2 = opacity 0.94 0.86, class:^(chrome-.+-Default)$ # Chrome PWAs -windowrulev2 = opacity 0.9 0.8, class:^([Tt]hunar)$ +windowrulev2 = opacity 0.9 0.8, class:^([Tt]hunar|org.gnome.Nautilus)$ windowrulev2 = opacity 0.8 0.6, class:^(pcmanfm-qt)$ -windowrulev2 = opacity 0.8 0.7, class:^(gedit|org.gnome.TextEditor)$ +windowrulev2 = opacity 0.8 0.7, class:^(gedit|org.gnome.TextEditor|mousepad)$ windowrulev2 = opacity 0.9 0.8, class:^(deluge)$ -windowrulev2 = opacity 0.9 0.8, class:^(Alacritty)$ -windowrulev2 = opacity 0.9 0.8, class:^(kitty)$ -windowrulev2 = opacity 0.9 0.7, class:^(mousepad)$ +windowrulev2 = opacity 0.9 0.8, class:^(Alacritty|kitty)$ # Terminals windowrulev2 = opacity 0.9 0.7, class:^(VSCodium|codium-url-handler)$ windowrulev2 = opacity 0.9 0.8, class:^(nwg-look|qt5ct|qt6ct|yad)$ windowrulev2 = opacity 0.9 0.8, title:(Kvantum Manager) windowrulev2 = opacity 0.9 0.7, class:^(com.obsproject.Studio)$ windowrulev2 = opacity 0.9 0.7, class:^([Aa]udacious)$ -windowrulev2 = opacity 0.9 0.8, class:^(org.gnome.Nautilus)$ windowrulev2 = opacity 0.9 0.8, class:^(VSCode|code-url-handler)$ windowrulev2 = opacity 0.9 0.8, class:^(jetbrains-.+)$ # JetBrains IDEs windowrulev2 = opacity 0.94 0.86, class:^([Dd]iscord|[Vv]esktop)$ windowrulev2 = opacity 0.9 0.8, class:^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop)$ -windowrulev2 = opacity 0.94 0.86, class:^(gnome-disks|evince|wihotspot-gui|org.gnome.baobab)$ +windowrulev2 = opacity 0.9 0.8, class:^(im.riot.Riot)$ # Element matrix client +windowrulev2 = opacity 0.94 0.86, class:^(gnome-disks|evince|wihotspot(-gui)?|org.gnome.baobab)$ windowrulev2 = opacity 0.9 0.8, class:^(file-roller|org.gnome.FileRoller)$ # archive manager windowrulev2 = opacity 0.8 0.7, class:^(app.drey.Warp)$ # Warp file transfer windowrulev2 = opacity 0.9 0.8, class:^(seahorse)$ # gnome-keyring gui @@ -97,37 +99,33 @@ windowrulev2 = opacity 0.82 0.75, class:^(gnome-system-monitor|org.gnome.SystemM windowrulev2 = opacity 0.9 0.8, class:^(xdg-desktop-portal-gtk)$ # gnome-keyring gui windowrulev2 = opacity 0.9 0.7, class:^([Ww]hatsapp-for-linux)$ windowrulev2 = opacity 0.9 0.7, class:^([Ff]erdium)$ +windowrulev2 = opacity 0.95 0.75, title:^(Picture-in-Picture)$ # windowrule v2 - size windowrulev2 = size 70% 70%, class:^(gnome-system-monitor|org.gnome.SystemMonitor)$ windowrulev2 = size 70% 70%, class:^(xdg-desktop-portal-gtk)$ windowrulev2 = size 60% 70%, title:(Kvantum Manager) windowrulev2 = size 60% 70%, class:^(qt6ct)$ -windowrulev2 = size 70% 70%, class:^(evince|wihotspot-gui)$ +windowrulev2 = size 70% 70%, class:^(evince|wihotspot(-gui)?)$ windowrulev2 = size 60% 70%, class:^(file-roller|org.gnome.FileRoller)$ windowrulev2 = size 60% 70%, class:^([Ww]hatsapp-for-linux)$ windowrulev2 = size 60% 70%, class:^([Ff]erdium)$ +windowrulev2 = size 25% 25%, title:^(Picture-in-Picture)$ +#windowrulev2 = size 25% 25%, title:^(Firefox)$ -#layerrule = unset,class:^([Rr]ofi)$ -#layerrule = blur,class:^([Rr]ofi)$ -#layerrule = ignorezero, <rofi> - -layerrule = ignorezero, overview -layerrule = blur, overview +# windowrule v2 - pinning +windowrulev2 = pin,title:^(Picture-in-Picture)$ +#windowrulev2 = pin,title:^(Firefox)$ #windowrulev2 = bordercolor rgb(EE4B55) rgb(880808), fullscreen:1 #windowrulev2 = bordercolor rgb(282737) rgb(1E1D2D), floating:1 #windowrulev2 = opacity 0.8 0.8, pinned:1 -# Picture-in-a-Picture (PIP) rules: Oddly, some need re-duplication. This is because the window for -# PIP changes after on first launch, and will not inherant the rules... -windowrulev2=opacity 0.95 0.75,title:^(Picture-in-Picture)$ # for opacity: [focus num] [bg num] -# Interestingly, the opacity rule above doesn't need the reduplication? -windowrulev2=pin,title:^(Picture-in-Picture)$ -#windowrulev2=pin,title:^(Firefox)$ -windowrulev2=float, title:^(Picture-in-Picture)$ -#windowrulev2=float, title:^(Firefox)$ -windowrulev2=size 25% 25%,title:^(Picture-in-Picture)$ -#windowrulev2=size 25% 25%,title:^(Firefox)$ -windowrulev2=move 72% 7%,title:^(Picture-in-Picture)$ -#windowrulev2=move 72% 7%,title:^(Firefox)$ + +# LAYER RULES +#layerrule = unset,class:^([Rr]ofi)$ +#layerrule = blur,class:^([Rr]ofi)$ +#layerrule = ignorezero, <rofi> + +#layerrule = ignorezero, overview +#layerrule = blur, overview
\ No newline at end of file diff --git a/config/hypr/UserScripts/QuickEdit.sh b/config/hypr/UserScripts/QuickEdit.sh index cd604619..8864a30c 100755 --- a/config/hypr/UserScripts/QuickEdit.sh +++ b/config/hypr/UserScripts/QuickEdit.sh @@ -2,7 +2,7 @@ # Rofi menu for Quick Edit / View of Settings (SUPER E) # define your preferred text editor and terminal to use -editor=nano +editor=${EDITOR:-nano} tty=kitty configs="$HOME/.config/hypr/configs" diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index 84f8fd7b..cc6a5781 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -1,9 +1,9 @@ #!/bin/bash # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # -# Wallpaper Effects using imagemagick +# Wallpaper Effects using ImageMagick # Inspiration from ML4W - Stephan Raabe https://gitlab.com/stephan-raabe/dotfiles -# variables +# Variables current_wallpaper="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" wallpaper_output="$HOME/.config/hypr/wallpaper_effects/.wallpaper_modified" SCRIPTSDIR="$HOME/.config/hypr/scripts" @@ -20,27 +20,26 @@ BEZIER=".43,1.19,1,.4" SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION" # Define ImageMagick effects -# https://imagemagick.org/script/magick.php - declare -A effects=( -["Black & White"]="magick $current_wallpaper -colorspace gray -sigmoidal-contrast 10,40% $wallpaper_output" -["Blurred"]="magick $current_wallpaper -blur 0x5 $wallpaper_output" -["Solarize"]="magick $current_wallpaper -solarize 80% $wallpaper_output" -["Sepia Tone"]="magick $current_wallpaper -sepia-tone 65% $wallpaper_output" -["Negate"]="magick $current_wallpaper -negate $wallpaper_output" -["Charcoal"]="magick $current_wallpaper -charcoal 0x5 $wallpaper_output" -["Edge Detect"]="magick $current_wallpaper -edge 1 $wallpaper_output" -["Emboss"]="magick $current_wallpaper -emboss 0x5 $wallpaper_output" -["Sharpen"]="magick $current_wallpaper -sharpen 0x5 $wallpaper_output" -["Oil Paint"]="magick $current_wallpaper -paint 4 $wallpaper_output" -["Vignette"]="magick $current_wallpaper -vignette 0x5 $wallpaper_output" -["Posterize"]="magick $current_wallpaper -posterize 4 $wallpaper_output" -["Polaroid"]="magick $current_wallpaper -polaroid 0 $wallpaper_output" -["No Effects"]="no-effects" + ["No Effects"]="no-effects" + ["Black & White"]="magick $current_wallpaper -colorspace gray -sigmoidal-contrast 10,40% $wallpaper_output" + ["Blurred"]="magick $current_wallpaper -blur 0x10 $wallpaper_output" + ["Charcoal"]="magick $current_wallpaper -charcoal 0x5 $wallpaper_output" + ["Edge Detect"]="magick $current_wallpaper -edge 1 $wallpaper_output" + ["Emboss"]="magick $current_wallpaper -emboss 0x5 $wallpaper_output" + ["Negate"]="magick $current_wallpaper -negate $wallpaper_output" + ["Oil Paint"]="magick $current_wallpaper -paint 4 $wallpaper_output" + ["Posterize"]="magick $current_wallpaper -posterize 4 $wallpaper_output" + ["Polaroid"]="magick $current_wallpaper -polaroid 0 $wallpaper_output" + ["Sepia Tone"]="magick $current_wallpaper -sepia-tone 65% $wallpaper_output" + ["Solarize"]="magick $current_wallpaper -solarize 80% $wallpaper_output" + ["Sharpen"]="magick $current_wallpaper -sharpen 0x5 $wallpaper_output" + ["Vignette"]="magick $current_wallpaper -vignette 0x5 $wallpaper_output" + ["Zoomed"]="magick $current_wallpaper -gravity Center -extent 1:1 $wallpaper_output" ) # Function to apply no effects -no_effects() { +no-effects() { swww img -o "$focused_monitor" "$current_wallpaper" $SWWW_PARAMS & # Wait for swww command to complete wait $! @@ -51,56 +50,52 @@ no_effects() { # Refresh rofi, waybar, wallust palettes "${SCRIPTSDIR}/Refresh.sh" notify-send -u low -i "$iDIR/bell.png" "No wallpaper effects" - - # copying wallpaper for rofi menu - cp $current_wallpaper $wallpaper_output + # copying wallpaper for rofi menu + cp "$current_wallpaper" "$wallpaper_output" } # Function to run rofi menu main() { # Populate rofi menu options - options="No Effects" + options=("No Effects") for effect in "${!effects[@]}"; do - if [ "$effect" != "No Effects" ]; then - options+="\n$effect" - fi + [[ "$effect" != "No Effects" ]] && options+=("$effect") done - # rofi - choice=$(echo -e "$options" | rofi -i -dmenu -config ~/.config/rofi/config-wallpaper-effect.rasi) - if [ ! -z "$choice" ]; then - # Check if the choice exists in the array - if [[ "${effects[$choice]+exists}" ]]; then - if [ "$choice" == "No Effects" ]; then - no_effects - else - # Apply selected effect - notify-send -u normal -i "$iDIR/bell.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 - wait $! - # Run other commands after swww - wallust run "$wallpaper_output" -s & - # Wait for other commands to finish - wait $! - # Refresh rofi, waybar, wallust palettes - "${SCRIPTSDIR}/Refresh.sh" - notify-send -u low -i "$iDIR/bell.png" "$choice effects applied" - fi + # Show rofi menu and handle user choice + choice=$(printf "%s\n" "${options[@]}" | LC_COLLATE=C sort | rofi -dmenu -p "Choose effect" -i -config ~/.config/rofi/config-wallpaper-effect.rasi) + + # Process user choice + if [[ -n "$choice" ]]; then + if [[ "$choice" == "No Effects" ]]; then + no-effects + elif [[ "${effects[$choice]+exists}" ]]; then + # Apply selected effect + notify-send -u normal -i "$iDIR/bell.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 + wait $! + # Wait for other commands to finish + wallust run "$wallpaper_output" -s & + # Wait for other commands to finish + wait $! + # Refresh rofi, waybar, wallust palettes + "${SCRIPTSDIR}/Refresh.sh" + notify-send -u low -i "$iDIR/bell.png" "$choice effects applied" else - echo "Effects not recognized." + echo "Effect '$choice' not recognized." fi fi } -# Check if rofi is already running +# Check if rofi is already running and kill it if pidof rofi > /dev/null; then - pkill rofi - exit 0 + pkill rofi + exit 0 fi main diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index d2ca7c28..25ef30e9 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -4,11 +4,10 @@ # WALLPAPERS PATH wallDIR="$HOME/Pictures/wallpapers" +SCRIPTSDIR="$HOME/.config/hypr/scripts" # variables -SCRIPTSDIR="$HOME/.config/hypr/scripts" focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}') - # swww transition config FPS=60 TYPE="any" @@ -21,24 +20,28 @@ if pidof swaybg > /dev/null; then pkill swaybg fi -# Retrieve image files -PICS=($(find "${wallDIR}" -type f \( -iname \*.jpg -o -iname \*.jpeg -o -iname \*.png -o -iname \*.gif \))) +# Retrieve image files using null delimiter to handle spaces in filenames +mapfile -d '' PICS < <(find "${wallDIR}" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.gif" \) -print0) + RANDOM_PIC="${PICS[$((RANDOM % ${#PICS[@]}))]}" RANDOM_PIC_NAME=". random" # Rofi command rofi_command="rofi -i -show -dmenu -config ~/.config/rofi/config-wallpaper.rasi" - # Sorting Wallpapers menu() { - sorted_options=($(printf '%s\n' "${PICS[@]}" | sort)) + # 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 [[ -z $(echo "$pic_name" | grep -i "\.gif$") ]]; then + if [[ ! "$pic_name" =~ \.gif$ ]]; then printf "%s\x00icon\x1f%s\n" "$(echo "$pic_name" | cut -d. -f1)" "$pic_path" else printf "%s\n" "$pic_name" @@ -51,15 +54,25 @@ swww query || swww-daemon --format xrgb # Choice of wallpapers main() { - choice=$(menu | ${rofi_command}) + choice=$(menu | $rofi_command) + + # Trim any potential whitespace or hidden characters + choice=$(echo "$choice" | xargs) + RANDOM_PIC_NAME=$(echo "$RANDOM_PIC_NAME" | xargs) + # No choice case - if [[ -z $choice ]]; then + if [[ -z "$choice" ]]; then + echo "No choice selected. Exiting." exit 0 fi # Random choice case - if [ "$choice" = "$RANDOM_PIC_NAME" ]; then - swww img -o $focused_monitor "${RANDOM_PIC}" $SWWW_PARAMS + if [[ "$choice" == "$RANDOM_PIC_NAME" ]]; then + swww img -o "$focused_monitor" "$RANDOM_PIC" $SWWW_PARAMS; + sleep 0.5 + "$SCRIPTSDIR/WallustSwww.sh" + sleep 0.2 + "$SCRIPTSDIR/Refresh.sh" exit 0 fi @@ -74,7 +87,7 @@ main() { done if [[ $pic_index -ne -1 ]]; then - swww img -o $focused_monitor "${PICS[$pic_index]}" $SWWW_PARAMS + swww img -o "$focused_monitor" "${PICS[$pic_index]}" $SWWW_PARAMS else echo "Image not found." exit 1 @@ -84,12 +97,14 @@ main() { # Check if rofi is already running if pidof rofi > /dev/null; then pkill rofi - exit 0 + sleep 1 # Allow some time for rofi to close fi main sleep 0.5 -${SCRIPTSDIR}/WallustSwww.sh +"$SCRIPTSDIR/WallustSwww.sh" + sleep 0.2 -${SCRIPTSDIR}/Refresh.sh +"$SCRIPTSDIR/Refresh.sh" + diff --git a/config/hypr/UserScripts/Weather.py b/config/hypr/UserScripts/Weather.py index 1d2ea30b..c0a40fd7 100755 --- a/config/hypr/UserScripts/Weather.py +++ b/config/hypr/UserScripts/Weather.py @@ -63,12 +63,12 @@ temp_feel_text = f"Feels like {temp_feel}c" # min-max temperature temp_min = ( html_data("div[data-testid='wxData'] > span[data-testid='TemperatureValue']") - .eq(0) + .eq(1) .text() ) temp_max = ( html_data("div[data-testid='wxData'] > span[data-testid='TemperatureValue']") - .eq(1) + .eq(0) .text() ) temp_min_max = f" {temp_min}\t\t {temp_max}" diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 30486de2..b53c6e8c 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -38,7 +38,7 @@ bind = $mainMod SHIFT, W, exec, $UserScripts/WallpaperEffects.sh # Wallpaper Eff bind = CTRL ALT, W, exec, $UserScripts/WallpaperRandom.sh # Random wallpapers # Waybar / Bar related -bind = $mainMod, B, exec, killall -SIGUSR1 waybar # Toggle hide/show waybar +bind = $mainMod, B, exec, pkill -SIGUSR1 waybar # Toggle hide/show waybar bind = $mainMod CTRL, B, exec, $scriptsDir/WaybarStyles.sh # Waybar Styles Menu bind = $mainMod ALT, B, exec, $scriptsDir/WaybarLayout.sh # Waybar Layout Menu diff --git a/config/hypr/hyprlock-1080p.conf b/config/hypr/hyprlock-1080p.conf new file mode 100644 index 00000000..68409417 --- /dev/null +++ b/config/hypr/hyprlock-1080p.conf @@ -0,0 +1,150 @@ +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# Hyprlock config for =< 1080p monitor resolutions +# Original config submitted by https://github.com/SherLock707 + +# Sourcing colors generated by wallust +source = $HOME/.config/hypr/wallust/wallust-hyprland.conf +$Scripts = $HOME/.config/hypr/scripts + +general { + grace = 1 +} + +background { + monitor = + #path = screenshot # screenshot of your desktop + path = $HOME/.config/hypr/wallpaper_effects/.wallpaper_modified # NOTE only png supported for now + #color = $color7 + + # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations + blur_size = 5 + blur_passes = 1 # 0 disables blurring + noise = 0.0117 + contrast = 1.3000 # Vibrant!!! + brightness = 0.8000 + vibrancy = 0.2100 + vibrancy_darkness = 0.0 +} + +input-field { + monitor = + size = 250, 50 + outline_thickness = 3 + dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = true + outer_color = $color5 + inner_color = $color0 + font_color = $color12 + fade_on_empty = true + placeholder_text = <i>Password...</i> # Text rendered in the input box when it's empty. + hide_input = false + + position = 0, 80 + halign = center + valign = bottom +} + +# Date +label { + monitor = + text = cmd[update:18000000] echo "<b> "$(date +'%A, %-d %B %Y')" </b>" + color = $color12 + font_size = 34 + font_family = JetBrains Mono Nerd Font 10 + position = 0, -80 + halign = center + valign = top +} + +# Hour-Time +label { + monitor = + text = cmd[update:1000] echo "$(date +"%H")" +# text = cmd[update:1000] echo "$(date +"%I")" #AM/PM + color = rgba(255, 185, 0, .6) + font_size = 150 + font_family = JetBrains Mono Nerd Font Mono ExtraBold + position = 0, -200 + halign = center + valign = top +} + +# Minute-Time +label { + monitor = + text = cmd[update:1000] echo "$(date +"%M")" + color = rgba(255, 255, 255, .6) + font_size = 150 + font_family = JetBrains Mono Nerd Font Mono ExtraBold + position = 0, -450 + halign = center + valign = top +} + +# Seconds-Time +label { + monitor = + text = cmd[update:1000] echo "$(date +"%S")" +# text = cmd[update:1000] echo "$(date +"%S %p")" #AM/PM + color = $color12 + font_size = 20 + font_family = JetBrains Mono Nerd Font Mono ExtraBold + position = 0, -450 + halign = center + valign = top +} + +# User +label { + monitor = + text =  $USER + color = $color10 + font_size = 18 + font_family = Inter Display Medium + + position = 0, 20 + halign = center + valign = bottom +} + +# uptime +label { + monitor = + text = cmd[update:60000] echo "<b> "$(uptime -p || $Scripts/UptimeNixOS.sh)" </b>" + color = $color10 + font_size = 24 + font_family = JetBrains Mono Nerd Font 10 + position = 0, 0 + halign = right + valign = bottom +} + +# weather edit the scripts for locations +# weather scripts are located in ~/.config/hypr/UserScripts Weather.sh and/or Weather.py +# see https://github.com/JaKooLit/Hyprland-Dots/wiki/TIPS#%EF%B8%8F-weather-app-related-for-waybar-and-hyprlock +label { + monitor = + text = cmd[update:3600000] [ -f ~/.cache/.weather_cache ] && cat ~/.cache/.weather_cache + color = $color10 + font_size = 24 + font_family = JetBrains Mono Nerd Font 10 + position = 50, 0 + halign = left + valign = bottom +} + +# Put a picture of choice here. Default is the current wallpaper +image { + monitor = + path = $HOME/.config/hypr/wallpaper_effects/.wallpaper_current + size = 150 + rounding = -1 + border_size = 2 + border_color = $color11 + rotate = 0 + reload_time = -1 + position = 0, 180 + halign = center + valign = bottom +} diff --git a/config/hypr/hyprlock.conf b/config/hypr/hyprlock.conf index f42b08f7..e95da6dd 100644 --- a/config/hypr/hyprlock.conf +++ b/config/hypr/hyprlock.conf @@ -1,5 +1,5 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # -# Hyprlock +# Hyprlock config for => 2k monitor resolutions # Original config submitted by https://github.com/SherLock707 # Sourcing colors generated by wallust @@ -52,7 +52,7 @@ label { color = $color12 font_size = 34 font_family = JetBrains Mono Nerd Font Mono ExtraBold - position = 0, -150 + position = 0, -100 halign = center valign = top } @@ -60,39 +60,39 @@ label { # Hour-Time label { monitor = - text = cmd[update:1000] echo -e "$(date +"%H")" -# text = cmd[update:1000] echo -e "$(date +"%I")" #AM/PM + text = cmd[update:1000] echo "$(date +"%H")" +# text = cmd[update:1000] echo "$(date +"%I")" #AM/PM color = rgba(255, 185, 0, .6) font_size = 200 font_family = JetBrains Mono Nerd Font Mono ExtraBold - position = 0, 300 + position = 0, -200 halign = center - valign = center + valign = top } # Minute-Time label { monitor = - text = cmd[update:1000] echo -e "$(date +"%M")" + text = cmd[update:1000] echo "$(date +"%M")" color = rgba(255, 255, 255, .6) font_size = 200 font_family = JetBrains Mono Nerd Font Mono ExtraBold - position = 0, 0 + position = 0, -500 halign = center - valign = center + valign = top } # Seconds-Time label { monitor = - text = cmd[update:1000] echo -e "$(date +"%S")" -# text = cmd[update:1000] echo -e "$(date +"%S %p")" #AM/PM + text = cmd[update:1000] echo "$(date +"%S")" +# text = cmd[update:1000] echo "$(date +"%S %p")" #AM/PM color = $color12 font_size = 40 font_family = JetBrains Mono Nerd Font Mono ExtraBold - position = 0, 150 + position = 0, -500 halign = center - valign = center + valign = top } # User diff --git a/config/hypr/initial-boot.sh b/config/hypr/initial-boot.sh index 28bf33ab..85e65322 100755 --- a/config/hypr/initial-boot.sh +++ b/config/hypr/initial-boot.sh @@ -8,7 +8,7 @@ # Variables scriptsDir=$HOME/.config/hypr/scripts wallpaper=$HOME/.config/hypr/wallpaper_effects/.wallpaper_modified -waybar_style="$HOME/.config/waybar/style/[Wallust] Box type.css" +waybar_style="$HOME/.config/waybar/style/[Dark] Half-Moon.css" kvantum_theme="Catppuccin-Mocha" color_scheme="prefer-dark" gtk_theme="Andromeda-dark" diff --git a/config/hypr/scripts/PortalHyprland.sh b/config/hypr/scripts/PortalHyprland.sh index 59f2e1df..d40f02ed 100755 --- a/config/hypr/scripts/PortalHyprland.sh +++ b/config/hypr/scripts/PortalHyprland.sh @@ -11,6 +11,6 @@ sleep 1 /usr/lib/xdg-desktop-portal-hyprland & /usr/libexec/xdg-desktop-portal-hyprland & sleep 2 -/usr/lib/xdg-desktop-portal-hyprland & +/usr/lib/xdg-desktop-portal & /usr/libexec/xdg-desktop-portal & diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh index 42e70896..f7a3ec08 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -26,7 +26,7 @@ done ags -q sleep 0.3 -# Relaunch waybar +#Restart waybar waybar & # relaunch swaync diff --git a/config/hypr/scripts/SwitchKeyboardLayout.sh b/config/hypr/scripts/SwitchKeyboardLayout.sh index 55bdf997..9ef71f64 100755 --- a/config/hypr/scripts/SwitchKeyboardLayout.sh +++ b/config/hypr/scripts/SwitchKeyboardLayout.sh @@ -6,29 +6,41 @@ layout_f="$HOME/.cache/kb_layout" settings_file="$HOME/.config/hypr/UserConfigs/UserSettings.conf" notif="$HOME/.config/swaync/images/bell.png" +echo "Starting script..." + # Check if ~/.cache/kb_layout exists and create it with a default layout from Settings.conf if not found if [ ! -f "$layout_f" ]; then + echo "Creating layout file as it does not exist..." default_layout=$(grep 'kb_layout = ' "$settings_file" | cut -d '=' -f 2 | cut -d ',' -f 1 2>/dev/null) if [ -z "$default_layout" ]; then default_layout="us" # Default to 'us' layout if Settings.conf or 'kb_layout' is not found fi echo "$default_layout" > "$layout_f" + echo "Default layout set to $default_layout" fi current_layout=$(cat "$layout_f") +echo "Current layout: $current_layout" # Read keyboard layout settings from Settings.conf if [ -f "$settings_file" ]; then + echo "Reading keyboard layout settings from $settings_file..." kb_layout_line=$(grep 'kb_layout = ' "$settings_file" | cut -d '=' -f 2) IFS=',' read -ra layout_mapping <<< "$kb_layout_line" + echo "Available layouts: ${layout_mapping[@]}" +else + echo "Settings file not found!" + exit 1 fi layout_count=${#layout_mapping[@]} +echo "Number of layouts: $layout_count" # Find the index of the current layout in the mapping for ((i = 0; i < layout_count; i++)); do if [ "$current_layout" == "${layout_mapping[i]}" ]; then current_index=$i + echo "Current layout index: $current_index" break fi done @@ -36,10 +48,7 @@ done # Calculate the index of the next layout next_index=$(( (current_index + 1) % layout_count )) new_layout="${layout_mapping[next_index]}" - -# Update the keyboard layout -hyprctl switchxkblayout "at-translated-set-2-keyboard" "$new_layout" -echo "$new_layout" > "$layout_f" +echo "Next layout: $new_layout" # Created by T-Crypt @@ -51,7 +60,8 @@ change_layout() { local got_error=false while read -r name; do - hyprctl switchxkblayout "$name" next + echo "Switching layout for $name to $new_layout..." + hyprctl switchxkblayout "$name" "$new_layout" if [[ $? -eq 0 ]]; then echo "Switched the layout for $name." else @@ -74,5 +84,8 @@ if ! change_layout; then exit 1 else # Notification for the new keyboard layout - notify-send -u low -i "$notif" "new KB_Layout: $new_layout" + notify-send -u low -i "$notif" "new KB_Layout: $new_layout" + echo "Layout change notification sent." fi + +echo "$new_layout" > "$layout_f" diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh index 03029889..36cbeb10 100755 --- a/config/hypr/scripts/WaybarLayout.sh +++ b/config/hypr/scripts/WaybarLayout.sh @@ -24,15 +24,7 @@ menu() { # Apply selected configuration apply_config() { ln -sf "$waybar_layouts/$1" "$waybar_config" - restart_waybar_if_needed -} - -# Restart Waybar -restart_waybar_if_needed() { - if pgrep -x "waybar" >/dev/null; then - pkill waybar - sleep 0.1 # Delay for Waybar to completely terminate - fi + #restart_waybar_if_needed "${SCRIPTSDIR}/Refresh.sh" & } diff --git a/config/hypr/scripts/WaybarStyles.sh b/config/hypr/scripts/WaybarStyles.sh index 2e994780..95a348ba 100755 --- a/config/hypr/scripts/WaybarStyles.sh +++ b/config/hypr/scripts/WaybarStyles.sh @@ -26,15 +26,6 @@ menu() { # Apply selected style apply_style() { ln -sf "$waybar_styles/$1.css" "$waybar_style" - restart_waybar_if_needed -} - -# Restart Waybar if it's running -restart_waybar_if_needed() { - if pgrep -x "waybar" >/dev/null; then - pkill waybar - sleep 0.1 # Delay for Waybar to completely terminate - fi "${SCRIPTSDIR}/Refresh.sh" & } diff --git a/config/hypr/v2.3.1 b/config/hypr/v2.3.2 index 31b3414d..31b3414d 100644 --- a/config/hypr/v2.3.1 +++ b/config/hypr/v2.3.2 |
