From 208051406fae8d3abdde110914c5bcf0066e4e84 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Sun, 30 Jun 2019 11:51:02 +0200 Subject: [PATCH 1/5] Set escape-time config value for tmux to 0. --- tmux/tmux.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/tmux/tmux.conf b/tmux/tmux.conf index f9be927..7d646ff 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -1,5 +1,6 @@ set-option -g prefix C-t set-option -g allow-rename off +set-option -g escape-time 0 set-window-option -g allow-rename off bind-key h swap-window -t -1 bind-key l swap-window -t +1 From 47abd6604bf6a855c9465d6353b621ca5505b36a Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Wed, 1 Jan 2020 19:21:26 +0100 Subject: [PATCH 2/5] Configure new aliases. --- zsh/zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zsh/zshrc b/zsh/zshrc index 0822465..00506bf 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -176,9 +176,12 @@ compdef st=ssh ### Alias configuration +alias dc='docker-compose --env-file docker-compose.env' + if [[ $(uname) = "Linux" ]]; then alias em='emacs -nw' alias ec='emacsclient -c' + alias gl='glances -b' alias grep='grep --color' alias ls='ls --color' alias l='ls -lh --color' From 4b22720c9e4f3a487577009f8446c03198314f99 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Sun, 19 Jan 2020 12:21:07 +0100 Subject: [PATCH 3/5] Refactor sortimages. --- zsh/zshrc | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index 0822465..05fd41f 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -126,16 +126,30 @@ source $DOTCONFDIR/dotconf.sh ### 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 () { case $1 in -d) shift 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=`echo $DST.jpg` - echo mv $file $DST; - mv $file $DST; - chmod 640 $DST; + _sortimages $file $DST 0 done ;; *) @@ -144,11 +158,10 @@ function sortimages () { echo " : for example *.JPG" echo " : rename to "'$date'"-'$time'-suffix.jpg" echo " : -d rename the files" - echo -n + echo 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=${DST}'.jpg' - echo mv ${file} ${DST}; + _sortimages $file $DST 1 done ;; esac From a91be59b4a3ec378d05bcd1635844580f26912b7 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Sun, 19 Jan 2020 12:22:22 +0100 Subject: [PATCH 4/5] Adapt spacemacs conf. --- emacs/spacemacs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/emacs/spacemacs b/emacs/spacemacs index 99c83ce..007abbe 100644 --- a/emacs/spacemacs +++ b/emacs/spacemacs @@ -344,9 +344,9 @@ package is loaded, you should place your code here." (setq org-agenda-log-mode-items '(closed state)) (setq org-agenda-custom-commands '(("b" "Purchases List" tags-todo "BUY") - ("B" "Big Spendings List" tags-todo "+BIGSPENDSBUY") - ("p" "Private Todo List" tags "PR") - ("h" "Home Todo List" tags "HOME")) + ("B" "Big Spendings List" tags-todo "+BIGSPENDS") + ("p" "Private Todo List" tags-todo "PR") + ("h" "Home Todo List" tags-todo "HOME")) ) ) @@ -372,7 +372,8 @@ package is loaded, you should place your code here." ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(org-agenda-files - (list "~/Documents/docs-private/orgmode/org-mode.org" "~/Documents/docs-sm/organisation/projects.om")) + (quote + ("/Users/mschoengens/Documents/docs-private/orgmode/org-mode.org" "~/Documents/docs-sm/organisation/projects.org"))) '(org-default-priority 85) '(org-enable-priority-commands t) '(org-highest-priority 65) From 1a4b6a3863842666756a8cca494c4b5733a460f6 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Sun, 19 Jan 2020 18:59:24 +0100 Subject: [PATCH 5/5] Add dstat alias. --- zsh/zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/zshrc b/zsh/zshrc index 3ef79c1..ce4f26b 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -190,6 +190,7 @@ compdef st=ssh ### Alias configuration alias dc='docker-compose --env-file docker-compose.env' +alias dstat='dstat -tclmsgdnpy' if [[ $(uname) = "Linux" ]]; then alias em='emacs -nw'