From 030e4595401765032e04ebd93e66793052f112fa Mon Sep 17 00:00:00 2001 From: Till Date: Mon, 23 Mar 2026 01:12:56 +0100 Subject: [PATCH] changes --- home/desktop-slim.nix | 1 + home/dotfiles/foot/foot.ini | 39 +++++ home/dotfiles/polybar/config.ini | 186 ++++++++++++++++++++++++ home/dotfiles/waybar/config.jsonc | 219 +++++++++++++++++++++++++++++ home/modules/foot.nix | 54 +------ home/modules/mail/config.neomuttrc | 4 +- home/modules/niri.nix | 15 +- home/modules/nvim/default.nix | 17 ++- system/desktop/niri.nix | 2 + 9 files changed, 467 insertions(+), 70 deletions(-) create mode 100644 home/dotfiles/foot/foot.ini create mode 100644 home/dotfiles/polybar/config.ini create mode 100644 home/dotfiles/waybar/config.jsonc diff --git a/home/desktop-slim.nix b/home/desktop-slim.nix index 0ddcb83..1382321 100644 --- a/home/desktop-slim.nix +++ b/home/desktop-slim.nix @@ -7,6 +7,7 @@ ./modules/devel.nix ./modules/firefox.nix ./modules/fonts.nix + ./modules/foot.nix ./modules/gpg.nix ./modules/media.nix ./modules/niri.nix diff --git a/home/dotfiles/foot/foot.ini b/home/dotfiles/foot/foot.ini new file mode 100644 index 0000000..3524125 --- /dev/null +++ b/home/dotfiles/foot/foot.ini @@ -0,0 +1,39 @@ +[colors-light] +alpha=1.0 +background=eeeeee +bright0=585858 +bright1=d70000 +bright2=5faf5f +bright3=ffaf00 +bright4=0087af +bright5=ff5faf +bright6=00afaf +bright7=bcbcbc +cursor=eeeeee 1c1c1c +foreground=1c1c1c +regular0=1c1c1c +regular1=af0000 +regular2=008700 +regular3=d75f00 +regular4=005faf +regular5=d70087 +regular6=005f87 +regular7=ffffff + +[csd] +size=0 + +[cursor] +blink=true +style=beam + +[key-bindings] +show-urls-copy=Control+Shift+y +show-urls-launch=Control+Shift+g + +[main] +font=JetBrains Mono:size=12 +pad=15x15 + +[mouse] +hide-when-typing=yes diff --git a/home/dotfiles/polybar/config.ini b/home/dotfiles/polybar/config.ini new file mode 100644 index 0000000..0c89cda --- /dev/null +++ b/home/dotfiles/polybar/config.ini @@ -0,0 +1,186 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/polybar/polybar +; +; The README contains a lot of information +; +;========================================================== + +[colors] +background = #282A2E +background-alt = #373B41 +foreground = #C5C8C6 +primary = #F0C674 +secondary = #8ABEB7 +alert = #A54242 +disabled = #707880 + +[bar/example] +width = 100% +height = 35pt +radius = 0 + +offset-x = 0 + +; dpi = 96 + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3pt + +border-size = 4pt +border-color = #00000000 + +padding-left = 0 +padding-right = 1 + +module-margin = 1 + +separator = | +separator-foreground = ${colors.disabled} + +font-0 = monospace;2 + +modules-left = xworkspaces xwindow +modules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth date + +cursor-click = pointer +cursor-scroll = ns-resize + +enable-ipc = true + +; wm-restack = generic +; wm-restack = bspwm +; wm-restack = i3 + +override-redirect = false + +; This module is not active by default (to enable it, add it to one of the +; modules-* list above). +; Please note that only a single tray can exist at any time. If you launch +; multiple bars with this module, only a single one will show it, the others +; will produce a warning. Which bar gets the module is timing dependent and can +; be quite random. +; For more information, see the documentation page for this module: +; https://polybar.readthedocs.io/en/stable/user/modules/tray.html +[module/systray] +type = internal/tray + +format-margin = 8pt +tray-spacing = 16pt + +[module/xworkspaces] +type = internal/xworkspaces + +label-active = %name% +label-active-background = ${colors.background-alt} +label-active-underline= ${colors.primary} +label-active-padding = 1 + +label-occupied = %name% +label-occupied-padding = 1 + +label-urgent = %name% +label-urgent-background = ${colors.alert} +label-urgent-padding = 1 + +label-empty = %name% +label-empty-foreground = ${colors.disabled} +label-empty-padding = 1 + +[module/xwindow] +type = internal/xwindow +label = %title:0:60:...% + +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / + +label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%% + +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.disabled} + +[module/pulseaudio] +type = internal/pulseaudio + +format-volume-prefix = "VOL " +format-volume-prefix-foreground = ${colors.primary} +format-volume = + +label-volume = %percentage%% + +label-muted = muted +label-muted-foreground = ${colors.disabled} + +[module/xkeyboard] +type = internal/xkeyboard +blacklist-0 = num lock + +label-layout = %layout% +label-layout-foreground = ${colors.primary} + +label-indicator-padding = 2 +label-indicator-margin = 1 +label-indicator-foreground = ${colors.background} +label-indicator-background = ${colors.secondary} + +[module/memory] +type = internal/memory +interval = 2 +format-prefix = "RAM " +format-prefix-foreground = ${colors.primary} +label = %percentage_used:2%% + +[module/cpu] +type = internal/cpu +interval = 2 +format-prefix = "CPU " +format-prefix-foreground = ${colors.primary} +label = %percentage:2%% + +[network-base] +type = internal/network +interval = 5 +format-connected = +format-disconnected = +label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected + +[module/wlan] +inherit = network-base +interface-type = wireless +label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip% + +[module/eth] +inherit = network-base +interface-type = wired +label-connected = %{F#F0C674}%ifname%%{F-} %local_ip% + +[module/date] +type = internal/date +interval = 1 + +date = %H:%M +date-alt = %Y-%m-%d %H:%M:%S + +label = %date% +label-foreground = ${colors.primary} + +[settings] +screenchange-reload = true +pseudo-transparency = true + +; vim:ft=dosini diff --git a/home/dotfiles/waybar/config.jsonc b/home/dotfiles/waybar/config.jsonc new file mode 100644 index 0000000..a330204 --- /dev/null +++ b/home/dotfiles/waybar/config.jsonc @@ -0,0 +1,219 @@ +// -*- mode: jsonc -*- +{ + // "layer": "top", // Waybar at top layer + // "position": "bottom", // Waybar position (top|bottom|left|right) + "height": 20, // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "spacing": 2, // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": [ + "sway/workspaces", + "sway/mode", + "sway/scratchpad", + "custom/media" + ], + "modules-center": [ + "sway/window" + ], + "modules-right": [ + "mpd", + "idle_inhibitor", + "pulseaudio", + "network", + "power-profiles-daemon", + "cpu", + "memory", + "temperature", + "backlight", + "keyboard-state", + "sway/language", + "battery", + "battery#bat2", + "clock", + "tray", + "custom/power" + ], + // Modules configuration + // "sway/workspaces": { + // "disable-scroll": true, + // "all-outputs": true, + // "warp-on-scroll": false, + // "format": "{name}: {icon}", + // "format-icons": { + // "1": "", + // "2": "", + // "3": "", + // "4": "", + // "5": "", + // "urgent": "", + // "focused": "", + // "default": "" + // } + // }, + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "sway/mode": { + "format": "{}" + }, + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", ""], + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + "mpd": { + "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", + "format-disconnected": "Disconnected ", + "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", + "unknown-tag": "N/A", + "interval": 5, + "consume-icons": { + "on": " " + }, + "random-icons": { + "off": " ", + "on": " " + }, + "repeat-icons": { + "on": " " + }, + "single-icons": { + "on": "1 " + }, + "state-icons": { + "paused": "", + "playing": "" + }, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10, + // "icons": { + // "blueman": "bluetooth", + // "TelegramDesktop": "$HOME/.local/share/icons/hicolor/16x16/apps/telegram.png" + // } + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + "cpu": { + "format": "{usage}% ", + "tooltip": false + }, + "memory": { + "format": "{}% " + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["󰉬", "", "󰉪"] + }, + "backlight": { + // "device": "acpi_video1", + "format": "{percent}% {icon}", + "format-icons": ["", "", "", "", "", "", "", "", ""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-full": "{capacity}% {icon}", + "format-charging": "{capacity}% 󰃨", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "battery#bat2": { + "bat": "BAT2" + }, + "power-profiles-daemon": { + "format": "{icon}", + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", + "tooltip": true, + "format-icons": { + "default": "", + "performance": "", + "balanced": "", + "power-saver": "" + } + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} 󰊗", + "tooltip-format": "{ifname} via {gwaddr} 󰊗", + "format-linked": "{ifname} (No IP) 󰊗", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": "󰅶 {icon} {format_source}", + "format-muted": "󰅶 {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "󰂑", + "headset": "󰂑", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + }, + "custom/media": { + "format": "{icon} {text}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "", + "default": "🎜" + }, + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + }, + "custom/power": { + "format" : "⏻ ", + "tooltip": false, + "menu": "on-click", + "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder + "menu-actions": { + "shutdown": "shutdown", + "reboot": "reboot", + "suspend": "systemctl suspend", + "hibernate": "systemctl hibernate" + } + } +} diff --git a/home/modules/foot.nix b/home/modules/foot.nix index 10dc8aa..4e54a1f 100644 --- a/home/modules/foot.nix +++ b/home/modules/foot.nix @@ -1,58 +1,8 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { programs.foot = { enable = true; - settings = { - - main = { - shell = "${pkgs.fish}/bin/fish -c 'tmux attach'"; - pad = "34x34"; - font = "JetBrains Mono:size=14"; - # font = "Adwaita Mono:size=17"; - # font-bold = "Adwaita Mono:size=17:weight=bold"; - # font-italic = "Adwaita Mono:size=17:slant=italic"; - # font-bold-italic = "Adwaita Mono:size=17:weight=boldslant=italic"; - # initial-window-mode = "maximized"; - # initial-color-theme = "dark"; - }; - - mouse.hide-when-typing = "yes"; - cursor = { - style = "beam"; - blink = true; - }; - - csd.size = "0"; - - colors = { - cursor = "eeeeee 1c1c1c"; - alpha = "1.0"; - background = "eeeeee"; - foreground = "1c1c1c"; - regular0 = "1c1c1c"; # black - bright0 = "585858"; # bright black - regular1 = "af0000"; # red - bright1 = "d70000"; # bright red - regular2 = "008700"; # green - bright2 = "5faf5f"; # bright green - regular3 = "d75f00"; # yellow - bright3 = "ffaf00"; # bright yellow - regular4 = "005faf"; # blue - bright4 = "0087af"; # bright blue - regular5 = "d70087"; # magenta - bright5 = "ff5faf"; # bright magenta - regular6 = "005f87"; # cyan - bright6 = "00afaf"; # bright cyan - regular7 = "ffffff"; # white - bright7 = "bcbcbc"; # bright white - }; - - key-bindings = { - show-urls-launch = "Control+Shift+g"; - show-urls-copy = "Control+Shift+y"; - }; - - }; }; + xdg.configFile."foot/foot.ini".source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/home/dotfiles/foot/foot.ini"; } diff --git a/home/modules/mail/config.neomuttrc b/home/modules/mail/config.neomuttrc index da13972..392c634 100644 --- a/home/modules/mail/config.neomuttrc +++ b/home/modules/mail/config.neomuttrc @@ -42,10 +42,10 @@ set attach_save_dir = $my_download_folder # Colors -color indicator brightwhite brightblack +color indicator white brightblack color index_flags brightmagenta default '.*' color index_date cyan default -color index brightblack default '~N' +color index brightgreen default '~N' color header brightblack default ".*" color header brightgreen default "^(Subject)" color header yellow default "^(From|To|CC|BCC)" diff --git a/home/modules/niri.nix b/home/modules/niri.nix index e29b384..9cc652e 100644 --- a/home/modules/niri.nix +++ b/home/modules/niri.nix @@ -1,14 +1,15 @@ -{ ... }: +{ pkgs, config, ... }: { - programs.alacritty.enable = true; # Super+T in the default setting (terminal) - programs.fuzzel.enable = true; # Super+D in the default setting (app launcher) - programs.swaylock.enable = true; # Super+Alt+L in the default setting (screen locker) - programs.waybar.enable = true; # launch on startup in the default setting (bar) - services.mako.enable = true; # notification daemon services.swayidle.enable = true; # idle management daemon services.polkit-gnome.enable = true; # polkit + home.packages = with pkgs; [ - swaybg # wallpaper + wl-mirror + xwayland-satellite ]; + + programs.ghostty.enable = true; + + # xdg.configFile."polybar/config.ini".source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/home/dotfiles/polybar/config.ini"; } diff --git a/home/modules/nvim/default.nix b/home/modules/nvim/default.nix index 1847781..cdb8211 100644 --- a/home/modules/nvim/default.nix +++ b/home/modules/nvim/default.nix @@ -31,7 +31,7 @@ cmp-path { - plugin = fugitive; + plugin = vim-fugitive; type = "lua"; config = '' vim.api.nvim_set_keymap("n", "g", ":Git", { noremap = true, silent = true }) @@ -68,7 +68,7 @@ } { - plugin = goyo; + plugin = goyo-vim; config = '' nnoremap yog :Goyo nnoremap [og :Goyo 80 @@ -135,13 +135,12 @@ ''; } - { - plugin = papercolor-theme; - config = '' - set background=light - colorscheme PaperColor - ''; - } + # { + # plugin = papercolor-theme; + # config = '' + # colorscheme PaperColor + # ''; + # } quarto-nvim typescript-vim diff --git a/system/desktop/niri.nix b/system/desktop/niri.nix index d55d052..025a474 100644 --- a/system/desktop/niri.nix +++ b/system/desktop/niri.nix @@ -3,6 +3,8 @@ { programs.niri.enable = true; + programs.dms-shell.enable = true; + services.gnome.gnome-keyring.enable = lib.mkForce false; programs.firefox.preferences = {