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] 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";