minor fixes

This commit is contained in:
David Aizenberg
2025-11-26 23:44:21 +01:00
parent 80e865f496
commit 35a0b4ef93
2 changed files with 18 additions and 9 deletions

View File

@@ -170,8 +170,8 @@ device {
$mainMod = SUPER $mainMod = SUPER
# Keyboard layout toggle # Keyboard layout toggle (us/ru)
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" bind = SUPER, SPACE, exec, hyprctl switchxkblayout all next
# Wallpapers # Wallpapers
bind = SUPER, bracketright, exec, ~/Scripts/change_wallpaper.sh next 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, 9, movetoworkspacesilent, 9
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10 bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
# Screenshot # Screenshot (selection, copies to clipboard)
bind = , Print, exec, ~/.config/hypr/scripts/screenshot.sh bind = , Print, exec, ~/.config/hypr/scripts/screenshot.sh
# Scroll through existing workspaces # Scroll through existing workspaces

View File

@@ -18,12 +18,21 @@ if [ ! -d "$save_dir" ] ; then
mkdir -p $save_dir mkdir -p $save_dir
fi fi
case $1 in case ${1:-s} in
p) grim $save_dir/$save_file ;; p) # Full screen - save and copy
s) grim -g "$(slurp)" - | satty --filename - --fullscreen --output-filename ~/Pictures/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png;; grim "$save_dir/$save_file"
*) echo "...valid options are..." wl-copy < "$save_dir/$save_file"
echo "p : print screen to $save_dir" ;;
echo "s : snip current screen to $save_dir" 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 ;; exit 1 ;;
esac esac