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