From 6a1a9ed956c2075a9acbd6efb63f2ae1a666229f Mon Sep 17 00:00:00 2001 From: iFargle Date: Tue, 15 Aug 2023 20:49:57 +0900 Subject: [PATCH] Test --- README.md | 1 + desktops/hyprland.nix | 9 +- .../home-manager/hyprland-conf.nix | 9 +- .../nixos-laptop/home-manager/waybar-conf.nix | 204 +++++++++++++++++- 4 files changed, 212 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2027365b..d701ff9b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ Repo for nix configuration files --- # To Do List * [ ] tmux config / theming +* [ ] regreet config / theming * [ ] waybar config / theming * [ ] hyprland config / theming * [ ] powerline config / theming diff --git a/desktops/hyprland.nix b/desktops/hyprland.nix index 92cdd1cc..081c645f 100644 --- a/desktops/hyprland.nix +++ b/desktops/hyprland.nix @@ -11,12 +11,17 @@ GTK.application_prefer_dark_theme = true; GTK.cursor_theme_name = "Adwaita"; GTK.font_name = "Cantarell 16"; - GTK.icon_theme_name = "Papirus-Dark"; + GTK.icon_theme_name = "ePapirus-Dark"; # GTK.theme_name = "Adwaita"; GTK.theme_name = "Gruvbox-Dark-BL"; commands.reboot = [ "systemctl" "reboot" ]; commands.poweroff = [ "systemctl" "poweroff" ]; - }; + }; + extraCSS = { + img.background = { + filter = "blur(20px)"; + }; + }; }; # Brightness and volume control diff --git a/hosts/nixos-laptop/home-manager/hyprland-conf.nix b/hosts/nixos-laptop/home-manager/hyprland-conf.nix index ac45e46f..155132c4 100644 --- a/hosts/nixos-laptop/home-manager/hyprland-conf.nix +++ b/hosts/nixos-laptop/home-manager/hyprland-conf.nix @@ -183,15 +183,10 @@ executable = true; text = " #!/usr/bin/env bash - # Init the wallpaper daemon and set the wallpaper: - sww init & - #TODO: Set this - sww img /etc/nixos/git/desktops/wallpapers/gruvbox/wallpaper1.jpg & - # Add the network manager applet: + swww daemon & + swww img /etc/nixos/git/desktops/wallpapers/gruvbox/wallpaper3.jpg & nm-applet --indicator & - # The bar waybar & - # Notifications mako "; }; diff --git a/hosts/nixos-laptop/home-manager/waybar-conf.nix b/hosts/nixos-laptop/home-manager/waybar-conf.nix index 1cf6840f..f435d894 100644 --- a/hosts/nixos-laptop/home-manager/waybar-conf.nix +++ b/hosts/nixos-laptop/home-manager/waybar-conf.nix @@ -5,13 +5,213 @@ ".config/waybar/config.jsonc" = { enable = true; executable = false; - text = ""; + text = '' + { + "position": "top", + # "modules-left": ["sway/workspaces"], + # "modules-center": ["custom/spotify"], + "modules-right": ["network", "custom/vpn", "pulseaudio", "battery", "clock"], + // Modules configuration + "sway/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "format": "{icon}", + "persistent_workspaces": { + "1": [], + "2": [], + "3": [], + "4": [], + "5": [], + "6": [], + "7": [], + "8": [], + "9": [], + "10": [] + }, + "format-icons": { + "default": "", + "urgent": "", + "focused": "", + } + }, + "custom/vpn": { + "format": "{}", + "interval": 1, + "exec": "/home/loki/bin/waybar-vpn.sh" + }, + "custom/spotify": { + "format": "{}", + "interval": 1, + "exec-if": "pgrep spotify", + "on-click": "playerctl -p spotify play-pause", + "on-scroll-up": "playerctl -p spotify previous", + "on-scroll-down": "playerctl -p spotify next", + "tooltip": false, + "escape": true, + "max-length": 60, + "exec": "/home/loki/bin/spotify.sh" + }, + "clock": { + "format": "{:%a %d %H:%M}", + "tooltip-format": "{:%Y %B}\n{calendar}", + }, + "battery": { + "states": { + "warning": 30, + "critical": 15, + }, + "format": "{icon} {capacity}%", + "format-warning": "{icon} {capacity}%", + "format-critical": "{icon} {capacity}%", + "format-charging": "{capacity}%", + "format-plugged": "{capacity}%", + "format-alt": "{icon} {time}", + "format-full": "{capacity}%", + "format-icons": ["", "", "", "", ""], + "tooltip-format": "{time}" + }, + "network": { + "format-wifi": "{essid}", + "format-ethernet": "󰤭 Disconnected", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected", + "tooltip-format-wifi": "Signal Strenght: {signalStrength}%", + }, + "pulseaudio": { + "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "format": "{icon} {volume}%", + "format-muted": " Muted", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", ""] + }, + }, + } + ''; }; # Waybar theming ".config/waybar/style.css" = { enable = true; executable = false; - text = ""; + text = '' + * { + font-family: "JetBrainsMono Nerd Font"; + font-size: 17px; + /* font-weight: bold; */ + border-radius: 0px; + } + + window#waybar { + background-color: #45403d; + border-radius: 10px; + } + + .modules-right { + font-size: 10px; + margin-right: 0.5rem; + } + .modules-left { + margin-left: 0.5rem; + } + tooltip { + background: #45403d; + border-radius: 10px; + } + tooltip label { + color: #ebdbb2; + background-color: #45403d; + border-radius: 10px; + } + tooltip * { + border-radius: 10px; + } + #workspaces button { + margin: 0; + color: #d4be98; + font-weight: bolder; + font-style: normal; + margin: 0.2rem 0.1rem; + border-radius: 20px; + } + button:hover { + box-shadow: inherit; + text-shadow: inherit; + background: inherit; + } + #workspaces button.active { + color: #ebdbb2; + background-color: #7daea3; + text-shadow: 0 0 5px rgba(0, 0, 0, 0.818); + transition: all 0.1s ease-in-out; + } + + #clock, + #custom-weather { + font-family: "GE Inspira"; + font-weight: bolder; + text-shadow: 0 0 5px rgb(0, 0, 0); + color: #d4be98; + } + + #clock { + padding: 0 0 0 1.5em; + } + #custom-weather { + padding: 0 1.5em 0 0.5em; + } + #memory { + color: #a9b665; + padding: 0 0.3em; + } + + #pulseaudio { + margin: 0; + padding: 0 0.5em 0 0.4em; + color: #d8a657; + } + + #backlight { + margin: 0; + padding: 0 0.5em 0 0.4em; + color: #d8a657; + } + #cpu { + margin: 0; + padding: 0 0.1em 0 0.1em; + color: #a9b665; + } + #network { + margin: 0; + padding: 0 0.4em 0 0.5em; + color: #d8a657; + } + #custom-cycle_wall { + margin: 0; + padding: 0 0.5em; + color: #d3869b; + } + + #language { + margin: 0; + padding: 0 0.1em; + color: #d3869b; + } + #tray { + margin: 0; + padding: 0 0.2em; + color: #d3869b; + } + #battery { + margin: 0; + padding: 0 0.5em 0 0.4em; + color: #a9b665; + } + ''; }; }; } \ No newline at end of file