106 Commits

Author SHA1 Message Date
Fabian Ising
293b1cd4cc [ZSH] Move optional config files to the bottom 2025-08-12 16:20:09 +02:00
Fabian Ising
baf8cfdddf [ZSH] Add git variables 2025-08-12 16:14:56 +02:00
murgi
7b6e35a1be [NVIM] Fix osc52 typo 2025-08-06 10:41:03 +02:00
Fabian Ising
6fdcef86b2 [NVIM] Check for OSC52 support 2025-08-06 10:14:48 +02:00
murgi
c825643148 [ZSH] Fix autopull 2025-08-05 14:34:08 +02:00
murgi
fe309df985 [ZSH] Fix autopull 2025-08-05 12:44:21 +02:00
murgi
d67e725497 [ZSH] Add autopull for repo 2025-08-05 12:38:26 +02:00
murgi
1cf948885a [ZSH] Temporarily create nvim shared config file 2025-08-05 10:00:29 +02:00
murgi
eddb0c81e3 [NVIM] Disable OSC52 on shared systems 2025-08-05 09:52:20 +02:00
Fabian Ising
689412b474 [ZSH] Add completion rehash 2025-08-04 11:49:09 +02:00
Fabian Ising
a06b25c883 [ZSH] Optimize History handling 2025-07-31 15:25:01 +02:00
Fabian Ising
57045ac50d [all] Switch to nvim snap 2025-05-09 13:56:27 +02:00
Fabian Ising
e2711e52f6 [zsh] Add snap to path 2025-05-09 13:34:28 +02:00
murgi
d6a0080561 [zsh] Add XDG Home 2025-05-08 09:10:37 +02:00
Fabian Ising
4245e17133 [nvim] Use OSC52 2025-05-08 08:49:52 +02:00
10f7c19e1d Update clone_and_link.sh 2025-04-18 09:02:42 +02:00
murgi
055aff3c3c [ALL] Fix ssh_tty permissions 2025-04-18 08:55:42 +02:00
Fabian Ising
0e251ec36a [tmux] Allow cross-ssh copying 2025-04-18 08:52:11 +02:00
Fabian Ising
edde785a03 [tmux] Change theme 2025-04-18 08:52:11 +02:00
Fabian Ising
a8330549a8 [nvim] Delete without copy 2025-01-10 10:02:23 +01:00
Fabian Ising
84bfcd0297 [zsh] change config depending on user 2025-01-08 10:39:28 +01:00
Fabian Ising
4d194d822f [zsh] change config depending on user 2025-01-08 09:49:46 +01:00
Fabian Ising
d6fd2f6d61 [all] Link examples files (instead of cp) 2024-12-20 12:47:54 +01:00
Fabian Ising
9521ed086c [vim] Fixate python to correct version 2024-12-20 11:43:07 +01:00
Fabian Ising
3b2089d4c6 [vim] Fixate python 2024-12-20 11:33:13 +01:00
murgi
87d85a4e34 [ZSH] Disable vi mode for shared setups 2024-10-14 16:38:40 +02:00
murgi
07a66952ad [ZSH] Actually use shared plugins file 2024-10-14 16:02:14 +02:00
Fabian Ising
115a3d0d6a [ZSH] Fix paste autosuggest 2024-10-14 15:54:06 +02:00
Fabian Ising
2a3bf65169 [ZSH] Fix slow paste 2024-10-14 15:51:20 +02:00
Fabian Ising
cb4e36a568 [zsh] Fix delete wrong file 2024-10-13 08:46:31 +02:00
Fabian Ising
16496c1b9a [zsh] Simplify shared config 2024-10-13 08:41:25 +02:00
Fabian Ising
be42293f1c [ZSH] Workaround for powerlevel10k issue #1554 2024-10-07 14:30:23 +02:00
Fabian Ising
21121ad69d [All] Add curl install for shared installs 2024-08-01 11:36:20 +02:00
Fabian Ising
c23e995431 [All] Add curl install 2024-08-01 11:35:57 +02:00
Fabian Ising
503fc4471e [NVIM] Fix vim-plug install 2024-07-19 14:38:47 +02:00
Fabian Ising
855d94a1a6 [ZSH] Switch back docker completion 2024-07-19 13:26:32 +02:00
Fabian Ising
6c15ac33e8 [setup] Fix ubuntu glob 2024-07-19 09:11:53 +02:00
Fabian Ising
bf8080ba70 [tmux] Fix PATH 2024-07-18 16:23:18 +02:00
Fabian Ising
4cd6aedf32 [all] Fix noglob setup error 2024-07-01 13:39:53 +00:00
Fabian Ising
21025d1ba7 [all] Fix ubunut pynvim install 2024-07-01 13:29:55 +00:00
Fabian Ising
4cd2a69c5b [all] Fix clone_and_link script 2024-07-01 13:26:23 +00:00
Fabian Ising
0d332ab5e6 [nvim] Use neovim env if available 2024-04-12 23:30:40 +02:00
Fabian Ising
8a428ac3a5 [zsh] Set LIBVIRT URI 2024-03-26 14:12:09 +01:00
Fabian Ising
3808390af2 [all] Ignore pycache 2024-03-19 15:22:31 +01:00
Fabian Ising
58e7939a68 [zsh] Change time style to long iso 2024-03-19 15:22:06 +01:00
Fabian Ising
0ac57fb714 [zsh] Add config for shared servers 2024-01-10 16:29:27 +01:00
Fabian Ising
0814ed539a [zsh] Fix docker completion 2023-12-18 14:34:40 +01:00
murgi
1b9e0c1a82 [zsh] Save SSH-agent in var 2023-10-31 12:34:17 +01:00
murgi
f8de99b825 [zsh] Save SSH-agent in var 2023-10-31 12:19:57 +01:00
Fabian Ising
e415b2f32d [zsh] vi mode, cleanup 2023-07-21 09:24:29 +02:00
Fabian Ising
57e67fb2dc Add cgrep alias 2023-07-18 14:54:43 +02:00
Fabian Ising
8a3ec7bf84 [tmux] Add second prefix 2023-07-17 12:44:07 +02:00
Fabian Ising
695f09ba8d Switch prefix, recolor 2023-07-17 11:07:35 +02:00
Fabian Ising
2b175bead0 Add docker plugins 2023-07-11 15:19:58 +02:00
murgi
0d4129c0ef [vim] Add outdated plugin notification 2023-04-14 09:28:35 +02:00
Fabian Ising
873107b1f2 [zsh] Add os specific config file 2023-04-14 09:21:55 +02:00
murgi
6aeab855eb Remove tmux wrapper 2022-11-14 11:55:14 +01:00
Fabian Ising
cd703bd9ea Merge branch 'main' into server 2022-10-26 15:26:24 +02:00
Fabian Ising
b78a34f74a Remove powerline dependency 2022-10-26 15:23:36 +02:00
Fabian
6c3e520d20 Add ubuntu setup 2022-10-26 13:09:21 +00:00
Fabian Ising
2e783e24b6 Remove unnecessary PATH manipulation 2022-10-24 12:55:10 +02:00
Fabian Ising
ebd8e331d6 Reattach tmux sessions on alacritty start 2022-10-24 12:53:54 +02:00
Fabian Ising
b4d81ec06a Make colorscheme configuration templates 2022-10-24 11:59:58 +02:00
Fabian Ising
982dd1d1bf Add color switching 2022-10-24 11:38:50 +02:00
Fabian Ising
0b2f96683c Improve setup scripts, reset tmux path 2022-10-07 09:01:35 +02:00
Fabian Ising
ec0340a4b9 Merge branch 'main' into server 2022-10-07 08:41:12 +02:00
Fabian Ising
bb16baf6b6 Cleanup 2022-10-07 08:40:47 +02:00
Fabian Ising
de0e1a53e7 Cleanup 2022-10-07 08:40:03 +02:00
murgi
50c2a410b3 Remove tmux-open 2022-10-07 08:32:37 +02:00
murgi
382e1a4be2 Merge branch 'main' into server 2022-10-07 08:26:43 +02:00
Fabian Ising
90f96f875f Add note on nvim plugin dir 2022-10-06 17:02:37 +02:00
Fabian Ising
6b6bbf6fcc Remove pathogen 2022-10-06 16:39:49 +02:00
Fabian Ising
532d539ddc OS agnostic tmux path for alacritty 2022-10-06 16:38:03 +02:00
Fabian Ising
0e60423de9 Auto install new nvim plugins 2022-10-06 16:37:30 +02:00
Fabian Ising
629c3b6985 Fix missing zsh cache dir 2022-10-06 16:36:52 +02:00
Fabian Ising
19d2d39e15 Remove submodules, tpm auto install 2022-10-06 16:36:16 +02:00
Fabian Ising
0b3db63868 Cleanup zshrc 2022-09-27 13:18:21 +02:00
Fabian Ising
953ef0e5df Fix p10k 2022-09-27 12:43:40 +02:00
Fabian Ising
1a7515f148 Change tmux hotkeys 2022-09-27 12:38:22 +02:00
Fabian Ising
609789fba7 Merge branch 'main' into server 2022-09-27 12:37:43 +02:00
Fabian Ising
71b9db4cae Add virtual env config on MacOS 2022-09-27 12:31:54 +02:00
Fabian Ising
11a589d138 Fix neovim in virtualenvs 2022-09-27 12:31:18 +02:00
Fabian Ising
b2b8d42d70 Fix antidote config 2022-09-06 13:25:54 +02:00
Fabian Ising
9352ac948e Switch to antidote plugin manager 2022-09-06 10:50:17 +02:00
Fabian Ising
9cd5f4323f Fix some mac setup stuff 2022-09-05 14:41:15 +02:00
Fabian Ising
c80b8a7c71 Switch from Vundle to vim-plug 2022-09-05 14:40:20 +02:00
Fabian Ising
6e1373a67d Update 2022-09-05 10:52:43 +02:00
Fabian Ising
3ccf1b4023 Disable mouse yanking 2022-07-06 12:06:58 +02:00
Fabian Ising
916095cebd Add alacritty config for macos 2022-07-06 11:41:32 +02:00
Fabian Ising
cd1f0ada29 Fix tmux copying, remove old plugins, cleanup 2022-07-06 11:41:04 +02:00
Fabian Ising
ce7869b2f0 Add mac setup script 2022-07-06 11:39:50 +02:00
Fabian Ising
3bac32cbec Update config for python3.10 2022-07-05 13:22:11 +02:00
Fabian Ising
eaddae6937 Update fonts 2022-07-05 13:01:06 +02:00
Fabian Ising
303b3f4055 Remove nerdcommenter leader-hotkey in insert mode 2022-03-08 11:35:20 +01:00
Fabian
3c91b8eed4 Ignore insecure directories for antigen compinit 2022-02-17 10:56:22 +01:00
Fabian
76af77e37f Update link scripts 2022-02-17 10:52:12 +01:00
Fabian
db0af81c9f Update antigen 2022-02-17 10:44:24 +01:00
Fabian Ising
83b60feaf7 Update linking on mac 2022-02-17 10:14:55 +01:00
Fabian Ising
3f271925e8 Fix p10k config loading 2022-02-17 10:06:56 +01:00
Fabian Ising
3a457db8e4 Gitignore mac p10k zsh config 2022-02-17 10:04:10 +01:00
Fabian Ising
5f7464780f Merge branch 'master' 2022-02-17 10:00:24 +01:00
Fabian Ising
40efd721fd Add mac specific p10k config 2022-02-17 09:59:48 +01:00
Fabian Ising
d0ae4ef7f8 Move zsh p10k context to the left 2022-02-17 09:54:33 +01:00
Fabian Ising
f511ee7e4c Cleanup init.vim, configure folding 2022-02-17 09:11:22 +01:00
Fabian Ising
7425286bca Move P10K context 2022-02-14 13:43:00 +00:00
Fabian Ising
1c2e5c9dbc Remove Youcompleteme and some other stuff 2022-02-14 12:48:35 +00:00
68 changed files with 5511 additions and 1678 deletions

