From efe07eef8b4e598480f3ba50eb8fddd42cf4daf6 Mon Sep 17 00:00:00 2001 From: Ryan Kes Date: Mon, 30 Sep 2019 18:16:51 +0200 Subject: [PATCH 1/4] Cleaned up git --- git/.gitconfig | 8 ---- git/.gitignore_global | 100 ------------------------------------------ 2 files changed, 108 deletions(-) delete mode 100644 git/.gitignore_global diff --git a/git/.gitconfig b/git/.gitconfig index 2058d25..17ae4dc 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -12,11 +12,3 @@ email = alrayyes@gmail.com name = Ryan Kes signingkey = alrayyes@gmail.com -[sendemail] - confirm = auto - -[sendemail] - smtpEncryption = tls - smtpServer = /usr/bin/msmtp - confirm = auto - chainreplyto = false diff --git a/git/.gitignore_global b/git/.gitignore_global deleted file mode 100644 index a35426e..0000000 --- a/git/.gitignore_global +++ /dev/null @@ -1,100 +0,0 @@ -# Created by https://www.gitignore.io/api/phpstorm - -### PhpStorm ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 -.idea/ - -## File-based project format: -*.iws - -## Plugin-specific files: - -# IntelliJ -/out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -### PhpStorm Patch ### -# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 - -# *.iml -# modules.xml -# .idea/misc.xml -# *.ipr - -# End of https://www.gitignore.io/api/phpstorm - -### WebStorm ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff: -.idea/workspace.xml -.idea/tasks.xml - -# Sensitive or high-churn files: -.idea/dataSources/ -.idea/dataSources.ids -.idea/dataSources.xml -.idea/dataSources.local.xml -.idea/sqlDataSources.xml -.idea/dynamic.xml -.idea/uiDesigner.xml - -# Gradle: -.idea/gradle.xml -.idea/libraries - -# Mongo Explorer plugin: -.idea/mongoSettings.xml - -## File-based project format: -*.iws - -## Plugin-specific files: - -# IntelliJ -/out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -### WebStorm Patch ### -# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 - -# *.iml -# modules.xml -# .idea/misc.xml -# *.ipr - -# End of https://www.gitignore.io/api/webstorm - -# php-cs-fixer -php-cs-fixer -.php_cs.cache - -# composer -composer.phar - -.idea -.idea/* From 215c4518964533f75dc6baac33ebb69fe455d785 Mon Sep 17 00:00:00 2001 From: Ryan Kes Date: Mon, 30 Sep 2019 18:19:06 +0200 Subject: [PATCH 2/4] Don't use notmuch --- mutt/.notmuch-config | 101 --------------------------------------- mutt/bin/notmuch-hook.sh | 4 -- 2 files changed, 105 deletions(-) delete mode 100644 mutt/.notmuch-config delete mode 100755 mutt/bin/notmuch-hook.sh diff --git a/mutt/.notmuch-config b/mutt/.notmuch-config deleted file mode 100644 index 6855bb1..0000000 --- a/mutt/.notmuch-config +++ /dev/null @@ -1,101 +0,0 @@ -# .notmuch-config - Configuration file for the notmuch mail system -# -# For more information about notmuch, see https://notmuchmail.org - -# Database configuration -# -# The only value supported here is 'path' which should be the top-level -# directory where your mail currently exists and to where mail will be -# delivered in the future. Files should be individual email messages. -# Notmuch will store its database within a sub-directory of the path -# configured here named ".notmuch". -# -[database] -path=/home/alrayyes/mail - -# User configuration -# -# Here is where you can let notmuch know how you would like to be -# addressed. Valid settings are -# -# name Your full name. -# primary_email Your primary email address. -# other_email A list (separated by ';') of other email addresses -# at which you receive email. -# -# Notmuch will use the various email addresses configured here when -# formatting replies. It will avoid including your own addresses in the -# recipient list of replies, and will set the From address based on the -# address to which the original email was addressed. -# -[user] -name=Ryan Kes -primary_email=alrayyes@gmail.com -other_email=ryan@andthensome.nl; - -# Configuration for "notmuch new" -# -# The following options are supported here: -# -# tags A list (separated by ';') of the tags that will be -# added to all messages incorporated by "notmuch new". -# -# ignore A list (separated by ';') of file and directory names -# that will not be searched for messages by "notmuch new". -# -# NOTE: *Every* file/directory that goes by one of those -# names will be ignored, independent of its depth/location -# in the mail store. -# -[new] -tags=unread;inbox; -ignore= - -# Search configuration -# -# The following option is supported here: -# -# exclude_tags -# A ;-separated list of tags that will be excluded from -# search results by default. Using an excluded tag in a -# query will override that exclusion. -# -[search] -exclude_tags=deleted;spam; - -# Maildir compatibility configuration -# -# The following option is supported here: -# -# synchronize_flags Valid values are true and false. -# -# If true, then the following maildir flags (in message filenames) -# will be synchronized with the corresponding notmuch tags: -# -# Flag Tag -# ---- ------- -# D draft -# F flagged -# P passed -# R replied -# S unread (added when 'S' flag is not present) -# -# The "notmuch new" command will notice flag changes in filenames -# and update tags, while the "notmuch tag" and "notmuch restore" -# commands will notice tag changes and update flags in filenames -# -[maildir] -synchronize_flags=true - -# Cryptography related configuration -# -# The following option is supported here: -# -# gpg_path -# binary name or full path to invoke gpg. -# -[crypto] -gpg_path=gpg - -[new] -tags=new diff --git a/mutt/bin/notmuch-hook.sh b/mutt/bin/notmuch-hook.sh deleted file mode 100755 index d01ba2d..0000000 --- a/mutt/bin/notmuch-hook.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -notmuch new -notmuch tag +inbox -new -- tag:new -notmuch tag -new -inbox +sent -- from:alrayyes@gmail.com or from:ryan@andthensome.nl From 787539704bf4c13a2661a225a57d6ec63fd63c9c Mon Sep 17 00:00:00 2001 From: Ryan Kes Date: Mon, 30 Sep 2019 18:21:32 +0200 Subject: [PATCH 3/4] Added lfcd --- README.md | 1 + lfcd/.config/lf/lfrc | 105 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 lfcd/.config/lf/lfrc diff --git a/README.md b/README.md index 86a5122..ed729b6 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ A repository of my personal server configuration files. # Packages * [git](https://git-scm.com/) +* [lf](https://github.com/gokcehan/lf) * [neomutt](https://neomutt.org/) * [neovim](https://neovim.io/) * [tmux](https://tmux.github.io/) diff --git a/lfcd/.config/lf/lfrc b/lfcd/.config/lf/lfrc new file mode 100644 index 0000000..88f3ea4 --- /dev/null +++ b/lfcd/.config/lf/lfrc @@ -0,0 +1,105 @@ +# interpreter for shell commands (needs to be POSIX compatible) +set shell zsh + +# enable icons +set icons on + +# set '-eu' options for shell commands +# These options are used to have safer shell commands. Option '-e' is used to +# exit on error and option '-u' is used to give error for unset variables. +# Option '-f' disables pathname expansion which can be useful when $f, $fs, and +# $fx variables contain names with '*' or '?' characters. However, this option +# is used selectively within individual commands as it can be limiting at +# times. +set shellopts '-eu' + +# set internal field separator (IFS) to "\n" for shell commands +# This is useful to automatically split file names in $fs and $fx properly +# since default file separator used in these variables (i.e. 'filesep' option) +# is newline. You need to consider the values of these options and create your +# commands accordingly. +set ifs "\n" + +# leave some space at the top and the bottom of the screen +set scrolloff 10 + +# use enter for shell commands +map shell + +# execute current file (must be executable) +map x $$f +map X !$f + +# dedicated keys for file opener actions +map o &mimeopen $f +map O $mimeopen --ask $f + +# map fzf +map f $lf -remote "send $id select '$(fzf)'" + +# define a custom 'open' command +# This command is called when current file is not a directory. You may want to +# use either file extensions and/or mime types here. Below uses an editor for +# text files and a file opener for the rest. +cmd open ${{ + case $(file --mime-type $f -b) in + text/*) $EDITOR $fx;; + *) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;; + esac +}} + +# define a custom 'rename' command without prompt for overwrite +# cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1 +# map r push :rename + +# make sure trash folder exists +# %mkdir -p ~/.trash + +# move current file or selected files to trash folder +# (also see 'man mv' for backup/overwrite options) +cmd trash %set -f; mv $fx ~/.trash + +# define a custom 'delete' command +# cmd delete ${{ +# set -f +# printf "$fx\n" +# printf "delete?[y/n]" +# read ans +# [ $ans = "y" ] && rm -rf $fx +# }} + +# use '' key for either 'trash' or 'delete' command +# map trash +map delete + +# extract the current file with the right command +# (xkcd link: https://xkcd.com/1168/) +cmd extract ${{ + set -f + case $f in + *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;; + *.tar.gz|*.tgz) tar xzvf $f;; + *.tar.xz|*.txz) tar xJvf $f;; + *.zip) unzip $f;; + *.rar) unrar x $f;; + *.7z) 7z x $f;; + esac +}} + +# compress current file or selected files with tar and gunzip +cmd tar ${{ + set -f + mkdir $1 + cp -r $fx $1 + tar czf $1.tar.gz $1 + rm -rf $1 +}} + +# compress current file or selected files with zip +cmd zip ${{ + set -f + mkdir $1 + cp -r $fx $1 + zip -r $1.zip $1 + rm -rf $1 +}} From 643968a46207064c043ac6855e7fbff357f7a457 Mon Sep 17 00:00:00 2001 From: Ryan Kes Date: Mon, 30 Sep 2019 18:30:46 +0200 Subject: [PATCH 4/4] updated .zshrc --- zsh/.zshrc | 80 ++---------------------------------------------------- 1 file changed, 3 insertions(+), 77 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 387cd45..b547bf9 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,6 +1,3 @@ -# Ifkyou come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH - # Stop tmux bitching about 256 colours TERM="xterm-256color" @@ -13,83 +10,17 @@ ZSH="/home/alrayyes/.oh-my-zsh" #ZSH_THEME="robbyrussell" ZSH_THEME="powerlevel9k/powerlevel9k" -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. Case -# sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment the following line to disable bi-weekly auto-update checks. -# DISABLE_AUTO_UPDATE="true" - -# Uncomment the following line to change how often to auto-update (in days). -# export UPDATE_ZSH_DAYS=13 - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(aws archlinux bower common-aliases composer docker git git-flow pass sudo symfony2 systemd tmux fzf gitignore ) +plugins=(aws common-aliases composer docker extract git git-flow gitignore httpie rsync symfony2 systemd tmux vi-mode fzf sudo yarn zsh-syntax-highlighting ) source $ZSH/oh-my-zsh.sh -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# ssh -# export SSH_KEY_PATH="~/.ssh/rsa_id" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" - # nvim alias alias vim="nvim" +alias vi="nvim" # ls alias alias ls="lsd" @@ -98,12 +29,7 @@ alias l="lsd -al" # vifm alias alias vifm="vifmrun" -transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi -tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://share.higherlearning.eu/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://share.higherlearning.eu/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } -transferats() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi -tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://share.andthensome.nl/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://share.andthensome.nl/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } - -# Emberjs settings +# Add yarn path export PATH="$PATH:/home/alrayyes/.config/yarn/global/node_modules/.bin:/home/alrayyes/.scripts" # Set GPG TTY