Merge branch 'master' of https://git.asgard.bitvalve.org/mschoengens/dotconfigs
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
set-option -g prefix C-t
|
set-option -g prefix C-t
|
||||||
set-option -g allow-rename off
|
set-option -g allow-rename off
|
||||||
|
set-option -g escape-time 0
|
||||||
set-window-option -g allow-rename off
|
set-window-option -g allow-rename off
|
||||||
bind-key h swap-window -t -1
|
bind-key h swap-window -t -1
|
||||||
bind-key l swap-window -t +1
|
bind-key l swap-window -t +1
|
||||||
|
|||||||
@@ -126,16 +126,30 @@ source $DOTCONFDIR/dotconf.sh
|
|||||||
|
|
||||||
### Shell function definition
|
### Shell function definition
|
||||||
|
|
||||||
|
function _sortimages () {
|
||||||
|
SOURCE="$1"
|
||||||
|
TARGET_PREFIX="$2"
|
||||||
|
DRYRUN=$3
|
||||||
|
|
||||||
|
TARGET=${TARGET_PREFIX}".jpg"
|
||||||
|
if [ $(echo "$TARGET_PREFIX" | awk '{print length}') -ge 15 ]; then
|
||||||
|
echo mv $SOURCE $TARGET;
|
||||||
|
if [ $DRYRUN = 0 ]; then
|
||||||
|
mv $SOURCE $TARGET;
|
||||||
|
chmod 640 $TARGET;
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Cannot read Exif information, skipping... $SOURCE"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function sortimages () {
|
function sortimages () {
|
||||||
case $1 in
|
case $1 in
|
||||||
-d)
|
-d)
|
||||||
shift
|
shift
|
||||||
for file in $@; do
|
for file in $@; do
|
||||||
DST=`identify -format "%[Exif:DateTimeOriginal]" $file | head -1 | awk '{print $1":"$2}' | awk -F':' '{print $1$2$3"-"$4$5$6}' | awk -F'.' '{print $1 }' | awk -F'::' '{print $1}'`
|
DST=`identify -format "%[Exif:DateTimeOriginal]" $file | head -1 | awk '{print $1":"$2}' | awk -F':' '{print $1$2$3"-"$4$5$6}' | awk -F'.' '{print $1 }' | awk -F'::' '{print $1}'`
|
||||||
DST=`echo $DST.jpg`
|
_sortimages $file $DST 0
|
||||||
echo mv $file $DST;
|
|
||||||
mv $file $DST;
|
|
||||||
chmod 640 $DST;
|
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -144,11 +158,10 @@ function sortimages () {
|
|||||||
echo " <file-selection> : for example *.JPG"
|
echo " <file-selection> : for example *.JPG"
|
||||||
echo " <suffix> : rename to "'$date'"-'$time'-suffix.jpg"
|
echo " <suffix> : rename to "'$date'"-'$time'-suffix.jpg"
|
||||||
echo " <options> : -d rename the files"
|
echo " <options> : -d rename the files"
|
||||||
echo -n
|
echo
|
||||||
for file in $@; do
|
for file in $@; do
|
||||||
DST=`identify -format "%[Exif:DateTimeOriginal]" ${file} | head -1 | awk '{print $1":"$2}' | awk -F':' '{print $1$2$3"-"$4$5$6}' | awk -F'.' '{print $1 }' | awk -F'::' '{print $1}'`
|
DST=`identify -format "%[Exif:DateTimeOriginal]" ${file} | head -1 | awk '{print $1":"$2}' | awk -F':' '{print $1$2$3"-"$4$5$6}' | awk -F'.' '{print $1 }' | awk -F'::' '{print $1}'`
|
||||||
DST=${DST}'.jpg'
|
_sortimages $file $DST 1
|
||||||
echo mv ${file} ${DST};
|
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -176,9 +189,13 @@ compdef st=ssh
|
|||||||
|
|
||||||
### Alias configuration
|
### Alias configuration
|
||||||
|
|
||||||
|
alias dc='docker-compose --env-file docker-compose.env'
|
||||||
|
alias dstat='dstat -tclmsgdnpy'
|
||||||
|
|
||||||
if [[ $(uname) = "Linux" ]]; then
|
if [[ $(uname) = "Linux" ]]; then
|
||||||
alias em='emacs -nw'
|
alias em='emacs -nw'
|
||||||
alias ec='emacsclient -c'
|
alias ec='emacsclient -c'
|
||||||
|
alias gl='glances -b'
|
||||||
alias grep='grep --color'
|
alias grep='grep --color'
|
||||||
alias ls='ls --color'
|
alias ls='ls --color'
|
||||||
alias l='ls -lh --color'
|
alias l='ls -lh --color'
|
||||||
|
|||||||
Reference in New Issue
Block a user