Skip to content

Commit

Permalink
feat: satty - screenshot util
Browse files Browse the repository at this point in the history
  • Loading branch information
scottames committed Nov 17, 2024
1 parent 4b8ff66 commit a2a1cd6
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 19 deletions.
41 changes: 24 additions & 17 deletions aqua/aqua-registry.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
---
packages:
# cod https://github.com/dim-an/cod
- type: github_release
repo_owner: dim-an
repo_name: cod
asset: cod-{{.OS}}-{{.Arch}}.tgz
description: cod is a completion daemon for bash/fish/zsh
checksum:
enabled: false
- type: github_release
repo_owner: alajmo
repo_name: mani
asset: mani_{{trimV .Version}}_{{.OS}}_{{.Arch}}.tar.gz
description: 🤖 CLI tool to help you manage repositories
# errcheck https://github.com/kisielk/errcheck
- type: go_install
repo_owner: iwittkau
repo_name: mage-select
description: CLI frontend for mage based on promptui
- type: github_release
repo_owner: dkaslovsky
repo_name: nav
asset: nav_{{.OS}}_{{.Arch}}
description: Terminal navigator for interactive ls workflows
repo_owner: kisielk
repo_name: errcheck
description: errcheck checks that you checked errors.
# immich-go https://github.com/simulot/immich-go
- type: github_release
repo_owner: simulot
repo_name: immich-go
Expand All @@ -31,10 +24,7 @@ packages:
An alternative to the immich-CLI command that doesn't depend on nodejs
installation. It tries its best for importing google photos takeout
archives.
- type: go_install
repo_owner: kisielk
repo_name: errcheck
description: errcheck checks that you checked errors.
# gt https://graphite.dev
- type: http
repo_owner: withgraphite
repo_name: gt
Expand All @@ -47,3 +37,20 @@ packages:
- darwin
- linux
description: graphite.dev
# mani https://github.com/alajmo/mani
- type: github_release
repo_owner: alajmo
repo_name: mani
asset: mani_{{trimV .Version}}_{{.OS}}_{{.Arch}}.tar.gz
description: 🤖 CLI tool to help you manage repositories
# mage-select https://github.com/iwittkau/mage-select
- type: go_install
repo_owner: iwittkau
repo_name: mage-select
description: CLI frontend for mage based on promptui
# nav https://github.com/dkaslovsky/nav
- type: github_release
repo_owner: dkaslovsky
repo_name: nav
asset: nav_{{.OS}}_{{.Arch}}
description: Terminal navigator for interactive ls workflows
1 change: 0 additions & 1 deletion aqua/aqua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ packages:
registry: dots
- name: simulot/[email protected]
registry: dots
# renovate: datasource=npm depName=@trunkio/launcher
- name: trunk-io/[email protected]
- name: lsd-rs/[email protected]
- name: PaulJuliusMartinez/[email protected]
Expand Down
17 changes: 17 additions & 0 deletions home/.chezmoiexternal.toml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@
path = "keymapp"
refreshPeriod = "168h"

# renovate: datasource=github-releases depName=gabm/Satty
{{ $sattyVersion := "v0.14.0" -}}

[".local/bin/satty"]
type = "archive-file"
url = "https://github.com/gabm/Satty/releases/download/{{ $sattyVersion }}/satty-x86_64-unknown-linux-gnu.tar.gz"
path = "satty"
stripComponents = 1
refreshPeriod = "168h"

[".config/fish/completions/satty.fish"]
type = "archive-file"
url = "https://github.com/gabm/Satty/releases/download/{{ $sattyVersion }}/satty-x86_64-unknown-linux-gnu.tar.gz"
path = "completions/satty.fish"
stripComponents = 1
refreshPeriod = "168h"

[".local/share/yubico-authenticator"]
type = "archive"
url = "https://developers.yubico.com/yubioath-flutter/Releases/yubico-authenticator-latest-linux.tar.gz"
Expand Down
4 changes: 3 additions & 1 deletion home/private_dot_config/niri/config.kdl.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ binds {
Mod+Shift+Space { spawn "rofi" "-show" "drun"; }
Mod+Ctrl+Space { spawn "rofi" "-show" "window"; }
Super+Alt+L { spawn "hyprlock"; }
// FIXME: launch default terminal w/ yari
Super+Alt+Y { spawn "/var/home/scta/.local/share/aquaproj-aqua/bin/bin/yari"; }

// You can also use a shell. Do this if you need pipes, multiple commands, etc.
Expand Down Expand Up @@ -464,9 +465,10 @@ binds {
Mod+Shift+C { spawn "sh" "-c" "env DISPLAY=:0 xsel -ob | wl-copy"; }
Mod+Shift+V { spawn "sh" "-c" "wl-paste -n | env DISPLAY=:0 xsel -ib"; }

Print { screenshot; }
Super+Print { spawn "sh" "-c" "grim -t png - | satty --fullscreen --filename -"; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
Print { screenshot; }

// The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
Expand Down
33 changes: 33 additions & 0 deletions home/private_dot_config/satty/config.toml.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[general]
annotation-size-factor = 1
copy-command = "wl-copy"
default-hide-toolbars = false
disable-notifications = false
# Exit directly after copy/save action
early-exit = true
fullscreen = false
# Select the tool on startup
# possible values:
# pointer, crop, line, arrow, rectangle, text, marker, blur, brush
initial-tool = "crop"
# 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 = "{{ .chezmoi.homeDir }}/Pictures/Screenshots/satty-%Y-%m-%d_%H:%M:%S.png"
save-after-copy = false
primary-highlighter = "block"

# Font to use for text annotations
[font]
family = "Roboto"
style = "Bold"

# custom colours for the colour palette
[color-palette]
first = "#00ffff"
second = "#a52a2a"
third = "#dc143c"
fourth = "#ff1493"
fifth = "#ffd700"
custom = "#008000"

0 comments on commit a2a1cd6

Please sign in to comment.