more commands
This commit is contained in:
parent
862f9e0895
commit
27e27c11ce
3
.bashrc
3
.bashrc
@ -16,7 +16,10 @@ alias bell="paplay /usr/share/sounds/freedesktop/stereo/complete.oga"
|
||||
alias useage="du -h -d 1 2> /dev/null | sort -h"
|
||||
# For laptop multi-gpu offloading
|
||||
alias nvidia_gpu="DRI_PRIME=1 __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia"
|
||||
# Opinionated defaults
|
||||
alias feh="swallow feh --force-aliasing --draw-exif --scale-down --draw-filename"
|
||||
alias ffplay="swallow ffplay $@"
|
||||
alias shutdown="shutdown -P now"
|
||||
|
||||
export DENO_INSTALL="/home/oliver/.deno"
|
||||
export PATH="$DENO_INSTALL/bin:$PATH"
|
||||
|
46
.local/bin/screenshot
Executable file
46
.local/bin/screenshot
Executable file
@ -0,0 +1,46 @@
|
||||
notify-send "Postion 1"
|
||||
sleep 2
|
||||
eval $(xdotool getmouselocation --shell)
|
||||
X1=$X
|
||||
Y1=$Y
|
||||
|
||||
notify-send "Postion 2"
|
||||
sleep 2
|
||||
|
||||
eval $(xdotool getmouselocation --shell)
|
||||
X2=$X
|
||||
Y2=$Y
|
||||
|
||||
# X COORDS
|
||||
if [[ $X2 -ge $X1 ]]; then
|
||||
X=$X1
|
||||
W=$(($X2-$X1))
|
||||
else
|
||||
X=$X2
|
||||
W=$(($X1-$X2))
|
||||
fi
|
||||
|
||||
# Y COORDS
|
||||
if [[ $Y2 -ge $Y1 ]]; then
|
||||
Y=$Y1
|
||||
H=$(($Y2-$Y1))
|
||||
else
|
||||
Y=$Y2
|
||||
H=$(($Y1-$Y2))
|
||||
fi
|
||||
|
||||
CLIPBOARD="0"
|
||||
DISK="1"
|
||||
SAVE=$(notify-send "How to save?" --action=$CLIPBOARD=Clipboard --action=$DISK=Disk --expire-time=99999)
|
||||
|
||||
if [[ $SAVE == $CLIPBOARD ]]; then
|
||||
shotgun - | xclip -selection clipboard -target image/png -i
|
||||
elif [[ $SAVE == $DISK ]]; then
|
||||
shotgun -g ${W}x${H}+${X}+${Y} ~/Pictures/$(date +%a%b%d-%G-%s).png
|
||||
else
|
||||
# They let the notification expire
|
||||
echo 0
|
||||
fi
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user