diff --git a/configs/kde-shortcuts/files/.local/bin/fiw-shot b/configs/kde-shortcuts/files/.local/bin/fiw-shot index 247a153..2af68ab 100755 --- a/configs/kde-shortcuts/files/.local/bin/fiw-shot +++ b/configs/kde-shortcuts/files/.local/bin/fiw-shot @@ -1,10 +1,12 @@ #!/usr/bin/env bash -# fiw-shot: Spectacle in background mode (never opens the app window). -# The shot goes straight to the clipboard, then a notification shows the -# thumbnail (drag it into any app) with Save / Edit buttons. +# fiw-shot: screenshot straight to the clipboard, then a notification with +# Save (and Edit under KWin). Never opens a picker window of its own. # -# fiw-shot region Alt+S select area (adjust with handles, Enter = take) -# fiw-shot screen Alt+D monitor under the cursor +# fiw-shot region Alt+S select area (Enter = take) +# fiw-shot screen Alt+D full screen of the focused window's monitor +# +# KDE/KWin uses Spectacle (its region UI is KWin-only). Every other Wayland +# session, TideWM included, uses grim + slurp. set -u mode=${1:-region} @@ -12,11 +14,26 @@ tmp_dir="${XDG_RUNTIME_DIR:-/tmp}/fiw-shot" # tmpfs, gone at logout save_dir="$HOME/Pictures/Screenshots" case $mode in - region) flag=-r ;; - screen) flag=-m ;; + region|screen) ;; *) echo "usage: fiw-shot region|screen" >&2; exit 2 ;; esac +case ${XDG_CURRENT_DESKTOP:-} in + *KDE*|*Plasma*) backend=spectacle ;; + *) backend=grim ;; +esac + +if [[ $backend == grim ]]; then + need="grim wl-copy" + [[ $mode == region ]] && need="grim slurp wl-copy" + for bin in $need; do + command -v "$bin" >/dev/null 2>&1 || { + echo "fiw-shot: $bin is missing (emerge gui-apps/slurp)" >&2 + exit 1 + } + done +fi + mkdir -p "$tmp_dir" # keep the last 20 unsaved shots, drop older ones ls -1t "$tmp_dir"/*.png 2>/dev/null | tail -n +21 | xargs -r rm -f -- @@ -24,15 +41,41 @@ ls -1t "$tmp_dir"/*.png 2>/dev/null | tail -n +21 | xargs -r rm -f -- name="Screenshot_$(date +%Y%m%d_%H%M%S).png" shot="$tmp_dir/$name" -spectacle --background --nonotify $flag --output "$shot" 2>/dev/null +if [[ $backend == spectacle ]]; then + [[ $mode == region ]] && flag=-r || flag=-m + spectacle --background --nonotify "$flag" --output "$shot" 2>/dev/null +else + if [[ $mode == region ]]; then + geometry=$(slurp) || exit 0 + [[ -n $geometry ]] || exit 0 + grim -g "$geometry" "$shot" + else + # Monitor of the focused window; whole layout if nothing is focused. + output=$(tidectl focused-window 2>/dev/null | + sed -n 's/.*output=\([^ ]*\).*/\1/p' | head -n1) + if [[ -n ${output:-} ]]; then + grim -o "$output" "$shot" + else + grim "$shot" + fi + fi +fi + [[ -s $shot ]] || exit 0 # Esc during selection: nothing to do wl-copy --type image/png < "$shot" -action=$(notify-send --app-name=Screenshot --icon="$shot" \ - --hint="variant:x-kde-urls:@as ['file://$shot']" \ - --action=save=Save --action=edit=Edit \ - "Copied to clipboard" "$name") +if [[ $backend == spectacle ]]; then + action=$(notify-send --app-name=Screenshot --icon="$shot" \ + --hint="variant:x-kde-urls:@as ['file://$shot']" \ + --action=save=Save --action=edit=Edit \ + "Copied to clipboard" "$name") +else + action=$(notify-send --app-name=Screenshot --icon="$shot" \ + --hint="variant:x-kde-urls:@as ['file://$shot']" \ + --action=save=Save \ + "Copied to clipboard" "$name") +fi case $action in save) diff --git a/configs/kde-shortcuts/kconfig/.config/kglobalshortcutsrc b/configs/kde-shortcuts/kconfig/.config/kglobalshortcutsrc index 6c24b53..6ad7266 100644 --- a/configs/kde-shortcuts/kconfig/.config/kglobalshortcutsrc +++ b/configs/kde-shortcuts/kconfig/.config/kglobalshortcutsrc @@ -66,6 +66,7 @@ MoveZoomUp=none,none,Move Zoomed Area Upwards Overview=Meta+W,Meta+W,Toggle Overview Setup Window Shortcut=none,none,Setup Window Shortcut Show Desktop=none,Meta+D,Peek at Desktop +Suspend Compositing=Alt+Shift+F12,Alt+Shift+F12,Suspend Compositing Switch One Desktop Down=Meta+Ctrl+Down,Meta+Ctrl+Down,Switch One Desktop Down Switch One Desktop Up=Meta+Ctrl+Up,Meta+Ctrl+Up,Switch One Desktop Up Switch One Desktop to the Left=Meta+Ctrl+Left,Meta+Ctrl+Left,Switch One Desktop to the Left @@ -168,6 +169,7 @@ Window Quick Tile Top Right=none,none,Quick Tile Window to the Top Right Window Raise=none,none,Raise Window Window Resize=none,none,Resize Window Window Restore=none,Meta+Backspace,Restore Window +Window Shade=none,none,Shade Window Window Shrink Horizontal=none,none,Shrink Window Horizontally Window Shrink Vertical=none,none,Shrink Window Vertically Window to Desktop 1=Meta+!,none,Window to Desktop 1 diff --git a/configs/kitty/files/.config/kitty/kitty-common.conf b/configs/kitty/files/.config/kitty/kitty-common.conf index 9135e22..16b01ff 100644 --- a/configs/kitty/files/.config/kitty/kitty-common.conf +++ b/configs/kitty/files/.config/kitty/kitty-common.conf @@ -5,7 +5,6 @@ italic_font auto bold_italic_font auto font_size 11.0 -shell fish linux_display_server auto background_blur 32 dynamic_background_opacity yes @@ -38,3 +37,5 @@ color12 #B9AEE6 color13 #DDDAEC color14 #B2B2CB color15 #F7F1F6 + +shell fish diff --git a/configs/prism/kconfig/.local/share/PrismLauncher/prismlauncher.cfg b/configs/prism/kconfig/.local/share/PrismLauncher/prismlauncher.cfg index 400581f..35e1a09 100644 --- a/configs/prism/kconfig/.local/share/PrismLauncher/prismlauncher.cfg +++ b/configs/prism/kconfig/.local/share/PrismLauncher/prismlauncher.cfg @@ -11,7 +11,7 @@ MenuBarInsteadOfToolBar=false QuitAfterGameStop=false RecordGameTime=true ShowConsole=false -ShowConsoleOnError=true +ShowConsoleOnError=false ShowGameTime=true ShowGameTimeWithoutDays=false ShowGlobalGameTime=true diff --git a/configs/vesktop/json/.config/vesktop/settings/settings.json b/configs/vesktop/json/.config/vesktop/settings/settings.json index d5bc201..60860de 100644 --- a/configs/vesktop/json/.config/vesktop/settings/settings.json +++ b/configs/vesktop/json/.config/vesktop/settings/settings.json @@ -447,9 +447,6 @@ "SuperReactionTweaks": { "enabled": false }, - "TenorGifSearch": { - "enabled": false - }, "TextReplace": { "enabled": false }, @@ -566,6 +563,9 @@ }, "FixDiscordCss": { "enabled": true + }, + "GifProviderSwitcher": { + "enabled": false } } } diff --git a/docs/shortcuts.md b/docs/shortcuts.md index 11a02d5..26a54ef 100644 --- a/docs/shortcuts.md +++ b/docs/shortcuts.md @@ -4,7 +4,7 @@ Generated from the repo’s captured `kglobalshortcutsrc`. This describes Fiw’s bindings as configured; applying them is a separate installer action. It covers KDE global shortcuts, not every shortcut inside individual applications. -**67 assigned actions · 193 unassigned actions · 260 total** +**68 assigned actions · 194 unassigned actions · 262 total** `Meta` is the Super/Windows key. In the full tables, multiple keys for one action are alternatives. Grouped summary keys match the named actions @@ -105,6 +105,7 @@ Bindings for desktops 1–3 are retained exactly as configured. | Toggle Grid View | Meta+G | Meta+G | | Kill Window | Meta+Ctrl+Esc | Meta+Ctrl+Esc | | Toggle Overview | Meta+W | Meta+W | +| Suspend Compositing | Alt+Shift+F12 | Alt+Shift+F12 | | Switch One Desktop Down | Meta+Ctrl+Down | Meta+Ctrl+Down | | Switch One Desktop Up | Meta+Ctrl+Up | Meta+Ctrl+Up | | Switch One Desktop to the Left | Meta+Ctrl+Left | Meta+Ctrl+Left | @@ -242,7 +243,7 @@ stored KDE default. Expand each section to review the full capture.
-KWin (138) +KWin (139) | Action | Stored KDE default | |---|---| @@ -349,6 +350,7 @@ stored KDE default. Expand each section to review the full capture. | Raise Window | Unassigned | | Resize Window | Unassigned | | Restore Window | Meta+Backspace | +| Shade Window | Unassigned | | Shrink Window Horizontally | Unassigned | | Shrink Window Vertically | Unassigned | | Window to Desktop 10 | Unassigned |