From f6d8d90f64f4abf2943d9112e4c2a62111bd0338 Mon Sep 17 00:00:00 2001 From: iFargle Date: Mon, 28 Aug 2023 12:08:58 +0900 Subject: [PATCH] Test --- README.md | 8 +- .../desktops/hyprland/default.nix | 4 +- .../hyprland/gruvbox/swayosd-conf.nix | 2 +- .../desktops/hyprland/gruvbox/waybar-conf.nix | 253 ------------------ .../hyprland/gruvbox/waybar/waybar-conf.nix | 252 +++++++++++++++++ .../hyprland/gruvbox/waybar/waybar-conf2.nix | 241 +++++++++++++++++ 6 files changed, 503 insertions(+), 257 deletions(-) delete mode 100644 home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar-conf.nix create mode 100644 home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf.nix create mode 100644 home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf2.nix diff --git a/README.md b/README.md index 874ef39b..c0fcce0e 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ nixos-rebuild switch --flake '/etc/nixos#' * [x] Get swaylock to dim / turn off the screen, then enter suspend/hibernate * [x] swayosd * [ ] wayprompt - * [ ] Needs an overlay? Can't find it in search + * [x] Needs an overlay? Can't find it in search * [ ] wlogout / nwg-bar theming * [x] cli-based filebrowser for hyprland * Installed `ranger` @@ -142,3 +142,9 @@ nixos-rebuild switch --flake '/etc/nixos#' 4. Enroll the keys: `sbctl enroll-keys --microsoft` * If you wish, you can select `--tpm-eventlog`, but checksums will change later (ie, at a kernel rebuild) 5. Reboot and verify you are activated: `bootctl status` + +# Other +* Waybar inspirations + * https://github.com/Pipshag/dotfiles_nord + * https://github.com/hajosattila/dotfiles/ + * https://gist.github.com/toger5/3a509d9a9d7ebba1e02205b00449ccff diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/default.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/default.nix index e3c48e7c..51e1d9c5 100644 --- a/home-manager/hosts/nixos-laptop/desktops/hyprland/default.nix +++ b/home-manager/hosts/nixos-laptop/desktops/hyprland/default.nix @@ -4,7 +4,7 @@ ./gruvbox/mako-conf.nix ./gruvbox/rofi-conf.nix ./gruvbox/swaylock-conf.nix - ./gruvbox/waybar-conf.nix + ./gruvbox/waybar/waybar-conf2.nix ./gruvbox/swayosd-conf.nix ]; -} +} \ No newline at end of file diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/swayosd-conf.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/swayosd-conf.nix index d5ee199d..946f0186 100644 --- a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/swayosd-conf.nix +++ b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/swayosd-conf.nix @@ -1,3 +1,3 @@ { pkgs, config, ... }: { services.swayosd.enable = true; -} +} \ No newline at end of file diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar-conf.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar-conf.nix deleted file mode 100644 index 0b2d26de..00000000 --- a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar-conf.nix +++ /dev/null @@ -1,253 +0,0 @@ -{ hostname, ...}: { - home.file = { - # https://yewtu.be/watch?v=tWQB1NDDA9c - # https://github.com/DN-debug/waybar-examples - # Waybar configuration - ".config/waybar/config.jsonc" = { - enable = true; - executable = false; - text = '' - -{ - "layer": "top", - "position": "top", - "modules-left": [ - "wlr/workspaces", - ], - "modules-center": [ - "clock" - ], - "modules-right": [ - "mpris", - "pulseaudio", - "network", - "backlight", - "battery", - ], - - "mpris": { - "format": "{player_icon} {dynamic}", - "format-paused": "{status_icon} {dynamic}", - "player-icons": { - "default": "▶", - }, - "status-icons": { - "paused": "⏸" - }, - }, - - "wlr/workspaces": { - "on-click": "activate" - }, - - "clock": { - "format": "󰥔 {:%H:%M}", - "format-alt": "󰃭 {:%A, %d %b, %Y}", - "tooltip-format": "{calendar}", - "calendar": { - "mode" : "month", - "mode-mon-col" : 3, - "weeks-pos" : "left", - "on-scroll" : 1, - "format": { - "months": "{}", - "days": "{}", - "weeks": "W{}", - "weekdays": "{}", - "today": "{}" - } - }, - "actions": { - "on-click-right": "kitty --class=calcurse -e calcurse", - "on-click-middle": "mode", - "on-scroll-up": "shift_up", - "on-scroll-down": "shift_down" - } - }, - - "pulseaudio": { - "scroll-step": 1, - "format": "{volume}% {icon} {format_source}", - "format-bluetooth": "{volume}% {icon} {format_source}", - "format-bluetooth-muted": "  {format_source}", - "format-muted": "󰝟 {format_source}", - "format-source": " ", - "format-source-muted": " ", - "format-icons": { - "headphone": "", - "headset": "", - "default": ["󰕿", "󰖀", "󰕾"] - }, - "tooltip": false, - "on-click": "pavucontrol --class=pavu", - }, - - "network": { - "format-wifi": "󰤨", - "format-ethernet": "󰈀", - "format-linked": "", - "format-disconnected": "⚠", - "tooltip-format": "{essid}\n{ipaddr}/{cidr}", - "tooltip": true, - "on-click": "kitty --class=nmtui -e nmtui" - }, - - "cpu": { - "format": "{usage}% ", - "states": { - "warning": 60, - "critical": 80 - }, - "tooltip": false, - "on-click": "kitty --class=btop -e btop" - }, - - "memory": { - "tooltip": true, - "format": "{}% 󰍛", - "states": { - "warning": 60, - "critical": 80 - }, - "tooltip-format": "RAM: {used}GB/{total}GB\nSwap: {swapUsed}GB/{swapAvail}GB" - }, - - "temperature": { - "tooltip": false, - "critical-threshold": 80, - "format": "{temperatureC}°{icon}", - "format-icons": ["", "", ""] - }, - - "backlight": { - "tooltip": false, - "format": "{percent}% {icon}", - "format-icons": [""] - }, - - "battery": { - "tooltip": true, - "tooltip-format": "{time}", - "states": { - "warning": 35, - "critical": 20 - }, - "format": "{capacity}% {icon}", - "format-charging": "{capacity}% 󰂄", - "format-plugged": "{capacity}% ", - "format-icons": ["", "", "", "", ""] - }, - - "tray": { - "tooltip": false, - "spacing": 5 - } -} - - ''; - }; - # Waybar theming - ".config/waybar/style.css" = { - enable = true; - executable = false; - text = '' -* { - border: none; - border-radius: 0; - font-family: my-queue; -} - -#waybar { - background-color: rgba(50, 48, 47, 0.8); - padding: 5px; -} - -#workspaces button { - color: #e2cca9; - font-size: 14px; -} - -#workspaces button:hover, -#workspaces button.focused:hover, -#workspaces button.visible:hover { - color: #32302f; - background-color: #e9b143; -} - -#workspaces button.active { - box-shadow: inset 0 -3px #f28534; -} - -#workspaces button.urgent { - color: #32302f; - background-color: #f2594b; -} - -#workspaces button.visible { -} - -/* - * General background - */ -#network, -#mpris, -#memory, -#backlight, -#cpu, -#pulseaudio, -#temperature, -#battery, -#tray, -#submap, -#window { - color: #e2cca9; - font-size: 14px; - padding: 0 5 0 5; -} - -/* - * Warning plugins state - */ -#memory.warning, -#cpu.warning, -#battery.warning { - color: #e9b143; -} - -/* - * Critical plugins state - */ -#cpu.critical, -#temperature.critical, -#memory.critical, -#battery.critical, -#network.disconnected { - color: #f2594b; -} - -#clock { - color: #e2cca9; - font-size: 14px; - font-weight: bold; -} - -#battery.charging { - color: #b0b846; -} - -#battery.plugged { - color: #80aa9e; -} - -#pulseaudio.bluetooth { - color: #80aa9e; -} - -tooltip { - color: #e2cca9; - font-size: 14px; -} - ''; - }; - }; -} \ No newline at end of file diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf.nix new file mode 100644 index 00000000..48fe7ba2 --- /dev/null +++ b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf.nix @@ -0,0 +1,252 @@ +{ hostname, ...}: { + home.file = { + # https://yewtu.be/watch?v=tWQB1NDDA9c + # https://github.com/DN-debug/waybar-examples + # Waybar configuration + ".config/waybar/config.jsonc" = { + enable = true; + executable = false; + text = '' + { + "layer": "top", + "position": "top", + "modules-left": [ + "wlr/workspaces", + ], + "modules-center": [ + "clock" + ], + "modules-right": [ + "mpris", + "pulseaudio", + "network", + "backlight", + "battery", + ], + + "mpris": { + "format": "{player_icon} {dynamic}", + "format-paused": "{status_icon} {dynamic}", + "player-icons": { + "default": "▶", + }, + "status-icons": { + "paused": "⏸" + }, + }, + + "wlr/workspaces": { + "on-click": "activate" + }, + + "clock": { + "format": "󰥔 {:%H:%M}", + "format-alt": "󰃭 {:%A, %d %b, %Y}", + "tooltip-format": "{calendar}", + "calendar": { + "mode" : "month", + "mode-mon-col" : 3, + "weeks-pos" : "left", + "on-scroll" : 1, + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + "actions": { + "on-click-right": "kitty --class=calcurse -e calcurse", + "on-click-middle": "mode", + "on-scroll-up": "shift_up", + "on-scroll-down": "shift_down" + } + }, + + "pulseaudio": { + "scroll-step": 1, + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": "  {format_source}", + "format-muted": "󰝟 {format_source}", + "format-source": " ", + "format-source-muted": " ", + "format-icons": { + "headphone": "", + "headset": "", + "default": ["󰕿", "󰖀", "󰕾"] + }, + "tooltip": false, + "on-click": "pavucontrol --class=pavu", + }, + + "network": { + "format-wifi": "󰤨", + "format-ethernet": "󰈀", + "format-linked": "", + "format-disconnected": "⚠", + "tooltip-format": "{essid}\n{ipaddr}/{cidr}", + "tooltip": true, + "on-click": "kitty --class=nmtui -e nmtui" + }, + + "cpu": { + "format": "{usage}% ", + "states": { + "warning": 60, + "critical": 80 + }, + "tooltip": false, + "on-click": "kitty --class=btop -e btop" + }, + + "memory": { + "tooltip": true, + "format": "{}% 󰍛", + "states": { + "warning": 60, + "critical": 80 + }, + "tooltip-format": "RAM: {used}GB/{total}GB\nSwap: {swapUsed}GB/{swapAvail}GB" + }, + + "temperature": { + "tooltip": false, + "critical-threshold": 80, + "format": "{temperatureC}°{icon}", + "format-icons": ["", "", ""] + }, + + "backlight": { + "tooltip": false, + "format": "{percent}% {icon}", + "format-icons": [""] + }, + + "battery": { + "tooltip": true, + "tooltip-format": "{time}", + "states": { + "warning": 35, + "critical": 20 + }, + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% 󰂄", + "format-plugged": "{capacity}% ", + "format-icons": ["", "", "", "", ""] + }, + + "tray": { + "tooltip": false, + "spacing": 5 + } + } + + ''; + }; + # Waybar theming + ".config/waybar/style.css" = { + enable = true; + executable = false; + text = '' + * { + border: none; + border-radius: 0; + font-family: my-queue; + } + + #waybar { + background-color: rgba(50, 48, 47, 0.8); + padding: 5px; + } + + #workspaces button { + color: #e2cca9; + font-size: 14px; + } + + #workspaces button:hover, + #workspaces button.focused:hover, + #workspaces button.visible:hover { + color: #32302f; + background-color: #e9b143; + } + + #workspaces button.active { + box-shadow: inset 0 -3px #f28534; + } + + #workspaces button.urgent { + color: #32302f; + background-color: #f2594b; + } + + #workspaces button.visible { + } + + /* + * General background + */ + #network, + #mpris, + #memory, + #backlight, + #cpu, + #pulseaudio, + #temperature, + #battery, + #tray, + #submap, + #window { + color: #e2cca9; + font-size: 14px; + padding: 0 5 0 5; + } + + /* + * Warning plugins state + */ + #memory.warning, + #cpu.warning, + #battery.warning { + color: #e9b143; + } + + /* + * Critical plugins state + */ + #cpu.critical, + #temperature.critical, + #memory.critical, + #battery.critical, + #network.disconnected { + color: #f2594b; + } + + #clock { + color: #e2cca9; + font-size: 14px; + font-weight: bold; + } + + #battery.charging { + color: #b0b846; + } + + #battery.plugged { + color: #80aa9e; + } + + #pulseaudio.bluetooth { + color: #80aa9e; + } + + tooltip { + color: #e2cca9; + font-size: 14px; + } + ''; + }; + }; +} \ No newline at end of file diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf2.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf2.nix new file mode 100644 index 00000000..97e6b0cd --- /dev/null +++ b/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf2.nix @@ -0,0 +1,241 @@ +{ hostname, ...}: { + home.file = { + # https://yewtu.be/watch?v=tWQB1NDDA9c + # https://github.com/DN-debug/waybar-examples + # Waybar configuration + ".config/waybar/config.jsonc" = { + enable = true; + executable = false; + text = '' + { + "layer": "top", + "position": "top", + "modules-left": [ + "wlr/workspaces", + ], + "modules-center": [ + "clock" + ], + "modules-right": [ + "mpris", + "pulseaudio", + "network", + "backlight", + "battery", + ], + + "mpris": { + "format": "{player_icon} {dynamic}", + "format-paused": "{status_icon} {dynamic}", + "player-icons": { + "default": "▶", + }, + "status-icons": { + "paused": "⏸" + }, + }, + + "wlr/workspaces": { + "on-click": "activate" + }, + + "clock": { + "format": "󰥔 {:%H:%M}", + "format-alt": "󰃭 {:%A, %d %b, %Y}", + "tooltip-format": "{calendar}", + "calendar": { + "mode" : "month", + "mode-mon-col" : 3, + "weeks-pos" : "left", + "on-scroll" : 1, + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + "actions": { + "on-click-right": "kitty --class=calcurse -e calcurse", + "on-click-middle": "mode", + "on-scroll-up": "shift_up", + "on-scroll-down": "shift_down" + } + }, + + "pulseaudio": { + "scroll-step": 1, + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": "  {format_source}", + "format-muted": "󰝟 {format_source}", + "format-source": " ", + "format-source-muted": " ", + "format-icons": { + "headphone": "", + "headset": "", + "default": ["󰕿", "󰖀", "󰕾"] + }, + "tooltip": false, + "on-click": "pavucontrol --class=pavu", + }, + + "network": { + "format-wifi": "󰤨", + "format-ethernet": "󰈀", + "format-linked": "", + "format-disconnected": "⚠", + "tooltip-format": "{essid}\n{ipaddr}/{cidr}", + "tooltip": true, + "on-click": "kitty --class=nmtui -e nmtui" + }, + + "cpu": { + "format": "{usage}% ", + "states": { + "warning": 60, + "critical": 80 + }, + "tooltip": false, + "on-click": "kitty --class=btop -e btop" + }, + + "memory": { + "tooltip": true, + "format": "{}% 󰍛", + "states": { + "warning": 60, + "critical": 80 + }, + "tooltip-format": "RAM: {used}GB/{total}GB\nSwap: {swapUsed}GB/{swapAvail}GB" + }, + + "temperature": { + "tooltip": false, + "critical-threshold": 80, + "format": "{temperatureC}°{icon}", + "format-icons": ["", "", ""] + }, + + "battery": { + "tooltip": true, + "tooltip-format": "{time}", + "states": { + "warning": 35, + "critical": 20 + }, + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% 󰂄", + "format-plugged": "{capacity}% ", + "format-icons": ["", "", "", "", ""] + }, + } + + ''; + }; + # Waybar theming + ".config/waybar/style.css" = { + enable = true; + executable = false; + text = '' + * { + border: none; + border-radius: 0; + font-family: my-queue; + } + + #waybar { + background-color: rgba(50, 48, 47, 0.8); + padding: 5px; + } + + #workspaces button { + color: #e2cca9; + font-size: 14px; + } + + #workspaces button:hover, + #workspaces button.focused:hover, + #workspaces button.visible:hover { + color: #32302f; + background-color: #e9b143; + } + + #workspaces button.active { + box-shadow: inset 0 -3px #f28534; + } + + #workspaces button.urgent { + color: #32302f; + background-color: #f2594b; + } + + #workspaces button.visible { + } + + /* + * General background + */ + #network, + #mpris, + #memory, + #backlight, + #cpu, + #pulseaudio, + #temperature, + #battery, + #tray, + #submap, + #window { + color: #e2cca9; + font-size: 14px; + padding: 0 5 0 5; + } + + /* + * Warning plugins state + */ + #memory.warning, + #cpu.warning, + #battery.warning { + color: #e9b143; + } + + /* + * Critical plugins state + */ + #cpu.critical, + #temperature.critical, + #memory.critical, + #battery.critical, + #network.disconnected { + color: #f2594b; + } + + #clock { + color: #e2cca9; + font-size: 14px; + font-weight: bold; + } + + #battery.charging { + color: #b0b846; + } + + #battery.plugged { + color: #80aa9e; + } + + #pulseaudio.bluetooth { + color: #80aa9e; + } + + tooltip { + color: #e2cca9; + font-size: 14px; + } + ''; + }; + }; +} \ No newline at end of file