summary refs log tree commit diff stats
path: root/bin
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-01 08:22:14 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-07-01 08:22:14 +0200
commitd7693f1e7532b584eb5e4c13b0adac177e8d5153 (patch)
treefd1e40d3d039b7c5a40a90811921c473d89f1533 /bin
parent6ad0c78b1b958e3e5a1971b0c5f0f23be87a4f16 (diff)
downloaddotfiles-d7693f1e7532b584eb5e4c13b0adac177e8d5153.tar.gz
dotfiles-d7693f1e7532b584eb5e4c13b0adac177e8d5153.zip
nvim fix and lazy update, edit screenshot script
Diffstat (limited to 'bin')
-rwxr-xr-xbin/screenshot5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/screenshot b/bin/screenshot
index c641d55..bc7bd6e 100755
--- a/bin/screenshot
+++ b/bin/screenshot
@@ -4,6 +4,7 @@
 # Takes a screenshot with grimshot, in clipboard or in given directory
 #
 
+DIR="$HOME/downloads/screenshots"
 MODE=$(printf "save\ncopy" | dmenu)
 
 # If dmenu was cancelled, exit program
@@ -11,9 +12,11 @@ if [ $? -ne 0 ]; then
     exit 1
 fi
 
+mkdir -p $DIR
+
 case "$MODE" in 
   *save*)
-    cd $HOME/downloads/screenshots
+    cd $DIR
     timestamp=$(date +"%Y-%m-%d_%H-%M-%S")
     /usr/share/sway-contrib/grimshot save area "$timestamp.png"
     ;;