From 1bb49481dbec223e68df4f60fa1d425525e16cff Mon Sep 17 00:00:00 2001 From: brustybee Date: Mon, 13 Apr 2026 03:04:59 +0530 Subject: This is like that one dream you don't know how to describe --- common/modules/mango/default.nix | 84 ++--- common/modules/mango/scripts.nix | 261 ---------------- common/modules/mango/swayidleNdLock.nix | 53 ---- common/modules/mango/waybar.nix | 528 -------------------------------- 4 files changed, 25 insertions(+), 901 deletions(-) delete mode 100644 common/modules/mango/scripts.nix delete mode 100644 common/modules/mango/swayidleNdLock.nix delete mode 100644 common/modules/mango/waybar.nix (limited to 'common/modules/mango') diff --git a/common/modules/mango/default.nix b/common/modules/mango/default.nix index b47f7ca..7938c05 100644 --- a/common/modules/mango/default.nix +++ b/common/modules/mango/default.nix @@ -45,31 +45,11 @@ let smart-ghostty else config.beeMods.terminal.default; - settings-persist = pkgs.writeShellScript "settings-persist" '' - SETTINGS_FILE="$HOME/.config/beeSettings" - - if [[ -f "$SETTINGS_FILE" ]]; then - IS_NIGHTMODE=$(${pkgs.ripgrep}/bin/rg "nightlight" "$SETTINGS_FILE" | cut -d"=" -f2) - - if [[ "$IS_NIGHTMODE" == "on" ]]; then - ${pkgs.wlsunset}/bin/wlsunset -T 4500 & - fi - fi - ''; in { imports = - if homeManager then - [ - inputs.mango.hmModules.mango - ./waybar.nix - ./scripts.nix - ./swayidleNdLock.nix - ] - else - [ - inputs.mango.nixosModules.mango - ]; + if homeManager then [ inputs.mango.hmModules.mango ] else [ inputs.mango.nixosModules.mango ]; + options.${moduleNameSpace}.mango = { enable = lib.mkEnableOption "mango setup"; animations = lib.mkEnableOption "Uiiiiiiiiiii"; @@ -107,7 +87,7 @@ in enable = true; systemd.enable = true; systemd.variables = [ "--all" ]; - settings = '' + extraConfig = '' ${lib.optionalString (config.beeMods.matugen.enable) '' source=~/.config/mango/mango-colors.conf ''} @@ -127,7 +107,7 @@ in layer_shadows = 0 shadow_only_floating = 1 shadows_size = 10 - shadows_blur = 10 + shadows_blur = 15 shadows_position_x = 0 shadows_position_y = 0 @@ -175,7 +155,7 @@ in # Scroller configuration scroller_structs=15 - scroller_default_proportion=0.8 + scroller_default_proportion=0.6 scroller_focus_center=0 scroller_prefer_center=0 edge_scroller_pointer_focus=1 @@ -276,12 +256,11 @@ in bind=SUPER,Return,spawn,${terminal} - # bind=SUPER,v,spawn,clipvault list | rofi -dmenu -display-columns 2 | clipvault get | wl-copy - 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,beesettings wall - bind=SUPER,comma,spawn,beesettings settings + bind=SUPER,v,spawn,dms ipc call clipboard toggle + bind=SUPER,a,spawn,dms ipc call spotlight toggle + bind=ALT,F4,spawn,dms ipc call powermenu toggle + bind=SUPER,y,spawn,dms ipc call dankdash wallpaper + bind=SUPER,comma,spawn,dms ipc call settings focusOrToggle bind=SUPER,F12,spawn,gnome-calculator bind=SUPER,b,spawn,zen @@ -326,7 +305,7 @@ in # switch layout # bind=SUPER,n,switch_layout - bind=SUPER,n,spawn,beesettings layout + bind=SUPER,n,spawn,dms ipc call notifications toggle # tag switch bind=SUPER,1,view,1,0 @@ -376,75 +355,62 @@ in bind=ALT,l,resizewin,+50,+0 # Volume Control (using wpctl/Pipewire) - bind=NONE,XF86AudioRaiseVolume,spawn,volume-control up - bind=NONE,XF86AudioLowerVolume,spawn,volume-control down - bind=NONE,XF86AudioMute,spawn,volume-control mute + bind=NONE,XF86AudioRaiseVolume,spawn,wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ + bind=NONE,XF86AudioLowerVolume,spawn,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- + bind=NONE,XF86AudioMute,spawn,wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bind=NONE,XF86AudioPlay,spawn,playerctl play-pause bind=NONE,XF86AudioNext,spawn,playerctl next bind=NONE,XF86AudioPrev,spawn,playerctl previous bind=NONE,XF86AudioStop,spawn,playerctl stop - # Mic Control - bind=NONE,XF86AudioMicMute,spawn,mic-control toggle + bind=NONE,XF86AudioMicMute,spawn,wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle - # Brightness Control (using brightnessctl) - bind=NONE,XF86MonBrightnessUp,spawn,brightness-control up - bind=NONE,XF86MonBrightnessDown,spawn,brightness-control down + bind=NONE,XF86MonBrightnessUp,spawn,brightnessctl set +5% + bind=NONE,XF86MonBrightnessDown,spawn,brightnessctl set 5%- - # Mouse Button Bindings - # NONE mode key only work in ov mode mousebind=SUPER,btn_left,moveresize,curmove mousebind=NONE,btn_middle,togglemaximizescreen,0 mousebind=SUPER,btn_right,moveresize,curresize - # Axis Bindings axisbind=SUPER,UP,viewtoleft_have_client axisbind=SUPER,DOWN,viewtoright_have_client - # layer rule - layerrule=animation_type_open:zoom,layer_name:rofi - layerrule=animation_type_close:zoom,layer_name:rofi + layerrule=noanim:1,layer_name:^dms env=NIXOS_OZONE_WL,1 env=QT_AUTO_SCREEN_SCALE_FACTOR,1 env=ELECTRON_OZONE_PLATFORM_HINT,auto - env=QT_QPA_PLATFORM,wayland;xcb + env=QT_QPA_PLATFORM,wayland env=XDG_SESSION_TYPE,wayland env=GDK_BACKEND,wayland,x11 env=GDK_SCALE,1 - - exec-once = ~/.config/mango/autostart.sh ''; autostart_sh = '' - wl-clip-persist --clipboard regular & - ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1 & + wl-paste --type text --watch cliphist store & gnome-keyring-daemon --start --components=secrets,ssh,pkcs11 & - awww-daemon -q & - ${settings-persist} - ${lib.optionalString (config.beeMods.x11.dwm.enable || config.beeMods.x11.bspwm.enable) '' + ${lib.optionalString (config.beeMods.dwm.enable) '' systemctl --user stop xidlehook.service systemctl --user stop xautolock-session.service systemctl --user stop xss-lock.service systemctl --user stop clipcat.service ''} - ${lib.optionalString (config.beeMods.x11.picom.enable) '' + ${lib.optionalString (config.beeMods.dwm.picom.enable) '' systemctl --user stop picom.service ''} ''; }; home.packages = with pkgs; [ - awww - wl-clipboard-rs - wl-clip-persist + wl-clipboard + cliphist + brightnessctl ]; } else { programs.mango.enable = true; - security.pam.services.swaylock = { }; } ); } diff --git a/common/modules/mango/scripts.nix b/common/modules/mango/scripts.nix deleted file mode 100644 index d330211..0000000 --- a/common/modules/mango/scripts.nix +++ /dev/null @@ -1,261 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: -let - volume-control = pkgs.writeShellScriptBin "volume-control" '' - TAG="audio-volume" - - function get_vol { - ${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2 * 100)}' - } - - case $1 in - up) ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ ;; - down) ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- ;; - mute) ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle ;; - esac - - vol=$(get_vol) - is_muted=$(${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep "MUTED") - - if [ -n "$is_muted" ]; then - ${pkgs.dunst}/bin/dunstify -a "Volume" -u low \ - -h string:x-canonical-private-synchronous:$TAG \ - "Volume: Muted" - else - ${pkgs.dunst}/bin/dunstify -a "Volume" -u low \ - -h string:x-canonical-private-synchronous:$TAG \ - -h int:value:"$vol" \ - "Volume: $vol%" - fi - ''; - - brightness-control = pkgs.writeShellScriptBin "brightness-control" '' - TAG="screen-brightness" - - case $1 in - up) ${pkgs.brightnessctl}/bin/brightnessctl set +5% ;; - down) ${pkgs.brightnessctl}/bin/brightnessctl set 5%- ;; - esac - - # Get current percentage - current=$(${pkgs.brightnessctl}/bin/brightnessctl info | grep -oP '\(\K[0-9]+(?=%\))') - - ${pkgs.dunst}/bin/dunstify -a "Brightness" -u low \ - -h string:x-canonical-private-synchronous:$TAG \ - -h int:value:"$current" \ - "Brightness: $current%" - ''; - - mic-control = pkgs.writeShellScriptBin "mic-control" '' - TAG="audio-mic" - - case $1 in - toggle) ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle ;; - esac - - is_muted=$(${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep "MUTED") - - if [ -n "$is_muted" ]; then - ${pkgs.dunst}/bin/dunstify -a "Microphone" -u low \ - -h string:x-canonical-private-synchronous:$TAG \ - "Microphone: Muted" - else - ${pkgs.dunst}/bin/dunstify -a "Microphone" -u low \ - -h string:x-canonical-private-synchronous:$TAG \ - "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\ncolor_type=scheme-tonal-spot" > "$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 color_type=$(get_val "color_type") - local mode_flag="dark" - [ "$theme" == "light" ] && mode_flag="light" - - matugen image "$wall" -m "$mode_flag" -t "$color_type" --source-color-index 0 2>/dev/null - wallust -q -s run -p "''${mode_flag}16" "$wall" 2>/dev/null - - systemctl --user restart xdg-desktop-portal-gtk - if [ "$mode_flag" = "dark" ]; then - dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'" - else - dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" - fi - - dconf write /org/gnome/desktop/interface/color-scheme "'prefer-$mode_flag'" - - if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$DISPLAY" ]; then - xrdb -merge "$HOME/.Xresources" - fi - - ${lib.optionalString - (config.beeMods.terminal.default == "foot" || config.beeMods.terminal.default == "ghostty") - '' - [ -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 awww >/dev/null 2>&1; then - awww 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 --no-fehbg --bg-fill "$FULL_PATH" - fi - - apply_all - fi - } - - clr_type() { - local types=( - "scheme-tonal-spot" - "scheme-content" - "scheme-expressive" - "scheme-fidelity" - "scheme-fruit-salad" - "scheme-monochrome" - "scheme-neutral" - "scheme-rainbow" - "scheme-vibrant" - ) - - local selection - selection=$(printf "%s\n" "''${types[@]}" | rofi -dmenu -i -p "Coloscheme Types") - - if [[ -n "$selection" ]]; then - set_val "color_type" "$selection" - apply_all - fi - } - - cmd_layout() { - declare -A layouts=( - ["tile"]="T" - ["monocle"]="M" - ["scroller"]="S" - ["tgmix"]="TG" - ["grid"]="G" - ["deck"]="K" - ["center tile"]="CT" - ["right tile"]="RT" - ["vertical scroller"]="VS" - ["vertical tile"]="VT" - ["vertical grid"]="VG" - ["vertical deck"]="VK" - ) - - local selection - selection=$(printf "%s\n" "''${!layouts[@]}" | sort | rofi -dmenu -i -p "Layout") - - if [[ -n "''${layouts[$selection]}" ]]; then - set_layout "''${layouts[$selection]}" - fi - } - - cmd_settings() { - local theme=$(get_val "theme") - local nl=$(get_val "nightlight") - local ct=$(get_val "color_type") - - local options=( - "Mode: $theme" - "Night Light: $nl" - "Wallpaper" - "Colorscheme Type: $ct" - "Layouts" - ) - - local choice - choice=$(printf "%s\n" "''${options[@]}" | 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" - - if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then - pkill wlsunset - else - redshift -x - fi - else - set_val "nightlight" "on" - - if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then - wlsunset -T 4500 & - else - redshift -O 4500 - fi - fi - ;; - "Wallpaper") cmd_wall ;; - "Colorscheme Type:"*) clr_type ;; - "Layouts") cmd_layout ;; - esac - } - - - init_settings - case "$1" in - wall) cmd_wall ;; - settings) cmd_settings ;; - layout) cmd_layout ;; - 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/mango/swayidleNdLock.nix b/common/modules/mango/swayidleNdLock.nix deleted file mode 100644 index 2788db9..0000000 --- a/common/modules/mango/swayidleNdLock.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - cfg = config.beeMods.mango; - swaylock_cmd = "${pkgs.swaylock}/bin/swaylock -e -f -C ~/.config/swaylock/swaylock-colors"; -in -{ - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - wlopm - swaylock - ]; - - services.swayidle = { - enable = true; - systemdTarget = [ "mango-session.target" ]; - - events = { - "before-sleep" = swaylock_cmd; - "lock" = swaylock_cmd; - }; - - timeouts = [ - # dim screen at 4:30 - { - timeout = 270; - command = "${pkgs.brightnessctl}/bin/brightnessctl g > /tmp/brightness_prev && ${pkgs.brightnessctl}/bin/brightnessctl set 10%"; - resumeCommand = "${pkgs.brightnessctl}/bin/brightnessctl set $(${pkgs.coreutils}/bin/cat /tmp/brightness_prev 2>/dev/null || echo 100%)"; - } - # Lock at 5:00 - { - timeout = 300; - command = swaylock_cmd; - } - # Screen off at 10:00 - { - timeout = 600; - command = "${pkgs.wlopm}/bin/wlopm --off '*'"; - resumeCommand = "${pkgs.wlopm}/bin/wlopm --on '*'"; - } - # suspend at 15:00 - { - timeout = 900; - command = "systemctl suspend"; - } - ]; - }; - }; -} diff --git a/common/modules/mango/waybar.nix b/common/modules/mango/waybar.nix deleted file mode 100644 index 7b8a26a..0000000 --- a/common/modules/mango/waybar.nix +++ /dev/null @@ -1,528 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: -let - screenshot = pkgs.writeShellScript "screenshot" '' - GEOM=$(${pkgs.slurp}/bin/slurp -b '#2E2A1E55' -c '#fb751bff') || exit - ${pkgs.grim}/bin/grim -g "$GEOM" -t ppm - | ${pkgs.satty}/bin/satty --filename - - ''; -in -{ - programs.waybar = { - enable = config.beeMods.mango.waybar; - systemd.enable = true; - systemd.target = [ "mango-session.target" ]; - # package = pkgs.waybar.overrideAttrs (oldAttrs: { - # mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; - # }); - - settings = { - mainBar = { - layer = "top"; - position = "top"; - exclusive = true; - passthrough = false; - gtk-layer-shell = true; - ipc = false; - reload_style_on_change = true; - height = 35; - - modules-left = [ - "dwl/tags" - "wlr/taskbar" - "dwl/window" - ]; - - modules-center = [ - # "cava" - "mpris" - ]; - - modules-right = [ - "tray" - "power-profiles-daemon" - "network" - "group/hardware" - "upower" - "clock" - "custom/power" - ]; - - "group/hardware" = { - orientation = "horizontal"; - modules = [ - "pulseaudio" - "pulseaudio#microphone" - "cpu" - "backlight" - ]; - }; - - "dwl/tags" = { - num-tags = 9; - hide-vacant = true; - # tag-labels = ["一" "二" "三" "四" "五" "六" "七" "八" "九"]; - }; - - "dwl/window" = { - format = "[{layout}]{title}"; - on-click = "${screenshot}"; - }; - - cpu = { - interval = 2; - format = " {usage}%"; - }; - - "wlr/taskbar" = { - format = "{icon}"; - icon-size = 22; - all-outputs = false; - tooltip-format = "{title}"; - markup = true; - on-click = "activate"; - on-click-right = "close"; - ignore-list = [ - "Rofi" - "wofi" - ]; - }; - - backlight = { - interval = 2; - format = "{icon} {percent}%"; - format-icons = [ - "󰖔" - "󰖨" - ]; - on-scroll-up = "brightnessctl set +1%"; - on-scroll-down = "brightnessctl set 1%-"; - smooth-scrolling-threshold = 1; - }; - - idle_inhibitor = { - tooltip = false; - format = "{icon}"; - start-activated = false; - format-icons = { - activated = " "; - deactivated = " "; - }; - }; - - tray = { - interval = 1; - icon-size = 21; - spacing = 10; - }; - - network = { - interval = 2; - format-wifi = " {essid} ({signalStrength}%)"; - format-ethernet = "󰈀 {ifname}"; - format-linked = " No IP ({ifname})"; - format-disconnected = " Disconnected"; - tooltip-format = "{ifname} {ipaddr}/{cidr} via {gwaddr}"; - format-alt = "↓{bandwidthDownBytes} ↑{bandwidthUpBytes}"; - }; - - clock = { - # format = "{:%H:%M} "; # 24 hrs - format = "{:%I:%M %p}"; - format-alt = " {:%A, %b %d}"; - tooltip-format = "{:%Y}"; - calendar = { - mode = "year"; - mode-mon-col = 3; - weeks-pos = "right"; - on-scroll = 1; - format = { - months = "{}"; - days = "{}"; - weeks = "W{}"; - weekdays = "{}"; - today = "{}"; - }; - }; - }; - - pulseaudio = { - format = "{icon} {volume}%"; - tooltip = false; - format-muted = " Muted"; - format-bluetooth-muted = " Muted"; - on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; - on-scroll-up = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%+"; - on-scroll-down = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%-"; - scroll-step = 5; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = [ - "" - "" - "" - ]; - }; - ignored-sinks = [ "Easy Effects Sink" ]; - }; - - "pulseaudio#microphone" = { - format = "{format_source}"; - format-source = " {volume}%"; - tooltip = false; - format-source-muted = " Muted"; - on-click = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; - on-scroll-up = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SOURCE@ 2%+"; - on-scroll-down = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SOURCE@ 2%-"; - scroll-step = 5; - }; - - "custom/power" = { - format = ""; - tooltip = false; - on-click = "rofi -show power-menu -modi power-menu:rofi-power-menu"; - }; - - power-profiles-daemon = { - format = "{icon}"; - tooltip-format = "Power profile: {profile}\nDriver: {driver}"; - tooltip = true; - "format-icons" = { - default = ""; - performance = ""; - balanced = ""; - power-saver = ""; - }; - }; - - mpris = { - format = "{player_icon} {title} - {artist}"; - format-paused = "{status_icon} {title} - {artist}"; - format-stopped = ""; - max-length = 45; - ellipsis = true; - tooltip = false; - playerctld = false; - player-icons = { - default = ""; - spotify = ""; - firefox = ""; - mpv = ""; - }; - status-icons = { - paused = ""; - playing = ""; - }; - on-click = "playerctl play-pause"; - on-click-right = "playerctl next"; - on-click-middle = "playerctl previous"; - on-scroll-up = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%+"; - on-scroll-down = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%-"; - }; - - cava = { - framerate = 60; - autosens = 0; - bars = 8; - lower_cutoff_freq = 50; - higher_cutoff_freq = 12000; - method = "pipewire"; - hide_on_silence = true; - sleep_timer = 5; - source = "auto"; - stereo = false; - reverse = false; - bar_delimiter = 0; - monstercat = false; - waves = false; - noise_reduction = 0.77; - input_delay = 0; - format-icons = [ - "▁" - "▂" - "▃" - "▄" - "▅" - "▆" - "▇" - "█" - ]; - actions = { - on-click-right = "mode"; - }; - }; - - upower = { - icon-size = 18; - hide-if-empty = true; - tooltip = true; - tooltip-spacing = 20; - format = "{percentage}"; - }; - }; - }; - - # The style attribute manages style.css natively - style = '' - * { - border: none; - font-family: "JetBrainsMono Nerd Font Propo", monospace; - font-weight: 700; - font-size: 14px; - min-height: 0; - } - - window#waybar { - background: none; - margin: 0px; - padding: 0px; - } - - ${ - if config.beeMods.matugen.enable then - ''@import url("colors.css");'' - else - ''@import url("colors-default.css");'' - } - - tooltip { - background: @bg_panel; - border-radius: 0px; - border-width: 2px; - border-style: solid; - border-color: @border_color; - } - - tooltip label { - color: @text_main; - font-weight: 500; - text-shadow: none; - } - - #window, - #taskbar, - #tags, - #workspaces, - #mpris, - #clock, - #upower, - #network, - #tray, - #cava, - #custom-power, - #power-profiles-daemon, - #hardware { - background: @bg_panel; - color: @text_main; - padding: 0px 8px; - margin: 0px; - margin-top: 1px; - margin-bottom: 0px; - border-width: 2px; - border-style: solid; - border-color: @border_color; - border-radius: 0px; - } - - #workspaces button, - #tags button { - border: none; - background: none; - box-shadow: inherit; - text-shadow: inherit; - padding: 1px 3px; - } - - #workspaces button:hover, - #tags button:hover { - color: @text_main; - } - - - #workspaces button.active, - #tags button.focused, - #taskbar button.active { - background-color: @text_main; - } - - #workspaces button.urgent, - #tags button.urgent { - background-color: @alert_urgent; - } - - #taskbar button.urgent { - background-color: @alert_critical; - } - - #taskbar button.minimized { - background-color: @alert_minimized; - } - - #taskbar button.active, - #taskbar button.urgent, - #taskbar button.minimized { - padding-left: 3px; - padding-right: 3px; - } - - #hardware { - padding: 0px; - margin-right: 4px; - } - - #hardware > widget > * { - padding: 0px 8px; - } - - #workspaces { - margin-left: 4px; - padding-left: 10px; - padding-right: 6px; - } - - #workspaces button { - color: @text_main; - margin-right: 2px; - margin-left: 2px; - } - - #workspaces button.hidden { - color: @text_main; - background-color: transparent; - } - - #workspaces button.visible { - color: @text_main; - } - - #tags { - margin-left: 5px; - padding-left: 6px; - padding-right: 6px; - } - - #taskbar button { - color: @text_main; - margin: 2px; - padding: 0px 3px; - border-radius: 0px; - background: transparent; - } - - #tags button:not(.occupied):not(.focused):not(.overview):not(.urgent) { - font-size: 0; - min-width: 0; - min-height: 0; - margin: -17px; - padding: 0; - color: transparent; - background-color: transparent; - } - - #tags button.occupied, - #tags button.overview { - color: @text_main; - } - - #tray { - margin-right: 4px; - margin-left: 4px; - padding: 0px 9px 0px 9px; - } - - #power-profiles-daemon, - #network { - margin-right: 4px; - padding: 0px 8px 0px 9px; - } - - #window { - margin-right: 10px; - } - - #taskbar { - margin-left: 10px; - margin-right: 10px; - } - - #taskbar.empty { - margin: 0px; - padding-left: 10px; - padding-right: 0px; - border-color: transparent; - border: none; - background-color: transparent; - } - - #taskbar button { - margin-right: 3px; - } - - #mpris { - margin-left: 4px; - } - - #cava { - margin-left: 4px; - } - - #clock { - border-right: 2px; - } - - #upower { - margin-right: 4px; - } - - #custom-power { - margin-left: 4px; - margin-right: 5px; - } - - #workspaces button.active, - #workspaces button.urgent, - #tags button.focused, - #tags button.urgent, - #taskbar button.active, - #taskbar button.urgent, - #taskbar button.minimized { - color: @text_dark; - margin-top: 2px; - margin-bottom: 2px; - padding-top: 0px; - padding-bottom: 0px; - border-radius: 0px; - } - ''; - }; - - xdg.configFile = { - "waybar/colors-default.css" = { - enable = !config.beeMods.matugen.enable; - text = - # css - '' - @define-color bg_panel alpha(#131313, 0.9); - @define-color bg_base transparent; - @define-color border_color #ffffff; - @define-color text_main #ffffff; - @define-color text_muted #ffffff; - @define-color text_dim #ffffff; - @define-color text_accent #ffffff; - @define-color text_dark #353535; - @define-color alert_urgent #ffb4ab; - @define-color alert_minimized #93000a; - @define-color alert_critical #ffdad6; - - ''; - }; - }; -} -- cgit v1.3.1