Update sylix things

This commit is contained in:
iFargle 2024-01-04 14:39:52 +09:00
parent bfd6f6ae22
commit f6ef0c4694
9 changed files with 249 additions and 432 deletions

View file

@ -9,6 +9,47 @@
./common/waybar/scripts.nix ./common/waybar/scripts.nix
]; ];
stylix.image = /etc/nixos/git/wallpapers/default/wallpaper1.png; services.gammastep = {
stylix.autoEnable = true; enable = true;
provider = "geoclue2";
tray = true;
dawnTime = "6:00-7:45";
duskTime = "18:35-20:15";
};
gtk.enable = true;
stylix = {
image = /etc/nixos/git/wallpapers/default/wallpaper1.png;
autoEnable = true;
polarity = "dark";
targets = {
waybar = {
enableCenterBackColors = true;
enableLeftBackColors = true;
enableRightBackColors = true;
};
};
fonts = {
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans";
};
monospace = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans Mono";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
};
} }

View file

@ -1,30 +1,27 @@
{ ... }: { { ... }: {
home.file.".config/mako/config".text = '' services.mako = {
max-history=5 enable = true;
sort=+time anchor = "top-left";
border-radius = 10;
on-button-left=dismiss border-size = 2;
on-button-right=dismiss-all icons = true;
actions = true;
font=JetbrainsMono Regular layer = "top";
background-color=#3a3c3e markup = true;
border-color=#2a9b34 height = 100;
text-color=#d9eed2 width = 300;
width=300 margin = 10;
height=100 default-timeout = 15000;
margin=10 sort = "+time";
padding=15 extraConfig = ''
border-size=3 max-history=5
border-radius=15 on-button-left=dismiss
icons=1 on-button-right=dismiss-all
max-icon-size=128 padding=15
icon-location=left max-icon-size=128
markup=1 icon-location=left
actions=1 history=1
history=1 text-alignment=left
text-alignment=left
default-timeout=15000
layer=top
anchor=top-right
''; '';
};
} }

View file

@ -1,223 +1,5 @@
{ ...}: { { ...}: {
home.file = { programs.rofi = {
# https://github.com/davatorium/rofi/blob/next/CONFIG.md
# Rofi configuration
".config/rofi/config.rasi" = {
enable = true; enable = true;
executable = false;
text = ''
configuration {
}
@theme "dark"
'';
};
# Rofi theme
".config/rofi/themes/dark.rasi" = {
enable = true;
executable = false;
text = ''
/* ==========================================================================
Rofi color theme
Based on the Gruvbox color scheme for Vim by morhetz
https://github.com/morhetz/gruvbox
File: dark.rasi
Desc: Gruvbox dark color theme for Rofi
Author: bardisty <b@bah.im>
Source: https://github.com/bardisty/rofi
Modified: Mon Feb 12 2018 04:08:43 PST -0800
========================================================================== */
* {
/* Theme settings */
highlight: bold italic;
scrollbar: true;
/* Gruvbox dark colors */
dark-bg0: #282828;
dark-bg0-soft: #32302f;
dark-bg3: #665c54;
dark-fg0: #d9eed2;
dark-fg1: #d9eed2;
dark-red-dark: #fb0029;
dark-red-light: #fb4934;
dark-yellow-dark: #7a6640;
dark-yellow-light: #7a6640;
dark-gray: #a89984;
/* Theme colors */
background: @dark-bg0;
background-color: @background;
foreground: @dark-fg1;
border-color: @dark-gray;
separatorcolor: @border-color;
scrollbar-handle: @border-color;
normal-background: @background;
normal-foreground: @foreground;
alternate-normal-background: @dark-bg0-soft;
alternate-normal-foreground: @foreground;
selected-normal-background: @dark-bg3;
selected-normal-foreground: @dark-fg0;
active-background: @dark-yellow-dark;
active-foreground: @background;
alternate-active-background: @active-background;
alternate-active-foreground: @active-foreground;
selected-active-background: @dark-yellow-light;
selected-active-foreground: @active-foreground;
urgent-background: @dark-red-dark;
urgent-foreground: @background;
alternate-urgent-background: @urgent-background;
alternate-urgent-foreground: @urgent-foreground;
selected-urgent-background: @dark-red-light;
selected-urgent-foreground: @urgent-foreground;
}
@import "common"
'';
};
# Rofi theme
".config/rofi/themes/common.rasi" = {
enable = true;
executable = false;
text = ''
/* ==========================================================================
File: common.rasi
Desc: Shared rules between all gruvbox themes
Author: bardisty <b@bah.im>
Source: https://github.com/bardisty/rofi
Modified: Mon Feb 12 2018 06:06:47 PST -0800
========================================================================== */
window {
background-color: @background;
border: 2;
padding: 2;
}
mainbox {
border: 0;
padding: 0;
}
message {
border: 2px 0 0;
border-color: @separatorcolor;
padding: 1px;
}
textbox {
highlight: @highlight;
text-color: @foreground;
}
listview {
border: 2px solid 0 0;
padding: 2px 0 0;
border-color: @separatorcolor;
spacing: 2px;
scrollbar: @scrollbar;
}
element {
border: 0;
padding: 2px;
}
element.normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
element.normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
element.selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
element.selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
element.alternate.normal {
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
}
element.alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
}
element.alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
}
scrollbar {
width: 4px;
border: 0;
handle-color: @scrollbar-handle;
handle-width: 8px;
padding: 0;
}
mode-switcher {
border: 2px 0 0;
border-color: @separatorcolor;
}
inputbar {
spacing: 0;
text-color: @normal-foreground;
padding: 2px;
children: [ prompt, textbox-prompt-sep, entry, case-indicator ];
}
case-indicator,
entry,
prompt,
button {
spacing: 0;
text-color: @normal-foreground;
}
button.selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
textbox-prompt-sep {
expand: false;
str: ":";
text-color: @normal-foreground;
margin: 0 0.3em 0 0;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
'';
};
}; };
} }

