code changes
This commit is contained in:
parent
c9469c99f6
commit
1cd308102e
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
mbsync -c /home/marulo/.mbsyncrc-1 cock
|
||||
mbsync -c /home/marulo/.mbsyncrc-2 disroot
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
. $HOME/.nextcloud_data
|
||||
|
||||
echo "================= nextcloud_sync ====================="
|
||||
echo "start at $(date +%H:%Mhs)"
|
||||
echo -e "\n"
|
||||
|
||||
nextcloudcmd -u $USER -p $PASS $LDIR $URL &&
|
||||
echo "nextcloud_root sync done at $(date +%H:%Mhs)"
|
||||
echo "nextcloud_sync.sh finish!"
|
||||
|
|
@ -10,10 +10,10 @@ if [ ! -d $TD ]; then
|
|||
mkdir $TD
|
||||
fi
|
||||
|
||||
TARGET=$(find $PD -type f | grep .mp3 | fzfmenu.sh) # give the target file
|
||||
TARGET=$(find $PD -type f | grep .ogg | fzfmenu.sh) # give the target file
|
||||
BASET=${TARGET##*/} # basename of the target
|
||||
|
||||
if [ -n "$TARGET" ]; then # if target
|
||||
mpv "$TARGET" # play it
|
||||
ffplay -autoexit -showmode 1 "$TARGET" # play it
|
||||
mv "$TARGET" "$TD$BASET" # move target to trash dir
|
||||
fi
|
||||
|
|
4
power.sh
4
power.sh
|
@ -18,12 +18,12 @@ hibernate() {
|
|||
}
|
||||
|
||||
# if status and level match send alarm
|
||||
if [ $STATUS = "Discharging" ] && [ $LEVEL -le "30" ]; then
|
||||
if [ $STATUS = "Discharging" ] && [ $LEVEL -le "50" ]; then
|
||||
alarm
|
||||
fi
|
||||
|
||||
# if status and level match, hibernate
|
||||
if [ $STATUS = "Discharging" ] && [ $LEVEL -le "20" ]; then
|
||||
if [ $STATUS = "Discharging" ] && [ $LEVEL -le "30" ]; then
|
||||
hibernate
|
||||
fi
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
amixer sset Master 10%-
|
||||
|
||||
vol=$(amixer sget Master | awk -F "[][]" '/Playback/ {print $2}' | tr -d '\n')
|
||||
pkill -SIGUSR1 herbe & herbe "audio volume : $vol"
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
amixer sset Master 10%+
|
||||
|
||||
vol=$(amixer sget Master | awk -F "[][]" '/Playback/ {print $2}' | tr -d '\n')
|
||||
|
||||
pkill -SIGUSR1 herbe & herbe "audio volume : $vol"
|
56
wallpaper.sh
56
wallpaper.sh
|
@ -1,17 +1,59 @@
|
|||
#/bin/sh
|
||||
|
||||
TARGET=$1 # new image file
|
||||
WALL="$HOME/.cw.png" # path to current wallpaper
|
||||
. $HOME/.config/wms/wms_var
|
||||
|
||||
FLAG=$1 # flag
|
||||
TARGET=$2 # image target
|
||||
WALL="$HOME/.wall.png" # path to current wallpaper
|
||||
BITMAP="$HOME/.bitmap.xbm" # path to current bitmap
|
||||
RES=$(xdpyinfo | awk '/dimensions/ {print $2}') # screen resolution
|
||||
|
||||
# makes a bitmap of the given image and sets it as wallpaper
|
||||
bitmap() {
|
||||
convert $TARGET -negate -resize "!$RES" $BITMAP
|
||||
xsetroot -fg "#$AC" -bg "#000000" -bitmap $BITMAP
|
||||
}
|
||||
|
||||
# pixelate the given image and set it as wallpaper
|
||||
pixel() {
|
||||
convert -scale 10% -scale 1000% $TARGET $WALL
|
||||
display -resize "!$RES" -window root $WALL
|
||||
}
|
||||
|
||||
# copy the given image and set it as wallpaper
|
||||
wall() {
|
||||
cp $TARGET $WALL
|
||||
display -resize "!$RES" -window root $WALL
|
||||
}
|
||||
|
||||
# let's proceed with the given images
|
||||
if [ -n "$TARGET" ]; then # if a new image is to be set
|
||||
if [ -f "$TARGET" ]; then # if the provided name is a file
|
||||
cp $TARGET $WALL # copy given image as current wallpaper
|
||||
display -resize "!$RES" -window root "$WALL" # wallpaper to desktop
|
||||
|
||||
case $FLAG in
|
||||
-b)
|
||||
bitmap
|
||||
;;
|
||||
-p)
|
||||
pixel
|
||||
;;
|
||||
-w)
|
||||
wall
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
else
|
||||
display -resize "!$RES" -window root "$WALL" # just wallpaper to desktop
|
||||
else # if the name of an image is not passed as the second argument
|
||||
case $FLAG in
|
||||
-b) # just bitmap.xbm to desktopk
|
||||
if [ -f "$HOME/.bitmap.xbm" ]; then
|
||||
xsetroot -fg "#$AC" -bg "#000000" -bitmap $BITMAP
|
||||
fi
|
||||
;;
|
||||
-w) # just wall.png to desktop
|
||||
if [ -f "$HOME/.wall.png" ]; then
|
||||
display -resize "!$RES" -window root $WALL
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ GEO=$(wattr wh $(pfw) | sed 's/ /x/g') # geometry "wmutils"
|
|||
|
||||
import -w $WID /tmp/windowblur_$DATE.png # capture focused window
|
||||
convert /tmp/windowblur_$DATE.png -gaussian-blur 8x8 /tmp/windowblur_blur_$DATE.png # brur
|
||||
sxiv -b -g $GEO -e $WID /tmp/windowblur_blur_$DATE.png # windowed
|
||||
nsxiv -b -g $GEO -e $WID /tmp/windowblur_blur_$DATE.png # windowed
|
||||
|
||||
|
||||
#### WID and GEO widh "xdotool" ####
|
||||
|
|
Loading…
Reference in New Issue