1
.config/alacritty/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
schemes.yml

View File

@@ -1,48 +1,43 @@
import:
- ~/.config/alacritty/schemes.yml
env:
TERM: xterm-256color
font:
# The size to use.
size: 12
# The normal (roman) font face to use.
normal:
family: DejaVu Sans Mono For Powerline
family: "MesloLGS NF"
# Style can be specified to pick a specific face.
style: Regular
# The bold font face
bold:
family: DejaVu Sans Mono For Powerline
family: "MesloLGS NF"
# Style can be specified to pick a specific face.
# style: Bold
# The italic font face
italic:
family: DejaVu Sans Mono For Powerline
style: Bold
bold:
family: "MesloLGS NF"
# Style can be specified to pick a specific face.
# style: Italic
style: Bold
colors:
# Default colors
primary:
background: '0x323232'
foreground: '0xeeeeec'
window:
dynamic_title: true
padding:
x: 0
y: 0
# Normal colors
normal:
black: '0x2e3436'
red: '0xcc0000'
green: '0x4e9a06'
yellow: '0xc4a000'
blue: '0x3465a4'
magenta: '0x75507b'
cyan: '0x06989a'
white: '0xd3d7cf'
scrolling:
history: 0
# Bright colors
bright:
black: '0x555753'
red: '0xef2929'
green: '0x8ae234'
yellow: '0xfce94f'
blue: '0x729fcf'
magenta: '0xad7fa8'
cyan: '0x34e2e2'
white: '0xeeeeec'
shell:
program: zsh
args:
- "-c"
- "$HOME/.tmux/tmux_attach.sh"
alt_send_esc: false
live_config_reload: true
key_bindings:
- { key: F, mods: Control, command: {program: "zsh", args: ["-c","python3 ~/.config/alacritty/color_switcher.py"]} }
- { key: T, mods: Command, command: {program: "alacritty", args: ["-e","zsh"]} } # Spawn alacritty without tmux

View File

@@ -0,0 +1,66 @@
#!/usr/bin/env python3
import os
import re
CONFIG_FILE_NAME = "schemes.yml"
CONFIG_FILE_DIR = os.path.expanduser("~/.config/alacritty/")
CONFIG_FILE_PATH = os.path.join(CONFIG_FILE_DIR, CONFIG_FILE_NAME)
COLOR_SCHEME_LINE_SEARCH = "colors: \*(\S+)"
COLOR_SCHEME_LINE_TEMPLATE = "colors: *{}\n"
NVIM_CONFIG_FILE_DIR = os.path.expanduser("~/.config/nvim/")
NVIM_CONFIG_FILE_NAME = "scheme.vim"
NVIM_CONFIG_FILE_PATH = os.path.join(NVIM_CONFIG_FILE_DIR, NVIM_CONFIG_FILE_NAME)
NVIM_COLOR_SCHEME_LINE_SEARCH = "set background=(\S+)\ncolorscheme (\S+)"
NVIM_COLOR_SCHEME_LINE_TEMPLATE = "set background={}\ncolorscheme {}"
def change_alacritty_theme():
with open(CONFIG_FILE_PATH, "r") as config_file:
config_file.seek(0)
lines = config_file.readlines()
colors_line_index = -1
for i, line in enumerate(lines):
match = re.search(COLOR_SCHEME_LINE_SEARCH, line)
if match is not None:
current_color_scheme = match.group(1)
colors_line_index = i
if current_color_scheme == "dark_mode":
new_scheme = "solarized_light"
else:
new_scheme = "dark_mode"
lines[colors_line_index] = COLOR_SCHEME_LINE_TEMPLATE.format(
new_scheme)
with open(CONFIG_FILE_PATH, "w") as config_file:
for line in lines:
config_file.write(line)
return new_scheme
def change_vim_theme(light_mode=False):
with open(NVIM_CONFIG_FILE_PATH, "r") as config_file:
config_file.seek(0)
config = config_file.read()
if light_mode:
color_line = NVIM_COLOR_SCHEME_LINE_TEMPLATE.format("light", "solarized")
else:
color_line = NVIM_COLOR_SCHEME_LINE_TEMPLATE.format("dark", "badwolf")
res = re.sub(NVIM_COLOR_SCHEME_LINE_SEARCH, color_line, config)
with open(NVIM_CONFIG_FILE_PATH, "w") as config_file:
config = config_file.write(res)
def main():
new_theme = change_alacritty_theme()
change_vim_theme(new_theme == "solarized_light")
if __name__=="__main__":
main()

File diff suppressed because it is too large Load Diff

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
*.swp
.shared_config
tags
.DS_STORE
__pycache__

15
.gitmodules vendored
View File

@@ -1,15 +0,0 @@
[submodule "plugins/tpm"]
path = tmux/plugins/tpm
url = https://github.com/tmux-plugins/tpm.git
[submodule "antigen"]
path = zsh/antigen
url = https://github.com/zsh-users/antigen.git
[submodule "bundle/Vundle.vim"]
path = vim/bundle/Vundle.vim
url = https://github.com/VundleVim/Vundle.vim.git
[submodule "nvim/bundle/Vundle.vim"]
path = nvim/bundle/Vundle.vim
url = https://github.com/VundleVim/Vundle.vim.git

View File

@@ -1,4 +1,4 @@
#! /bin/sh
#! /bin/bash
#
# clone_and_link.sh
# Copyright (C) 2016 fabian <fabian@fabi-laptop-arch>
@@ -7,12 +7,24 @@
#
git submodule update --init --recursive
echo "ln -s $PWD/vim $HOME/.vim"
ln -Tsv $PWD/vim $HOME/.vim
ln -Tsv ~/.vim/.vimrc $HOME/.vimrc
ln -Tsv $PWD/zsh $HOME/.zsh
ln -Tsv ~/.zsh/.zshrc $HOME/.zshrc
ln -Tsv $PWD/tmux $HOME/.tmux
ln -Tsv ~/.tmux/.tmux.conf $HOME/.tmux.conf
ln -Tsv $PWD/nvim $HOME/.config/nvim
if [[ $1 == "shared" ]]; then
ln -Tsfv $PWD/zsh $HOME/.zsh
ln -Tsfv ~/.zsh/.zshrc $HOME/.zshrc
touch ~/.zsh/.shared_config
ln -Tsfv $PWD/tmux $HOME/.tmux
ln -Tsfv ~/.tmux/.tmux.conf $HOME/.tmux.conf
mkdir -p $HOME/.config
rm -rf $HOME/.config/nvim
ln -Tsfv $PWD/nvim $HOME/.config/nvim
touch $HOME/.config/nvim/.shared_config
else
ln -Tsfv $PWD/zsh $HOME/.zsh
ln -Tsfv ~/.zsh/.zshrc $HOME/.zshrc
ln -Tsfv $PWD/tmux $HOME/.tmux
ln -Tsfv ~/.tmux/.tmux.conf $HOME/.tmux.conf
mkdir -p $HOME/.config
rm -rf $HOME/.config/nvim
ln -Tsfv $PWD/nvim $HOME/.config/nvim
fi
cat $PWD/ssh_tty | sudo tee /etc/sudoers.d/ssh_tty > /dev/null

View File

@@ -1,18 +0,0 @@
#! /bin/sh
#
# clone_and_link.sh
# Copyright (C) 2016 fabian <fabian@fabi-laptop-arch>
#
# Distributed under terms of the MIT license.
#
git submodule update --init --recursive
echo "ln -s $PWD/vim $HOME/.vim"
ln -sv $PWD/vim $HOME/.vim
ln -sv ~/.vim/.vimrc $HOME/.vimrc
ln -sv $PWD/zsh $HOME/.zsh
ln -sv ~/.zsh/.zshrc $HOME/.zshrc
ln -sv $PWD/tmux $HOME/.tmux
ln -sv ~/.tmux/.tmux.conf $HOME/.tmux.conf

12
copy_fonts_arch.sh Executable file
View File

