From 054db1f72365f943549c2814df172d16687b0f19 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Thu, 26 Jul 2018 08:14:01 +0200 Subject: [PATCH 01/11] Adapted ZSH config --- zsh/zshrc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index 2f4b656..4bc169e 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -40,21 +40,26 @@ SAVEHIST=$HISTSIZE export LC_ALL='en_US.UTF-8' export WORKON_HOME=~/.virtualenvs -alias em='emacs -nw' +if [[ $(uname) = "Darwin" ]]; then + PATH=$PATH:~/Library/Anaconda/bin +fi source $DOTCONFDIR/dotconf.sh -# System specific config -SYS=`uname` -if [[ $SYS = "Linux" ]]; then +# Alias configuration + +alias l='ls -lh --color' +alias em='emacs -nw' +alias ec='emacsclient -c' + +if [[ $(uname) = "Linux" ]]; then alias grep='grep --color' alias ls='ls --color' alias open='xdg-open' - alias l='ls -lh --color' - alias ec='emacsclient -c' fi -if [[ $SYS = "Darwin" ]]; then +if [[ $(uname) = "Darwin" ]]; then PATH=$PATH:~/Library/Anaconda/bin + alias grep='grep --color=always' fi From 3eb8f31dd5b6b22f17ff7c409a26ca310f10bd49 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Sun, 29 Jul 2018 21:18:24 +0200 Subject: [PATCH 02/11] Added aliases for emacs (in particular on MacOS) --- zsh/zshrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index 4bc169e..61f6be2 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -49,17 +49,21 @@ source $DOTCONFDIR/dotconf.sh # Alias configuration -alias l='ls -lh --color' -alias em='emacs -nw' -alias ec='emacsclient -c' if [[ $(uname) = "Linux" ]]; then + alias em='emacs -nw' + alias ec='emacsclient -c' alias grep='grep --color' alias ls='ls --color' + alias l='ls -lh --color' alias open='xdg-open' fi if [[ $(uname) = "Darwin" ]]; then PATH=$PATH:~/Library/Anaconda/bin + alias emacs='/usr/local/opt/emacs/bin/emacs' + alias em='emacs -nw' + alias ec='/usr/local/opt/emacs/bin/emacsclient -c' alias grep='grep --color=always' + alias l='ls -lh' fi From 0aef4221c93a5f2ba71e0716d1b471d772ebe3b9 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Sun, 29 Jul 2018 21:18:37 +0200 Subject: [PATCH 03/11] orgmode configuration --- emacs/spacemacs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/emacs/spacemacs b/emacs/spacemacs index 56fc7cb..b010493 100644 --- a/emacs/spacemacs +++ b/emacs/spacemacs @@ -31,6 +31,7 @@ values." ;; List of configuration layers to load. dotspacemacs-configuration-layers '( + swift python ;; ---------------------------------------------------------------- ;; Example of useful layers you may want to use right away. @@ -323,7 +324,7 @@ package is loaded, you should place your code here." ) (setq org-agenda-log-mode-items '(closed)) (setq org-agenda-custom-commands - '(("b" "Purchases list" tags "BUY")) + '(("b" "Purchases list" tags-todo "BUY")) ) ) ) @@ -342,9 +343,14 @@ package is loaded, you should place your code here." ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. + '(org-agenda-files (quote ("~/Documents/docs-private/orgmode/org-mode.org"))) + '(org-default-priority 85) + '(org-enable-priority-commands t) + '(org-highest-priority 65) + '(org-lowest-priority 90) '(package-selected-packages (quote - (org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download htmlize gnuplot yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode dash-functional helm-pydoc cython-mode anaconda-mode pythonic ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async)))) + (swift3-mode swift-mode org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download htmlize gnuplot yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode dash-functional helm-pydoc cython-mode anaconda-mode pythonic ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. From c8bd28c5ff675902151ab4d03d59939ff642b3bc Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Fri, 3 Aug 2018 08:24:51 +0200 Subject: [PATCH 04/11] Smaller fixes to dotconf.sh. --- dotconf.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dotconf.sh b/dotconf.sh index 4144c52..ebaf5b6 100644 --- a/dotconf.sh +++ b/dotconf.sh @@ -7,18 +7,19 @@ function dotconf () { ln -s $DOTCONFDIR/tmux/tmux.conf ~/.tmux.conf ln -s $DOTCONFDIR/vim/vimrc ~/.vimrc - # setup spacemacs - if [ -d ~/.emacs.d ]; then - echo "Backing up .emacs.d ..." - mv ~/.emacs.d ~/.emacs.d.bak - fi - git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d + # setup spacemacs + if [ -d ~/.emacs.d ]; then + echo "Backing up .emacs.d ..." + mv ~/.emacs.d ~/.emacs.d.bak + fi + git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d ln -s $DOTCONFDIR/emacs/spacemacs ~/.spacemacs ;; "update") - OLDDIR="$(PWD)" + OLDDIR="$(pwd)" cd "$DOTCONFDIR" && git pull origin + source dotconf.sh cd "$OLDDIR" ;; From c350af00e72154a403a231e5f698e15cff6824c8 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Sun, 12 Aug 2018 19:55:03 +0200 Subject: [PATCH 05/11] Added sortimage function. --- emacs/spacemacs | 11 +++++++---- zsh/zshrc | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/emacs/spacemacs b/emacs/spacemacs index b010493..f26402b 100644 --- a/emacs/spacemacs +++ b/emacs/spacemacs @@ -31,6 +31,8 @@ values." ;; List of configuration layers to load. dotspacemacs-configuration-layers '( + markdown + markdown swift python ;; ---------------------------------------------------------------- @@ -316,7 +318,8 @@ package is loaded, you should place your code here." (global-set-key "\C-cc" 'org-capture) (global-set-key "\C-cb" 'org-iswitchb) (custom-set-variables - '(org-agenda-files (quote ("~/Documents/docs-private/orgmode/org-mode.org"))) + '(org-agenda-files (list "~/Documents/docs-private/orgmode/org-mode.org" + "~/Documents/docs-sm/organisation/projekte/projects.org"))) '(org-enable-priority-commands t) '(org-highest-priority ?A) '(org-lowest-priority ?Z) @@ -324,10 +327,10 @@ package is loaded, you should place your code here." ) (setq org-agenda-log-mode-items '(closed)) (setq org-agenda-custom-commands - '(("b" "Purchases list" tags-todo "BUY")) + '(("b" "Purchases List" tags-todo "BUY") + ("h" "Home Todo List" tags "HOME")) ) ) - ) (defun my-cal-exp () "test" @@ -350,7 +353,7 @@ package is loaded, you should place your code here." '(org-lowest-priority 90) '(package-selected-packages (quote - (swift3-mode swift-mode org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download htmlize gnuplot yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode dash-functional helm-pydoc cython-mode anaconda-mode pythonic ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async)))) + (mmm-mode markdown-toc markdown-mode gh-md swift3-mode swift-mode org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download htmlize gnuplot yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode dash-functional helm-pydoc cython-mode anaconda-mode pythonic ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/zsh/zshrc b/zsh/zshrc index 61f6be2..1a71051 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -46,9 +46,37 @@ fi source $DOTCONFDIR/dotconf.sh +### Shell function definition -# Alias configuration +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; + done + ;; + *) + echo "Rename files" + echo "Usage: sortimages " + echo " : for example *.JPG" + echo " : rename to "'$date'"-'$time'-suffix.jpg" + echo " : -d rename the files" + echo -n + 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}; + done + ;; +esac +} +### Alias configuration if [[ $(uname) = "Linux" ]]; then alias em='emacs -nw' @@ -67,3 +95,10 @@ if [[ $(uname) = "Darwin" ]]; then alias grep='grep --color=always' alias l='ls -lh' fi + + +### Conda setup on MacOS + +if [[ $(uname) = "Darwin" ]]; then + source /Users/mschoengens/Library/Anaconda/etc/profile.d/conda.sh +fi From 112ee2b097c69e53db258e94c05b1c0499e86cd5 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Tue, 14 Aug 2018 15:01:30 +0200 Subject: [PATCH 06/11] Configured more sophisticated prompt. git push --- zsh/zshrc | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/zsh/zshrc b/zsh/zshrc index 1a71051..0a5f742 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -15,7 +15,7 @@ fi ### Configure oh-my-zsh -ZSH_THEME="pygmalion" +# ZSH_THEME="pygmalion" plugins=( git @@ -30,6 +30,83 @@ source $ZSH/oh-my-zsh.sh ### Configure zsh +# Configure prompt + +prompt_segment() { + [[ -n $1 ]] && color=$1 || return + [[ -n $2 ]] && text='%{$fg['$color']%}'$2'%{$reset_color%}' || return + [[ -n $3 ]] && sep='%{$fg[red]%}'$3'%{$reset_color%}' || sep='' + echo -n $sep$text +} + +prompt_git() { + (( $+commands[git] )) || return + if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then + ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}" + ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" + ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}" + ZSH_THEME_GIT_PROMPT_CLEAN="" + echo -n "git:$(git_prompt_info)" + fi +} + +prompt_virtualenv() { + local virtualenv_path="$VIRTUAL_ENV" + if [[ -n $virtualenv_path ]]; then + text="penv:`basename $virtualenv_path`" + echo -n $text + fi +} + +prompt_condaenv() { + local env_path="$CONDA_PREFIX" + if [[ -n $env_path ]]; then + text="cenv:`basename $env_path`" + echo -n $text + fi +} + +prompt_extensions=(prompt_virtualenv prompt_condaenv prompt_git) + +build_prompt() { + # build base prompt + PROMPT=$(prompt_segment magenta '%n') + PROMPT+=$(prompt_segment red '@') + PROMPT+=$(prompt_segment yellow '%m') + PROMPT+=$(prompt_segment red ':') + PROMPT+=$(prompt_segment cyan '%0~') + + # build prompt for extensions + local prompt_ext_text="" + local sep="" + for ext in $prompt_extensions; do + local ext_text=$(eval $ext) + if [[ -n $prompt_ext_text ]] && [[ -n $ext_text ]]; then + sep="," + else + sep="" + fi + prompt_ext_text+=$(prompt_segment green $ext_text $sep) + done + + # build prompt base - extension separator + if [[ -n $prompt_ext_text ]]; then + PROMPT+=$(prompt_segment red '|') + fi + PROMPT+=$prompt_ext_text + + # build prompt suffix + local prompt_nocolor=$(echo $PROMPT | perl -pe "s/%\{[^}]+\}//g") + local prompt_length=${#prompt_nocolor} + if [[ $prompt_length -gt 40 ]]; then + PROMPT+=$(prompt_segment cyan '\n%{\r%}⇒ ') + else + PROMPT+=$(prompt_segment cyan ' ⇒ ') + fi +} + +precmd_functions+=(build_prompt) + HISTSIZE=20000 HISTFILE=~/.zsh_history SAVEHIST=$HISTSIZE From 56f320d84073b480f99df8462c722961fd0bf325 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Thu, 11 Oct 2018 13:33:18 +0200 Subject: [PATCH 07/11] Add yaml and git layer to spacemacs config --- emacs/spacemacs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/emacs/spacemacs b/emacs/spacemacs index f26402b..f999fba 100644 --- a/emacs/spacemacs +++ b/emacs/spacemacs @@ -31,21 +31,20 @@ values." ;; List of configuration layers to load. dotspacemacs-configuration-layers '( - markdown + yaml markdown swift python + git ;; ---------------------------------------------------------------- ;; Example of useful layers you may want to use right away. ;; Uncomment some layer names and press (Vim style) or ;; (Emacs style) to install them. ;; ---------------------------------------------------------------- helm - ;; auto-completion + auto-completion ;; better-defaults emacs-lisp - ;; git - ;; markdown org ;; (shell :variables ;; shell-default-height 30 @@ -319,7 +318,7 @@ package is loaded, you should place your code here." (global-set-key "\C-cb" 'org-iswitchb) (custom-set-variables '(org-agenda-files (list "~/Documents/docs-private/orgmode/org-mode.org" - "~/Documents/docs-sm/organisation/projekte/projects.org"))) + "~/Documents/docs-sm/organisation/projects.om"))) '(org-enable-priority-commands t) '(org-highest-priority ?A) '(org-lowest-priority ?Z) From fb8a61d83ce57a30c526c1444241110a12596172 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Thu, 11 Oct 2018 13:35:14 +0200 Subject: [PATCH 08/11] Rename org mode files in spacemacs config --- emacs/spacemacs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/emacs/spacemacs b/emacs/spacemacs index f999fba..c11d71c 100644 --- a/emacs/spacemacs +++ b/emacs/spacemacs @@ -345,14 +345,15 @@ package is loaded, you should place your code here." ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(org-agenda-files (quote ("~/Documents/docs-private/orgmode/org-mode.org"))) + '(org-agenda-files + (list "~/Documents/docs-private/orgmode/org-mode.org" "~/Documents/docs-sm/organisation/projects.om")) '(org-default-priority 85) '(org-enable-priority-commands t) '(org-highest-priority 65) '(org-lowest-priority 90) '(package-selected-packages (quote - (mmm-mode markdown-toc markdown-mode gh-md swift3-mode swift-mode org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download htmlize gnuplot yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode dash-functional helm-pydoc cython-mode anaconda-mode pythonic ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async)))) + (helm-company helm-c-yasnippet fuzzy company-statistics company-anaconda company auto-yasnippet yasnippet ac-ispell auto-complete smeargle orgit magit-gitflow helm-gitignore gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link evil-magit realgud magit yaml-mode pandoc pandoc-mode mmm-mode markdown-toc markdown-mode gh-md swift3-mode swift-mode org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download htmlize gnuplot yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode dash-functional helm-pydoc cython-mode anaconda-mode pythonic ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. From 18b7b45f179a83ada3486f03b6c37f322f343e59 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Thu, 1 Nov 2018 14:41:45 +0100 Subject: [PATCH 09/11] Add zsh alias / function for ssh + tmux --- zsh/zshrc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/zsh/zshrc b/zsh/zshrc index 0a5f742..0891179 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -153,6 +153,26 @@ function sortimages () { esac } + +read -r -d '' REMOTE_CMD << EOF +if [ \$(command -v module 2> /dev/null | wc -l) -gt 0 ]; then + module load tmux +fi + +if [ \$(lsof -U 2> /dev/null | grep ^tmux | wc -l) -gt 0 ]; then + tmux a +else + tmux +fi +EOF + +function st () { + ssh -t $@ ${REMOTE_CMD} +} + +compdef st=ssh + + ### Alias configuration if [[ $(uname) = "Linux" ]]; then From 251c79100364fa3976f373320d360bdaabf8985d Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Thu, 1 Nov 2018 14:42:17 +0100 Subject: [PATCH 10/11] Add new agenda command --- emacs/spacemacs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/emacs/spacemacs b/emacs/spacemacs index c11d71c..ed9655f 100644 --- a/emacs/spacemacs +++ b/emacs/spacemacs @@ -43,6 +43,7 @@ values." ;; ---------------------------------------------------------------- helm auto-completion + docker ;; better-defaults emacs-lisp org @@ -327,6 +328,7 @@ package is loaded, you should place your code here." (setq org-agenda-log-mode-items '(closed)) (setq org-agenda-custom-commands '(("b" "Purchases List" tags-todo "BUY") + ("B" "Big Spendings List" tags-todo "+BIGSPENDS") ("h" "Home Todo List" tags "HOME")) ) ) @@ -338,6 +340,13 @@ package is loaded, you should place your code here." (org-agenda-write "test1.ics") ) +(defun browse-url-default-macosx-browser (url &optional new-window) + (interactive (browse-url-interactive-arg "URL: ")) + (if (and new-window (>= emacs-major-version 23)) + (ns-do-applescript + (format "tell application \"Safari\" to open location \"%s\"\n" url)) + (start-process (concat "open " url) nil "open" url))) + ;; Do not write anything past this comment. This is where Emacs will ;; auto-generate custom variable definitions. (custom-set-variables @@ -353,7 +362,7 @@ package is loaded, you should place your code here." '(org-lowest-priority 90) '(package-selected-packages (quote - (helm-company helm-c-yasnippet fuzzy company-statistics company-anaconda company auto-yasnippet yasnippet ac-ispell auto-complete smeargle orgit magit-gitflow helm-gitignore gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link evil-magit realgud magit yaml-mode pandoc pandoc-mode mmm-mode markdown-toc markdown-mode gh-md swift3-mode swift-mode org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download htmlize gnuplot yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode dash-functional helm-pydoc cython-mode anaconda-mode pythonic ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async)))) + (dockerfile-mode docker json-mode tablist docker-tramp json-snatcher json-reformat helm-company helm-c-yasnippet fuzzy company-statistics company-anaconda company auto-yasnippet yasnippet ac-ispell auto-complete smeargle orgit magit-gitflow helm-gitignore gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link evil-magit realgud magit yaml-mode pandoc pandoc-mode mmm-mode markdown-toc markdown-mode gh-md swift3-mode swift-mode org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download htmlize gnuplot yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode dash-functional helm-pydoc cython-mode anaconda-mode pythonic ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. From 1dcf2d2488d40c5f7acb62ae06ea15add9af8d3e Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Tue, 6 Nov 2018 09:23:31 +0100 Subject: [PATCH 11/11] Add keys to move tmux windows --- tmux/tmux.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tmux/tmux.conf b/tmux/tmux.conf index b614c51..4e3a2ad 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -1 +1,3 @@ -set-option -g prefix C-t \ No newline at end of file +set-option -g prefix C-t +bind-key h swap-window -t -1 +bind-key l swap-window -t +1