1
0
mirror of https://github.com/alrayyes/server-dotfiles synced 2023-11-14 15:56:25 +00:00

Compare commits

...

9 Commits

Author SHA1 Message Date
5802691084 converted markdown to org and now use zplug 2020-02-09 01:22:49 +01:00
de266d3640 Don't use lsd 2019-10-02 17:28:15 +02:00
fe414adce2 Fix merge 2019-09-30 18:35:22 +02:00
d677fc7ea4 Merge branch 'master' of https://github.com/alrayyes/server-dotfiles 2019-09-30 18:31:06 +02:00
643968a462 updated .zshrc 2019-09-30 18:30:46 +02:00
787539704b Added lfcd 2019-09-30 18:21:32 +02:00
215c451896 Don't use notmuch 2019-09-30 18:19:06 +02:00
efe07eef8b Cleaned up git 2019-09-30 18:16:51 +02:00
d230bfabff Updated a couple of things 2019-06-01 14:03:38 +02:00
10 changed files with 282 additions and 160 deletions

View File

@ -1,22 +0,0 @@
The MIT License (MIT)
=====================
Copyright (c) `2019` `Ryan Kes`
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

25
LICENSE.org Normal file
View File

@ -0,0 +1,25 @@
* The MIT License (MIT)
:PROPERTIES:
:CUSTOM_ID: the-mit-license-mit
:END:
Copyright © =<2019>= =<Ryan Kes>=
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,25 +0,0 @@
# Server Dotfiles
A repository of my personal server configuration files.
# Requirements
[stow](http://www.gnu.org/software/stow/)
# Installation
```shell
./install.sh
```
# Packages
* [neovim](https://neovim.io/)
* [tmux](https://tmux.github.io/)
* [vifm](https://vifm.info/)
* [zsh](https://www.zsh.org/)
# License
This theme is released under the MIT License. For more information read the [license][license].
[license]: LICENSE.md

73
README.org Normal file
View File

@ -0,0 +1,73 @@
#+TITLE: Server Dotfiles
#+DATE: February 9, 2020
#+SINCE: {replace with next tagged release version}
#+STARTUP: inlineimages nofold
* Table of Contents :TOC_3:noexport:
- [[#description][Description]]
- [[#maintainers][Maintainers]]
- [[#prerequisites][Prerequisites]]
- [[#applications][Applications]]
- [[#zsh][Zsh]]
- [[#theme][Theme]]
- [[#plugin-manager][Plugin Manager]]
- [[#plugins][Plugins]]
- [[#configuration][Configuration]]
- [[#installation][Installation]]
- [[#find--delete-orphaned-symlinks][Find & delete orphaned symlinks]]
- [[#license][License]]
* Description
A repository of my personal configuration files.
** Maintainers
+ [[https://github.com/alrayyes][@alrayyes]]
* Prerequisites
- [[http://www.gnu.org/software/stow/][stow]]
* Applications
- [[https://the.exa.website/][exa]]
- [[https://git-scm.com/][git]]
- [[https://gnupg.org/][gnupg]]
- [[https://github.com/gokcehan/lf][lf]]
- [[https://neovim.io/][neovim]]
- [[https://tmux.github.io/][tmux]]
- [[https://vifm.info/][vifm]]
* Zsh
** Theme
- [[https://github.com/denysdovhan/spaceship-prompt][spaceship zsh]]
** Plugin Manager
- [[https://github.com/zplug/zplug][zplug]]
** Plugins
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker][docker]]
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker-compose][docker-compose]]
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/extract][extract]]
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git][git]]
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/gitignore][gitignore]]
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/ripgrep][ripgrep]]
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/rsync][rsync]]
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/sudo][sudo]]
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/systemd][systemd]]
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/tmux][tmux]]
- [[https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/vi-mode][vi-mode]]
- [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]]
- [[https://github.com/zsh-users/zsh-syntax-highlighting][zsh-syntax-highlighting]]
* Configuration
** Installation
#+BEGIN_SRC shell
./install.sh
#+END_SRC
** Find & delete orphaned symlinks
#+BEGIN_SRC shell
./clean-dead-symlinks
#+END_SRC
* License
:PROPERTIES:
:CUSTOM_ID: license
:END:
This theme is released under the MIT License. For more information read
the [[file:LICENSE.org][license]].

14
git/.gitconfig Normal file
View File

@ -0,0 +1,14 @@
[name]
name = Ryan
email = ryan@andthensome.nl
[core]
editor = nvim
excludesfile = /home/alrayyes/.gitignore_global
[push]
default = matching
[user]
email = alrayyes@gmail.com
name = Ryan Kes
signingkey = alrayyes@gmail.com

105
lfcd/.config/lf/lfrc Normal file
View File

@ -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 <enter> 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<space>
# 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 '<delete>' key for either 'trash' or 'delete' command
# map <delete> trash
map <delete> 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
}}

View File

@ -1,3 +0,0 @@
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc

1
nvim/.config/nvim/init.vim Symbolic link
View File

@ -0,0 +1 @@
/home/alrayyes/.spf13-vim-3/.vimrc

@ -1 +0,0 @@
Subproject commit d848c94804918138375041a9f800f401bec12068

22
zsh/.zshenv Normal file
View File

@ -0,0 +1,22 @@
path_if_exists() {
if [[ -d $1 ]]; then
export PATH="$1:$PATH"
fi
}
# Stop tmux bitching about 256 colours
TERM="xterm-256color"
# PATH
path_if_exists ~/.config/yarn/global/node_modules/.bin
path_if_exists ~/.local/bin
path_if_exists ~/.emacs.d/bin
# Set GPG TTY
export GPG_TTY="$(tty)"
# editor
export EDITOR="nvim"
# Save history file in proper place
HISTFILE=~/.cache/zsh/history

View File

@ -1,127 +1,60 @@
# Ifkyou come from bash you might have to change your $PATH. source_if_exists() {
# export PATH=$HOME/bin:/usr/local/bin:$PATH if [[ -f $1 ]]; then
source $1
fi
}
# Stop tmux bitching about 256 colours # Check if zplug is installed
TERM="xterm-256color" if [[ ! -d ~/.zplug ]]; then
git clone https://github.com/b4b4r07/zplug ~/.zplug
fi
source ~/.zplug/init.zsh
# Path to your oh-my-zsh installation. # Spaceship theme
ZSH="/home/alrayyes/.oh-my-zsh" zplug "denysdovhan/spaceship-prompt", use:spaceship.zsh, from:github, as:theme
# Set name of the theme to load. Optionally, if you set this to "random" # Oh my zsh lugins
# it'll load a random theme each time that oh-my-zsh is loaded. # sudo must start after vi-mode for it to work properly
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes zplug "plugins/docker", from:oh-my-zsh
#ZSH_THEME="robbyrussell" zplug "plugins/docker-compose", from:oh-my-zsh
ZSH_THEME="powerlevel9k/powerlevel9k" zplug "plugins/extract", from:oh-my-zsh
zplug "plugins/git", from:oh-my-zsh
zplug "plugins/gitignore", from:oh-my-zsh
zplug "plugins/ripgrep", from:oh-my-zsh
zplug "plugins/rsync", from:oh-my-zsh
zplug "plugins/systemd", from:oh-my-zsh
zplug "plugins/tmux", from:oh-my-zsh
zplug "plugins/vi-mode", from:oh-my-zsh
zplug "plugins/sudo", from:oh-my-zsh
zplug "zsh-users/zsh-autosuggestions", from:github, defer:3
zplug "zsh-users/zsh-syntax-highlighting", from:github, defer:3
# Uncomment the following line to use case-sensitive completion. # Install packages
# CASE_SENSITIVE="true" if ! zplug check --verbose; then
printf "Install zplug plugins? [y/N]: "
if read -q; then
echo
zplug install
fi
fi
# Uncomment the following line to use hyphen-insensitive completion. Case zplug load
# 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 )
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 # nvim alias
alias vim="nvim" alias vim="nvim"
alias vi="nvim"
# ls alias # ls alias
alias ls="lsd" alias ls="exa"
alias l="lsd -al" alias l="exa -al"
# vifm alias # vifm alias
alias vifm="vifmrun" 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
export PATH="$PATH:/home/alrayyes/.config/yarn/global/node_modules/.bin:/home/alrayyes/.scripts"
# Set GPG TTY
export GPG_TTY="$(tty)"
# Set default browser
export BROWSER="firefox"
# Set default terminal
export TERMINAL="st"
# pkg editor
export VISUAL="vim"
# Enable password store extensions
export PASSWORD_STORE_ENABLE_EXTENSIONS="true"
# Refresh gpg-agent tty in case user switches into an X session # Refresh gpg-agent tty in case user switches into an X session
gpg-connect-agent updatestartuptty /bye >/dev/null gpg-connect-agent updatestartuptty /bye >/dev/null
source_if_exists ~/.fzf/key-bindings.zsh
source_if_exists ~/.fzf/completion.zsh
neofetch neofetch