@@ -0,0 +1,12 @@
#! /bin/sh
#
# copy_fonts_arch.sh
# Copyright (C) 2022 fabian <fabian@krikkit>
#
# Distributed under terms of the MIT license.
#
mkdir -p $HOME/.local/share/fonts
for filename in fonts/*; do
cp "$filename" "$HOME/.local/share/$filename"
done

Binary file not shown.

BIN
fonts/MesloLGS NF Bold.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,12 +0,0 @@
#! /bin/sh
#
# general_setup.sh
# Copyright (C) 2016 fabian <fabian@testvm>
#
# Distributed under terms of the MIT license.
#
echo "exit" | zsh
chsh -s /usr/bin/zsh
tmux
echo ":PluginInstall" | vim

View File

@@ -1,104 +0,0 @@
#if __has_include(".extend.Xresources")
#include ".extend.Xresources"
#endif
! ^ The above lines are no comments!
! Leave them as they are if a file ~/.extend.Xresources is being used on your system.
! config can be added there or also here below.
! For comments use "!"
Xft.dpi: 96
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.autohint: false
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
XTerm*background: #2b2b2b
XTerm*foreground: #e7e7e7
XTerm*pointerColor: #16A085
XTerm*faceName: Input Mono:size=9:antialias=false
XTerm*font: 7x13
#define base00 #282936
#define base01 #3a3c4e
#define base02 #4d4f68
#define base03 #626483
#define base04 #62d6e8
#define base05 #e9e9f4
#define base06 #f1f2f8
#define base07 #f7f7fb
#define base08 #ea51b2
#define base09 #b45bcf
#define base0A #00f769
#define base0B #ebff87
#define base0C #a1efe4
#define base0D #62d6e8
#define base0E #b45bcf
#define base0F #00f769
! URxvt settings
URxvt*font: xft:Input\ Mono:pixelsize=11
URxvt*boldFont: xft:Input\ Mono:pixelsize=11
URxvt*loginShell: true
URxvt*cursorUnderline: false
URxvt*scrollBar: false
URxvt*letterSpace: 1
URxvt*imLocale: en_US.UTF-8
!URxvt*scrollstyle: plain
!URxvt*scrollBar_right: true
URxvt*termName: rxvt
URxvt.buffered: true
URxvt.perl-ext: default,matcher
URxvt.urlLauncher: /bin/firefox
URxvt.matcher.button: 1
URxvt.transparent: False
URxvt.shading: 5
URxvt*foreground: #1abc9c
URxvt*background: #1F2D3A
URxvt*cursorColor: #1abc9c
URxvt*color0: #2c3e50
URxvt*color1: #c0392b
URxvt*color2: #27ae60
URxvt*color3: #f39c12
URxvt*color4: #2980b9
URxvt*color5: #8e44ad
URxvt*color6: #16a085
URxvt*color7: #bdc3c7
URxvt*color8: #34495e
URxvt*color9: #e74c3c
URxvt*color10: #2ecc71
URxvt*color11: #f1c40f
URxvt*color12: #3498db
URxvt*color13: #9b59b6
URxvt*color14: #2AA198
URxvt*color15: #ecf0f1
! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
! use 'shell' template to set these if necessary
URxvt*color16: base09
URxvt*color17: base0F
URxvt*color18: base01
URxvt*color19: base02
URxvt*color20: base04
URxvt*color21: base06
URxvt*keysym.Shift-Control-V: perl:clipboard:paste
URxvt*iso14755: False
URxvt*perl-ext-common: default,clipboard
! ------------------------------------------------------------------------------
! ROFI Color theme
! ------------------------------------------------------------------------------
rofi.color-enabled: true
rofi.color-window: #273238, #273238, #1e2529
rofi.color-normal: #273238, #c1c1c1, #273238, #394249, #ffffff
rofi.color-active: #273238, #80cbc4, #273238, #394249, #80cbc4
rofi.color-urgent: #273238, #ff1844, #273238, #394249, #ff1844

View File

@@ -1,5 +0,0 @@
xrandr --setprovideroffload 1 0
setxkbmap de
xrdb -merge ~/.Xresources
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK

View File

@@ -1 +0,0 @@
KERNEL=="card0", SUBSYSTEM=="drm", ACTION=="change", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/fabian/.Xauthority", RUN+="/bin/bash /usr/local/bin/auto_monitor.sh"

View File

@@ -1,62 +0,0 @@
#! /bin/sh
#
# monitors.sh
# Copyright (C) 2017 Fabian Ising <fabian@murgi.de>
#
# Distributed under terms of the Apache v2.0 license.
#
# Get out of town if something errors
set -e
HDMI_STATUS=$(</sys/class/drm/card0/card0-HDMI-A-1/status )
HDMI2_STATUS=$(</sys/class/drm/card0/card0-HDMI-A-2/status )
DP_STATUS=$(</sys/class/drm/card0/card0-DP-1/status )
I3CONFIG=/home/fabian/i3/i3config
echo "Rule run" >> /tmp/udev_test
OUT2="eDP-1"
if [ "connected" == "$HDMI_STATUS" ]; then
xrandr >> /tmp/udev_test
/usr/bin/xrandr --output eDP-1 --auto --left-of HDMI-1
/usr/bin/notify-send --urgency=low -t 5000 "Graphics Update" "HDMI-1 plugged in"
echo "HDMI connected" >> /tmp/udev_test
xrandr >> /tmp/udev_test
OUT2="HDMI-1"
else
/usr/bin/xrandr --output HDMI-1 --off
/usr/bin/notify-send --urgency=low -t 5000 "Graphics Update" "External monitor (HDMI-1) disconnected"
echo "HDMI disconnected" >> /tmp/udev_test
fi
if [ "connected" == "$HDMI2_STATUS" ]; then
xrandr >> /tmp/udev_test
/usr/bin/xrandr --output eDP-1 --auto --left-of HDMI-2
/usr/bin/notify-send --urgency=low -t 5000 "Graphics Update" "HDMI-2 plugged in"
echo "HDMI-2 connected" >> /tmp/udev_test
xrandr >> /tmp/udev_test
OUT2="HDMI-2"
else
/usr/bin/xrandr --output HDMI-2 --off
/usr/bin/notify-send --urgency=low -t 5000 "Graphics Update" "External monitor (HDMI-2) disconnected"
echo "HDMI disconnected" >> /tmp/udev_test
fi
if [ "connected" == "$DP_STATUS" ]; then
xrandr >> /tmp/udev_test
/usr/bin/xrandr --output eDP-1 --auto --right-of DP-1
/usr/bin/notify-send --urgency=low -t 5000 "Graphics Update" "DP-1 plugged in"
echo "DP connected" >> /tmp/udev_test
xrandr >> /tmp/udev_test
OUT2="DP-1"
else
/usr/bin/xrandr --output DP-1 --off
/usr/bin/notify-send --urgency=low -t 5000 "Graphics Update" "External monitor (DP-1) disconnected"
echo "DP disconnected" >> /tmp/udev_test
fi
sed 's/^set\s\s*$OUTPUT_EVEN\s.*/set $OUTPUT_EVEN '$OUT2'/' -i "$I3CONFIG"
i3-msg [workspace=2] move workspace to output $OUT2
i3-msg [workspace=4] move workspace to output $OUT2
i3-msg [workspace=6] move workspace to output $OUT2
i3-msg reload

View File

@@ -1,232 +0,0 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $OUTPUT_ODD eDP-1
set $OUTPUT_EVEN eDP-1
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesnt scale on retina/hidpi displays.
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec "termite -e tmux"
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
#bindsym $mod+d exec i3-dmenu-desktop
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+minus split h
# split in vertical orientation
bindsym $mod+bar split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+ctrl+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+ctrl+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+ctrl+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+ctrl+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+ctrl+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+ctrl+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+ctrl+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+ctrl+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+ctrl+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
bindsym $mod+ctrl+0 move container to workspace 10
# reload the configuration file
bindsym $mod+Shift+c exec "i3-msg reload && /usr/bin/notify-send -t 5000 --urgency=low 'Reload' 'Reloaded i3 config'"
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym odiaeresis resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
mode "moveit" {
bindsym Up move up 20px
bindsym Left move left 20px
bindsym Down move down 20px
bindsym Right move right 20px
bindsym $mod+m mode "default"
bindsym Escape mode "default"
}
bindsym $mod+m focus floating; mode "moveit"
# Sound
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 5%+ unmute
bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 5%- unmute
bindsym XF86AudioMute exec "amixer set Master 1+ toggle && amixer -c 0 set IEC958 1+ toggle"
#Rofi
bindsym $mod+d exec --no-startup-id "rofi -show drun"
bindsym $mod+Shift+s exec --no-startup-id "rofi -show window"
bindsym $mod+x exec --no-startup-id "rofi -combi-modi window,drun -show window -show drun"
bindsym Mod1+Tab exec --no-startup-id "rofi -show window"
bindsym Mod1+F2 exec --no-startup-id "rofi -show run"
#Lock
bindsym $mod+Escape exec --no-startup-id "i3lock -d -c 000000 -f"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
#status_command i3status
#}
exec --no-startup-id nitrogen --restore
exec --no-startup-id nm-applet
exec --no-startup-id owncloud
exec --no-startup-id "xset dpms 60"
exec --no-startup-id "polybar top"
exec --no-startup-id "polybar bottom"
exec --no-startup-id "xfsettingsd"
exec --no-startup-id "xfce4-power-manager"
exec --no-startup-id "owncloud"
#exec --no-startup-id "caffeine"
#Colors
# class border backgr. text indicator child_border
client.placeholder #242424 #242424 #242424
client.background #242424 #242424 #242424
client.focused #4A4A4A #4A4A4A #e5e5e5 #4A4A4A
client.unfocused #222222 #222222 #aaaaaa #222222
client.focused_inactive #222222 #222222 #a9a9a9 #222222
client.urgent #4A4A4A #4A4A4A #f7f7f7 #4A4A4A
hide_edge_borders both
# Change monitor mirroring
bindsym XF86Display exec --no-startup-id "/usr/local/bin/switch_monitors.sh"
bindsym Shift+XF86Display exec --no-startup-id "/usr/local/bin/switch_monitors.sh mirror"
# pdfpc
assign [class="Pdfpc" window_role="presenter"] 1
assign [class="Pdfpc" window_role="presentation"] 2
# multi monitor
workspace 1 output $OUTPUT_ODD
workspace 2 output $OUTPUT_EVEN
workspace 3 output $OUTPUT_ODD
workspace 4 output $OUTPUT_EVEN
workspace 5 output $OUTPUT_ODD
workspace 6 output $OUTPUT_EVEN

