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
# 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

View File

@@ -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