- commit
- b09372a
- parent
- 9d84096
- author
- xxwhirlpool
- date
- 2025-12-18 17:09:06 -0500 EST
split crontabs, consolidate screenshot scripts
7 files changed,
+24,
-69
+3,
-0
1@@ -0,0 +1,3 @@
2+0 */3 * * * vdirsyncer sync
3+
4+0 0 * * * crontab -l > /home/kat/dotfiles/config/.crontab-laptop
+3,
-0
1@@ -0,0 +1,3 @@
2+0 */3 * * * vdirsyncer sync
3+
4+0 0 * * * crontab -l > /home/kat/dotfiles/config/.crontab-pc
+9,
-1
1@@ -5,7 +5,15 @@
2 # https://github.com/BreadOnPenguins/scripts/blob/master/screenshot_extra_features
3
4 export DISPLAY=:0
5-SHOTPATH="/media/kat/disk/Pictures/Screenshots"
6+
7+if [[ $(hostname) == "mariposa" ]]; then
8+ SHOTPATH="/home/kat/Pictures/Screenshots"
9+elif [[ $(hostname) == "kwangya" ]]; then
10+ SHOTPATH="/media/kat/disk/Pictures/Screenshots"
11+else
12+ echo "fuck"
13+fi
14+
15 COUNT=$(find $SHOTPATH -type f -printf x | wc -c | awk '{print $1+2}' | awk '{printf "%04d\n", $0}')
16 FILE="$SHOTPATH/$COUNT.png"
17
+0,
-18
1@@ -1,18 +0,0 @@
2-#!/usr/bin/env bash
3-#
4-# modified from this GH script:
5-#
6-# https://github.com/BreadOnPenguins/scripts/blob/master/screenshot_extra_features
7-
8-export DISPLAY=:0
9-SHOTPATH="/home/kat/Pictures/Screenshots"
10-COUNT=$(find $SHOTPATH -type f -printf x | wc -c | awk '{print $1+1}' | awk '{printf "%04d\n", $0}')
11-FILE="$SHOTPATH/$COUNT.png"
12-
13-post () { # copy image to clip & send a notification
14- xclip -selection clipboard -t image/png -i $FILE && notify-send -i "$FILE" "$FILE copied to clipboard"
15-}
16-
17-import -window root "$FILE" && post || exit 1
18-
19-# notify-send "screenshot taken" "saved as ${FILE} in ${SHOTPATH}"
+9,
-1
1@@ -5,7 +5,15 @@
2 # https://github.com/BreadOnPenguins/scripts/blob/master/screenshot_extra_features
3
4 export DISPLAY=:0
5-SHOTPATH="/media/kat/disk/Pictures/Screenshots"
6+
7+if [[ $(hostname) == "mariposa" ]]; then
8+ SHOTPATH="/home/kat/Pictures/Screenshots"
9+elif [[ $(hostname) == "kwangya" ]]; then
10+ SHOTPATH="/media/kat/disk/Pictures/Screenshots"
11+else
12+ echo "fuck"
13+fi
14+
15 COUNT=$(find $SHOTPATH -type f -printf x | wc -c | awk '{print $1+2}' | awk '{printf "%04d\n", $0}')
16 FILE="$SHOTPATH/$COUNT.png"
17
+0,
-22
1@@ -1,22 +0,0 @@
2-#!/usr/bin/env bash
3-
4-# modified from this GH script:
5-#
6-# https://github.com/BreadOnPenguins/scripts/blob/master/screenshot_extra_features
7-
8-export DISPLAY=:0
9-SHOTPATH="/home/kat/Pictures/Screenshots"
10-COUNT=$(find $SHOTPATH -type f -printf x | wc -c | awk '{print $1+1}' | awk '{printf "%04d\n", $0}')
11-FILE="$SHOTPATH/$COUNT.png"
12-
13-
14-selection () { # draw a selection, or click to select a window
15- import "$FILE" && post
16-}
17-
18-
19-post () { # copy image to clip & send a notification
20- xclip -selection clipboard -t image/png -i $FILE && notify-send -i "$FILE" "$FILE copied to clipboard"
21-}
22-
23-selection
+0,
-27
1@@ -1,27 +0,0 @@
2-# Edit this file to introduce tasks to be run by cron.
3-#
4-# Each task to run has to be defined through a single line
5-# indicating with different fields when the task will be run
6-# and what command to run for the task
7-#
8-# To define the time you can provide concrete values for
9-# minute (m), hour (h), day of month (dom), month (mon),
10-# and day of week (dow) or use '*' in these fields (for 'any').
11-#
12-# Notice that tasks will be started based on the cron's system
13-# daemon's notion of time and timezones.
14-#
15-# Output of the crontab jobs (including errors) is sent through
16-# email to the user the crontab file belongs to (unless redirected).
17-#
18-# For example, you can run a backup of all your user accounts
19-# at 5 a.m every week with:
20-# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
21-#
22-# For more information see the manual pages of crontab(5) and cron(8)
23-#
24-# m h dom mon dow command
25-
26-0 */3 * * * vdirsyncer sync
27-
28-0 0 * * * crontab -l > /home/kat/dotfiles/config/crontab