diff options
| author | ryukamish <[email protected]> | 2026-06-08 12:24:02 +0530 |
|---|---|---|
| committer | ryukamish <[email protected]> | 2026-06-08 12:24:02 +0530 |
| commit | fcd1c4bac7bc3c17124331ced6702d5bf72e71fa (patch) | |
| tree | 2b177d471fd555d8eea11319ce10490ddde41508 | |
| parent | 51183654e84b12d38cf72d8581f950269d6b47c1 (diff) | |
screenshot options added and sway launching correctly
| -rw-r--r-- | .config/sway/config | 17 | ||||
| -rwxr-xr-x | .local/bin/screenshot | 1 | ||||
| -rwxr-xr-x | .local/bin/sway-launch | 26 |
3 files changed, 42 insertions, 2 deletions
diff --git a/.config/sway/config b/.config/sway/config index c254176..28d559a 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -261,6 +261,23 @@ bindsym $mod+Shift+v exec cliphist list \ | $dmenu -l 10 \ | cliphist delete +# === Screenshot === + +# Screenshot whole screen +bindsym Print exec --no-startup-id ~/.local/bin/screenshot + +# Screenshot region of screen +bindsym Shift+Print exec --no-startup-id ~/.local/bin/screenshot region + +# Screenshot current window +bindsym Ctrl+Print exec --no-startup-id ~/.local/bin/screenshot window + +# Parse text on screen and copy to clipboard +bindsym $mod+Print exec --no-startup-id slurp \ + | xargs -I {} grim -s 2 -t png -g {} - \ + | tesseract - - \ + | wl-copy -n + # === Windows === floating_modifier $mod normal diff --git a/.local/bin/screenshot b/.local/bin/screenshot index 7328c10..b7ab422 100755 --- a/.local/bin/screenshot +++ b/.local/bin/screenshot @@ -20,6 +20,7 @@ case "$1" in ;; *) grim -t png $HOME/pictures/Screenshots/$(date +$filename) + sleep 1 && notify-send "SCREENSHOT" "Screenshot saved to $XDG_PICTURES_DIR/Screenshots" ;; esac diff --git a/.local/bin/sway-launch b/.local/bin/sway-launch index ed1e71f..66efd16 100755 --- a/.local/bin/sway-launch +++ b/.local/bin/sway-launch @@ -15,6 +15,8 @@ export XDG_PUBLICSHARE_DIR="${HOME}/public" export XDG_MUSIC_DIR="${HOME}/music" export XDG_VIDEOS_DIR="${HOME}/videos" +export XDG_CURRENT_DESKTOP=sway + export EDITOR="nvim" export PATH="${PATH}:${HOME}/.local/bin" @@ -25,7 +27,27 @@ export TZ=Asia/Kolkata # Qt apps export QT_QPA_PLATFORM="wayland-egl" -export QT_QPA_PLATFORMTHEME="qt5ct" +export QT_QPA_PLATFORMTHEME="qt6ct" + +# https://github.com/Cloudef/bemenu +export DMENU_PROGRAM="bemenu" +export BEMENU_COLOR_BORDER="$(rg -Nr '$1' '^ *\$fcdBg (#.*)' \ + $HOME/.config/sway/config)" +export BEMENU_COLOR_SCROLL="$(rg -Nr '$1' '^ *\$fcdInd (#.*)' \ + $HOME/.config/sway/config)" +export BEMENU_OPTS="-n -c -s -i \ + -W 0.3 -H 26 -B 2 -l 10 \ + -p '▲' -P '' --ch 16 --scrollbar always \ + --fn 'Berkeley Mono 11' \ + --nb #040606cc --nf #FFFFFF \ + --ab #040606cc --af #FFFFFF \ + --hb $BEMENU_COLOR_BORDER --hf #FFFFFF \ + --sb $BEMENU_COLOR_BORDER --sf #FFFFFF \ + --fb #040606cc --ff #FFFFFF \ + --fbb #040606cc --fbf #FFFFFF \ + --tb #040606cc --tf #FFFFFF \ + --scb #040606ff --scf $BEMENU_COLOR_SCROLL \ + --bdr $BEMENU_COLOR_BORDER" # Launch sway -exec dbus-launch --exit-with-session sway +exec sway |
