From 9e1a310014d4a07444136a29e776bdb7d1f465b6 Mon Sep 17 00:00:00 2001 From: rxyhn Date: Wed, 3 Jan 2024 21:43:37 +0700 Subject: [PATCH] [chore]: update --- config | 100 ++++++++++++++++++ home/modules/programs/vscode.nix | 2 +- .../windowManager/hyprland/default.nix | 2 +- .../hyprland/programs/waybar.nix | 73 +++++++------ modules/desktop.nix | 3 +- w.css | 74 +++++++------ 6 files changed, 184 insertions(+), 70 deletions(-) create mode 100644 config diff --git a/config b/config new file mode 100644 index 00000000..36a784a2 --- /dev/null +++ b/config @@ -0,0 +1,100 @@ +{ + "layer": "top", + "position": "left", + "mode": "dock", + "exclusive": true, + "passthrough": false, + "fixed-center": true, + "gtk-layer-shell": true, + "spacing": 0, + "margin-top": 0, + "margin-right": 0, + "margin-bottom": 0, + "margin-left": 0, + "modules-left": [ + "custom/search" + ], + "modules-center": [ + "hyprland/workspaces" + ], + "modules-right": [ + "network", + "pulseaudio", + "battery", + "clock" + ], + "custom/search": { + "format": "", + "tooltip": false, + "on-click": "sh -c 'run-as-service $(wofi -S drun)'" + }, + "hyprland/workspaces": { + "active-only": false, + "all-outputs": true, + "disable-scroll": true, + "on-click": "activate", + "format": "{icon}", + "format-icons": { + "active": "", + "default": "", + "empty": "", + "persistent": "", + "special": "", + "urgent": "" + }, + "persistent-workspaces": { + "*": 5 + } + }, + "network": { + "format": "{icon}", + "format-ethernet": "", + "format-disconnected": "", + "format-icons": { + "default": [ + "", + "", + "", + "", + "" + ] + } + }, + "pulseaudio": { + "scroll-step": 5, + "tooltip": true, + "tooltip-format": "{volume}%", + "format": "{icon}", + "format-muted": "", + "format-icons": { + "default": [ + "", + "", + "" + ] + } + }, + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon}", + "format-charging": "", + "format-plugged": "", + "tooltip-format": "{timeTo}", + "format-icons": [ + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "clock": { + "format": "{:%H\n%M}" + } +} diff --git a/home/modules/programs/vscode.nix b/home/modules/programs/vscode.nix index 307d0d69..5d311696 100644 --- a/home/modules/programs/vscode.nix +++ b/home/modules/programs/vscode.nix @@ -69,7 +69,7 @@ cursorSmoothCaretAnimation = "on"; cursorWidth = 2; find.addExtraSpaceOnTop = false; - fontFamily = "'monospace', monospace, 'Material Symbols Outlined'"; + fontFamily = "'monospace', monospace, 'Material Design Icons'"; fontLigatures = true; fontSize = 16; formatOnPaste = true; diff --git a/home/modules/windowManager/hyprland/default.nix b/home/modules/windowManager/hyprland/default.nix index 2e337f29..6fe75966 100644 --- a/home/modules/windowManager/hyprland/default.nix +++ b/home/modules/windowManager/hyprland/default.nix @@ -10,7 +10,7 @@ ./config ./programs/swaylock.nix - ./programs/waybar.nix + # ./programs/waybar.nix ./programs/wofi.nix ./services/cliphist.nix diff --git a/home/modules/windowManager/hyprland/programs/waybar.nix b/home/modules/windowManager/hyprland/programs/waybar.nix index 5dc278dc..547ef6d8 100644 --- a/home/modules/windowManager/hyprland/programs/waybar.nix +++ b/home/modules/windowManager/hyprland/programs/waybar.nix @@ -34,7 +34,7 @@ in { "custom/power" ]; "custom/search" = { - format = ""; + format = " "; tooltip = false; on-click = "sh -c 'run-as-service $(wofi -S drun)'"; }; @@ -45,60 +45,59 @@ in { on-click = "activate"; format = "{icon}"; format-icons = { - active = ""; - default = "ﰓ"; - empty = "ﰓ"; + active = ""; + default = ""; + empty = ""; }; persistent-workspaces = { "*" = 5; }; }; + network = { + format-wifi = "󰖩 {essid}"; + format-ethernet = "󰈀 {ipaddr}/{cidr}"; + format-alt = "󱛇"; + format-disconnected = "󰖪"; + tooltip-format = '' + 󰅃 {bandwidthUpBytes} 󰅀 {bandwidthDownBytes} + {ipaddr}/{ifname} via {gwaddr} ({signalStrength}%)''; + }; battery = { states = { warning = 30; critical = 15; }; - format = "{icon}"; - format-charging = ""; - format-plugged = ""; - tooltip-format = "{timeTo}"; + format = "{icon} {capacity}%"; + tooltip-format = "{timeTo}, {capacity}%"; + format-charging = "󰂄 {capacity}%"; + format-plugged = "󰚥 {capacity}%"; + format-alt = "{time} {icon}"; format-icons = [ - "" - "" - "" - "" - "" + "󰂎" + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" ]; }; clock = { - format = "{:%H:%M}"; + tooltip = false; + format = "󱑎 {:%H:%M}"; + }; + "clock#date" = { + format = "󰃶 {:%a %d %b}"; tooltip-format = '' {:%Y %B} {calendar}''; - calendar = { - mode = "year"; - mode-mon-col = 3; - weeks-pos = "right"; - on-scroll = 1; - on-click-right = "mode"; - format = { - months = "{}"; - days = "{}"; - weeks = "T{:%U}"; - weekdays = "{}"; - today = "{}"; - }; - actions = { - on-click-right = "mode"; - on-click-forward = "tz_up"; - on-click-backward = "tz_down"; - on-scroll-up = "shift_up"; - on-scroll-down = "shift_down"; - }; - }; }; "custom/power" = { - format = ""; + format = "󰐥"; tooltip = false; }; }; @@ -107,7 +106,7 @@ in { style = '' * { all: initial; - font-family:'Dosis','Material Symbols Outlined'; + font-family: Material Design Icons, monospace; } #custom-search { diff --git a/modules/desktop.nix b/modules/desktop.nix index 62bd26ae..45d808a0 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -6,7 +6,8 @@ }: { fonts = { packages = with pkgs; [ - material-symbols + material-icons + material-design-icons noto-fonts noto-fonts-cjk noto-fonts-emoji diff --git a/w.css b/w.css index 6aa073dc..b0b38048 100644 --- a/w.css +++ b/w.css @@ -6,7 +6,7 @@ * { all: initial; - font-family: "Dosis", "tabler-icons"; + font-family: "Dosis", "Material Symbols Outlined"; font-size: 13pt; border-radius: 0; } @@ -19,7 +19,7 @@ window#waybar.hidden { opacity: 0; } -#custom-search { +/* #custom-search { background-image: url("/nix/store/488hqs4jj4i981k6pfbbmxd62nigkpxa-Logo-14mbpw8jv1w2c5wvfvj8clmjw0fi956bq5xf9s2q3my14far0as8.svg"); background-position: center; background-repeat: no-repeat; @@ -27,47 +27,61 @@ window#waybar.hidden { min-width: 32px; min-height: 32px; margin: 0 10px; -} +} */ -#workspaces { - background-color: alpha(@Background, 0.2); - border-radius: 8px; - padding: 5px; - margin: 5px; -} +/* #custom-search { + background: url("/nix/store/488hqs4jj4i981k6pfbbmxd62nigkpxa-Logo-14mbpw8jv1w2c5wvfvj8clmjw0fi956bq5xf9s2q3my14far0as8.svg") + no-repeat center / 65%; + padding: 0 13px; +} */ -#workspaces button { +/* #custom-search { + background-image: url("/nix/store/488hqs4jj4i981k6pfbbmxd62nigkpxa-Logo-14mbpw8jv1w2c5wvfvj8clmjw0fi956bq5xf9s2q3my14far0as8.svg"); + background-size: 65%; + background-position: center; + padding: 0 13px; + background-repeat: no-repeat; +} */ + +/* #workspaces { + padding: 10px; margin: 0 10px; } -#workspaces button label { - color: alpha(@Foreground, 0.8); - font-size: 15pt; +#workspaces button { + background: alpha(@Foreground, 0.8); + margin: 5px 0; + padding: 2px; + border-radius: 50px; } -#workspaces button.empty label { - color: alpha(@Foreground, 0.4); +#workspaces button.empty { + background: alpha(@Foreground, 0.4); } -#workspaces button.active label { - color: @Accent; - text-shadow: - 0 0 5px @Accent, - 0 0 10px @Accent, - 0 0 15px @Accent, - 0 0 20px @Accent, - 0 0 30px @Accent, - 0 0 40px @Accent, - 0 0 50px @Accent, +#workspaces button.active { + background: @Accent; + min-height: 48px; + box-shadow: 0 0 5px @Accent, 0 0 10px @Accent, 0 0 15px @Accent, + 0 0 20px @Accent, 0 0 30px @Accent, 0 0 40px @Accent, 0 0 50px @Accent, 0 0 60px @Accent; -} +} */ +#network, +#pulseaudio, #battery { color: alpha(@Foreground, 0.8); - font-size: 15pt; + background: alpha(@Background, 0.2); + font-size: 17pt; + margin: 0 5px; + padding: 5px; +} + +#network { + padding-top: 5px; + border-radius: 8px 8px 0 0; } -#custom-power { - color: alpha(@Error, 0.8); - font-size: 15pt; +#battery { + border-radius: 0 0 8px 8px; }