satty: add config

This commit is contained in:
Leonardo Eugênio 2025-06-22 23:56:09 -03:00
parent f410503e66
commit 0fa0d0b7a9
No known key found for this signature in database
GPG key ID: 2F8F21CE8721456B
5 changed files with 88 additions and 1 deletions

View file

@ -36,6 +36,7 @@
./pass.nix ./pass.nix
./pqiv.nix ./pqiv.nix
./zathura.nix ./zathura.nix
./satty
./man.nix ./man.nix
./mpd.nix ./mpd.nix
./sway ./sway

63
user/satty/config.toml Normal file
View file

@ -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",
]

22
user/satty/default.nix Normal file
View file

@ -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
];
};
}

View file

@ -32,6 +32,7 @@ in
my.swaylock.enable = true; my.swaylock.enable = true;
my.mpd.enable = true; my.mpd.enable = true;
my.zathura.enable = true; my.zathura.enable = true;
my.satty.enable = true;
my.waybar.enable = true; my.waybar.enable = true;
my.gammastep.enable = true; my.gammastep.enable = true;

View file

@ -172,7 +172,7 @@ let
"${mod}+Return" = "exec ${terminal}"; "${mod}+Return" = "exec ${terminal}";
"${mod}+Ctrl+Return" = "exec thunar"; "${mod}+Ctrl+Return" = "exec thunar";
"${mod}+Shift+s" = '' "${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}+Ctrl+v" = "exec wl-paste | tesseract -l por - - | wl-copy";
"${mod}+k" = "exec showkeys"; "${mod}+k" = "exec showkeys";