View File

@@ -1,25 +0,0 @@
#! /bin/sh
#
# link_config.sh
# Copyright (C) 2016 fabian <fabian@tmurgi.de>
#
# Distributed under terms of the MIT license.
#
mkdir -p $HOME/.config/i3
mkdir -p $HOME/.config/polybar
ln -Ts $PWD/i3config ~/.config/i3/config
ln -Ts $PWD/polybarconfig ~/.config/polybar/config
ln -Ts $PWD/.xinitrc ~/.xinitrc
ln -Ts $PWD/.Xresources ~/.Xresources
while true; do
read -p "Is this your laptop? [y/n]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
sudo ln -Ts $PWD/auto_monitor.sh /usr/local/bin/auto_monitor.sh
sudo ln -Ts $PWD/switch_monitors.sh /usr/local/bin/switch_monitors.sh
sudo ln -Ts $PWD/98-monitor-hotplug.rules /etc/udev/rules.d/98-monitor-hotplug.rules

View File

@@ -1,474 +0,0 @@
;=====================================================
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;=====================================================
[colors]
background = #222
background-alt = #444
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/top]
monitor = eDP-1
monitor-fallback = HDMI-1
width = 100%
height = 27
;offset-x = 1%
;offset-y = 1%
radius = 6.0
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
;font-0 = fixed:pixelsize=10;1
;font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
;font-2 = siji:pixelsize=10;1
font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = MaterialIcons:antialias=false;pixelsize=10;1
font-3 = PowerlineSymbols:size=10;1
font-4 = FontAwesome:pixelsize=12
modules-left = i3
modules-center = date
modules-right = filesystem xkeyboard volume powermenu
;tray-position =
;tray-padding = 2
;tray-transparent = true
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
;
;[module/date]
;type = internal/date
;; Seconds to sleep between updates
;interval = 1.0
;; See "man date" for details on how to format the date string
;; NOTE: if you want to use syntax tags here you need to use %%{...}
;date = %Y-%m-%d%
;; Optional time format
;time = %H:%M
;; if `date-alt` or `time-alt` is defined, clicking
;; the module will toggle between formats
;date-alt = %A%, %d %B %Y
;time-alt = %H:%M:%S
[bar/bottom]
monitor = eDP-1
monitor-fallback = HDMI-1
width = 100%
height = 27
fixed-center = true
bottom = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 2
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = MaterialIcons:pixelsize=10;1
font-3 = PowerlineSymbols:pixelsize=12
font-4 = FontAwesome:pixelsize=12
;modules-left = bspwm i3
;modules-right = i3
modules-center = memory cpu
modules-right = temperature
modules-left = battery backlight-acpi
tray-position = right
tray-padding = 2
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = "⌨ "
format-prefix-foreground = ${colors.foreground}
format-prefix-underline = ${colors.secondary}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /home
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 25
label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 20
bar-indicator = |
bar-indicator-foreground = #ff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage%%
;[module/memory]
;type = internal/memory
;interval = 2
;format-prefix = " "
;format-prefix-foreground = ${colors.foreground-alt}
;format-underline = #4bffdc
;label = %percentage_used%%
[module/memory]
type = internal/memory
interval = 2
; Available tags:
; <label> (default)
; <bar-used>
; <bar-free>
format = <label> <bar-used>
; Available tokens:
; %percentage_used% (default)
; %percentage_free%
; %gb_used%
; %gb_free%
; %gb_total%
; %mb_used%
; %mb_free%
; %mb_total%
label = RAM %gb_used%/%gb_total%
; Only applies if <bar-used> is used
bar-used-indicator =
bar-used-width = 15
bar-used-foreground-0 = #55aa55
bar-used-foreground-1 = #557755
bar-used-foreground-2 = #f5a70a
bar-used-foreground-3 = #ff5555
bar-used-fill = ▐
bar-used-empty = ▐
bar-used-empty-foreground = #444444
format-underline = #4bffdc
[module/wlan]
type = internal/network
interface =
interval = 3.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface =
interval = 3.0
format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 5
date = " %Y-%m-%d"
date-alt = " %Y-%m-%d"
time = %H:%M:%S
time-alt = %H:%M:%S
format-prefix =
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time%
[module/volume]
type = internal/volume
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground}
label-muted = " sound muted"
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT1
adapter = ACAD
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix =""
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-0-foreground = ${colors.alert}
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature%
label-warn = %temperature%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-foreground = ${colors.foreground-alt}
ramp-3-foreground = ${colors.alert}
[module/powermenu]
type = custom/menu
format-spacing = 1
label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-0-2 =  Lock
menu-0-2-exec = i3lock
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = systemctl reboot
menu-2-0 = power off
menu-2-0-exec = systemctl poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini

View File

@@ -1,115 +0,0 @@
#! /bin/sh
#
# switch_monitors.sh
# Copyright (C) 2017 Fabian Ising <fabian@murgi.de>
#
# Distributed under terms of the Apache v2.0 license.
#
# Get info on the monitors
HDMI_STATUS=$(</sys/class/drm/card0/card0-HDMI-A-1/status )
HDMI_ENABLED=$(</sys/class/drm/card0/card0-HDMI-A-1/enabled)
DP_STATUS=$(</sys/class/drm/card0/card0-DP-1/status )
DP_ENABLED=$(</sys/class/drm/card0/card0-DP-1/enabled )
# Check to see if our state log exists
if [ ! -f /tmp/monitor ]; then
touch /tmp/monitor
STATE=5
else
STATE=$(</tmp/monitor)
fi
# The state log has the NEXT state to go to in it
# If monitors are disconnected, stay in state 1
if [ "disconnected" == "$HDMI_STATUS" -a "disconnected" == "$DP_STATUS" ]; then
STATE=5
fi
if [ $1 == "mirror" ]; then
if [ $STATE == 4 ]; then
/usr/bin/notify-send -t 5000 --urgency=low "Graphics Update" "Mirror Stuff from $STATE to 5"
# eDP-1 is on, projectors are mirroring
if [ "connected" == "$HDMI_STATUS" ]; then
/usr/bin/xrandr --output eDP-1 --auto --output HDMI-1 --auto --same-as eDP-1
TYPE="HDMI"
elif [ "connected" == "$DP_STATUS" ]; then
/usr/bin/xrandr --output eDP-1 --auto --output HDMI-1 --off --output DP-1 --auto --same-as eDP-1
TYPE="DP-1"
fi
/usr/bin/notify-send -t 5000 --urgency=low "Graphics Update" "Switched to $TYPE mirroring"
STATE=5
else
/usr/bin/notify-send -t 5000 --urgency=low "Graphics Update" "Mirror Stuff from $STATE to 4"
# eDP-1 is on, projectors are extending
if [ "connected" == "$HDMI_STATUS" ]; then
/usr/bin/xrandr --output eDP-1 --auto --output HDMI-1 --auto --right-of eDP-1
TYPE="HDMI"
elif [ "connected" == "$DP_STATUS" ]; then
/usr/bin/xrandr --output eDP-1 --auto --output HDMI-1 --off --output DP-1 --auto --left-of eDP-1
TYPE="DP-1"
fi
/usr/bin/notify-send -t 5000 --urgency=low "Graphics Update" "Switched to $TYPE extending"
STATE=4
fi
else
TYPE="eDP-1"
case $STATE in
1)
# eDP-1 is on, projectors not connected
/usr/bin/xrandr --output eDP-1 --auto
STATE=2
/usr/bin/notify-send -t 5000 --urgency=low "Graphics Update" "Switched to $TYPE"
;;
2)
# eDP-1 is on, projectors are connected but inactive
/usr/bin/xrandr --output eDP-1 --auto --output HDMI-1 --off
TYPE="eDP-1"
STATE=3
/usr/bin/notify-send -t 5000 --urgency=low "Graphics Update" "Switched to $TYPE"
;;
3)
# eDP-1 is off, projectors are on
if [ "connected" == "$HDMI_STATUS" ]; then
/usr/bin/xrandr --output eDP-1 --off --output HDMI-1 --auto
TYPE="HDMI"
elif [ "connected" == "$DP_STATUS" ]; then
/usr/bin/xrandr --output eDP-1 --off --output HDMI-1 --off --output DP-1 --auto
TYPE="DP-1"
fi
/usr/bin/notify-send -t 5000 --urgency=low "Graphics Update" "Switched to $TYPE"
STATE=4
;;
4)
# eDP-1 is on, projectors are mirroring
if [ "connected" == "$HDMI_STATUS" ]; then
/usr/bin/xrandr --output eDP-1 --auto --output HDMI-1 --auto --same-as eDP-1
TYPE="HDMI"
elif [ "connected" == "$DP_STATUS" ]; then
/usr/bin/xrandr --output eDP-1 --auto --output HDMI-1 --off --output DP-1 --auto --same-as eDP-1
TYPE="DP-1"
fi
/usr/bin/notify-send -t 5000 --urgency=low "Graphics Update" "Switched to $TYPE mirroring"
STATE=5
;;
5)
# eDP-1 is on, projectors are extending
if [ "connected" == "$HDMI_STATUS" ]; then
/usr/bin/xrandr --output eDP-1 --auto --output HDMI-1 --auto --right-of eDP-1
TYPE="HDMI"
elif [ "connected" == "$DP_STATUS" ]; then
/usr/bin/xrandr --output eDP-1 --auto --output HDMI-1 --off --output DP-1 --auto --left-of eDP-1
TYPE="DP-1"
fi
/usr/bin/notify-send -t 5000 --urgency=low "Graphics Update" "Switched to $TYPE extending"
STATE=2
;;
*)
# Unknown state, assume we're in 1
STATE=1
esac
fi
echo $STATE > /tmp/monitor

View File