View file

@ -9,7 +9,6 @@
show-failed-attempts = true; show-failed-attempts = true;
effect-blur = "20x8"; effect-blur = "20x8";
screenshots = true; screenshots = true;
font = "JetBrainsMono Nerd Font";
clock = true; clock = true;
timestr = "%R"; timestr = "%R";

View file

@ -1,176 +1,157 @@
{ ...}: { { ...}: {
imports = [ ../../common/waybar/scripts.nix ]; imports = [ ../../common/waybar/scripts.nix ];
home.file = { programs.waybar = {
# https://yewtu.be/watch?v=tWQB1NDDA9c
# https://github.com/DN-debug/waybar-examples
# Inspiration:
# https://github.com/Pipshag/dotfiles_gruvbox
# Font Search:
# https://www.nerdfonts.com/cheat-sheet
# Online CSS testing
# https://www.w3schools.com/css/tryit.asp?filename=trycss_border_round
# Waybar configuration
".config/waybar/config.jsonc" = {
enable = true; enable = true;
executable = false; settings = {
text = '' mainBar = {
{ layer = "top";
"layer": "top", position = "top";
"position": "top", modules-left = [
"modules-left": [ "custom/wlogout"
"custom/wlogout", "idle_inhibitor"
"idle_inhibitor", "clock"
"clock", "mpris"
"mpris", ];
], module-center = [
"modules-center": [ "hyprland/workspaces"
"hyprland/workspaces", ];
], modules-right = [
"modules-right": [ "pulseaudio"
"pulseaudio", "custom/tailscale"
"custom/tailscale", "network"
"network", "battery"
"battery", ];
],
"custom/wlogout": { # Modules
"format": "", "custom/wlogout" = {
"on-click": "wlogout" format = "";
}, on-click = "wlogout";
};
"custom/tailscale": { "custom/tailscale" = {
"format": "{icon} ", format = "{icon} ";
"exec": "$HOME/.config/waybar/scripts/tailscale.sh", exec = "$HOME/.config/waybar/scripts/tailscale.sh";
"exec-if": "pgrep tailscaled", exec-if = "pgrep tailscaled";
"return-type": "json", return-type = "json";
"interval": 5, interval = 5;
"format-icons": { format-icons = {
"Running": "󰌆", Running = "󰌆";
"Stopped": "󰌊", Stopped = "󰌊";
} };
}, };
idle_inhibitor = {
"idle_inhibitor": { format = "{icon} ";
"format": "{icon} ", format-icons = {
"format-icons": { activated = "";
"activated": "", deactivated = "";
"deactivated": "" };
} };
}, mpris = {
format = "{player_icon} {dynamic}";
"mpris": { format-paused = ''{status_icon} <i>{dynamic}</i>'';
"format": "{player_icon} {dynamic}", player-icons = { default = "" };
"format-paused": "{status_icon} <i>{dynamic}</i>", status-icons = { paused = "" };
"player-icons": { "default": "" }, max-length = 30;
"status-icons": { "paused": "" }, };
"max-length": 30, "hyprland/workspaces" = {
}, on-click = "activate";
};
"hyprland/workspaces": { clock = {
"on-click": "activate", format = "󰥔 {:%H:%M}";
}, format-alt = "󰃭 {:%A, %d %b, %Y}";
tooltip-format = "<tt><small>{calendar}</small></tt>";
"clock": { calendar = {
"format": "󰥔 {:%H:%M}", mode = "month";
"format-alt": "󰃭 {:%A, %d %b, %Y}", mode-mon-col = 3;
"tooltip-format": "<tt><small>{calendar}</small></tt>", weeks-pos = "left";
"calendar": { on-scroll = 1;
"mode" : "month", format = {
"mode-mon-col" : 3, months = "<b>{}</b>";
"weeks-pos" : "left", days = "<b>{}</b>";
"on-scroll" : 1, weeks = "<b>W{}</b>";
"format": { weekdays = "<b>{}</b>";
"months": "<span color='#d9eed2'><b>{}</b></span>", today = "<b><u>{}</u></b>";
"days": "<span color='#d9eed2'><b>{}</b></span>", };
"weeks": "<span color='#2a9b34'><b>W{}</b></span>", };
"weekdays": "<span color='#a6ff3e'><b>{}</b></span>", actions = {
"today": "<span color='#22ff71'><b><u>{}</u></b></span>" on-click-right = "kitty -e calcurse";
} on-click-middle = "mode";
}, on-scroll-up = "shift_up";
"actions": { on-scroll-down = "shift_down";
"on-click-right": "kitty -e calcurse", };
"on-click-middle": "mode", };
"on-scroll-up": "shift_up", pulseaudio = {
"on-scroll-down": "shift_down" scroll-step = 1;
} format = "{icon} {format_source}";
}, format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " ";
"pulseaudio": { format-muted = "󰝟 {format_source}";
"scroll-step": 1, format-source = " ";
"format": "{icon} {format_source}", format-source-muted = " ";
"format-bluetooth": "<span foreground='#fb0029'>{volume}% {icon} {format_source}</span>", format-icons = {
"format-bluetooth-muted": " ", headphone = " ";
"format-muted": "󰝟 {format_source}", headset = " ";
"format-source": " <span foreground='#fb0029'></span>", default = ["󰕿" "󰖀" "󰕾"];
"format-source-muted": " ", };
"format-icons": { tooltip = false;
"headphone": " ", on-click = "kitty -e pulsemixer";
"headset": " ", };
"default": ["󰕿", "󰖀", "󰕾"] network = {
}, format = "{ifname}";
"tooltip": false, format-wifi = " ";
"on-click": "kitty -e pulsemixer", format-ethernet = " {ipaddr}";
}, format-disconnected = ""; # Hides the module
tooltip-format = "{ifname} via {gwaddr} ";
"network": { tooltip-format-wifi = "{essid} ({signalStrength}%) ";
"format": "{ifname}", tooltip-format-ethernet = "{ifname} ";
"format-wifi": " ", tooltip-format-disconnected = "Disconnected";
"format-ethernet": " {ipaddr}", max-length = 50;
"format-disconnected": "", // An empty format will hide the module. on-click = "kitty --class=nmtui -e nmtui";
"tooltip-format": "{ifname} via {gwaddr} ", };
"tooltip-format-wifi": "{essid} ({signalStrength}%) ", battery = {
"tooltip-format-ethernet": "{ifname} ", tooltip = true;
"tooltip-format-disconnected": "Disconnected", tooltip-format = "{time}";
"max-length": 50, states = {
"on-click": "kitty --class=nmtui -e nmtui" warning = 35;
}, critical = 20;
};
"battery": { format = "{icon} {capacity}%";
"tooltip": true, format-charging = "󰂄 {capacity}%";
"tooltip-format": "{time}", format-plugged = " {capacity}%";
"states": { format-icons = [ "" "" "" "" "" ];
"warning": 35, };
"critical": 20 };
}, };
"format": "{icon} {capacity}%", /*style = {
"format-charging": "󰂄 {capacity}%", "*" = {
"format-plugged": " {capacity}%", border = "none";
"format-icons": ["", "", "", "", ""] border-radius = 0;
}, };
} waybar = {
''; padding = "15px";
};
workspaces = {
button.visible = {
font-size = "15px";
border-radius = "50px";
padding = "0px 5px";
margin = "5px";
};
button = {
font-size = "15px";
border-radius = "50px";
padding = "0px 5px";
margin = "5px";
};
};
};*/
}; };
# Waybar theming # Waybar theming
".config/waybar/style.css" = { ".config/waybar/style.css" = {
enable = true; enable = false;
executable = false; executable = false;
text = '' text = ''
* {
border: none;
border-radius: 0;
font-family: JetbrainsMono Regular;
}
#waybar {
background-color: rgba(50, 48, 47, 0.8);
padding: 15px;
}
#workspaces button.visible,
#workspaces button {
font-size: 15px;
border-radius: 50px;
padding: 0px 5px;
margin: 5px;
color: rgba(200, 200, 200, 0.5);
background-color: #282828;
}
#workspaces button.active { #workspaces button.active {
padding: 0px 15px; padding: 0px 15px;

View file

@ -1,4 +1,4 @@
{ ... }: { { config, ... }: {
xdg.configFile."wlogout/style.css" = { xdg.configFile."wlogout/style.css" = {
enable = true; enable = true;
target = "./wlogout/style.css"; target = "./wlogout/style.css";
@ -7,14 +7,14 @@
background-image: none; background-image: none;
} }
window { window {
background-color: rgba(58,60,62, 0.6); background-color: ${config.lib.stylix.colors.base05};
} }
button { button {
color: #d9eed2; color: ${config.lib.stylix.colors.base04};
font-size: 0px; font-size: 0px;
border-radius: 5000px; border-radius: 5000px;
margin: 25px; margin: 25px;
background-color: #3a3c3e; background-color: ${config.lib.stylix.colors.base01};
border-style: solid; border-style: solid;
border-width: 3px; border-width: 3px;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -23,7 +23,7 @@
} }
button:active, button:hover { button:active, button:hover {
background-color: #2a9b34; background-color: ${config.lib.stylix.colors.base00};
outline-style: none; outline-style: none;
} }

View file

@ -19,12 +19,6 @@
stateVersion = hmStateVersion; stateVersion = hmStateVersion;
homeDirectory = "/home/${username}"; homeDirectory = "/home/${username}";
sessionPath = [ "$HOME/.local/bin" ]; sessionPath = [ "$HOME/.local/bin" ];
# pointerCursor = {
# gtk.enable = true;
# package = pkgs.catppuccin-cursors.mochaLight;
# name = "Catppuccin-Mocha-Light-Cursors";
# size = 22;
# };
}; };
nixpkgs = { nixpkgs = {

View file

@ -8,8 +8,36 @@
# }; # };
imports = [ inputs.stylix.nixosModules.stylix ]; imports = [ inputs.stylix.nixosModules.stylix ];
stylix.image = /etc/nixos/git/wallpapers/default/wallpaper1.png;
stylix.targets.plymouth.enable = false; stylix = {
image = /etc/nixos/git/wallpapers/default/wallpaper1.png;
targets = {
plymouth.enable = false;
};
autoEnable = true;
polarity = "dark";
fonts = {
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans";
};
monospace = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans Mono";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
};
services.xserver.videoDrivers = [ ] ++ lib.optional (builtins.isString gpu) gpu; services.xserver.videoDrivers = [ ] ++ lib.optional (builtins.isString gpu) gpu;

View file

@ -58,13 +58,8 @@
sshpass # ssh password helper sshpass # ssh password helper
cbonsai # ncurses bonsai tree cbonsai # ncurses bonsai tree
busybox # Linux utilities busybox # Linux utilities
at # Job scheduler
]; ];
# Job scheduler
services.atd.enable = true;
services.atd.allowEveryone = true;
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {