diff options
| author | brustybee <bee@4d2.org> | 2026-03-14 20:48:08 +0530 |
|---|---|---|
| committer | brustybee <bee@4d2.org> | 2026-03-14 20:48:08 +0530 |
| commit | f33743bfd1fa3924d67a33ea8816c1b45d92e6a1 (patch) | |
| tree | 32100d087fac464626a5df68ca9c1949c5d473e5 | |
| parent | 8ae1bc8bc07b938a7fa44106ce699ad0dc17b510 (diff) | |
ummmmmm light mode
| -rw-r--r-- | common/modules/mango/default.nix | 3 | ||||
| -rw-r--r-- | common/modules/mango/scripts.nix | 140 | ||||
| -rw-r--r-- | common/modules/matugen/default.nix | 4 | ||||
| -rw-r--r-- | common/modules/matugen/templates/matugen-dunst.nix | 7 | ||||
| -rw-r--r-- | common/modules/matugen/templates/matugen-rofi.nix | 5 | ||||
| -rw-r--r-- | common/modules/matugen/templates/matugen-sequences.nix | 6 | ||||
| -rw-r--r-- | common/modules/matugen/templates/matugen-terminal.nix | 14 | ||||
| -rw-r--r-- | common/modules/matugen/templates/matugen-vesktop.nix | 4 | ||||
| -rw-r--r-- | common/modules/matugen/templates/matugen-waybar.nix | 14 | ||||
| -rw-r--r-- | common/modules/matugen/templates/matugen-xresources.nix | 12 | ||||
| -rw-r--r-- | common/modules/matugen/templates/matugen-zen.nix | 55 | ||||
| -rw-r--r-- | common/programs/rofi.nix | 46 | ||||
| -rw-r--r-- | common/programs/vesktop.nix | 2 | ||||
| -rw-r--r-- | users/common.nix | 6 |
14 files changed, 216 insertions, 102 deletions
diff --git a/common/modules/mango/default.nix b/common/modules/mango/default.nix index b42146e..be210ed 100644 --- a/common/modules/mango/default.nix +++ b/common/modules/mango/default.nix @@ -259,7 +259,8 @@ in bind=SUPER,a,spawn,rofi -show drun bind=SUPER,period,spawn,rofi -show emoji -modi emoji bind=ALT,F4,spawn,rofi -show power-menu -modi power-menu:rofi-power-menu - bind=SUPER,y,spawn,wall-picker + bind=SUPER,y,spawn,beesettings wall + bind=SUPER,comma,spawn,beesettings settings bind=SUPER,F12,spawn,gnome-calculator bind=SUPER,b,spawn,zen diff --git a/common/modules/mango/scripts.nix b/common/modules/mango/scripts.nix index b3de75d..edc9830 100644 --- a/common/modules/mango/scripts.nix +++ b/common/modules/mango/scripts.nix @@ -1,6 +1,5 @@ { pkgs, ... }: let - # CHANGED: writeShellScript -> writeShellScriptBin volume-control = pkgs.writeShellScriptBin "volume-control" '' TAG="audio-volume" @@ -29,7 +28,6 @@ let fi ''; - # CHANGED: writeShellScript -> writeShellScriptBin brightness-control = pkgs.writeShellScriptBin "brightness-control" '' TAG="screen-brightness" @@ -47,7 +45,6 @@ let "Brightness: $current%" ''; - # CHANGED: writeShellScript -> writeShellScriptBin mic-control = pkgs.writeShellScriptBin "mic-control" '' TAG="audio-mic" @@ -67,11 +64,148 @@ let "Microphone: On" fi ''; + beesettings = pkgs.writeShellScriptBin "beesettings" '' + CONFIG_FILE="$HOME/.config/beeSettings" + WALL_DIR="$HOME/Pictures/Wallpapers" + + init_settings() { + if [ ! -f "$CONFIG_FILE" ]; then + mkdir -p "$(dirname "$CONFIG_FILE")" + echo -e "theme=dark\nnightlight=off\nwallpaper=$WALL_DIR/default.jpg" > "$CONFIG_FILE" + fi + } + + get_val() { grep "^$1=" "$CONFIG_FILE" | cut -d'=' -f2; } + set_val() { sed -i "s|^$1=.*|$1=$2|" "$CONFIG_FILE"; } + set_layout() { mmsg -l "$1"; } + + apply_all() { + local theme=$(get_val "theme") + local wall=$(get_val "wallpaper") + local mode_flag="dark" + [ "$theme" == "light" ] && mode_flag="light" + + matugen image "$wall" -m "$mode_flag" -t scheme-content --source-color-index 0 2>/dev/null + wallust -q -s run "$wall" 2>/dev/null + + dconf write /org/gnome/desktop/interface/color-scheme "'prefer-$mode_flag'" + + if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$DISPLAY" ]; then + xrdb -merge "$HOME/.Xresources" + fi + [ -f "$HOME/.config/sequences" ] && sh "$HOME/.config/sequences" + } + + cmd_wall() { + list_walls() { + for wall in "$WALL_DIR"/*.{jpg,jpeg,png,webp}; do + [ -f "$wall" ] && echo -en "$(basename "$wall")\0icon\x1f$wall\n" + done + } + + SELECTED=$(list_walls | rofi -dmenu -i -p "Wallpaper" \ + -show-icons \ + -theme-str 'element { orientation: vertical; padding: 15px; }' \ + -theme-str 'element-icon { size: 10em; horizontal-align: 0.5; }' \ + -theme-str 'listview { columns: 3; lines: 2; }' \ + -theme-str 'window { width: 50%; }') + + if [ -n "$SELECTED" ]; then + FULL_PATH="$WALL_DIR/$SELECTED" + set_val "wallpaper" "$FULL_PATH" + + if [ -n "$WAYLAND_DISPLAY" ]; then + if command -v swww >/dev/null 2>&1; then + swww img "$FULL_PATH" --transition-type grow --transition-fps 120 --transition-step 60 --transition-duration 1.5 + else + pkill swaybg; swaybg -i "$FULL_PATH" -m fill & + fi + else + feh --bg-fill "$FULL_PATH" + fi + + apply_all + fi + } + + cmd_settings() { + local theme=$(get_val "theme") + local nl=$(get_val "nightlight") + + CHOICE=$(echo -e "Mode: $theme\nNight Light: $nl\nLayouts" | rofi -dmenu -p "Settings" -i) + + case "$CHOICE" in + "Mode: "*) + [ "$theme" == "dark" ] && set_val "theme" "light" || set_val "theme" "dark" + apply_all + ;; + "Night Light: "*) + if [ "$nl" == "on" ]; then + set_val "nightlight" "off"; pkill wlsunset + else + set_val "nightlight" "on"; wlsunset -T 4500 & + fi + ;; + "Layouts") + L=$(echo -e "tile\nmonocle\nscroller\ntgmix\ngrid\ndeck\ncenter tile\nright tile\nvertical scroller\nvertical tile\nvertical grid\nvertical deck" | rofi -dmenu -p "Layout") + case "$L" in + "tile") + set_layout "T" + ;; + "monocle") + set_layout "M" + ;; + "scroller") + set_layout "S" + ;; + "tgmix") + set_layout "TG" + ;; + "grid") + set_layout "G" + ;; + "deck") + set_layout "K" + ;; + "center tile") + set_layout "CT" + ;; + "right tile") + set_layout "RT" + ;; + "vertical grid") + set_layout "VG" + ;; + "vertical tile") + set_layout "VT" + ;; + "vertical deck") + set_layout "VK" + ;; + "vertical scroller") + set_layout "VS" + ;; + esac + ;; + esac + } + + + init_settings + case "$1" in + wall) cmd_wall ;; + settings) cmd_settings ;; + apply) apply_all ;; + *) echo "Usage: bee {wall|settings|apply}" ;; + esac + ''; + in { home.packages = [ volume-control brightness-control mic-control + beesettings ]; } diff --git a/common/modules/matugen/default.nix b/common/modules/matugen/default.nix index 3238b3a..301e9fa 100644 --- a/common/modules/matugen/default.nix +++ b/common/modules/matugen/default.nix @@ -145,7 +145,7 @@ in ${lib.optionalString config.programs.vesktop.enable '' [templates.vesktop] input_path = "~/.config/matugen/templates/vesktop.css" - output_path = "~/.config/vesktop/themes/midnight.css" + output_path = "~/.config/vesktop/themes/system24.css" ''} ${lib.optionalString config.beeMods.mango.waybar '' @@ -180,7 +180,7 @@ in [templates.gtk4] input_path = '~/.config/matugen/templates/colors.css' output_path = '~/.config/gtk-4.0/colors.css' - post_hook = "${update_gtkcolors}" + # post_hook = "${update_gtkcolors}" ''} [templates.zed] diff --git a/common/modules/matugen/templates/matugen-dunst.nix b/common/modules/matugen/templates/matugen-dunst.nix index 9b523d3..443feeb 100644 --- a/common/modules/matugen/templates/matugen-dunst.nix +++ b/common/modules/matugen/templates/matugen-dunst.nix @@ -4,14 +4,17 @@ [global] frame_color = "{{colors.primary.default.hex}}" separator_color = "{{colors.primary_container.default.hex}}" + <* if {{ is_dark_mode }} *> + background = '{{colors.background.default.hex}}' + <* else *> + background = '{{colors.surface_container.default.hex}}' + <* endif *> [urgency_low] - background = "{{colors.surface.default.hex}}" foreground = "{{colors.on_surface.default.hex}}" highlight = "{{colors.primary.default.hex}}" [urgency_normal] - background = "{{colors.surface.default.hex}}" foreground = "{{colors.on_surface.default.hex}}" highlight = "{{colors.primary.default.hex}}" diff --git a/common/modules/matugen/templates/matugen-rofi.nix b/common/modules/matugen/templates/matugen-rofi.nix index 9645e5a..2241c6d 100644 --- a/common/modules/matugen/templates/matugen-rofi.nix +++ b/common/modules/matugen/templates/matugen-rofi.nix @@ -11,8 +11,13 @@ # rasi '' * { + <* if {{ is_dark_mode }} *> background: {{colors.surface.default.hex}}; background-alt: {{colors.surface_container.default.hex}}; + <* else *> + background: {{colors.surface_container.default.hex}}; + background-alt: {{colors.surface_container_high.default.hex}}; + <* endif *> foreground: {{colors.on_surface.default.hex}}; selected: {{colors.primary.default.hex}}; active: {{colors.secondary.default.hex}}; diff --git a/common/modules/matugen/templates/matugen-sequences.nix b/common/modules/matugen/templates/matugen-sequences.nix index d974ae9..e158984 100644 --- a/common/modules/matugen/templates/matugen-sequences.nix +++ b/common/modules/matugen/templates/matugen-sequences.nix @@ -26,10 +26,14 @@ SEQ="$SEQ$(printf '\033]4;14;rgb:\{{color14 | xrgb}}\007')" SEQ="$SEQ$(printf '\033]4;15;rgb:\{{color15 | xrgb}}\007')" SEQ="$SEQ$(printf '\033]10;{{colors.on_surface.default.hex}}\007')" + <* if {{ is_dark_mode }} *> SEQ="$SEQ$(printf '\033]11;{{colors.background.default.hex}}\007')" + <* else *> + SEQ="$SEQ$(printf '\033]11;{{colors.surface_container.default.hex}}\007')" + <* endif *> SEQ="$SEQ$(printf '\033]12;{{colors.primary.default.hex}}\007')" SEQ="$SEQ$(printf '\033]17;{{colors.on_surface.default.hex}}\007')" - SEQ="$SEQ$(printf '\033]19;{{colors.background.default.hex}}\007')" + SEQ="$SEQ$(printf '\033]19;{{colors.primary_container.default.hex}}\007')" for tty in /dev/pts/*; do [ -w "$tty" ] && printf '%s' "$SEQ" > "$tty" diff --git a/common/modules/matugen/templates/matugen-terminal.nix b/common/modules/matugen/templates/matugen-terminal.nix index d8ee733..5ae9d86 100644 --- a/common/modules/matugen/templates/matugen-terminal.nix +++ b/common/modules/matugen/templates/matugen-terminal.nix @@ -10,7 +10,11 @@ text = '' [colors-dark] foreground={{colors.on_surface.default.hex_stripped}} + <* if {{ is_dark_mode }} *> background={{colors.background.default.hex_stripped}} + <* else *> + background={{colors.surface_container.default.hex_stripped}} + <* endif *> selection-foreground={{colors.on_surface.default.hex_stripped}} selection-background={{colors.primary_container.default.hex_stripped}} cursor = {{colors.background.default.hex_stripped}} {{colors.primary.default.hex_stripped}} @@ -42,7 +46,11 @@ xdg.configFile."matugen/templates/alacritty-colors.toml" = { text = '' [colors.primary] + <* if {{ is_dark_mode }} *> background = '{{colors.background.default.hex}}' + <* else *> + background = '{{colors.surface_container.default.hex}}' + <* endif *> foreground = '{{colors.on_surface.default.hex}}' [colors.selection] @@ -78,7 +86,11 @@ (lib.mkIf config.beeMods.terminal.ghostty { xdg.configFile."matugen/templates/ghostty.conf" = { text = '' - background = {{colors.background.default.hex}} + <* if {{ is_dark_mode }} *> + background = '{{colors.background.default.hex}}' + <* else *> + background = '{{colors.surface_container.default.hex}}' + <* endif *> foreground = {{colors.on_surface.default.hex}} cursor-color = {{colors.primary.default.hex}} selection-background = {{colors.primary_container.default.hex}} diff --git a/common/modules/matugen/templates/matugen-vesktop.nix b/common/modules/matugen/templates/matugen-vesktop.nix index aa3639f..44a6b20 100644 --- a/common/modules/matugen/templates/matugen-vesktop.nix +++ b/common/modules/matugen/templates/matugen-vesktop.nix @@ -103,7 +103,11 @@ --bg-1: {{colors.surface_variant.default.hex}}; --bg-2: {{colors.surface_container_high.default.hex}}; --bg-3: {{colors.surface_container_low.default.hex}}; + <* if {{ is_dark_mode }} *> --bg-4: {{colors.surface.default.hex}}; + <* else *> + --bg-4: {{colors.surface_container_low.default.hex}}; + <* endif *> /* hovers - using on_surface hex + CSS hex opacity (1a=10%, 33=20%, 4d=30%) */ --hover: {{colors.on_surface.default.hex}}1a; diff --git a/common/modules/matugen/templates/matugen-waybar.nix b/common/modules/matugen/templates/matugen-waybar.nix index 602a846..acdb788 100644 --- a/common/modules/matugen/templates/matugen-waybar.nix +++ b/common/modules/matugen/templates/matugen-waybar.nix @@ -8,11 +8,19 @@ xdg.configFile."matugen/templates/waybar.css" = { text = '' ${lib.optionalString (config.beeMods.mango.window.blur.enable) '' + <* if {{ is_dark_mode }} *> @define-color bg_panel rgba({{colors.surface.default.red}}, {{colors.surface.default.green}}, {{colors.surface.default.blue}}, 0.9); + <* else *> + @define-color bg_panel rgba({{colors.surface_container.default.red}}, {{colors.surface_container.default.green}}, {{colors.surface_container.default.blue}}, 0.9); + <* endif *> + ''} + ${lib.optionalString (!config.beeMods.mango.window.blur.enable) '' + <* if {{ is_dark_mode }} *> + @define-color bg_panel {{colors.surface.default.hex}}; + <* else *> + @define-color bg_panel {{colors.surface_container.default.hex}}; + <* endif *> ''} - ${lib.optionalString ( - !config.beeMods.mango.window.blur.enable - ) "@define-color bg_panel {{colors.surface.default.hex}}; "} @define-color bg_base transparent; @define-color border_color {{colors.primary.default.hex}}; diff --git a/common/modules/matugen/templates/matugen-xresources.nix b/common/modules/matugen/templates/matugen-xresources.nix index 614a4bc..6ee20c2 100644 --- a/common/modules/matugen/templates/matugen-xresources.nix +++ b/common/modules/matugen/templates/matugen-xresources.nix @@ -8,13 +8,19 @@ xdg.configFile."matugen/templates/colors-xresources" = { text = '' dwm.normbordercolor : {{colors.outline.default.hex}} - dwm.normbgcolor : {{colors.surface.default.hex}} dwm.normfgcolor : {{colors.on_surface.default.hex}} dwm.selbordercolor : {{colors.primary.default.hex}} - dwm.selbgcolor : {{colors.surface_container.default.hex}} dwm.selfgcolor : {{colors.primary.default.hex}} - + <* if {{ is_dark_mode }} *> st.background: {{colors.surface.default.hex}} + dwm.normbgcolor : {{colors.surface.default.hex}} + dwm.selbgcolor : {{colors.surface_container.default.hex}} + <* else *> + st.background: {{colors.surface_container.default.hex}} + dwm.normbgcolor : {{colors.surface_container.default.hex}} + dwm.selbgcolor : {{colors.secondary_fixed.default.hex}} + <* endif *> + st.foreground: {{colors.on_surface.default.hex}} st.cursorColor: {{colors.primary.default.hex}} diff --git a/common/modules/matugen/templates/matugen-zen.nix b/common/modules/matugen/templates/matugen-zen.nix index 837b401..cbb3df3 100644 --- a/common/modules/matugen/templates/matugen-zen.nix +++ b/common/modules/matugen/templates/matugen-zen.nix @@ -6,7 +6,6 @@ # css '' :root { - /* --- Matugen Colors (UI) --- */ --zen-primary-color: {{colors.primary_container.default.hex}} !important; --toolbarbutton-icon-fill: {{colors.primary.default.hex}} !important; --toolbar-field-color: {{colors.on_background.default.hex}} !important; @@ -15,47 +14,14 @@ --arrowpanel-color: {{colors.on_surface.default.hex}} !important; --arrowpanel-background: {{colors.surface_container.default.hex}} !important; --sidebar-text-color: {{colors.on_background.default.hex}} !important; - /* --zen-main-browser-background: {{colors.background.default.hex}} !important; */ - - /* --- Boxy UI Variables --- */ - --toolbarbutton-border-radius: 0px !important; - --tab-border-radius: 0px !important; - --arrowpanel-border-radius: 0px !important; - --urlbar-icon-border-radius: 0px !important; + --zen-main-browser-background: {{colors.background.default.hex}} !important; } * { font-family: "JetBrainsMono Nerd Font", monospace !important; - } - - /* --- Enforce Boxy Look (Zero Border Radius) --- */ - .tab-background, - .tabbrowser-tab, - .urlbar-background, - #urlbar-input-container, - #urlbar-background, - .urlbar-input-box, - .toolbarbutton-1, - .toolbarbutton-icon, - .toolbarbutton-badge-stack, - #zen-workspaces-button, - .panel-arrowcontent, - menupopup, - menuitem, - .sidebar-placesTree, - #zen-appcontent-navbar-container, - #TabsToolbar, - .browserContainer, - #navigator-toolbox, - #sidebar-box, - .searchbar-textbox, - window, - page, - browser { border-radius: 0 !important; } - /* --- Layout & Color Rules --- */ .sidebar-placesTree { background-color: {{colors.surface_container.default.hex}} !important; } @@ -94,7 +60,6 @@ } } - /* --- Tab Identity Colors --- */ .identity-color-blue { --identity-tab-color: \{{color12}} !important; --identity-icon-color: \{{color12}} !important; @@ -138,6 +103,24 @@ #zen-appcontent-navbar-container { background-color: {{colors.background.default.hex}} !important; } + + #PanelUI-menu-button .toolbarbutton-icon, + #downloads-button .toolbarbutton-icon, + #unified-extensions-button .toolbarbutton-icon { + fill: {{colors.primary.default.hex}} !important; + color: {{colors.primary.default.hex}} !important; + } + + #PanelUI-menu-button .toolbarbutton-badge-stack, + #downloads-button .toolbarbutton-badge-stack, + #unified-extensions-button .toolbarbutton-badge-stack { + fill: {{colors.primary.default.hex}} !important; + color: {{colors.primary.default.hex}} !important; + } + + toolbar .toolbarbutton-1 > .toolbarbutton-icon { + fill: {{colors.primary.default.hex}} !important; + } ''; }; }; diff --git a/common/programs/rofi.nix b/common/programs/rofi.nix index ce335dc..66ff00c 100644 --- a/common/programs/rofi.nix +++ b/common/programs/rofi.nix @@ -12,54 +12,8 @@ theme = "~/.config/rofi/themes/config.rasi"; }; - # custom scripts home.packages = [ pkgs.rofi-power-menu - (pkgs.writeShellScriptBin "wall-picker" '' - WALL_DIR="$HOME/Pictures/Wallpapers" - - list_wallpapers() { - for wall in "$WALL_DIR"/*.{jpg,jpeg,png,webp}; do - if [ -f "$wall" ]; then - echo -en "$(basename "$wall")\0icon\x1f$wall\n" - fi - done - } - - SELECTED=$(list_wallpapers | rofi -dmenu -i -p "Wallpaper" \ - -show-icons \ - -theme-str 'element { orientation: vertical; padding: 15px; }' \ - -theme-str 'element-icon { size: 10em; horizontal-align: 0.5; }' \ - -theme-str 'element-text { horizontal-align: 0.5; }' \ - -theme-str 'listview { columns: 3; lines: 2; }' \ - -theme-str 'window { width: 50%; }') - - if [ -n "$SELECTED" ]; then - FULL_PATH="$WALL_DIR/$SELECTED" - - if [ -n "$WAYLAND_DISPLAY" ]; then - if command -v swaybg >/dev/null 2>&1; then - pkill swaybg - echo "swaybg -i \"$FULL_PATH\" -m fill &" > "$HOME/.swaybg" - sh "$HOME/.swaybg" - elif command -v swww >/dev/null 2>&1; then - swww img "$FULL_PATH" --transition-type grow --transition-fps 120 --transition-step 60 --transition-duration 1.5 - else - dunstify "Error: No Wayland wallpaper tool found" - fi - echo "feh --no-fehbg --bg-fill '$FULL_PATH'" > ~/.fehbg - else - feh --bg-fill "$FULL_PATH" - echo "swaybg -i \"$FULL_PATH\" -m fill &" > "$HOME/.swaybg" - fi - - matugen image "$FULL_PATH" --source-color-index 0 2>/dev/null && wallust -q -s run "$FULL_PATH" 2>/dev/null - if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$DISPLAY" ]; then - xrdb -merge "$HOME/.Xresources" - fi - sh ~/.config/sequences - fi - '') ]; xdg.configFile = { diff --git a/common/programs/vesktop.nix b/common/programs/vesktop.nix index cf2da1d..41a9e56 100644 --- a/common/programs/vesktop.nix +++ b/common/programs/vesktop.nix @@ -4,7 +4,7 @@ enable = true; vencord = { settings = { - enabledThemes = lib.optionals config.beeMods.matugen.enable [ "system24.theme.css" ]; + enabledThemes = lib.optionals config.beeMods.matugen.enable [ "system24.css" ]; autoUpdate = false; autoUpdateNotification = false; notifyAboutUpdates = false; diff --git a/users/common.nix b/users/common.nix index 2d62370..42ae12f 100644 --- a/users/common.nix +++ b/users/common.nix @@ -33,9 +33,9 @@ }; dconf.settings = { - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - }; + # "org/gnome/desktop/interface" = { + # color-scheme = "prefer-dark"; + # }; "org/gnome/desktop/wm/preferences" = { button-layout = ""; }; |