@@ -11,3 +11,7 @@ for filename in .config/*; do
done
ln -Ts $PWD/nvim $HOME/.config/nvim
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
cat $PWD/ssh_config >> $HOME/.ssh/config

3
nvim/.gitignore vendored
View File

@@ -6,3 +6,6 @@ __pycache__/
bundle/*
!bundle/Vundle.vim
*.swp
# Prevent changes to propagate to all systems
scheme.vim

View File

@@ -1 +0,0 @@
set rtp+=/usr/lib/python3.6/site-packages/powerline/bindings/vim

View File

@@ -1 +0,0 @@
set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim

View File

@@ -1 +0,0 @@
set rtp+=$HOME/.local/lib/python3.9/site-packages/powerline/bindings/vim

View File

@@ -1,347 +0,0 @@
" pathogen.vim - path option manipulation
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 2.3
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
"
" For management of individually installed plugins in ~/.vim/bundle (or
" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your
" .vimrc is the only other setup necessary.
"
" The API is documented inline below.
if exists("g:loaded_pathogen") || &cp
finish
endif
let g:loaded_pathogen = 1
" Point of entry for basic default usage. Give a relative path to invoke
" pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke
" pathogen#surround(). Curly braces are expanded with pathogen#expand():
" "bundle/{}" finds all subdirectories inside "bundle" inside all directories
" in the runtime path.
function! pathogen#infect(...) abort
for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}']
if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*[{}*]'
call pathogen#surround(path)
elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)'
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#surround(path . '/{}')
elseif path =~# '[{}*]'
call pathogen#interpose(path)
else
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#interpose(path . '/{}')
endif
endfor
call pathogen#cycle_filetype()
if pathogen#is_disabled($MYVIMRC)
return 'finish'
endif
return ''
endfunction
" Split a path into a list.
function! pathogen#split(path) abort
if type(a:path) == type([]) | return a:path | endif
if empty(a:path) | return [] | endif
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
endfunction
" Convert a list to a path.
function! pathogen#join(...) abort
if type(a:1) == type(1) && a:1
let i = 1
let space = ' '
else
let i = 0
let space = ''
endif
let path = ""
while i < a:0
if type(a:000[i]) == type([])
let list = a:000[i]
let j = 0
while j < len(list)
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
let path .= ',' . escaped
let j += 1
endwhile
else
let path .= "," . a:000[i]
endif
let i += 1
endwhile
return substitute(path,'^,','','')
endfunction
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
function! pathogen#legacyjoin(...) abort
return call('pathogen#join',[1] + a:000)
endfunction
" Turn filetype detection off and back on again if it was already enabled.
function! pathogen#cycle_filetype() abort
if exists('g:did_load_filetypes')
filetype off
filetype on
endif
endfunction
" Check if a bundle is disabled. A bundle is considered disabled if its
" basename or full name is included in the list g:pathogen_disabled.
function! pathogen#is_disabled(path) abort
if a:path =~# '\~$'
return 1
endif
let sep = pathogen#slash()
let blacklist = map(
\ get(g:, 'pathogen_blacklist', get(g:, 'pathogen_disabled', [])) +
\ pathogen#split($VIMBLACKLIST),
\ 'substitute(v:val, "[\\/]$", "", "")')
return index(blacklist, fnamemodify(a:path, ':t')) != -1 || index(blacklist, a:path) != -1
endfunction "}}}1
" Prepend the given directory to the runtime path and append its corresponding
" after directory. Curly braces are expanded with pathogen#expand().
function! pathogen#surround(path) abort
let sep = pathogen#slash()
let rtp = pathogen#split(&rtp)
let path = fnamemodify(a:path, ':p:s?[\\/]\=$??')
let before = filter(pathogen#expand(path), '!pathogen#is_disabled(v:val)')
let after = filter(reverse(pathogen#expand(path.sep.'after')), '!pathogen#is_disabled(v:val[0:-7])')
call filter(rtp, 'index(before + after, v:val) == -1')
let &rtp = pathogen#join(before, rtp, after)
return &rtp
endfunction
" For each directory in the runtime path, add a second entry with the given
" argument appended. Curly braces are expanded with pathogen#expand().
function! pathogen#interpose(name) abort
let sep = pathogen#slash()
let name = a:name
if has_key(s:done_bundles, name)
return ""
endif
let s:done_bundles[name] = 1
let list = []
for dir in pathogen#split(&rtp)
if dir =~# '\<after$'
let list += reverse(filter(pathogen#expand(dir[0:-6].name.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])')) + [dir]
else
let list += [dir] + filter(pathogen#expand(dir.sep.name), '!pathogen#is_disabled(v:val)')
endif
endfor
let &rtp = pathogen#join(pathogen#uniq(list))
return 1
endfunction
let s:done_bundles = {}
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
function! pathogen#helptags() abort
let sep = pathogen#slash()
for glob in pathogen#split(&rtp)
for dir in map(split(glob(glob), "\n"), 'v:val.sep."/doc/".sep')
if (dir)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir) == 2 && !empty(split(glob(dir.'*.txt'))) && (!filereadable(dir.'tags') || filewritable(dir.'tags'))
silent! execute 'helptags' pathogen#fnameescape(dir)
endif
endfor
endfor
endfunction
command! -bar Helptags :call pathogen#helptags()
" Execute the given command. This is basically a backdoor for --remote-expr.
function! pathogen#execute(...) abort
for command in a:000
execute command
endfor
return ''
endfunction
" Section: Unofficial
function! pathogen#is_absolute(path) abort
return a:path =~# (has('win32') ? '^\%([\\/]\|\w:\)[\\/]\|^[~$]' : '^[/~$]')
endfunction
" Given a string, returns all possible permutations of comma delimited braced
" alternatives of that string. pathogen#expand('/{a,b}/{c,d}') yields
" ['/a/c', '/a/d', '/b/c', '/b/d']. Empty braces are treated as a wildcard
" and globbed. Actual globs are preserved.
function! pathogen#expand(pattern) abort
if a:pattern =~# '{[^{}]\+}'
let [pre, pat, post] = split(substitute(a:pattern, '\(.\{-\}\){\([^{}]\+\)}\(.*\)', "\\1\001\\2\001\\3", ''), "\001", 1)
let found = map(split(pat, ',', 1), 'pre.v:val.post')
let results = []
for pattern in found
call extend(results, pathogen#expand(pattern))
endfor
return results
elseif a:pattern =~# '{}'
let pat = matchstr(a:pattern, '^.*{}[^*]*\%($\|[\\/]\)')
let post = a:pattern[strlen(pat) : -1]
return map(split(glob(substitute(pat, '{}', '*', 'g')), "\n"), 'v:val.post')
else
return [a:pattern]
endif
endfunction
" \ on Windows unless shellslash is set, / everywhere else.
function! pathogen#slash() abort
return !exists("+shellslash") || &shellslash ? '/' : '\'
endfunction
function! pathogen#separator() abort
return pathogen#slash()
endfunction
" Convenience wrapper around glob() which returns a list.
function! pathogen#glob(pattern) abort
let files = split(glob(a:pattern),"\n")
return map(files,'substitute(v:val,"[".pathogen#slash()."/]$","","")')
endfunction "}}}1
" Like pathogen#glob(), only limit the results to directories.
function! pathogen#glob_directories(pattern) abort
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
endfunction "}}}1
" Remove duplicates from a list.
function! pathogen#uniq(list) abort
let i = 0
let seen = {}
while i < len(a:list)
if (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
call remove(a:list,i)
elseif a:list[i] ==# ''
let i += 1
let empty = 1
else
let seen[a:list[i]] = 1
let i += 1
endif
endwhile
return a:list
endfunction
" Backport of fnameescape().
function! pathogen#fnameescape(string) abort
if exists('*fnameescape')
return fnameescape(a:string)
elseif a:string ==# '-'
return '\-'
else
return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','')
endif
endfunction
" Like findfile(), but hardcoded to use the runtimepath.
function! pathogen#runtime_findfile(file,count) abort "{{{1
let rtp = pathogen#join(1,pathogen#split(&rtp))
let file = findfile(a:file,rtp,a:count)
if file ==# ''
return ''
else
return fnamemodify(file,':p')
endif
endfunction
" Section: Deprecated
function! s:warn(msg) abort
echohl WarningMsg
echomsg a:msg
echohl NONE
endfunction
" Prepend all subdirectories of path to the rtp, and append all 'after'
" directories in those subdirectories. Deprecated.
function! pathogen#runtime_prepend_subdirectories(path) abort
call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')')
return pathogen#surround(a:path . pathogen#slash() . '{}')
endfunction
function! pathogen#incubate(...) abort
let name = a:0 ? a:1 : 'bundle/{}'
call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')')
return pathogen#interpose(name)
endfunction
" Deprecated alias for pathogen#interpose().
function! pathogen#runtime_append_all_bundles(...) abort
if a:0
call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')')
else
call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()')
endif
return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}')
endfunction
if exists(':Vedit')
finish
endif
let s:vopen_warning = 0
function! s:find(count,cmd,file,lcd)
let rtp = pathogen#join(1,pathogen#split(&runtimepath))
let file = pathogen#runtime_findfile(a:file,a:count)
if file ==# ''
return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'"
endif
if !s:vopen_warning
let s:vopen_warning = 1
let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE'
else
let warning = ''
endif
if a:lcd
let path = file[0:-strlen(a:file)-2]
execute 'lcd `=path`'
return a:cmd.' '.pathogen#fnameescape(a:file) . warning
else
return a:cmd.' '.pathogen#fnameescape(file) . warning
endif
endfunction
function! s:Findcomplete(A,L,P)
let sep = pathogen#slash()
let cheats = {
\'a': 'autoload',
\'d': 'doc',
\'f': 'ftplugin',
\'i': 'indent',
\'p': 'plugin',
\'s': 'syntax'}
if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0])
let request = cheats[a:A[0]].a:A[1:-1]
else
let request = a:A
endif
let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*'
let found = {}
for path in pathogen#split(&runtimepath)
let path = expand(path, ':p')
let matches = split(glob(path.sep.pattern),"\n")
call map(matches,'isdirectory(v:val) ? v:val.sep : v:val')
call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]')
for match in matches
let found[match] = 1
endfor
endfor
return sort(keys(found))
endfunction
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(<count>,'edit<bang>',<q-args>,0)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>,0)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read',<q-args>,<bang>1)
" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=':

1
nvim/ftplugin/python.vim Normal file
View File

@@ -0,0 +1 @@
set foldmethod=indent

View File

@@ -1,72 +1,87 @@
set nocompatible
filetype off
" Plugins
set rtp+=~/.config/nvim/bundle/Vundle.vim
call vundle#begin("~/.config/nvim/bundle")
if ((!filereadable(stdpath('config') . "/.shared_config")) || (exists('$SUDO_USER') && $SUDO_USER == 'fabian'))
let shared_config = 0
else
let shared_config = 1
echo "Using shared config."
endif
Plugin 'VundleVim/Vundle.vim'
" Plugins
" Note: on most systems, this will make the plugins reside in \
" ~/.local/share/nvim/plugged/
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
let &runtimepath = &runtimepath
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin()
" Warn about plugin updates
Plug 'semanser/vim-outdated-plugins'
" Powerline replacement
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" Tags
Plugin 'xolox/vim-misc'
Plug 'xolox/vim-misc'
"Plugin 'ludovicchabant/vim-gutentags'
Plugin 'majutsushi/tagbar'
Plug 'majutsushi/tagbar'
" Templates
Plugin 'aperezdc/vim-template'
Plug 'aperezdc/vim-template'
" Selection expand
Plugin 'terryma/vim-expand-region'
Plugin 'kana/vim-textobj-user'
Plugin 'kana/vim-textobj-line'
Plugin 'kana/vim-submode'
Plug 'terryma/vim-expand-region'
Plug 'kana/vim-textobj-user'
Plug 'kana/vim-textobj-line'
Plug 'kana/vim-submode'
" Better Pasting
Plugin 'ConradIrwin/vim-bracketed-paste'
Plug 'ConradIrwin/vim-bracketed-paste'
" Tmux navigation
Plugin 'christoomey/vim-tmux-navigator'
" YouCompleteMe
Plugin 'Valloric/YouCompleteMe'
Plugin 'rdnetto/YCM-Generator'
Plug 'christoomey/vim-tmux-navigator'
" Git
Plugin 'tpope/vim-fugitive'
Plug 'tpope/vim-fugitive'
" Comments
Plugin 'scrooloose/nerdcommenter'
Plug 'scrooloose/nerdcommenter'
" Surround
Plugin 'tpope/vim-surround'
Plug 'tpope/vim-surround'
" Snippets
" Track the engine.
Plugin 'SirVer/ultisnips'
Plug 'SirVer/ultisnips'
" Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'
Plugin 'ervandew/supertab'
"Buftabeline
"Plugin 'ap/vim-buftabline'
Plug 'honza/vim-snippets'
Plug 'ervandew/supertab'
" Highlight matching xml tags
Plugin 'Valloric/MatchTagAlways'
Plug 'Valloric/MatchTagAlways'
"Javascript
Plugin 'pangloss/vim-javascript'
Plug 'pangloss/vim-javascript'
" Tex
Plugin 'lervag/vimtex'
Plug 'lervag/vimtex'
"Go
Plugin 'fatih/vim-go'
Plug 'fatih/vim-go'
call plug#end()
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endif
call vundle#end()
filetype plugin indent on
set cinkeys-=0#
@@ -75,7 +90,11 @@ set t_Co=256
"set term=screen-256color
" Color configuration
colorscheme badwolf " some color ..
try
source ~/.config/nvim/scheme.vim
catch
" Ignore non existing file
endtry
syntax enable " enable syntax processing
" Disable annoying bell
@@ -108,6 +127,13 @@ call submode#map('grow/shrink', 'n', '', '>', '<C-w>>')
set splitbelow
set splitright
" Delete without copying
nnoremap <leader>d "_d
xnoremap <leader>d "_d
nnoremap <leader>x "_x
xnoremap <leader>x "_x
xnoremap <leader>p "_dP
"disable submode timeouts:
let g:submode_timeout = 0
" don't consume submode-leaving key
@@ -177,6 +203,11 @@ nmap <Leader>t :call TextWrapToggle()<CR>
"augroup END
"Copying
if ((!shared_config) && (exists('$LC_OSC52') && $LC_OSC52 == '1'))
lua << EOF
vim.g.clipboard = 'osc52'
EOF
endif
set clipboard=unnamedplus,unnamed " Copy/Paste
" Airline
@@ -187,26 +218,11 @@ nmap <F8> :TagbarToggle<CR>
imap <F8> <ESC>:TagbarToggle<CR>gi
nmap <C-]> <C-w><C-]><C-w>T
" YouCompleteMe
let g:ycm_collect_identifiers_from_tags_files = 1 " Read from tag files
let g:ycm_global_ycm_extra_conf = '~/.config/nvim/.ycm_extra_conf.py' " Standard conf
let g:ycm_enable_diagnostic_signs = 0 " Do not show semantic error bar
let g:ycm_server_python_interpreter = 'python'
let g:ycm_key_list_select_completion = ['<C-j>', '<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-k>', '<C-p>', '<Up>']
"Tags
let g:easytags_async = 1
" make
autocmd QuickFixCmdPre make set cmdheight=2
"autocmd QuickFixCmdPost make nested cwindow "Open the quickfix window
"autocmd QuickFixCmdPost make nested lwindow "Change to the quickfix window
set switchbuf=split
nmap <F9> :silent! make<CR>:redraw!<CR>
nmap <Leader>m :silent! make<CR>:redraw!<CR>
nmap <Leader>x :silent! make ex<CR>:redraw!<CR>
imap <F9> <ESC>:make<CR>:redraw!<CR>i
" vim-templates config-file
try
@@ -229,6 +245,18 @@ let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:UltiSnipsEditSplit="vertical"
set rtp+=~/.config/nvim/my-snippets
" Folding
set foldmethod=syntax
set foldlevel=100
" Use F9 to toggle folding
inoremap <F9> <C-O>za
nnoremap <F9> za
onoremap <F9> <C-C>za
vnoremap <F9> zf
nnoremap <Leader>a za
onoremap <Leader>a <C-C>za
vnoremap <Leader>a zf
try
source ~/.config/nvim/.vimrc_config_expand_region
catch
@@ -243,3 +271,10 @@ catch
endtry
let g:tex_flavor = "latex"
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
if filereadable(expand("~/python-envs/neovim/bin/python3"))
let g:python3_host_prog="~/python-envs/neovim/bin/python3"
else
let g:python3_host_prog="/usr/bin/python3"
endif

2
nvim/scheme.vim.template Normal file
View File

@@ -0,0 +1,2 @@
set background=dark
colorscheme badwolf

14
push.sh
View File

@@ -1,14 +0,0 @@
#! /bin/sh
#
# update.sh
# Copyright (C) 2017 Fabian Ising <fabian@murgi.de>
#
# Distributed under terms of the Apache v2.0 license.
#
git pull
git subtree push --prefix=i3 i3 master
git subtree push --prefix=tmux tmux master
git subtree push --prefix=zsh zsh master
git subtree push --prefix=vim vim master

64
scripts/yank Executable file
View File

@@ -0,0 +1,64 @@
#!/bin/sh
#
# Usage: yank [FILE...]
#
# Copies the contents of the given files (or stdin if no files are given) to
# the terminal that runs this program. If this program is run inside tmux(1),
# then it also copies the given contents into tmux's current clipboard buffer.
# If this program is run inside X11, then it also copies to the X11 clipboard.
#
# This is achieved by writing an OSC 52 escape sequence to the said terminal.
# The maximum length of an OSC 52 escape sequence is 100_000 bytes, of which
# 7 bytes are occupied by a "\033]52;c;" header, 1 byte by a "\a" footer, and
# 99_992 bytes by the base64-encoded result of 74_994 bytes of copyable text.
#
# In other words, this program can only copy up to 74_994 bytes of its input.
# However, in such cases, this program tries to bypass the input length limit
# by copying directly to the X11 clipboard if a $DISPLAY server is available;
# otherwise, it emits a warning (on stderr) about the number of bytes dropped.
#
# See http://en.wikipedia.org/wiki/Base64 for the 4*ceil(n/3) length formula.
# See http://sourceforge.net/p/tmux/mailman/message/32221257 for copy limits.
# See http://sourceforge.net/p/tmux/tmux-code/ci/a0295b4c2f6 for DCS in tmux.
#
# Written in 2014 by Suraj N. Kurapati and documented at http://goo.gl/NwYqfW
buf=$( cat "$@" )
# Create the OSC52 escape string.
len=$( printf %s "$buf" | wc -c ) max=74994
test $len -gt $max && echo "$0: input is $(( len - max )) bytes too long" >&2
esc="\033]52;c;$( printf %s "$buf" | head -c $max | base64 | tr -d '\r\n' )\a"
test -n "$TMUX" && esc="\033Ptmux;\033$esc\033\\"
# Output the string to waiting terminals
printf "$esc"
# Attempt to push to the raw SSH_TTY if that exists.
test -n "$SSH_TTY" && printf "$esc" > $SSH_TTY
if [ -n "$TMUX" ]; then
#push the OSC52 esc string to the clients directly.
# tmux_clients=$(tmux list-clients -F "#{client_tty}")
# readarray -t tmux_clients <<<"$tmux_clients"
# for c in ${tmux_clients[@]}; do
# printf "$esc" > $c
# done
#
# And add it directly to the TMUX copy buffer.
test -n "$TMUX" && tmux set-buffer "$buf"
fi
# copy to X11 if possible...
test -n "$DISPLAY" && command -v xsel > /dev/null && command -v xclip > /dev/null \
&& printf %s "$buf" | { xsel -ib || xclip -sel c ;} && exit
# copy to pbcopy on MacOS
command -v pbcopy > /dev/null && printf %s "$buf" | pbcopy
# Copy to remote pbcopy daemon, if attached
if $(nc -z localhost 5556); then
printf %s "$buf" | nc localhost 5556
fi

View File

@@ -8,11 +8,12 @@
sudo pacman --needed -Sy archlinux-keyring --noconfirm
sudo pacman --needed -Syu --noconfirm
yes | sudo pacman --needed -Sy vte3-ng
sudo pacman --needed -Sy base-devel xorg xorg-xinit gnome gnome-extra neovim zsh tmux openssh termite powerline powerline-fonts i3 rofi nitrogen python-pip --noconfirm
sudo pacman --needed -Sy base-devel xorg xorg-xinit gnome gnome-extra neovim zsh tmux openssh alacritty powerline-fonts python-pip --noconfirm
cp $PWD/nvim/scheme.vim.template $PWD/nvim/scheme.vim
cp $PWD/.config/alacritty/schemes.yml.template $PWD/.config/alacritty/schemes.yml
pip3 install neovim
./clone_and_link.sh
cp zsh/.powerline_config_arch.example zsh/.powerline_config
cp vim/.vimrc_config_powerline_arch.example vim/.vimrc_config_powerline
./copy_fonts_arch.sh
if [ $SHELL != "/bin/zsh" ]; then
chsh -s /usr/bin/zsh;
fi
@@ -28,3 +29,4 @@ done
for filename in vim/.*_arch.example; do
cp $filename ${filename:0:-13}
done
echo "You should now start tmux (and zsh) and nvim for automatic plugin installation."

View File

@@ -1,13 +0,0 @@
#! /bin/sh
#
# setup_remotes.sh
# Copyright (C) 2017 Fabian Ising <fabian@murgi.de>
#
# Distributed under terms of the Apache v2.0 license.
#
git remote add i3 git@vcs.murgi.de:dotfiles_fabian/i3config.git
git remote add tmux git@vcs.murgi.de:dotfiles_fabian/tmux.git
git remote add tmux git@vcs.murgi.de:dotfiles_fabian/tmux.git
git remote add vim git@vcs.murgi.de:dotfiles_fabian/vim.git
git remote add zsh git@vcs.murgi.de:dotfiles_fabian/zsh.git

29
setup_ubuntu.sh Executable file
View File

@@ -0,0 +1,29 @@
#! /bin/bash
#
# clone_and_link.sh
# Copyright (C) 2016 fabian <fabian@fabi-laptop-arch>
#
# Distributed under terms of the MIT license.
#
shopt -s nullglob
sudo apt -y update
sudo apt -y dist-upgrade
sudo apt -y install curl zsh tmux virtualenvwrapper powerline fonts-powerline python3 python3-pip python3-pynvim
sudo snap install --classic nvim
./clone_and_link.sh; true
if [ $SHELL != "/bin/zsh" ]; then
chsh -s /usr/bin/zsh;
fi
for filename in zsh/.*_debian.example; do
ln -Tsfv $PWD/$filename $PWD/${filename:0:-15}
done
for filename in tmux/.*_debian.example; do
ln -Tsfv $PWD/$filename $PWD/${filename:0:-15}
done
for filename in nvim/.*_debian.example; do
ln -Tsfv $PWD/$filename $PWD/${filename:0:-15}
done

27
setup_ubuntu_shared.zsh Executable file
View File

@@ -0,0 +1,27 @@
#! /usr/bin/zsh
#
# clone_and_link.sh
# Copyright (C) 2016 fabian <fabian@fabi-laptop-arch>
#
# Distributed under terms of the MIT license.
#
sudo apt -y update
sudo apt -y dist-upgrade
sudo apt -y install curl zsh tmux virtualenvwrapper powerline fonts-powerline python3 python3-pip python3-pynvim
sudo snap install --classic nvim
./clone_and_link.sh shared; true
if [ $SHELL != "/bin/zsh" ]; then
chsh -s /usr/bin/zsh;
fi
for filename in zsh/.*_debian.example(N); do
ln -Tsfv $PWD/$filename $PWD/${filename:0:-15}
done
for filename in tmux/.*_debian.example(N); do
ln -Tsfv $PWD/$filename $PWD/${filename:0:-15}
done
for filename in nvim/.*_debian.example(N); do
ln -Tsfv $PWD/$filename $PWD/${filename:0:-15}
done

3
ssh_config Normal file
View File

@@ -0,0 +1,3 @@
Host *
IdentityAgent $SSH_REAL_SOCK
AddKeysToAgent yes

1
ssh_tty Normal file
View File

@@ -0,0 +1 @@
Defaults env_keep += "SSH_TTY SSH_CONNECTION SSH_CLIENT"

1
tmux/.gitignore vendored
View File

@@ -1,5 +1,4 @@
.tmux_config_*
!.tmux_config_*.example
plugins/
!plugins/tpm
*.log

3
tmux/.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "plugins/tpm"]
path = plugins/tpm
url = https://github.com/tmux-plugins/tpm.git

View File

@@ -1,4 +1,4 @@
set-option -g default-shell /bin/zsh
bind -Tcopy-mode-vi y send -X copy-pipe "pbcopy" \; display-message "copied to system clipboard"
bind C-p run "tmux set-buffer \"$pbpaste\"; tmux paste-buffer"
bind C-y run "tmux save-buffer - | pbcopy"
#bind -Tcopy-mode-vi y send -X copy-pipe "pbcopy" \; display-message "copied to system clipboard"
#bind C-p run "tmux set-buffer \"$pbpaste\"; tmux paste-buffer"
#bind C-y run "tmux save-buffer - | pbcopy"

View File

@@ -1,14 +1,11 @@
set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
set-environment -g PATH "$HOME/dotfiles/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
set -g default-terminal "xterm-256color"
set -g history-limit 100000
set -g history-limit 20000
# Remap prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind-key -n C-b send-keys C-b
#bind-key -n C-b send-prefix
set-option -g prefix2 C-b
setw -g mode-keys vi
set-option -g status-keys vi
@@ -37,11 +34,9 @@ bind r source-file ~/.tmux.conf\; display "Conf reloaded!"
set -g mouse on
# Vi copypaste mode
set-window-option -g mode-keys vi
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
bind -Tcopy-mode-vi y send -X copy-pipe "xclip -i -sel p -f | xclip -i -sel c" \; display-message "copied to system clipboard"
#bind-key -Tcopy-mode-vi 'v' send -X begin-selection
#bind-key -Tcopy-mode-vi 'y' send -X copy-selection
#bind -Tcopy-mode-vi y send -X copy-pipe "xclip -i -sel p -f | xclip -i -sel c" \; display-message "copied to system clipboard"
# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
@@ -55,15 +50,25 @@ bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key C-x send-keys C-x
bind-key C-o send-keys C-o
# Copying
# Copying - Most of this is done in tmux-yank!
# move x clipboard into tmux paste buffer
bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
#bind C-p run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
# move tmux copy buffer into x clipboard
# Vi copypaste mode
set-window-option -g mode-keys vi
set-option -s set-clipboard on
set -g @yank_with_mouse off
set -g @yank_action 'copy-pipe'
bind-key -Tcopy-mode-vi 'C-right' send -X next-word
bind-key -Tcopy-mode-vi 'C-left' send -X previous-word
unbind-key -T copy-mode-vi MouseDragEnd1Pane
# Allow copy across SSH
set -g @override_copy_command 'yank > #{pane_tty}'
if '[ `uname` == Darwin ]' \
'source-file ~/.tmux/.mac_config'
source-file ~/.tmux/.tmux_config_powerline
set-option -g set-titles on
# Escape timeout for nvim
@@ -72,17 +77,17 @@ set -sg escape-time 10
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-open'
# Does not work on servers without GUI
#set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'jimeh/tmux-themepack'
set -g @themepack 'powerline/double/blue'
set -g @themepack 'powerline/double/red'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
setenv -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.tmux/plugins/"
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && \
~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' # >> /tmp/tpm_out 2>&1 >> /tmp/tpm_out'
run -b '~/.tmux/plugins/tpm/tpm || true'

View File

@@ -1 +0,0 @@
source /usr/lib/python3.7/site-packages/powerline/bindings/tmux/powerline.conf

View File

@@ -1 +0,0 @@
source /usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf

View File

@@ -1,2 +0,0 @@
source $HOME/.local/lib/python3.9/site-packages/powerline/bindings/tmux/powerline.conf

View File

@@ -1 +0,0 @@
source '/usr/local/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf'

View File

@@ -1,11 +0,0 @@
#! /bin/sh
#
# test.sh
# Copyright (C) 2018 fabian <fabian@FordPrefect.local>
#
# Distributed under terms of the MIT license.
#
export PATH=$PATH:/usr/local/bin
tmux

Submodule tmux/plugins/tpm deleted from 26d9ace1b4

View File

@@ -1 +0,0 @@
/Users/fabian/Masterarbeit/thesis 40

13
tmux/tmux_attach.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
#
# tmux-attach - attach to first unattached session or
# create new session if none are found
#
N=$(tmux ls | grep -v attached | head -1 | cut -d: -f1)
if [[ ! -z $N ]]
then
ATTACH_OPTS="attach -t $N"
fi
exec tmux $ATTACH_OPTS

View File

@@ -1,14 +0,0 @@
#! /bin/sh
#
# update.sh
# Copyright (C) 2017 Fabian Ising <fabian@murgi.de>
#
# Distributed under terms of the Apache v2.0 license.
#
git pull
git subtree pull --prefix=i3 i3 master --squash
git subtree pull --prefix=tmux tmux master --squash
git subtree pull --prefix=zsh zsh master --squash
git subtree pull --prefix=vim vim master --squash

2
zsh/.gitignore vendored
View File

@@ -1,2 +1,4 @@
.*_config*
!.*_config*.example
.p10k.mac.zsh
antigen/

3
zsh/.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "antigen"]
path = antigen
url = https://github.com/zsh-users/antigen.git

View File

@@ -0,0 +1 @@
[[ -f /etc/zsh_command_not_found ]] && source /etc/zsh_command_not_found

1722
zsh/.p10k.mac.zsh.example Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -31,6 +31,7 @@
# The list of segments shown on the left. Fill it with the most important segments.
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
# os_icon # os identifier
context # user@hostname
dir # current directory
vcs # git status
# prompt_char # prompt symbol
@@ -79,7 +80,7 @@
gcloud # google cloud cli account and project (https://cloud.google.com/)
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
toolbox # toolbox name (https://github.com/containers/toolbox)
context # user@hostname
#context # user@hostname
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
ranger # ranger shell (https://github.com/ranger/ranger)
nnn # nnn shell (https://github.com/jarun/nnn)

1709
zsh/.p10k_shared.zsh Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
source /usr/lib/python3.8/site-packages/powerline/bindings/zsh/powerline.zsh

View File

@@ -1 +0,0 @@
source /usr/local/lib/python2.7/dist-packages/powerline/bindings/zsh/powerline.zsh

View File

@@ -1 +0,0 @@
source $HOME/.local/lib/python3.9/site-packages/powerline/bindings/zsh/powerline.zsh

View File

@@ -1,17 +1,10 @@
export WORKON_HOME=~/python-envs
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv
mkdir -p $WORKON_HOME
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
function workon() {
if ! { [ "$TERM" = "screen" ] && [ -n "$TMUX" ]; } then
if ! { [ -z "$1" ] } then
tmux setenv VIRTUAL_ENV "$1"
fi
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
workon "$@"
fi
}
if [ -n "$VIRTUAL_ENV" ]; then
workon $VIRTUAL_ENV
if [[ -f "$VIRTUAL_ENV/bin/activate" ]]; then
source $VIRTUAL_ENV/bin/activate;
fi
fi

View File

@@ -0,0 +1,4 @@
export WORKON_HOME=~/python-envs
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
mkdir -p $WORKON_HOME
source /usr/local/bin/virtualenvwrapper.sh

25
zsh/.zsh_plugins.txt Normal file
View File

@@ -0,0 +1,25 @@
# Load OMZ plugins
ohmyzsh/ohmyzsh
ohmyzsh/ohmyzsh path:plugins/vi-mode
ohmyzsh/ohmyzsh path:plugins/git
ohmyzsh/ohmyzsh path:plugins/golang
ohmyzsh/ohmyzsh path:plugins/ssh-agent
ohmyzsh/ohmyzsh path:plugins/pip
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/virtualenv
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/docker
ohmyzsh/ohmyzsh path:plugins/docker-compose
ohmyzsh/ohmyzsh path:plugins/command-not-found
romkatv/powerlevel10k
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-autosuggestions
zsh-users/zsh-completions
zsh-users/zsh-history-substring-search
urbainvaes/fzf-marks
zdharma-continuum/fast-syntax-highlighting kind:defer
# Initialize completions
belak/zsh-utils path:completion

View File

@@ -0,0 +1,23 @@
# Load OMZ plugins
ohmyzsh/ohmyzsh
ohmyzsh/ohmyzsh path:plugins/git
ohmyzsh/ohmyzsh path:plugins/golang
ohmyzsh/ohmyzsh path:plugins/ssh-agent
ohmyzsh/ohmyzsh path:plugins/pip
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/virtualenv
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/docker
ohmyzsh/ohmyzsh path:plugins/docker-compose
ohmyzsh/ohmyzsh path:plugins/command-not-found
romkatv/powerlevel10k
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-completions
zsh-users/zsh-history-substring-search
urbainvaes/fzf-marks
zdharma-continuum/fast-syntax-highlighting kind:defer
# Initialize completions
belak/zsh-utils path:completion

View File

@@ -1,74 +1,94 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
#if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
#source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
#fi
export PATH="$HOME/.local/bin:$PATH"
export PATH="/snap/bin:$HOME/.local/bin:$HOME/dotfiles/scripts:$PATH"
export XDG_CONFIG_HOME="$HOME/.config" # Fix nvim bug
[[ -z $SSH_AUTH_SOCK ]] || export FORWARD_SOCK=$SSH_AUTH_SOCK
[[ -f ~/.zsh/.powerline_config ]] && source ~/.zsh/.powerline_config
[[ -f ~/.zsh/.user_config ]] && source ~/.zsh/.user_config
[[ -f ~/.zsh/.virtual_env_config.zsh ]] && source ~/.zsh/.virtual_env_config.zsh
[[ -f /usr/share/doc/find-the-command/ftc.zsh ]] && source /usr/share/doc/find-the-command/ftc.zsh
[[ -f ~/.zsh/.local_config ]] && source ~/.zsh/.local_config
# Load Antigen
if [[ -f ~/.zsh/.shared_config ]] && [[ "$SUDO_USER" != "fabian" ]] ; then
shared_config=1
else
shared_config=0
fi
if [[ -f ~/.zsh/.shared_config ]] ; then
touch ~/.config/nvim/.shared_config
fi
update_dotfiles() {
cd ~/dotfiles || return
if git fetch --dry-run 2>&1 | grep -q .; then
git pull > /dev/null 2>&1
fi
}
if [ "$shared_config" -eq 0 ]; then
update_dotfiles 2>&1 &!
export GIT_AUTHOR_NAME="Fabian Ising"
export GIT_AUTHOR_EMAIL="f.ising@fh-muenster.de"
export GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
export GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
fi
# Load Antidote
mkdir -p ${ZDOTDIR:-~}/.cache/zsh
static_file=${ZDOTDIR:-~}/.cache/zsh/.zsh_plugins.zsh
if [ $shared_config -eq 0 ]; then
plugins_txt=${ZDOTDIR:-~}/.zsh/.zsh_plugins.txt
# Vi mode
bindkey -v
VI_MODE_SET_CURSOR=true
else
plugins_txt=${ZDOTDIR:-~}/.zsh/.zsh_plugins_shared.txt
static_file=${ZDOTDIR:-~}/.cache/zsh/.zsh_shared_plugins.zsh
fi
# clone antidote if necessary
if ! [[ -e ${ZDOTDIR:-~}/.antidote ]]; then
git clone https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote
fi
#zstyle ':omz:plugins:docker' legacy-completion yes
zstyle ':completion:*:ssh:*' hosts off
zstyle ':completion:*:scp:*' hosts off
# Run rehash for external commands
zstyle ":completion:*:commands" rehash 1
# source antidote and load plugins from `${ZDOTDIR:-~}/.zsh_plugins.txt`
source ${ZDOTDIR:-~}/.antidote/antidote.zsh
antidote load ${plugins_txt} ${static_file}
export SSH_REAL_SOCK=$SSH_AUTH_SOCK
[[ -z $FORWARD_SOCK ]] || export SSH_AUTH_SOCK=$FORWARD_SOCK
setopt interactivecomments
setopt HIST_IGNORE_SPACE
source ~/.zsh/antigen/antigen.zsh
# History options
HISTSIZE=100000 # Set the amount of lines you want saved
SAVEHIST=100000 # This is required to actually save them, needs to match with HISTSIZE
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
setopt HIST_IGNORE_DUPS # Don\'t record an entry that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_IGNORE_SPACE # Don\'t record an entry starting with a space.
setopt HIST_SAVE_NO_DUPS # Don\'t write duplicate entries in the history file.
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
# Clear screen by ctrl+q
bindkey '^q' clear-screen
# Load various lib files
antigen use oh-my-zsh
# Antigen Theme
antigen theme romkatv/powerlevel10k powerlevel10k
# Antigen Bundles
antigen bundle git
antigen bundle heroku
#antigen bundle command-not-found
antigen bundle go
# antigen bundle tmuxinator
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-completions
antigen bundle urbainvaes/fzf-marks
# For SSH, starting ssh-agent is annoying
antigen bundle ssh-agent
# Python Plugins
antigen bundle pip
antigen bundle python
antigen bundle virtualenv
antigen bundle virtualenv
antigen bundle "greymd/docker-zsh-completion"
antigen apply
alias vim=nvim
alias sudo='sudo '
alias cgrep="grep --color=always"
export EDITOR='nvim'
export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# Allow access to all libvirt vms
export LIBVIRT_DEFAULT_URI="qemu:///system"
PATH="/home/fabian/perl5/bin${PATH:+:${PATH}}"; export PATH;
PERL5LIB="/home/fabian/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/fabian/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/fabian/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/fabian/perl5"; export PERL_MM_OPT;
alias ls="ls --color=always"
export PATH="$PATH:${HOME}/Labor/tls-in-muas/starttls-research/99-Tools:/home/fabian/go/bin"
# For ccache
export CCACHE_CPP2=YES
delzip() {
unzip -Z -1 "$@" | xargs -I{} rm -rf {}
@@ -78,9 +98,43 @@ export MITMPROXY_SSLKEYLOGFILE="~/.mitmproxy/sslkeylogfile.txt"
[[ -f ~/.zsh/.mac_config ]] && source ~/.zsh/.mac_config
# Workaround for async issues https://github.com/romkatv/powerlevel10k/issues/1554
unset ZSH_AUTOSUGGEST_USE_ASYNC
# Powerlevel 10k
# Remove padding on right side
ZLE_RPROMPT_INDENT=0
# To customize prompt, run `p10k configure` or edit ~/dotfiles/zsh/.p10k.zsh.
[[ ! -f ~/dotfiles/zsh/.p10k.zsh ]] || source ~/dotfiles/zsh/.p10k.zsh
function load_p10k() {
if zmodload zsh/terminfo && (( terminfo[colors] >= 256 )) && [ $shared_config -eq 0 ]; then
[[ ! -f ~/dotfiles/zsh/.p10k.zsh ]] || source ~/dotfiles/zsh/.p10k.zsh
else
[[ ! -f ~/dotfiles/zsh/.p10k_shared.zsh ]] || source ~/dotfiles/zsh/.p10k_shared.zsh
fi
}
load_p10k
#
# This speeds up pasting w/ autosuggest
# https://github.com/zsh-users/zsh-autosuggestions/issues/238
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
}
pastefinish() {
zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
# https://github.com/zsh-users/zsh-autosuggestions/issues/351
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste)
export LANG="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export TIME_STYLE="long-iso"
[[ -f ~/.zsh/.user_config ]] && source ~/.zsh/.user_config
[[ -f ~/.zsh/.virtual_env_config.zsh ]] && source ~/.zsh/.virtual_env_config.zsh
[[ -f ~/.zsh/.local_config ]] && source ~/.zsh/.local_config
[[ -f ~/.zsh/.os_config.zsh ]] && source ~/.zsh/.os_config.zsh

Submodule zsh/antigen deleted from 74aa897570