From 35a0b4ef9373bee28dde1433bb64855e4ab17004 Mon Sep 17 00:00:00 2001 From: David Aizenberg Date: Wed, 26 Nov 2025 23:44:21 +0100 Subject: [PATCH] minor fixes --- .../hypr/hyprland.conf.tmpl | 6 +++--- .../hypr/scripts/executable_screenshot.sh | 21 +++++++++++++------ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/home/private_dot_config/hypr/hyprland.conf.tmpl b/home/private_dot_config/hypr/hyprland.conf.tmpl index c9eb76b..e827154 100644 --- a/home/private_dot_config/hypr/hyprland.conf.tmpl +++ b/home/private_dot_config/hypr/hyprland.conf.tmpl @@ -170,8 +170,8 @@ device { $mainMod = SUPER -# Keyboard layout toggle -bind = SUPER, SPACE, exec, bash -c "current=$(hyprctl getoption input:kb_layout -j | jq -r '.str'); if [[ $current == \"us,ru\" ]]; then hyprctl keyword input:kb_layout 'ru,us'; else hyprctl keyword input:kb_layout 'us,ru'; fi" +# Keyboard layout toggle (us/ru) +bind = SUPER, SPACE, exec, hyprctl switchxkblayout all next # Wallpapers bind = SUPER, bracketright, exec, ~/Scripts/change_wallpaper.sh next @@ -236,7 +236,7 @@ bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8 bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9 bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10 -# Screenshot +# Screenshot (selection, copies to clipboard) bind = , Print, exec, ~/.config/hypr/scripts/screenshot.sh # Scroll through existing workspaces diff --git a/home/private_dot_config/hypr/scripts/executable_screenshot.sh b/home/private_dot_config/hypr/scripts/executable_screenshot.sh index 785f779..2db1728 100644 --- a/home/private_dot_config/hypr/scripts/executable_screenshot.sh +++ b/home/private_dot_config/hypr/scripts/executable_screenshot.sh @@ -18,12 +18,21 @@ if [ ! -d "$save_dir" ] ; then mkdir -p $save_dir fi -case $1 in -p) grim $save_dir/$save_file ;; -s) grim -g "$(slurp)" - | satty --filename - --fullscreen --output-filename ~/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png;; -*) echo "...valid options are..." - echo "p : print screen to $save_dir" - echo "s : snip current screen to $save_dir" +case ${1:-s} in +p) # Full screen - save and copy + grim "$save_dir/$save_file" + wl-copy < "$save_dir/$save_file" + ;; +s) # Selection - save and copy + grim -g "$(slurp)" "$save_dir/$save_file" && wl-copy < "$save_dir/$save_file" + ;; +e) # Selection with editor (satty) + grim -g "$(slurp)" - | satty --filename - --fullscreen --output-filename "$save_dir/satty-$(date '+%Y%m%d-%H%M%S').png" + ;; +*) echo "Usage: $0 [p|s|e]" + echo " p - full screen" + echo " s - selection (default)" + echo " e - selection with editor" exit 1 ;; esac