It's moving

This commit is contained in:
Hadi
2026-06-29 17:48:21 +02:00
parent 082de49ca4
commit cdffe66d72
62 changed files with 953 additions and 2147 deletions
@@ -1,50 +0,0 @@
{
pkgs,
config,
...
}: let
inherit (config.theme) bar-rounding bar-thickness;
inherit (config.stylix) fonts;
in {
home.packages = with pkgs; [
papirus-icon-theme
];
programs.caelestia.settings = {
paths.sessionGif = ./session-gif-hacker-cat.gif;
background.enabled = false;
appearance = {
transparency = {
enabled = true;
base = config.theme.active-opacity;
layers = config.theme.inactive-opacity;
};
font.family = {
material = "Material Symbols Rounded";
mono = fonts.monospace.name;
sans = fonts.sansSerif.name;
};
};
utilities = {
enabled = true;
maxToasts = 4;
toasts = {
audioInputChanged = false;
audioOutputChanged = false;
capsLockChanged = false;
chargingChanged = true;
configLoaded = false;
dndChanged = true;
gameModeChanged = true;
numLockChanged = false;
nowPlaying = false;
kbLayoutChanged = false;
};
};
dashboard.showOnHover = false;
border = {
rounding = bar-rounding;
thickness = bar-thickness;
};
};
}
-68
View File
@@ -1,68 +0,0 @@
{
programs.caelestia.settings.bar = {
clock.showIcon = false;
popouts.activeWindow = false;
persistent = true;
status = {
showBattery = true;
showMicrophone = false;
showLockStatus = false;
showBluetooth = true;
showAudio = true;
showKbLayout = false;
showNetwork = true;
};
workspaces = {
activeIndicator = true;
activeLabel = "󰪥 ";
activeTrail = false;
label = " ";
occupiedBg = true;
occupiedLabel = "󰪥 ";
showWindows = false;
shown = 5;
};
entries = [
{
id = "logo";
enabled = true;
}
{
id = "workspaces";
enabled = true;
}
{
id = "spacer";
enabled = true;
}
{
id = "activeWindow";
enabled = true;
}
{
id = "spacer";
enabled = true;
}
{
id = "tray";
enabled = true;
}
{
id = "clock";
enabled = true;
}
{
id = "statusIcons";
enabled = true;
}
{
id = "power";
enabled = true;
}
];
tray = {
background = false;
recolour = false;
};
};
}
-80
View File
@@ -1,80 +0,0 @@
# Caelestia Shell Home Manager Configuration
# See https://github.com/caelestia-dots/shell
{
pkgs,
inputs,
lib,
...
}: {
imports = [
inputs.caelestia-shell.homeManagerModules.default
./bar.nix
./launcher.nix
./appearance.nix
./scheme.nix
./swappy.nix
];
programs.caelestia = {
enable = true;
systemd.enable = false;
settings = {
services.weatherLocation = "Paris";
general = {
apps = {
terminal = ["ghostty"];
audio = ["pavucontrol"];
explorer = ["thunar"];
};
idle = {
timeouts = [];
};
};
};
cli = {
enable = true;
settings.theme = {
enableTerm = false;
enableDiscord = false;
enableSpicetify = false;
enableBtop = false;
enableCava = false;
enableHypr = false;
enableGtk = false;
enableQt = false;
};
};
};
home.packages = with pkgs; [
gpu-screen-recorder
];
wayland.windowManager.hyprland.settings.exec-once = [
"uwsm app -- caelestia resizer -d"
"uwsm app -- caelestia shell -d"
"caelestia scheme set -n onedark"
"caelestia scheme set -n custom"
];
# shell.json is managed by home-manager (read-only symlink) but caelestia
# needs to write to it at runtime: replace the symlink with a mutable copy.
# The stale .hm-backup must be removed before linkGeneration so HM can
# back up the runtime-modified shell.json without hitting a conflict.
home.activation.caelestiaCleanBackup = lib.hm.dag.entryBefore ["linkGeneration"] ''
$DRY_RUN_CMD rm -f "$HOME/.config/caelestia/shell.json.hm-backup"
'';
home.activation.caelestiaWritableShellConfig = lib.hm.dag.entryAfter ["linkGeneration"] ''
if [ -L "$HOME/.config/caelestia/shell.json" ]; then
$DRY_RUN_CMD cp --remove-destination \
"$(readlink -f "$HOME/.config/caelestia/shell.json")" \
"$HOME/.config/caelestia/shell.json"
fi
'';
services.cliphist = {
enable = true;
allowImages = true;
};
}
-188
View File
@@ -1,188 +0,0 @@
{
programs.caelestia.settings = {
session.commands = {
shutdown = [
"systemctl"
"poweroff"
];
logout = [
"loginctl"
"lock-session"
];
hibernate = [
"systemctl"
"hibernate"
];
reboot = [
"systemctl"
"reboot"
];
};
launcher = {
actionPrefix = "/";
actions = [
{
name = "Calculator";
icon = "calculate";
description = "Do simple math equations (powered by Qalc)";
command = [
"autocomplete"
"calc"
];
enabled = true;
dangerous = false;
}
{
name = "Shutdown";
icon = "power_settings_new";
description = "Shutdown the system";
command = [
"systemctl"
"poweroff"
];
enabled = true;
dangerous = true;
}
{
name = "Reboot";
icon = "cached";
description = "Reboot the system";
command = [
"systemctl"
"reboot"
];
enabled = true;
dangerous = true;
}
{
name = "Logout";
icon = "exit_to_app";
description = "Log out of the current session";
command = [
"loginctl"
"terminate-user"
""
];
enabled = true;
dangerous = true;
}
{
name = "Lock";
icon = "lock";
description = "Lock the current session";
command = [
"loginctl"
"lock-session"
];
enabled = true;
dangerous = false;
}
{
name = "Sleep";
icon = "bedtime";
description = "Suspend then hibernate";
command = [
"systemctl"
"suspend-then-hibernate"
];
enabled = true;
dangerous = false;
}
{
name = "Restart caelestia";
icon = "cached";
description = "Restart caelestia";
command = [
"hyprctl"
"dispatch"
"exec"
"caelestia-shell kill | sleep 1 | caelestia-shell"
];
enabled = true;
dangerous = false;
}
{
name = "Emoji Picker";
icon = "mood";
description = "Toggle the emoji picker";
command = [
"caelestia"
"emoji"
"-p"
];
enabled = true;
dangerous = false;
}
{
name = "Clipboard History";
icon = "content_paste";
description = "Toggle the clipboard history";
command = [
"caelestia"
"clipboard"
];
enabled = true;
dangerous = false;
}
{
name = "Delete from Clipboard History";
icon = "content_paste_off";
description = "Delete a line from the clipboard history";
command = [
"caelestia"
"clipboard"
];
enabled = true;
dangerous = false;
}
{
name = "Night Shift";
icon = "moon_stars";
description = "Toggle Night Shift, the blue light filter";
command = ["nightshift-toggle"];
enabled = true;
dangerous = false;
}
{
name = "Hyprpicker";
icon = "colorize";
description = "Pick an hex color";
command = [
"hyprpicker"
"-a"
];
enabled = true;
dangerous = false;
}
{
name = "Run in background";
icon = "play_circle";
description = "Type and run any shell command in the background";
command = [
"ghostty"
"--title=run-bg"
"-e"
"bash"
"-c"
"printf 'Run: '; read -r cmd; [ -n \"$cmd\" ] && hyprctl dispatch exec \"$cmd\""
];
enabled = true;
dangerous = false;
}
];
dragThreshold = 50;
enableDangerousActions = false;
maxShown = 7;
specialPrefix = "@";
useFuzzy = {
apps = false;
actions = false;
schemes = false;
variants = false;
wallpapers = false;
};
showOnHover = false;
hiddenApps = [];
};
};
}
-137
View File
@@ -1,137 +0,0 @@
# This Nix module customizes the color scheme of the Caelestia CLI application using the Stylix base16 color palette.
{
pkgs,
inputs,
config,
...
}: let
colors = config.lib.stylix.colors;
customSchemeFile = pkgs.writeText "custom-dark.txt" ''
primary_paletteKeyColor ${colors.base0D}
secondary_paletteKeyColor ${colors.base04}
tertiary_paletteKeyColor ${colors.base08}
neutral_paletteKeyColor ${colors.base03}
neutral_variant_paletteKeyColor ${colors.base03}
background ${colors.base00}
onBackground ${colors.base05}
surface ${colors.base00}
surfaceDim ${colors.base00}
surfaceBright ${colors.base02}
surfaceContainerLowest ${colors.base01}
surfaceContainerLow ${colors.base01}
surfaceContainer ${colors.base01}
surfaceContainerHigh ${colors.base02}
surfaceContainerHighest ${colors.base02}
onSurface ${colors.base05}
surfaceVariant ${colors.base02}
onSurfaceVariant ${colors.base04}
inverseSurface ${colors.base05}
inverseOnSurface ${colors.base00}
outline ${colors.base03}
outlineVariant ${colors.base02}
shadow ${colors.base00}
scrim ${colors.base00}
surfaceTint ${colors.base0D}
primary ${colors.base0D}
onPrimary ${colors.base00}
primaryContainer ${colors.base0D}
onPrimaryContainer ${colors.base05}
inversePrimary ${colors.base0D}
secondary ${colors.base0C}
onSecondary ${colors.base00}
secondaryContainer ${colors.base02}
onSecondaryContainer ${colors.base0C}
tertiary ${colors.base08}
onTertiary ${colors.base00}
tertiaryContainer ${colors.base08}
onTertiaryContainer ${colors.base00}
error ${colors.base08}
onError ${colors.base00}
errorContainer ${colors.base08}
onErrorContainer ${colors.base05}
primaryFixed ${colors.base0D}
primaryFixedDim ${colors.base0D}
onPrimaryFixed ${colors.base00}
onPrimaryFixedVariant ${colors.base00}
secondaryFixed ${colors.base0C}
secondaryFixedDim ${colors.base0C}
onSecondaryFixed ${colors.base00}
onSecondaryFixedVariant ${colors.base02}
tertiaryFixed ${colors.base08}
tertiaryFixedDim ${colors.base08}
onTertiaryFixed ${colors.base00}
onTertiaryFixedVariant ${colors.base00}
term0 ${colors.base00}
term1 ${colors.base08}
term2 ${colors.base0B}
term3 ${colors.base0A}
term4 ${colors.base0D}
term5 ${colors.base0E}
term6 ${colors.base0C}
term7 ${colors.base05}
term8 ${colors.base03}
term9 ${colors.base08}
term10 ${colors.base0B}
term11 ${colors.base0A}
term12 ${colors.base0D}
term13 ${colors.base0E}
term14 ${colors.base0C}
term15 ${colors.base07}
rosewater ${colors.base06}
flamingo ${colors.base0F}
pink ${colors.base0E}
mauve ${colors.base0D}
red ${colors.base08}
maroon ${colors.base08}
peach ${colors.base09}
yellow ${colors.base0A}
green ${colors.base0B}
teal ${colors.base0C}
sky ${colors.base0C}
sapphire ${colors.base0C}
blue ${colors.base0D}
lavender ${colors.base0D}
klink ${colors.base0D}
klinkSelection ${colors.base0D}
kvisited ${colors.base0E}
kvisitedSelection ${colors.base0E}
knegative ${colors.base08}
knegativeSelection ${colors.base08}
kneutral ${colors.base0A}
kneutralSelection ${colors.base0A}
kpositive ${colors.base0B}
kpositiveSelection ${colors.base0B}
text ${colors.base05}
subtext1 ${colors.base04}
subtext0 ${colors.base03}
overlay2 ${colors.base03}
overlay1 ${colors.base03}
overlay0 ${colors.base02}
surface2 ${colors.base02}
surface1 ${colors.base01}
surface0 ${colors.base01}
base ${colors.base00}
mantle ${colors.base00}
crust ${colors.base00}
success ${colors.base0B}
onSuccess ${colors.base00}
successContainer ${colors.base0B}
onSuccessContainer ${colors.base05}
'';
colorsHash = builtins.hashString "sha256" (builtins.toJSON colors);
customCli =
inputs.caelestia-cli.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs
(oldAttrs: {
name = "${oldAttrs.name or "caelestia-cli"}-themed-${colorsHash}";
postUnpack = ''
mkdir -p $sourceRoot/src/caelestia/data/schemes/custom/main
cp ${customSchemeFile} $sourceRoot/src/caelestia/data/schemes/custom/main/dark.txt
echo "Custom scheme added to source"
'';
});
in {
programs.caelestia.cli.package = customCli;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

-11
View File
@@ -1,11 +0,0 @@
{
xdg.configFile."swappy/config".text = ''
[Default]
save_dir=~/Pictures/Screenshots
save_filename_format=screenshot-%Y%m%d-%H%M%S.png
show_panel=false
line_size=5
text_size=20
text_font=sans-serif
'';
}
+5 -4
View File
@@ -1,5 +1,6 @@
{
pkgs,
pkgs-stable,
lib,
config,
...
@@ -63,17 +64,17 @@ in {
{
key = "o";
desc = "Obsidian";
cmd = "${pkgs.obsidian}/bin/obsidian";
cmd = "${pkgs-stable.obsidian}/bin/obsidian";
}
{
key = "s";
desc = "Signal";
cmd = "${pkgs.signal-desktop}/bin/signal-desktop";
cmd = "${pkgs-stable.signal-desktop}/bin/signal-desktop";
}
{
key = "t";
desc = "TickTick";
cmd = "${pkgs.ticktick}/bin/ticktick";
cmd = "${pkgs-stable.ticktick}/bin/ticktick";
}
{
key = "b";
@@ -124,7 +125,7 @@ in {
# Quick launch
"$mod,RETURN, exec, uwsm app -- ${pkgs.ghostty}/bin/ghostty" # Ghostty (terminal)
"$mod,E, exec, uwsm app -- ${pkgs.thunar}/bin/thunar" # Thunar
"$mod,E, exec, uwsm app -- ${pkgs-stable.thunar}/bin/thunar" # Thunar
"$mod, SPACE, exec, rofi -show drun" # Launcher
"$mod, N, exec, swaync-client -t" # Notification center
+27 -32
View File
@@ -1,6 +1,7 @@
# Hyprland is a dynamic tiling Wayland compositor that is highly customizable and performant.
{
pkgs,
pkgs-stable,
config,
lib,
...
@@ -19,49 +20,43 @@ in {
./animations.nix
./bindings.nix
./polkitagent.nix
./keyboard-backlight.nix # CHANGEME: This is for omen laptop only
./hyprpaper.nix
];
home.packages = with pkgs; [
qt5.qtwayland
qt6.qtwayland
libsForQt5.qt5ct
qt6Packages.qt6ct
xcb-util-cursor
libxcb
hyprland-qtutils
adw-gtk3
hyprshot
hyprpicker
swappy
imv
wf-recorder
wlr-randr
brightnessctl
gnome-themes-extra
dconf
wayland-utils
wayland-protocols
];
home.packages =
(with pkgs; [
qt5.qtwayland
qt6.qtwayland
libsForQt5.qt5ct
qt6Packages.qt6ct
hyprland-qtutils
])
++ (with pkgs-stable; [
xcb-util-cursor
libxcb
adw-gtk3
hyprshot
hyprpicker
swappy
imv
wf-recorder
wlr-randr
brightnessctl
gnome-themes-extra
dconf
wayland-utils
wayland-protocols
]);
wayland.windowManager.hyprland = {
enable = true;
configType = "hyprlang";
xwayland.enable = true;
systemd = {
enable = false;
variables = [
"--all"
]; # https://wiki.hyprland.org/Nix/Hyprland-on-Home-Manager/#programs-dont-work-in-systemd-services-but-do-on-the-terminal
};
systemd.enable = false;
package = null;
portalPackage = null;
settings = {
exec-once = [
"dbus-update-activation-environment --systemd --all &"
];
monitor = [
",prefered,auto,1" # default
];
@@ -1,8 +1,9 @@
# Hyprpaper is used to set the wallpaper on the system
{lib, ...}: {
{pkgs-stable, lib, ...}: {
# The wallpaper is set by stylix
services.hyprpaper = {
enable = true;
package = pkgs-stable.hyprpaper;
settings = {
ipc = "on";
splash = false;
@@ -1,44 +0,0 @@
# Turn the keyboard red/off when the battery is low
# Include this one only if you have a omen laptop with RGB keyboard
{
pkgs,
config,
...
}: let
alert-when-low-battery = false;
keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" ''
function set_keyboard_backlight {
local color=$1
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone00
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone01
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone02
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone03
}
state="white"
set_keyboard_backlight ${config.lib.stylix.colors.base0D}
if [ "${toString alert-when-low-battery}" = "false" ]; then
exit 0
fi
while true; do
BATTERY_LEVEL=$(cat /sys/class/power_supply/BAT*/capacity)
IS_CHARGING=$(cat /sys/class/power_supply/BAT*/status)
if [[ $BATTERY_LEVEL -le 10 && $IS_CHARGING != "Charging" ]]; then
if [[ $state == "red" ]];then
state="white"
set_keyboard_backlight "000000"
else
state="red"
set_keyboard_backlight "FF0000"
fi
else
state="white"
set_keyboard_backlight ${config.lib.stylix.colors.base0D}
fi
sleep 2
done
'';
command = "bash ${keyboard-backlight}/bin/keyboard-backlight &";
in {
wayland.windowManager.hyprland.settings.exec-once = [command];
}
+2 -2
View File
@@ -1,6 +1,6 @@
# HyprPolkitAgent is a simple polkit agent for wayland compositors
{pkgs, ...}: {
home.packages = with pkgs; [hyprpolkitagent];
{pkgs-stable, ...}: {
home.packages = with pkgs-stable; [hyprpolkitagent];
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
}
+85
View File
@@ -0,0 +1,85 @@
{config, ...}: let
c = config.lib.stylix.colors;
in {
stylix.targets.hyprlock.enable = false;
programs.hyprlock = {
enable = true;
settings = {
background = [
{
monitor = "";
color = "rgba(${c.base00}FF)";
}
];
label = [
{
monitor = "";
text = ''cmd[update:0] echo "[$USER@$(hostname) ~]"'';
color = "rgb(${c.base0D})";
font_size = 13;
font_family = "Maple Mono NF";
position = "48, -48";
halign = "left";
valign = "top";
}
{
monitor = "";
text = ''cmd[update:1000] echo "$(date +'%H:%M:%S')"'';
color = "rgb(${c.base05})";
font_size = 13;
font_family = "Maple Mono NF";
position = "48, -70";
halign = "left";
valign = "top";
}
{
monitor = "";
text = ''cmd[update:60000] echo "$(date +'%A %d %B %Y')"'';
color = "rgb(${c.base04})";
font_size = 13;
font_family = "Maple Mono NF";
position = "48, -92";
halign = "left";
valign = "top";
}
{
monitor = "";
text = "passwd:";
color = "rgb(${c.base0D})";
font_size = 13;
font_family = "Maple Mono NF";
position = "48, -141";
halign = "left";
valign = "top";
}
];
"input-field" = [
{
monitor = "";
size = "200, 20";
outline_thickness = 0;
dots_size = 0.3;
dots_spacing = 0.2;
dots_center = false;
outer_color = "rgba(00000000)";
inner_color = "rgba(00000000)";
font_color = "rgb(${c.base05})";
fade_on_empty = false;
placeholder_text = "";
hide_input = true;
rounding = 0;
check_color = "rgb(${c.base0B})";
fail_color = "rgb(${c.base08})";
fail_text = ''<span font_desc="Maple Mono NF 13">auth failed</span>'';
capslock_color = "rgb(${c.base0A})";
position = "116, -138";
halign = "left";
valign = "top";
}
];
};
};
}
+24 -31
View File
@@ -1,24 +1,17 @@
# Mime type associations for the system.
{
lib,
pkgs,
...
}:
with lib; let
}: let
defaultApps = {
# check desktop files here: `ls $(echo $XDG_DATA_DIRS| sed "s/:/ /g")`
text = [
# "org.gnome.TextEditor.desktop"
"nvim-ghostty.desktop"
];
text = ["nvim-ghostty.desktop"];
code = ["nvim-ghostty.desktop"];
image = ["imv-dir.desktop"];
audio = ["mpv.desktop"];
video = ["mpv.desktop"];
audio = ["vlc.desktop"];
video = ["vlc.desktop"];
directory = ["thunar.desktop"];
office = ["libreoffice.desktop"];
pdf = ["zathura.desktop"];
terminal = ["ghostty.desktop"];
office = ["onlyoffice-desktopeditors.desktop"];
pdf = ["onlyoffice-desktopeditors.desktop"];
archive = ["xarchiver.desktop"];
browser = ["helium.desktop"];
};
@@ -34,7 +27,6 @@ with lib; let
"text/x-go"
"text/x-java"
"text/x-csharp"
"text/x-python"
"application/x-shellscript"
"text/javascript"
@@ -42,7 +34,6 @@ with lib; let
"text/css"
"text/x-php"
"text/x-ruby"
"application/json"
"application/xml"
"text/xml"
@@ -51,11 +42,8 @@ with lib; let
"application/toml"
"text/x-nix"
"text/markdown"
"text/x-dockerfile"
"application/x-yaml"
"text/x-terraform"
"application/x-perl"
"text/x-lua"
"text/x-haskell"
@@ -104,12 +92,17 @@ with lib; let
"application/rtf"
];
pdf = ["application/pdf"];
terminal = ["terminal"];
archive = [
"application/zip"
"application/rar"
"application/7z"
"application/*tar"
"application/x-rar-compressed"
"application/vnd.rar"
"application/x-7z-compressed"
"application/x-tar"
"application/gzip"
"application/x-bzip2"
"application/x-xz"
"application/x-zstd"
"application/x-compressed-tar"
];
browser = [
"text/html"
@@ -125,17 +118,17 @@ with lib; let
desktopName = "Neovim (Ghostty)";
exec = ''ghostty --title="Neovim Editor" -e nvim %F'';
terminal = false;
categories = [
"Development"
"TextEditor"
];
categories = ["Development" "TextEditor"];
mimeTypes = mimeMap.code ++ mimeMap.text;
};
associations = with lists;
listToAttrs (
flatten (mapAttrsToList (key: map (type: attrsets.nameValuePair type defaultApps."${key}")) mimeMap)
);
associations = lib.listToAttrs (
lib.flatten (
lib.mapAttrsToList
(key: map (type: lib.nameValuePair type defaultApps.${key}))
mimeMap
)
);
in {
home.packages = [nvim-ghostty];
@@ -144,7 +137,7 @@ in {
mimeApps = {
enable = true;
associations.added = associations;
defaultApplications = associations;
defaultApplications = lib.mapAttrs (_: lib.mkForce) associations;
};
};
}
+136
View File
@@ -0,0 +1,136 @@
{ config, pkgs, ... }: let
c = config.lib.stylix.colors;
font = config.stylix.fonts.sansSerif.name;
fontSize = toString config.stylix.fonts.sizes.applications;
gaps = toString config.theme.gaps-out;
theme = pkgs.writeText "launcher.rasi" ''
configuration {
modi: "drun,run";
case-sensitive: false;
cycle: true;
normalize-match: true;
show-icons: false;
matching: "normal";
tokenize: true;
kb-cancel: "Escape,MousePrimary";
drun-match-fields: "name,exec,generic,comment";
drun-display-format: "{name}";
drun-url-launcher: "xdg-open";
drun-show-actions: false;
disable-history: false;
sorting-method: "normal";
terminal: "ghostty";
hover-select: true;
me-select-entry: "";
me-accept-entry: [ "MousePrimary" ];
}
* {
background: transparent;
background-alt: #${c.base01}ff;
foreground: #${c.base05}ff;
active: #${c.base0D}ff;
inactive: #${c.base03}ff;
selected-fg: #${c.base00}ff;
font: "${font}, Bold ${fontSize}";
}
window {
transparency: "real";
location: north;
anchor: north;
padding: ${gaps}px ${gaps}px 0;
margin: 0;
width: 100%;
background-color: transparent;
border: 0px;
}
mainbox {
orientation: horizontal;
spacing: 0;
padding: 6px 14px;
border-radius: 100px;
background-color: @background-alt;
children: [ "inputbar", "listview" ];
}
inputbar {
expand: false;
spacing: 8px;
padding: 0;
background-color: transparent;
color: @foreground;
children: [ "prompt", "entry" ];
}
prompt {
background-color: transparent;
color: @active;
padding: 0 2px 0 0;
vertical-align: 0.5;
}
entry {
background-color: transparent;
color: inherit;
placeholder-color: @inactive;
placeholder: "Search...";
vertical-align: 0.5;
width: 180px;
}
listview {
layout: horizontal;
lines: 1;
dynamic: true;
scrollbar: false;
spacing: 0;
padding: 0 0 0 14px;
background-color: transparent;
color: @foreground;
}
element {
enabled: true;
spacing: 0;
padding: 2px 10px;
border-radius: 100px;
background-color: transparent;
color: @foreground;
cursor: pointer;
children: [ "element-text" ];
}
element selected.normal {
background-color: @active;
color: @selected-fg;
}
element-text {
background-color: transparent;
color: inherit;
vertical-align: 0.5;
}
message {
padding: 0;
background-color: transparent;
color: @foreground;
}
error-message {
padding: 10px;
border-radius: 100px;
background-color: @background-alt;
color: @foreground;
}
'';
in {
stylix.targets.rofi.enable = false;
programs.rofi = {
enable = true;
theme = "${theme}";
};
}
+357
View File
@@ -0,0 +1,357 @@
{config, ...}: let
c = config.lib.stylix.colors;
font = config.stylix.fonts.sansSerif.name;
monofont = config.stylix.fonts.monospace.name;
rounding = config.theme.rounding;
border-size = config.theme.border-size;
gaps-in = config.theme.gaps-in;
opacityToHex = opacity: let
val = builtins.floor (opacity * 255);
high = val / 16;
low = val - high * 16;
digits = "0123456789abcdef";
in "${builtins.substring high 1 digits}${builtins.substring low 1 digits}";
alphaHex = opacityToHex config.theme.inactive-opacity;
in {
services.swaync = {
enable = true;
settings = {
positionX = "right";
positionY = "top";
cssPriority = "user";
"control-center-width" = 450;
"fit-to-screen" = true;
"notification-window-width" = 400;
"notification-icon-size" = 40;
"notification-body-image-height" = 500;
"notification-body-image-width" = 500;
"notification-inline-replies" = true;
"notification-2fa-action" = false;
timeout = 3;
"timeout-low" = 2;
"timeout-critical" = 6;
"keyboard-shortcuts" = true;
"image-visibility" = "when-available";
"transition-time" = 200;
"hide-on-clear" = false;
"hide-on-action" = false;
"script-fail-notify" = true;
widgets = ["mpris" "dnd" "buttons-grid" "notifications"];
"widget-config" = {
dnd.text = "Do not disturb";
mpris = {
"image-size" = 100;
"image-radius" = 10;
autohide = false;
blacklist = ["org.mpris.MediaPlayer2.playerctld"];
};
"buttons-grid" = {
actions = [
{
label = "󰖔";
type = "toggle";
command = "nightshift-toggle";
"update-command" = "pidof hyprsunset > /dev/null && echo true || echo false";
}
{
label = "󰈈";
type = "toggle";
command = "focus-toggle";
"update-command" = "test -f /tmp/hypr-focus-mode && echo true || echo false";
}
{
label = "󰍭";
type = "toggle";
command = "swayosd-client --input-volume mute-toggle";
"update-command" = "wpctl get-volume @DEFAULT_SOURCE@ | grep -q MUTED && echo true || echo false";
}
{
label = "󰌾";
command = "swaync-client -cp ; hyprlock";
}
{
label = "󰐥";
command = "swaync-client -cp ; systemctl poweroff";
}
];
};
};
};
style = ''
@define-color center-bg #${c.base00}${alphaHex};
@define-color notification-bg #${c.base00}${alphaHex};
@define-color center-notification-bg #${c.base01};
@define-color background #${c.base00}${alphaHex};
@define-color background-alt #${c.base01};
@define-color text #${c.base05};
@define-color text-alt #${c.base03};
@define-color selected #${c.base03}66;
@define-color hover #${c.base03}28;
@define-color urgent #${c.base08};
* {
all: unset;
font-family: "${font}";
font-weight: 700;
--border-radius: ${toString rounding}px;
--border-radius-s: ${toString gaps-in}px;
--border-radius-xl: ${toString (rounding - 2)}px;
--shadow: 2px 4px 10px rgba(0,0,0,0.15);
}
.notification { padding: 5px; }
.notification-row { background: transparent; border: none; box-shadow: none; }
.control-center .notification { padding: 0; }
.notification-background {
background: @notification-bg;
border-radius: var(--border-radius);
border: ${toString border-size}px solid @selected;
box-shadow: none;
outline: none;
margin: ${toString gaps-in}px;
padding: 0;
}
.notification-background .close-button {
margin: 6px;
padding: 2px;
border-radius: ${toString (gaps-in - 2)}px;
background: transparent;
color: @text;
}
.notification-background .close-button:hover { background: @hover; }
.notification.low,
.notification.normal { border: none; }
.notification.critical {
border: ${toString border-size}px solid @urgent;
border-radius: var(--border-radius);
}
.notification-content {
color: @text;
margin: 10px;
font-weight: 700;
border: none;
}
.notification-content .text-box { margin: 0 0 0 15px; }
.notification-content .time {
padding: 2px;
font-size: 0.95rem;
font-weight: 800;
}
.notification-content .summary {
font-size: 1rem;
font-weight: 800;
padding: 2px 0;
margin-bottom: 2px;
}
.notification-content .body {
color: @text-alt;
font-size: 0.8rem;
}
.notification-row .inline-reply-entry,
.notification-row .inline-reply-button {
margin: 5px -5px -5px -5px;
padding: 10px 15px;
border-radius: var(--border-radius);
background: @background-alt;
}
.notification-row .inline-reply-entry { margin-right: 10px; }
.notification-row .inline-reply-button:hover { background: @selected; }
.notification-alt-actions { padding: 5px 0; }
.notification-action {
font-weight: 700;
border-radius: var(--border-radius);
background: @hover;
color: @text;
margin: 0 5px;
padding: 10px 0;
}
.notification-action:hover,
.notification-action:active { background: @selected; }
.control-center {
background: @center-bg;
border-radius: var(--border-radius);
border: ${toString border-size}px solid @selected;
margin: 5px;
padding: 5px 5px 0 5px;
}
.control-center .notification-background {
background: @center-notification-bg;
box-shadow: var(--shadow);
}
.control-center .notification-background .close-button,
.notification-group-close-button { opacity: 0; }
.notification-group { transition: 200ms; }
.notification-group:not(.collapsed) { margin: ${toString gaps-in}px; }
.notification-group-headers,
.notification-group-buttons {
color: @text;
font-weight: bold;
background: @background;
border-radius: var(--border-radius);
padding: 4px 8px;
}
.notification-group-headers > label {
margin: 0 3px;
font-size: 1rem;
}
.notification-group-icon { color: @text; }
.notification-group-buttons .image-button {
background: transparent;
color: @text;
padding: 4px;
border-radius: var(--border-radius);
}
.notification-group-buttons .image-button:hover { background: @hover; }
.widget {
margin: 5px;
color: @text;
}
.widget-mpris-album-art {
border-radius: var(--border-radius);
margin: 6px 4px;
}
.widget-mpris-title {
font-weight: 700;
font-size: 1.2rem;
margin: 0 3px;
}
.widget-mpris-subtitle {
color: @text-alt;
font-weight: 700;
font-size: 0.9rem;
margin: 0 3px;
}
.mpris-background { border-radius: 14px; margin: 3px; }
.widget-mpris {
border-radius: var(--border-radius);
box-shadow: var(--shadow);
}
.mpris-overlay {
border-radius: var(--border-radius);
padding: 10px;
background: @background;
}
.mpris-overlay > box:last-child {
border-radius: var(--border-radius-xl);
padding: 0 5px;
background: alpha(@hover, .6);
}
.widget-mpris-player button {
padding: 5px;
margin: 0 2.5px;
}
.widget-mpris-player button:hover {
border-radius: var(--border-radius-s);
background: @hover;
}
.widget-dnd {
padding: 10px 15px;
border-radius: var(--border-radius);
background: @background-alt;
box-shadow: var(--shadow);
color: @text;
}
.widget-dnd > label {
font-size: 1rem;
font-weight: 700;
}
.widget-dnd switch {
background: @hover;
border-radius: var(--border-radius-s);
box-shadow: none;
padding: 2px;
transition: 200ms;
}
.widget-dnd switch slider {
background: @text;
border-radius: var(--border-radius-s);
}
.widget-dnd switch:hover,
.widget-dnd switch:checked { background-color: @selected; }
.widget-notifications { margin: 0; }
.widget-buttons-grid {
border-radius: var(--border-radius);
padding: 5px 15px;
margin-bottom: 5px;
background: @background-alt;
box-shadow: var(--shadow);
}
.widget-buttons-grid button {
padding: 10px;
margin: 3px;
min-width: 2rem;
font-family: "${monofont}";
background: @hover;
border-radius: var(--border-radius);
transition: 200ms;
}
.widget-buttons-grid button > label {
font-family: "${monofont}";
font-size: 18px;
font-weight: normal;
font-style: normal;
color: @text;
}
.widget-buttons-grid button:hover { background: @selected; }
.widget-buttons-grid button:checked { background-color: @text; }
.widget-buttons-grid button:checked > label { color: @background; }
.control-center-list-placeholder { color: @text; }
.blank-window { background: transparent; }
'';
};
stylix.targets.swaync.enable = false;
}
+68
View File
@@ -0,0 +1,68 @@
{
config,
pkgs,
...
}: let
c = config.lib.stylix.colors;
rounding = config.theme.rounding;
border-size = config.theme.border-size;
gaps-in = config.theme.gaps-in;
opacityToHex = opacity: let
val = builtins.floor (opacity * 255);
high = val / 16;
low = val - high * 16;
digits = "0123456789abcdef";
in "${builtins.substring high 1 digits}${builtins.substring low 1 digits}";
alphaHex = opacityToHex config.theme.inactive-opacity;
style = pkgs.writeText "swayosd-style.css" ''
window#osd {
background: #${c.base00}${alphaHex};
border-radius: ${toString rounding}px;
border: ${toString border-size}px solid #${c.base03}66;
}
window#osd #container {
margin: ${toString gaps-in}px;
padding: 4px;
}
window#osd image,
window#osd label {
color: #${c.base05};
}
window#osd progressbar,
window#osd segmentedprogress {
min-height: 6px;
border-radius: 999px;
background: transparent;
border: none;
}
window#osd trough,
window#osd segment {
min-height: inherit;
border-radius: inherit;
border: none;
background: #${c.base03}66;
}
window#osd progress,
window#osd segment.active {
min-height: inherit;
border-radius: inherit;
border: none;
background: #${c.base0D};
}
window#osd segment { margin-left: 4px; }
window#osd segment:first-child { margin-left: 0; }
'';
in {
services.swayosd = {
enable = true;
stylePath = style;
topMargin = 0.5;
};
}
+21 -3
View File
@@ -1,9 +1,28 @@
{ pkgs, ... }: {
{pkgs, ...}: let
networkScript = pkgs.writeShellScript "waybar-network" ''
for iface in $(${pkgs.iproute2}/bin/ip -br link show | awk '$2 == "UP" {print $1}' | grep -vE '^(lo|tun|proton|wg[0-9]|ppp|vpn|docker|br-|veth|virbr)'); do
ip=$(${pkgs.iproute2}/bin/ip addr show "$iface" 2>/dev/null | grep 'inet ' | awk '{print $2}' | cut -d/ -f1 | head -1)
if [ -n "$ip" ]; then
if [[ "$iface" == wl* ]]; then
ssid=$(${pkgs.iw}/bin/iw dev "$iface" link 2>/dev/null | grep SSID | sed 's/.*SSID: //')
signal=$(${pkgs.iw}/bin/iw dev "$iface" link 2>/dev/null | grep signal | awk '{print $2}')
printf '{"text": "󰤨", "class": "wifi", "tooltip": " %s\\n %s dBm"}\n' "$ssid" "$signal"
else
printf '{"text": "󰛳", "class": "ethernet", "tooltip": " %s\\n %s"}\n' "$iface" "$ip"
fi
exit 0
fi
done
printf '{"text": "󰤭", "class": "disconnected", "tooltip": "Disconnected"}\n'
'';
in {
imports = [
./settings.nix
./style.nix
];
_module.args.networkScript = networkScript;
programs.waybar.enable = true;
stylix.targets.waybar.enable = false;
@@ -11,11 +30,10 @@
playerctl
pavucontrol
blueman
swayosd
iw
];
wayland.windowManager.hyprland.settings.exec-once = [
"waybar"
"swayosd-server"
];
}
+40 -127
View File
@@ -1,60 +1,23 @@
{ osConfig ? {}, lib, ... }: let
hasBluetooth = osConfig.hardware.bluetooth.enable or false;
{config, networkScript, ...}: let
gaps-out = config.theme.gaps-out;
c = config.lib.stylix.colors;
in {
programs.waybar.settings = [
{
layer = "top";
position = "top";
height = 25;
margin = "5 0";
margin = "${toString gaps-out} ${toString gaps-out} 0";
modules-center = ["clock" "tray" "hyprland/workspaces" "custom/network" "bluetooth" "battery" "group/right-hidden"];
modules-left = [ "group/left-hidden-top" "group/left" ];
modules-center = [ "clock" ];
modules-right = [ "group/right" "group/right-hidden-top" ];
# ── Groups ────────────────────────────────────────────────────────
"group/left" = {
orientation = "horizontal";
modules = [ "hyprland/workspaces" "mpris" ];
};
# power-profiles-daemon visible + hidden drawer (arrow → battery cpu load)
"group/left-hidden-top" = {
orientation = "horizontal";
modules = [ "power-profiles-daemon" "group/left-hidden" ];
};
"group/left-hidden" = {
"group/right-hidden" = {
orientation = "horizontal";
drawer = {
transition-duration = 500;
transition-left-to-right = false;
click-to-reveal = true;
};
modules = [ "custom/arrow-right" "battery" "cpu" "load" ];
};
# bluetooth volume network tray (visible)
"group/right" = {
orientation = "horizontal";
modules = lib.optional hasBluetooth "bluetooth" ++ [ "group/group-volume" "network" "tray" ];
};
# hidden drawer (arrow ← memory temp) + ctlcenter visible
"group/right-hidden-top" = {
orientation = "horizontal";
modules = [ "group/right-hidden" "custom/ctlcenter" ];
};
"group/right-hidden" = {
orientation = "horizontal";
drawer = {
transition-duration = 500;
transition-left-to-right = true;
click-to-reveal = true;
};
modules = [ "custom/arrow-left" "memory" "temperature" ];
modules = ["custom/arrow-right" "power-profiles-daemon" "mpris" "group/group-volume"];
};
"group/group-volume" = {
@@ -64,65 +27,47 @@ in {
transition-left-to-right = true;
reveal-delay = 450;
};
modules = [ "pulseaudio" "pulseaudio/slider" ];
modules = ["pulseaudio" "pulseaudio/slider"];
};
# ── Modules ─────────────────────────────────────────────────────────
"hyprland/workspaces" = {
format = "{icon}";
format = "{id}";
on-scroll-down = "hyprctl dispatch workspace e+1";
on-scroll-up = "hyprctl dispatch workspace e-1";
persistent-workspaces."*" = 5;
persistent-workspaces."*" = 4;
cursor = true;
format-icons = {
active = "󰮯";
persistent = "";
empty = "";
};
};
mpris = {
format = "{artist} - {title}";
tooltip-format = "{album}";
format-paused = " {artist} - {title}";
format = "󰐊";
format-paused = "󰏤";
tooltip-format = "{title}";
tooltip-format-paused = "{title}";
on-click = "playerctl play-pause";
on-scroll-up = "playerctl previous";
on-scroll-down = "playerctl next";
max-length = 45;
};
battery = {
bat = "BAT1";
interval = 20;
full-at = 100;
tooltip = true;
format-full = "";
format = "{icon} {capacity}%";
format-time = "{H}:{M:02}";
format-charging = " {capacity}% ({time})";
format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂂" "󰁹" ];
format = "{icon} ";
format-charging = " {icon} ";
format-icons = ["" "" "" "" ""];
tooltip-format = "{capacity}% · {time}";
tooltip-format-full = "Full\n{capacity}%";
tooltip-format-charging = "Charging\n{capacity}% · {time}";
states = {
warning = 30;
critical = 15;
};
};
cpu = {
interval = 30;
format = " {usage}%";
cursor = true;
states = {
warning = 80;
critical = 90;
};
};
load = {
interval = 30;
format = " {load1}%";
cursor = true;
};
"power-profiles-daemon" = {
format = "{icon}";
tooltip-format = "Power profile: {profile}";
@@ -133,22 +78,6 @@ in {
};
};
memory = {
interval = 10;
format = " {used:0.1f}G/{total:0.1f}G";
states = {
warning = 80;
critical = 90;
};
};
temperature = {
interval = 10;
format = "{icon} {temperatureC}°";
critical-threshold = 90;
format-icons = [ "" "" "" "" "" ];
};
bluetooth = {
format = "{}";
format-on = "󰂰";
@@ -156,9 +85,10 @@ in {
format-disabled = "";
format-connected = "{device_alias}";
format-connected-battery = "{device_alias}";
tooltip-format = "{device_enumerate}";
tooltip-format-enumerate-connected = "{device_alias}";
tooltip-format-enumerate-connected-battery = "{device_alias} {device_battery_percentage}%";
tooltip-format = "Bluetooth {status}";
tooltip-format-connected = "Bluetooth {status}\n{device_enumerate}";
tooltip-format-enumerate-connected = " {device_alias}";
tooltip-format-enumerate-connected-battery = " {device_alias} {device_battery_percentage}%";
on-click-right = "blueman-manager &";
};
@@ -178,9 +108,9 @@ in {
portable = "";
car = "";
default = [
"<span size='12pt'>󰕿</span>"
"<span size='12pt'>󰖀</span>"
"<span size='12pt'>󰕾</span>"
"󰕿"
"󰖀"
"󰕾"
];
};
};
@@ -191,19 +121,11 @@ in {
cursor = true;
};
network = {
"custom/network" = {
exec = "${networkScript}";
return-type = "json";
interval = 10;
format-disabled = "";
format-disconnected = "";
format-wifi = "";
format-ethernet = "";
tooltip-format = "{essid}
Frequency: {frequency}GHz
Strength: {signalStrength}%
{bandwidthUpBytes} {bandwidthDownBytes}";
on-click-right = "ghostty -e nmtui &";
on-click-right = "ghostty -e wifitui &";
};
tray = {
@@ -213,38 +135,29 @@ Strength: {signalStrength}%
};
clock = {
timezone = "Europe/Paris";
timezone = config.var.timeZone;
tooltip-format = "<tt><small>{calendar}</small></tt>";
format = "{:%H:%M}";
format-alt = "{:%H:%M %d %B %Y}";
calendar = {
mode = "year";
weeks-pos = "right";
mode-mon-col = 3;
mode = "month";
format = {
months = "<span color='#acb0d0'><b>{}</b></span>";
weeks = "<span color='#7aa2f7'><b>W{}</b></span>";
weekdays = "<span color='#e0af68'><b>{}</b></span>";
days = "<span color='#acb0d0'><b>{}</b></span>";
today = "<span color='#41a6b5'><b><u>{}</u></b></span>";
months = "<span color='#${c.base04}'><b>{}</b></span>";
weekdays = "<span color='#${c.base0A}'><b>{}</b></span>";
days = "<span color='#${c.base05}'>{}</span>";
today = "<span color='#${c.base0D}'><b><u>{}</u></b></span>";
};
};
};
"custom/ctlcenter" = {
format = "";
tooltip = false;
on-click = "swaync-client -t &";
};
"custom/arrow-left" = {
format = "";
format = " ";
tooltip = false;
cursor = true;
};
"custom/arrow-right" = {
format = "";
format = " ";
tooltip = false;
cursor = true;
};
+71 -70
View File
@@ -1,4 +1,4 @@
{ config, ... }: let
{config, ...}: let
c = config.lib.stylix.colors;
fg = "#${c.base05}";
module-bg = "#${c.base01}";
@@ -7,12 +7,16 @@
yellow = "#${c.base0A}";
green = "#${c.base0B}";
blue = "#${c.base0D}";
cyan = "#${c.base0C}";
mauve = "#${c.base0E}";
inactive = "#${c.base03}";
highlight = "#${c.base02}";
font-size = "${toString config.stylix.fonts.sizes.applications}px";
font-size-clock = "${toString (config.stylix.fonts.sizes.applications + 2)}px";
in {
programs.waybar.style = ''
* {
font-family: 'CaskaydiaCove Nerd Font Propo';
font-family: '${config.stylix.fonts.sansSerif.name}';
border: none;
border-radius: 0;
min-height: 0;
@@ -24,81 +28,78 @@ in {
#waybar {
font-weight: 700;
background: transparent;
font-size: 14px;
font-size: ${font-size};
color: ${fg};
}
#temperature,
.modules-center {
background: ${module-bg};
border-radius: 100px;
padding: 6px 14px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
#clock,
#tray,
#custom-network,
#bluetooth,
#battery,
#memory,
#mpris,
#cpu,
#load {
padding: 1px 7px;
min-width: 0;
#mpris {
padding: 1px 14px;
}
#network,
#tray {
padding: 1px 6px;
#clock {
font-size: ${font-size-clock};
}
#backlight,
#pulseaudio {
#workspaces {
padding: 1px 8px;
}
#pulseaudio {
padding-left: 4px;
padding: 1px 8px 1px 6px;
}
#backlight-slider,
#pulseaudio-slider {
padding: 0 7px 0 2px;
padding: 0 8px 0 2px;
}
#workspaces,
#bluetooth,
#battery,
#memory,
#temperature,
#cpu,
#mpris,
#load {
margin: 0 3px;
#workspaces button {
color: ${fg};
font-size: ${font-size};
border-radius: 100px;
padding: 0 5px;
margin: 0 1px;
}
#right,
#left,
#right-hidden-top,
#left-hidden-top {
padding: 2px 10px;
border-radius: 15px;
background: ${module-bg};
#workspaces button.empty {
color: ${inactive};
}
#right-hidden-top,
#left-hidden-top {
#workspaces button:hover {
background: transparent;
color: ${fg};
}
#workspaces button.active {
color: ${module-bg};
background: ${blue};
border-radius: 60px;
padding: 0 12px;
margin: 0 1px;
}
#right, #left {
margin: 0 8px;
#right-hidden {
padding: 0 6px;
}
#clock {
background: ${module-bg};
padding: 1px 18px;
border-radius: 15px;
}
#custom-ctlcenter {
margin-left: 7px;
#custom-arrow-right {
padding: 0 5px;
font-size: ${toString (config.stylix.fonts.sizes.applications + 2)}px;
}
#power-profiles-daemon {
margin-right: 7px;
margin-right: 4px;
}
#network.disabled,
@@ -108,42 +109,42 @@ in {
min-width: 0;
}
#cpu.critical,
#memory.critical,
#battery {
color: ${green};
}
#battery.charging,
#battery.full {
color: ${green};
}
#network.ethernet,
#network.wifi {
color: ${cyan};
}
#bluetooth.on,
#bluetooth.connected,
#bluetooth {
color: ${blue};
}
#battery.critical,
#temperature.critical,
#network.disconnected,
#power-profiles-daemon.performance {
color: ${red};
}
#cpu.warning,
#memory.warning,
#battery.warning,
#temperature.warning {
#battery.warning {
color: ${yellow};
background: unset;
}
#power-profiles-daemon.power-saver {
color: ${green};
}
#custom-start,
#custom-ctlcenter {
color: ${blue};
}
#workspaces button {
color: ${fg};
font-size: 14px;
border-radius: 100%;
padding: 0 2px;
margin: 0 3px;
}
#workspaces button:hover {
background: transparent;
#mpris {
color: ${mauve};
}
#mpris.paused {