diff --git a/README.md b/README.md new file mode 100644 index 0000000..4ba0f41 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# Hyprland Dotfiles + +This repository contains my Hyprland dotfiles, including configurations for Waybar, Kitty, and other related tools. + +## Recent Changes and Improvements + +This section summarizes the recent modifications made to the Hyprland setup, primarily focusing on integrating and adapting JaKooLit's comprehensive `DarkLight.sh` script for theme management. + +### Overview of Changes + +The primary goal was to enable reliable dark/light theme switching across Waybar, Kitty, GTK applications, and to resolve specific issues encountered during the setup. + +1. **Waybar Configuration (`~/.config/waybar/configs/[TOP] RAM Default`)**: + * Added the `memory` module and `custom/light_dark` module to the `modules-right` section for enhanced system monitoring and theme toggling. + +2. **Waybar Styling (`~/.config/waybar/style.css`)**: + * Ensured the "Golden Eclipse" dark theme was active. + * Added specific styling and a hover animation for the `memory` module. + * Implemented styling for the `custom/light_dark` module to visually integrate the theme toggle. + +3. **Waybar Theme Toggle Script (`~/.config/waybar/scripts/theme-toggle.sh`)**: + * **Major Change:** This script was simplified to primarily execute `~/.config/hypr/scripts/DarkLight.sh`. This delegates all comprehensive theme management (Waybar, Kitty, GTK, Kvantum, wallpapers) to JaKooLit's script, ensuring consistency and a single source of truth for theme logic. + +4. **Dark/Light Theme Management Script (`~/.config/hypr/scripts/DarkLight.sh`)**: + * **Cleaned Duplication:** Removed a large, duplicated section of code that was causing issues and making modifications difficult. + * **Waybar Stability:** Introduced a `sleep 0.5` command after the initial `killall` of applications. This ensures Waybar (and other relevant applications) fully terminate before being restarted, preventing crashes or unexpected behavior during theme transitions. + * **Kvantum Manager Suppression:** Commented out the `kvantummanager --set` line. Although the command was redirected to `/dev/null`, it was still unexpectedly launching the Kvantum Manager GUI. Disabling this line prevents the pop-up and improves the user experience. + * **Notification Timeout:** Added `-t 5000` (5-second timeout) to all `notify-send` calls. This makes theme-change notifications disappear automatically after a short period, reducing visual clutter and removing the need for manual dismissal. + +5. **Kitty Terminal Configuration (`~/.config/kitty/kitty.conf`)**: + * **Reverted Color Overrides:** Explicit `foreground`, `background`, and `cursor` color settings were re-added. This was necessary because `DarkLight.sh` is designed to manage these lines directly via `sed` commands to apply the correct theme colors. + +6. **Hyprland Window Rules (`~/.config/hypr/UserConfigs/WindowRules.conf`)**: + * **Alacritty Opacity Fix:** Added a specific `windowrule = opacity 1.0 1.0, class:^(Alacritty)$` to ensure the Alacritty terminal is fully opaque. This overrides a more general `tag:terminal*` transparency rule that was unintentionally affecting Alacritty. + +## Future Work + +* **Firefox Theming:** Further investigation is needed to ensure Firefox correctly follows the dark/light theme switch managed by `DarkLight.sh`. This is likely related to how `DarkLight.sh` interacts with GTK themes and how Firefox interprets those changes. +* **NVIDIA Environment Variables:** Review and potentially enable NVIDIA environment variables in `ENVariables.conf` for optimal performance with the NVIDIA RTX 4080. \ No newline at end of file diff --git a/UserConfigs/ENVariables.conf b/UserConfigs/ENVariables.conf index f24cc30..7820310 100644 --- a/UserConfigs/ENVariables.conf +++ b/UserConfigs/ENVariables.conf @@ -51,39 +51,39 @@ env = ELECTRON_OZONE_PLATFORM_HINT,auto # auto selects Wayland if possible, X11 # This is from Hyprland Wiki. Below will be activated nvidia gpu detected # See hyprland wiki https://wiki.hyprland.org/Nvidia/#environment-variables -#env = LIBVA_DRIVER_NAME,nvidia -#env = __GLX_VENDOR_LIBRARY_NAME,nvidia -#env = NVD_BACKEND,direct -#env = GSK_RENDERER,ngl +env = LIBVA_DRIVER_NAME,nvidia +env = __GLX_VENDOR_LIBRARY_NAME,nvidia +env = NVD_BACKEND,direct +env = GSK_RENDERER,ngl # additional ENV's for nvidia. Caution, activate with care -#env = GBM_BACKEND,nvidia-drm +env = GBM_BACKEND,nvidia-drm -#env = __GL_GSYNC_ALLOWED,1 #adaptive Vsync -#env = __NV_PRIME_RENDER_OFFLOAD,1 -#env = __VK_LAYER_NV_optimus,NVIDIA_only -#env = WLR_DRM_NO_ATOMIC,1 +env = __GL_GSYNC_ALLOWED,1 #adaptive Vsync +env = __NV_PRIME_RENDER_OFFLOAD,1 +env = __VK_LAYER_NV_optimus,NVIDIA_only +env = WLR_DRM_NO_ATOMIC,1 # FOR VM and POSSIBLY NVIDIA # LIBGL_ALWAYS_SOFTWARE software mesa rendering -#env = LIBGL_ALWAYS_SOFTWARE,1 # Warning. May cause hyprland to crash -#env = WLR_RENDERER_ALLOW_SOFTWARE,1 +env = LIBGL_ALWAYS_SOFTWARE,1 # Warning. May cause hyprland to crash +env = WLR_RENDERER_ALLOW_SOFTWARE,1 # nvidia firefox (for hardware acceleration on FF)? # check this post https://github.com/elFarto/nvidia-vaapi-driver#configuration -#env = MOZ_DISABLE_RDD_SANDBOX,1 -#env = EGL_PLATFORM,wayland +env = MOZ_DISABLE_RDD_SANDBOX,1 +env = EGL_PLATFORM,wayland #### Aquamarine Environment Variables #### ( Hyprland > 0.45 ) # https://wiki.hyprland.org/Configuring/Environment-variables/#aquamarine-environment-variables----ref-httpsgithubcomhyprwmaquamarineblobmaindocsenvmd--- -# env = AQ_TRACE,1 # Enables more verbose logging. -# env = AQ_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0 # Set an explicit list of DRM devices (GPUs) to use. It’s a colon-separated list of paths, with the first being the primary. E.g. /dev/dri/card1:/dev/dri/card0 -# env = AQ_MGPU_NO_EXPLICIT,1 # Disables explicit syncing on mgpu buffers -# env = AQ_NO_MODIFIERS,1 # Disables modifiers for DRM buffers + env = AQ_TRACE,1 # Enables more verbose logging. + env = AQ_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0 # Set an explicit list of DRM devices (GPUs) to use. It’s a colon-separated list of paths, with the first being the primary. E.g. /dev/dri/card1:/dev/dri/card0 + env = AQ_MGPU_NO_EXPLICIT,1 # Disables explicit syncing on mgpu buffers + env = AQ_NO_MODIFIERS,1 # Disables modifiers for DRM buffers #### Hyprland Environment Variables #### # https://wiki.hyprland.org/Configuring/Environment-variables/#hyprland-environment-variables -# env = HYPRLAND_TRACE,1 # Enables more verbose logging. -# env = HYPRLAND_NO_RT,1 # Disables realtime priority setting by Hyprland. -# env = HYPRLAND_NO_SD_NOTIFY,1 # If systemd, disables the 'sd_notify' calls. -# env = HYPRLAND_NO_SD_VARS,1 # Disables management of variables in systemd and dbus activation environments. + env = HYPRLAND_TRACE,1 # Enables more verbose logging. + env = HYPRLAND_NO_RT,1 # Disables realtime priority setting by Hyprland. + env = HYPRLAND_NO_SD_NOTIFY,1 # If systemd, disables the 'sd_notify' calls. + env = HYPRLAND_NO_SD_VARS,1 # Disables management of variables in systemd and dbus activation environments. diff --git a/UserConfigs/WindowRules.conf b/UserConfigs/WindowRules.conf index d6959dc..e1adc59 100644 --- a/UserConfigs/WindowRules.conf +++ b/UserConfigs/WindowRules.conf @@ -173,6 +173,7 @@ 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 1.0 1.0, class:^(Alacritty)$ windowrule = opacity 0.8 0.7, tag:settings* windowrule = opacity 0.82 0.75, tag:viewer* windowrule = opacity 0.9 0.7, tag:wallpaper* @@ -180,7 +181,8 @@ 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:^(seahorse)$ # gnome-keyring gui windowrule = opacity 0.95 0.75, title:^(Picture-in-Picture)$ -windowrule = opacity 0.9,class:^(code)$ +windowrule = opacity 1.0 1.0, class:^(firefox)$ +windowrule = opacity 1.0 1.0,class:^(code)$ # SIZE windowrule = size 65% 90%, tag:KooL_Cheat* @@ -208,8 +210,7 @@ windowrule = fullscreen, tag:games* windowrule = noinitialfocus, class:^(jetbrains-*) windowrule = noinitialfocus, title:^(wind.*)$ -#This will gonna make the VS Code bluer like other apps -windowrule = opacity 0.8,class:^(code)$ + #windowrule = bordercolor rgb(EE4B55) rgb(880808), fullscreen:1 #windowrule = bordercolor rgb(282737) rgb(1E1D2D), floating:1 diff --git a/hyprland.conf b/hyprland.conf index 71f243e..85e25f0 100644 --- a/hyprland.conf +++ b/hyprland.conf @@ -2,6 +2,10 @@ # always refer to Hyprland wiki # https://wiki.hyprland.org/ +# Autostart gnome-keyring-daemon +exec-once = /usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh + + # Initial boot script enable to apply initial wallpapers, theming, new settings etc. # suggest not to change this or delete this including deleting referrence file in ~/.config/hypr/.initial_startup_done # as long as the referrence file is present, this initial-boot.sh will not execute diff --git a/scripts/DarkLight.sh b/scripts/DarkLight.sh index 1bc1602..b2501b7 100755 --- a/scripts/DarkLight.sh +++ b/scripts/DarkLight.sh @@ -25,6 +25,7 @@ for pid in waybar rofi swaync ags swaybg; do killall -SIGUSR1 "$pid" done +sleep 0.5 # Added sleep to ensure applications fully terminate # Initialize swww if needed swww query || swww-daemon --format xrgb @@ -51,7 +52,7 @@ update_theme_mode() { # Function to notify user notify_user() { - notify-send -u low -i "$notif" " Switching to" " $1 mode" + notify-send -u low -t 5000 -i "$notif" " Switching to" " $1 mode" } # Use sed to replace the palette setting in the wallust config file @@ -143,7 +144,7 @@ fi sed -i "s|^color_scheme_path=.*$|color_scheme_path=$qt5ct_color_scheme|" "$HOME/.config/qt5ct/qt5ct.conf" sed -i "s|^color_scheme_path=.*$|color_scheme_path=$qt6ct_color_scheme|" "$HOME/.config/qt6ct/qt6ct.conf" -kvantummanager --set "$kvantum_theme" +#kvantummanager --set "$kvantum_theme" > /dev/null 2>&1 & # Redirect output and run in background # set the rofi color for background @@ -248,7 +249,9 @@ ${SCRIPTSDIR}/Refresh.sh sleep 0.5 # Display notifications for theme and icon changes -notify-send -u low -i "$notif" " Themes switched to:" " $next_mode Mode" +notify-send -u low -t 5000 -i "$notif" " Themes switched to:" " $next_mode Mode" exit 0 + + diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 0000000..85b5ba6 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,34 @@ +# Theme Management Changes + +This document summarizes the modifications made to the Hyprland theming setup, primarily integrating and adapting JaKooLit's comprehensive `DarkLight.sh` script. + +## Overview of Changes + +The goal was to enable reliable dark/light theme switching across Waybar, Kitty, GTK applications (like Firefox), and to resolve specific issues encountered during the setup. + +1. **`~/.config/waybar/configs/[TOP] RAM Default`**: + * Added the `memory` module and `custom/light_dark` module to the `modules-right` section. + +2. **`~/.config/waybar/style.css`**: + * Ensured the "Golden Eclipse" dark theme was active. + * Added styling and a hover animation for the `memory` module. + * Added styling for the `custom/light_dark` module. + +3. **`~/.config/waybar/scripts/theme-toggle.sh`**: + * **Major Change:** This script was simplified to primarily call `~/.config/hypr/scripts/DarkLight.sh`. This delegates all comprehensive theme management (Waybar, Kitty, GTK, Kvantum, wallpapers) to JaKooLit's script, ensuring consistency. + +4. **`~/.config/hypr/scripts/DarkLight.sh`**: + * **Cleaned Duplication:** Removed a large, duplicated section of code that was causing issues with precise modifications. + * **Waybar Stability:** Added a `sleep 0.5` command after the initial `killall` of applications to ensure Waybar (and other apps) fully terminate before restarting, preventing crashes or unexpected behavior. + * **Kvantum Suppression:** Commented out the `kvantummanager --set` line. Although the command was redirected to `/dev/null`, it was still unexpectedly launching the Kvantum Manager GUI. Disabling this line prevents the pop-up. + * **Notification Timeout:** Added `-t 5000` (5-second timeout) to all `notify-send` calls to make theme-change notifications disappear automatically without requiring user interaction. + +5. **`~/.config/kitty/kitty.conf`**: + * **Reverted Changes:** The explicit `foreground`, `background`, and `cursor` color settings were re-added. This was necessary because `DarkLight.sh` expects to manage these lines directly via `sed` commands. + +6. **`~/.config/hypr/UserConfigs/WindowRules.conf`**: + * **Alacritty Opacity Fix:** Added `windowrule = opacity 1.0 1.0, class:^(Alacritty)$` to ensure Alacritty is fully opaque, overriding a general `tag:terminal*` transparency rule. + +## Next Steps (Firefox Theming) + +Firefox's theming is still not behaving as expected. This is likely due to how `DarkLight.sh` interacts with GTK themes and how Firefox interprets those changes. Further investigation will be needed to ensure Firefox correctly follows the dark/light theme switch. diff --git a/wallpaper_effects/.wallpaper_current b/wallpaper_effects/.wallpaper_current index 8cc5058..e604c37 100644 Binary files a/wallpaper_effects/.wallpaper_current and b/wallpaper_effects/.wallpaper_current differ