Added screenshot filenamesEmacs:- Added yasnippet- Added company- Added flycheck- Added htmlize for reveal.js- Changed tabbing- Fixed org-insert-structure-template shortcut- display line numbers in c/cpp-mode

This commit is contained in:
TuDatTr
2020-12-14 04:57:42 +01:00
parent 293bf29e49
commit 78945a969d
15 changed files with 166 additions and 28 deletions

View File

@@ -6,22 +6,23 @@ type xclip >/dev/null 2>&1 || { echo >&2 "I require xclip but it's not installed
type xdotool >/dev/null 2>&1 || { echo >&2 "I require xdotool but it's not installed. Aborting."; exit 1; }
d=$HOME/Pictures/Screenshots/$(date +%G-%m);
fd=$(date +%G-%m-%d_%H-%M-%S)
case $1 in
"screen"*)
filename=$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm)_$(date +%G-%m-%d_%H-%M-%S).png;
filename=$fd-$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm).png;
maim -f png $d/$filename;
dunstify -r 2 "Saved screenshot of screen in $d/$filename";
xclip -selection clipboard -t image/png -i $d/$filename
;;
"window"*)
filename=$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm)_$(date +%G-%m-%d_%H-%M-%S).png
filename=$fd-$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm).png
maim -u -i $(xdotool getactivewindow) -f png $d/$filename;
dunstify -r 2 "Saved screenshot of window in $d/$filename";
xclip -selection clipboard -t image/png -i $d/$filename
;;
"area"*)
dunstify -r 2 'Taking screenshot from area.';
filename=$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm)_$(date +%G-%m-%d_%H-%M-%S).png;
filename=$fd-$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm).png;
maim -u -s -f png $d/$filename;
dunstify -r 2 "Saved in $d/$filename.";
xclip -selection clipboard -t image/png -i $d/$filename