diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-29 09:55:45 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-29 09:55:45 +0200 |
| commit | 1e4d2b4be7ad20dd108503fb65c264673ca6457b (patch) | |
| tree | 8d76604d4bdebe5fa4b4e60be2447df61475789f /bin/qar-scrotmenu.sh | |
| parent | a06d8f948c4d5a60bff992c3d6f26b5fb54f80cb (diff) | |
| download | unified-desktop-theme-1e4d2b4be7ad20dd108503fb65c264673ca6457b.tar.gz unified-desktop-theme-1e4d2b4be7ad20dd108503fb65c264673ca6457b.zip | |
feat(install): track rofi scripts, wire nvim and hypr-theme, merge qt/gtk keys
The rofi menus' launch scripts lived loose in ~/bin, so the themes were
tracked and the only things that open them were not. They now live in bin/
and are symlinked under the names hypr-theme's keybindings call.
neovim gets a generated colorscheme: catppuccin/nvim with all 26 palette
colours overridden from the active scheme, selected by rewriting only the
colorscheme line of init.vim. hypr-theme is linked as the whole of
~/.config/hypr, leaving a real directory there alone.
The qt-gtk templates were reference copies nothing installed. They now hold
theme keys only and ini_merge writes them into the live qt5ct, qt6ct and
gtk3 files key by key, keeping every other line; tests/ini-merge.sh checks
it. The stale kvantum.kvconfig template is gone, install.sh writes that file.
Fresh-machine fixes: settings.ini and ~/.config/gtk-4.0 are created when
missing instead of aborting under set -e, and conky is found as a sibling
checkout and skipped when absent, in udt-palette as well as install.sh.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'bin/qar-scrotmenu.sh')
| -rwxr-xr-x | bin/qar-scrotmenu.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/bin/qar-scrotmenu.sh b/bin/qar-scrotmenu.sh new file mode 100755 index 0000000..b60cbc8 --- /dev/null +++ b/bin/qar-scrotmenu.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Screenshot menu, rofi themed by udt. +# Copyright (C) 2026 Danilo M. <danix@danix.xyz> +# Licensed under the GNU General Public License v2 only. + +# Glyph size follows the monitor rofi opens on (the focused one), in points, +# since rofi cannot size a font by percentage. Each cell gets half the width, +# so a quarter of the smaller of half-width and height fits both a wide and a +# rotated portrait monitor. Odd transforms are 90/270 degree rotations, which +# swap the reported width and height. +size=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .scale as $s + | (if .transform % 2 == 1 then [.height, .width] else [.width, .height] end) + | [.[0] / 2, .[1]] | min / $s / 4 | floor' 2>/dev/null) +size=${size:-135} +rofi_command=(rofi -theme ~/.config/rofi/udt/screenshot.rasi + -theme-str "element-text { font: \"Inconsolata Nerd Font Mono $size\"; }") + +### Options ### +screen="" +area="" +# Variable passed to rofi +options="$screen\n$area" + +chosen="$(echo -e "$options" | "${rofi_command[@]}" -dmenu -selected-row 1)" +case $chosen in + $screen) + grimblast -w 3 -n -t png copysave active + ;; + $area) + grimblast -n -t png copysave area + ;; +esac |
