From 0fa0d0b7a92b3bd1d95d5f52d9982a3ae90455fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 22 Jun 2025 23:56:09 -0300 Subject: [PATCH 1/4] satty: add config --- user/home.nix | 1 + user/satty/config.toml | 63 ++++++++++++++++++++++++++++++++++++++++ user/satty/default.nix | 22 ++++++++++++++ user/sway/default.nix | 1 + user/sway/sway-binds.nix | 2 +- 5 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 user/satty/config.toml create mode 100644 user/satty/default.nix diff --git a/user/home.nix b/user/home.nix index 334e260..1778052 100644 --- a/user/home.nix +++ b/user/home.nix @@ -36,6 +36,7 @@ ./pass.nix ./pqiv.nix ./zathura.nix + ./satty ./man.nix ./mpd.nix ./sway diff --git a/user/satty/config.toml b/user/satty/config.toml new file mode 100644 index 0000000..84075cb --- /dev/null +++ b/user/satty/config.toml @@ -0,0 +1,63 @@ +[general] +# Start Satty in fullscreen mode +fullscreen = true +# Exit directly after copy/save action +early-exit = true +# Draw corners of rectangles round if the value is greater than 0 (0 disables rounded corners) +corner-roundness = 12 +# Select the tool on startup [possible values: pointer, crop, line, arrow, rectangle, text, marker, blur, brush] +initial-tool = "brush" +# Configure the command to be called on copy, for example `wl-copy` +copy-command = "wl-copy" +# Increase or decrease the size of the annotations +# annotation-size-factor = 2 +# Filename to use for saving action. Omit to disable saving to file. Might contain format specifiers: https://docs.rs/chrono/latest/chrono/format/strftime/index.html +# output-filename = "/tmp/test-%Y-%m-%d_%H:%M:%S.png" +# After copying the screenshot, save it to a file as well +# save-after-copy = false +# Hide toolbars by default +# default-hide-toolbars = false +# Experimental: whether window focus shows/hides toolbars. This does not affect initial state of toolbars, see default-hide-toolbars. +# focus-toggles-toolbars = false +# The primary highlighter to use, the other is accessible by holding CTRL at the start of a highlight [possible values: block, freehand] +primary-highlighter = "block" +# Disable notifications +disable-notifications = true +# Actions to trigger on right click (order is important) +# [possible values: save-to-clipboard, save-to-file, exit] +# actions-on-right-click = [] +# Actions to trigger on Enter key (order is important) +# [possible values: save-to-clipboard, save-to-file, exit] +# actions-on-enter = ["save-to-clipboard"] +# Actions to trigger on Escape key (order is important) +# [possible values: save-to-clipboard, save-to-file, exit] +# actions-on-escape = ["exit"] +# Action to perform when the Enter key is pressed [possible values: save-to-clipboard, save-to-file] +# Deprecated: use actions-on-enter instead +action-on-enter = "save-to-clipboard" +# Right click to copy +# Deprecated: use actions-on-right-click instead +# right-click-copy = false +# request no window decoration. Please note that the compositor has the final say in this. At this point. requires xdg-decoration-unstable-v1. +# no-window-decoration = true +# experimental feature: adjust history size for brush input smooting (0: disabled, default: 0, try e.g. 5 or 10) +# brush-smooth-history-size = 10 + +# Font to use for text annotations +[font] +family = "Roboto" +style = "Bold" + +# Custom colours for the colour palette +[color-palette] +# These will be shown in the toolbar for quick selection +palette = [ + "#ff0000", + "#00ffff", + "#a52a2a", + "#dc143c", + "#ff1493", + "#ffd700", + "#008000", +] + diff --git a/user/satty/default.nix b/user/satty/default.nix new file mode 100644 index 0000000..5709b77 --- /dev/null +++ b/user/satty/default.nix @@ -0,0 +1,22 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.my.satty; +in +{ + options.my.satty.enable = lib.mkEnableOption { }; + + config = lib.mkIf cfg.enable { + xdg.configFile."satty/config.toml" = { + source = ./config.toml; + }; + + home.packages = with pkgs; [ + satty + ]; + }; +} diff --git a/user/sway/default.nix b/user/sway/default.nix index 596fdde..7a2825f 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -32,6 +32,7 @@ in my.swaylock.enable = true; my.mpd.enable = true; my.zathura.enable = true; + my.satty.enable = true; my.waybar.enable = true; my.gammastep.enable = true; diff --git a/user/sway/sway-binds.nix b/user/sway/sway-binds.nix index fd05236..ae71cf4 100644 --- a/user/sway/sway-binds.nix +++ b/user/sway/sway-binds.nix @@ -172,7 +172,7 @@ let "${mod}+Return" = "exec ${terminal}"; "${mod}+Ctrl+Return" = "exec thunar"; "${mod}+Shift+s" = '' - exec grim - | satty --filename - --fullscreen --output-filename "$(xdg-user-dir PICTURES)"/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png + exec grim - | satty --filename - --output-filename "$(xdg-user-dir PICTURES)"/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png ''; "${mod}+Ctrl+v" = "exec wl-paste | tesseract -l por - - | wl-copy"; "${mod}+k" = "exec showkeys"; From 6ff8646af3eedad9c5f41713039c371b2c724e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 22 Jun 2025 23:56:31 -0300 Subject: [PATCH 2/4] 25.05: update renamed options --- system/sound.nix | 2 +- user/gnome.nix | 2 +- user/sway/default.nix | 2 +- user/vscode/default.nix | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system/sound.nix b/system/sound.nix index f04e513..40dd701 100644 --- a/system/sound.nix +++ b/system/sound.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - hardware.pulseaudio.enable = false; + services.pulseaudio.enable = false; services.pipewire = { enable = true; wireplumber.enable = true; diff --git a/user/gnome.nix b/user/gnome.nix index 776f095..9a3562b 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -43,7 +43,7 @@ lib.mkIf (config.my.desktop == "gnome") { qt6Packages.qtstyleplugin-kvantum ]; - services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome; + services.gpg-agent.pinentry.package = pkgs.pinentry-gnome; xdg.defaultApplications = { enable = lib.mkForce false; diff --git a/user/sway/default.nix b/user/sway/default.nix index 7a2825f..5fbd379 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -124,7 +124,7 @@ in indicator = true; }; - services.gpg-agent.pinentryPackage = pkgs.pinentry-all; + services.gpg-agent.pinentry.package = pkgs.pinentry-all; xdg.configFile."OpenTabletDriver/settings.json" = { force = true; diff --git a/user/vscode/default.nix b/user/vscode/default.nix index b8afdfd..e9a97cb 100644 --- a/user/vscode/default.nix +++ b/user/vscode/default.nix @@ -4,7 +4,7 @@ programs.vscode = { enable = true; package = pkgs.vscodium; - extensions = with pkgs.vscode-extensions; [ + profiles.default.extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide github.github-vscode-theme rust-lang.rust-analyzer From 48ca243d3b230f11f3746a8024af67c2ee06a8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 22 Jun 2025 23:56:58 -0300 Subject: [PATCH 3/4] make: update to new settings format --- user/sway/mako.nix | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/user/sway/mako.nix b/user/sway/mako.nix index 28b5eb4..6c78c9f 100644 --- a/user/sway/mako.nix +++ b/user/sway/mako.nix @@ -20,21 +20,22 @@ in config = lib.mkIf cfg.enable { services.mako = { enable = true; - borderSize = 2; - padding = "5"; - margin = "15"; - layer = "overlay"; - - font = "${font.interface} ${toString font.size.small}"; - textColor = color.txt; - - backgroundColor = color.bg; - borderColor = accent.color; - progressColor = "over ${accent.color}88"; - - defaultTimeout = 10000; settings = { + border-size = 2; + padding = "5"; + margin = "15"; + layer = "overlay"; + + font = "${font.interface} ${toString font.size.small}"; + text-color = color.txt; + + background-color = color.bg; + border-color = accent.color; + progress-color = "over ${accent.color}88"; + + default-timeout = 10000; + "app-name=volumesh" = { "default-timeout" = "5000"; "group-by" = "app-name"; From dc89b61ff7ee76cd6a89abf4b4d7f05bbd385795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 22 Jun 2025 23:57:12 -0300 Subject: [PATCH 4/4] waybar: fix use of deprecated function substituteAll --- user/waybar/default.nix | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/user/waybar/default.nix b/user/waybar/default.nix index fc95ff1..5af72bc 100644 --- a/user/waybar/default.nix +++ b/user/waybar/default.nix @@ -234,23 +234,19 @@ in }; } ]; - style = builtins.readFile ( - pkgs.substituteAll { - src = ./style.css; + style = pkgs.replaceVars ./style.css { + accent_color = accent.color; - accent_color = accent.color; + color_bg = color.bg; + color_bg_dark = color.bg_dark; + color_bg_light = color.bg_light; + color_txt = color.txt; - color_bg = color.bg; - color_bg_dark = color.bg_dark; - color_bg_light = color.bg_light; - color_txt = color.txt; + font_interface = font.interface; - font_interface = font.interface; - - font_size_big = "${toString font.size.big}px"; - font_size_medium = "${toString font.size.medium}px"; - } - ); + font_size_big = "${toString font.size.big}px"; + font_size_medium = "${toString font.size.medium}px"; + }; }; home.packages = with pkgs; [ waybar ]; };