mirror of
				https://github.com/shokinn/.files.git
				synced 2025-11-03 03:58:12 +00:00 
			
		
		
		
	consolidate and templeate my to files
in order to stop maintainung different files for each operationg system
This commit is contained in:
		
							parent
							
								
									7a1e8fda4b
								
							
						
					
					
						commit
						c377eb276a
					
				
					 40 changed files with 246 additions and 454 deletions
				
			
		| 
						 | 
				
			
			@ -1 +1 @@
 | 
			
		|||
dotdrop_warning="This file is managed by dotdrop, only edit it in your dotdrop files!"
 | 
			
		||||
# Environment Variables for dotdrop templating
 | 
			
		||||
							
								
								
									
										15
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								README.md
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -4,12 +4,19 @@ I manage my dotfiles using [dotdrop](https://github.com/deadc0de6/dotdrop).
 | 
			
		|||
 | 
			
		||||
## How to install
 | 
			
		||||
 | 
			
		||||
1. Install [Homebrew](https://brew.sh/)
 | 
			
		||||
2. Install `coreutils` via Homebrew.
 | 
			
		||||
3. Install [pyenv](https://github.com/pyenv/pyenv)
 | 
			
		||||
4. Install the latest python version via pyenv
 | 
			
		||||
5. Configure the latest python version as system (global) default
 | 
			
		||||
6. Clone dotfiles, install dependencies for dotdrop and install dotfiles.  
 | 
			
		||||
```shell
 | 
			
		||||
# git clone https://github.com/shokinn/.files ~/.files
 | 
			
		||||
# eval $(grep -v "^#" ~/.files/.env.public) ~/.files/dotdrop.sh
 | 
			
		||||
git clone https://github.com/shokinn/.files ~/.files \
 | 
			
		||||
&& pip3 install --user -r ~/.files/dotdrop/requirements.txt \
 | 
			
		||||
&& eval $(grep -v "^#" ~/.files/.env.public) ~/.files/dotdrop.sh install
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Documentation
 | 
			
		||||
 | 
			
		||||
Maybe you should [take a look to my documentation](https://docs.pphg.tech/) to understand how I use my dotfiles.
 | 
			
		||||
 | 
			
		||||
~~Maybe you should [take a look to my documentation](https://docs.pphg.tech/) to understand how I use my dotfiles.~~
 | 
			
		||||
My documentation is currently quite outdated and should not be considered for help.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										51
									
								
								config.yaml
									
										
									
									
									
								
							
							
						
						
									
										51
									
								
								config.yaml
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,3 +1,7 @@
 | 
			
		|||
config:
 | 
			
		||||
  backup: true
 | 
			
		||||
  create: true
 | 
			
		||||
  dotpath: dotfiles
 | 
			
		||||
actions:
 | 
			
		||||
  oh-my-zsh: |
 | 
			
		||||
    [[ ! -d ${{HOME}}/.oh-my-zsh ]] && sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" "" --unattended || echo "do nothing" >/dev/null
 | 
			
		||||
| 
						 | 
				
			
			@ -8,10 +12,6 @@ actions:
 | 
			
		|||
  powerlevel10k-theme: |
 | 
			
		||||
    [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes ]] && mkdir -p ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes || echo "do nothing" >/dev/null
 | 
			
		||||
    [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes/powerlevel10k ]] && git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes/powerlevel10k || echo "do nothing" >/dev/null
 | 
			
		||||
config:
 | 
			
		||||
  backup: true
 | 
			
		||||
  create: true
 | 
			
		||||
  dotpath: dotfiles
 | 
			
		||||
dotfiles:
 | 
			
		||||
  d_bspwm:
 | 
			
		||||
    dst: ~/.config/bspwm
 | 
			
		||||
| 
						 | 
				
			
			@ -64,10 +64,7 @@ dotfiles:
 | 
			
		|||
    src: p10k.zsh
 | 
			
		||||
  f_profile:
 | 
			
		||||
    dst: ~/.profile
 | 
			
		||||
    src: profile
 | 
			
		||||
  f_profile_win:
 | 
			
		||||
    dst: ~/.profile
 | 
			
		||||
    src: profile_win
 | 
			
		||||
    src: z_profile
 | 
			
		||||
  f_rofi_config:
 | 
			
		||||
    dst: ~/.config/rofi/config
 | 
			
		||||
    src: config/rofi/config
 | 
			
		||||
| 
						 | 
				
			
			@ -88,29 +85,15 @@ dotfiles:
 | 
			
		|||
    src: xsession
 | 
			
		||||
  f_zprofile:
 | 
			
		||||
    dst: ~/.zprofile
 | 
			
		||||
    src: profile
 | 
			
		||||
  f_zprofile_win:
 | 
			
		||||
    dst: ~/.zprofile
 | 
			
		||||
    src: profile_win
 | 
			
		||||
  f_zprofile_mac:
 | 
			
		||||
    dst: ~/.zprofile
 | 
			
		||||
    src: zprofile_mac
 | 
			
		||||
    src: z_profile
 | 
			
		||||
  f_zshenv:
 | 
			
		||||
    dst: ~/.zshenv
 | 
			
		||||
    src: zshenv
 | 
			
		||||
  f_zshenv_win:
 | 
			
		||||
    dst: ~/.zshenv
 | 
			
		||||
    src: zshenv_win
 | 
			
		||||
  f_zshrc:
 | 
			
		||||
    actions:
 | 
			
		||||
    - oh-my-zsh
 | 
			
		||||
    dst: ~/.zshrc
 | 
			
		||||
    src: zshrc
 | 
			
		||||
  f_zshrc_mac:
 | 
			
		||||
    actions:
 | 
			
		||||
    - oh-my-zsh
 | 
			
		||||
    dst: ~/.zshrc
 | 
			
		||||
    src: zshrc_mac
 | 
			
		||||
  f_start_systemd_shell.sh:
 | 
			
		||||
    src: start_systemd_shell.sh
 | 
			
		||||
    dst: ~/start_systemd_shell.sh
 | 
			
		||||
| 
						 | 
				
			
			@ -121,10 +104,10 @@ profiles:
 | 
			
		|||
  YOETUNHEIMR-wsl:
 | 
			
		||||
    dotfiles:
 | 
			
		||||
    - d_fonts
 | 
			
		||||
    - f_profile_win
 | 
			
		||||
    - f_profile
 | 
			
		||||
    - f_vimrc
 | 
			
		||||
    - f_zshrc
 | 
			
		||||
    - f_zshenv_win
 | 
			
		||||
    - f_zshenv
 | 
			
		||||
    - f_powerlevel10krc
 | 
			
		||||
    - d_colors
 | 
			
		||||
    - f_compton.conf
 | 
			
		||||
| 
						 | 
				
			
			@ -135,15 +118,15 @@ profiles:
 | 
			
		|||
    - f_c3kdenlive
 | 
			
		||||
    - f_c3mpv
 | 
			
		||||
    - f_c3check
 | 
			
		||||
    - f_zprofile_win
 | 
			
		||||
    - f_zprofile
 | 
			
		||||
    - f_start_systemd_shell.sh
 | 
			
		||||
  AINCRAD:
 | 
			
		||||
    dotfiles:
 | 
			
		||||
    - d_fonts
 | 
			
		||||
    - f_profile_win
 | 
			
		||||
    - f_profile
 | 
			
		||||
    - f_vimrc
 | 
			
		||||
    - f_zshrc
 | 
			
		||||
    - f_zshenv_win
 | 
			
		||||
    - f_zshenv
 | 
			
		||||
    - f_powerlevel10krc
 | 
			
		||||
    - d_colors
 | 
			
		||||
    - f_compton.conf
 | 
			
		||||
| 
						 | 
				
			
			@ -154,15 +137,15 @@ profiles:
 | 
			
		|||
    - f_c3kdenlive
 | 
			
		||||
    - f_c3mpv
 | 
			
		||||
    - f_c3check
 | 
			
		||||
    - f_zprofile_win
 | 
			
		||||
    - f_zprofile
 | 
			
		||||
    - f_start_systemd_shell.sh
 | 
			
		||||
  AINCRAD-wsl:
 | 
			
		||||
    dotfiles:
 | 
			
		||||
    - d_fonts
 | 
			
		||||
    - f_profile_win
 | 
			
		||||
    - f_profile
 | 
			
		||||
    - f_vimrc
 | 
			
		||||
    - f_zshrc
 | 
			
		||||
    - f_zshenv_win
 | 
			
		||||
    - f_zshenv
 | 
			
		||||
    - f_powerlevel10krc
 | 
			
		||||
    - d_colors
 | 
			
		||||
    - f_compton.conf
 | 
			
		||||
| 
						 | 
				
			
			@ -173,7 +156,7 @@ profiles:
 | 
			
		|||
    - f_c3kdenlive
 | 
			
		||||
    - f_c3mpv
 | 
			
		||||
    - f_c3check
 | 
			
		||||
    - f_zprofile_win
 | 
			
		||||
    - f_zprofile
 | 
			
		||||
    - f_start_systemd_shell.sh
 | 
			
		||||
  yoetunheimr:
 | 
			
		||||
    dotfiles:
 | 
			
		||||
| 
						 | 
				
			
			@ -214,7 +197,7 @@ profiles:
 | 
			
		|||
  VWAGWOY00349:
 | 
			
		||||
    dotfiles:
 | 
			
		||||
    - f_vimrc
 | 
			
		||||
    - f_zshrc_mac
 | 
			
		||||
    - f_zshrc
 | 
			
		||||
    - f_zshenv
 | 
			
		||||
    - f_powerlevel10krc
 | 
			
		||||
    - d_colors
 | 
			
		||||
| 
						 | 
				
			
			@ -224,4 +207,4 @@ profiles:
 | 
			
		|||
    - f_c3kdenlive
 | 
			
		||||
    - f_c3mpv
 | 
			
		||||
    - f_c3check
 | 
			
		||||
    - f_zprofile_mac
 | 
			
		||||
    - f_zprofile
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
/*
 | 
			
		||||
 {{@@ env['dotdrop_warning'] @@}} 
 | 
			
		||||
 {{@@ header() @@}} 
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
/* Set each shell as loginShell */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,17 +1,17 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
if [[ -z "$1" ]] || [[ -z "$2" ]] || [[ -z "$3" ]]; then
 | 
			
		||||
	echo "Usage: $0 <player> <event> <talk-id>"
 | 
			
		||||
	echo "e.g.: $0 vlc 35c3 9766"
 | 
			
		||||
if [[ -z "${1}" ]] || [[ -z "${2}" ]] || [[ -z "${3}" ]]; then
 | 
			
		||||
	echo "Usage: ${0} <player> <event> <talk-id>"
 | 
			
		||||
	echo "e.g.: ${0} vlc 35c3 9766"
 | 
			
		||||
	exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
mediainfo /video/video/encoded/$2/$3-hd.mp4
 | 
			
		||||
mediainfo /video/video/encoded/${2}/${3}-hd.mp4
 | 
			
		||||
 | 
			
		||||
read -p "Press any key to continue... " -n1 -s
 | 
			
		||||
 | 
			
		||||
$1 /video/video/encoded/$2/$3-hd.mp4
 | 
			
		||||
${1} /video/video/encoded/${2}/${3}-hd.mp4
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,12 +1,12 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
if [[ -z "$1" ]]; then
 | 
			
		||||
if [[ -z "${1}" ]]; then
 | 
			
		||||
	echo "Filepath missing."
 | 
			
		||||
	exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
rsync --verbose --progress --inplace $1 /tmp/
 | 
			
		||||
rsync --verbose --progress --inplace ${1} /tmp/
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,13 +1,13 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
 | 
			
		||||
	echo "Usage: $0 <event> <talk-id>"
 | 
			
		||||
	echo "e.g.: $0 35c3 9766"
 | 
			
		||||
if [[ -z "${1}" ]] || [[ -z "${2}" ]]; then
 | 
			
		||||
	echo "Usage: ${0} <event> <talk-id>"
 | 
			
		||||
	echo "e.g.: ${0} 35c3 9766"
 | 
			
		||||
	exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
kdenlive /video/fuse/$1/*/$2/project.kdenlive
 | 
			
		||||
kdenlive /video/fuse/${1}/*/${2}/project.kdenlive
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,13 +1,13 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
 | 
			
		||||
	echo "Usage: $0 <event> <talk-id>"
 | 
			
		||||
	echo "e.g.: $0 35c3 9766"
 | 
			
		||||
if [[ -z "${1}" ]] || [[ -z "${2}" ]]; then
 | 
			
		||||
	echo "Usage: ${0} <event> <talk-id>"
 | 
			
		||||
	echo "e.g.: ${0} 35c3 9766"
 | 
			
		||||
	exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
ls -lah --color=tty /video/fuse/$1/*/$2/
 | 
			
		||||
ls -lah --color=tty /video/fuse/${1}/*/${2}/
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,13 +1,13 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
 | 
			
		||||
	echo "Usage: $0 <event> <talk-id>"
 | 
			
		||||
	echo "e.g.: $0 35c3 9766"
 | 
			
		||||
if [[ -z "${1}" ]] || [[ -z "${2}" ]]; then
 | 
			
		||||
	echo "Usage: ${0} <event> <talk-id>"
 | 
			
		||||
	echo "e.g.: ${0} 35c3 9766"
 | 
			
		||||
	exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
mpv /video/fuse/$1/*/$2/uncut.ts
 | 
			
		||||
mpv /video/fuse/${1}/*/${2}/uncut.ts
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,23 +1,23 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
if [[ $UID -ne 0 ]]; then
 | 
			
		||||
if [[ ${UID} -ne 0 ]]; then
 | 
			
		||||
	echo "You have to run this script as root!"
 | 
			
		||||
	exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
options=( storage aws umount )
 | 
			
		||||
 | 
			
		||||
if [[ -z "$1" ]]; then
 | 
			
		||||
	echo "Usage: $0 <project>"
 | 
			
		||||
	echo "e.g.: $0 c3"
 | 
			
		||||
if [[ -z "${1}" ]]; then
 | 
			
		||||
	echo "Usage: ${0} <project>"
 | 
			
		||||
	echo "e.g.: ${0} c3"
 | 
			
		||||
	echo " "
 | 
			
		||||
	echo "Valid options:"
 | 
			
		||||
	for i in "${options[@]}"; do
 | 
			
		||||
		echo "    - $i"
 | 
			
		||||
		echo "    - ${i}"
 | 
			
		||||
	done
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -25,28 +25,28 @@ fuse="/video/fuse"
 | 
			
		|||
video="/video/video"
 | 
			
		||||
tmp="/video/tmp"
 | 
			
		||||
 | 
			
		||||
if mount | grep $fuse > /dev/null; then
 | 
			
		||||
    umount $fuse
 | 
			
		||||
if mount | grep ${fuse} > /dev/null; then
 | 
			
		||||
    umount ${fuse}
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if mount | grep $video > /dev/null; then
 | 
			
		||||
    umount $video
 | 
			
		||||
if mount | grep ${video} > /dev/null; then
 | 
			
		||||
    umount ${video}
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if mount | grep $tmp > /dev/null; then
 | 
			
		||||
    umount $tmp
 | 
			
		||||
if mount | grep ${tmp} > /dev/null; then
 | 
			
		||||
    umount ${tmp}
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
case $1 in
 | 
			
		||||
case ${1} in
 | 
			
		||||
	storage)
 | 
			
		||||
		mount.cifs //storage.lan.c3voc.de/fuse $fuse -o rw,guest -o uid=phg
 | 
			
		||||
		mount.cifs //storage.lan.c3voc.de/video $video -o rw,guest -o uid=phg
 | 
			
		||||
		mount.cifs //storage.lan.c3voc.de/tmp $tmp -o rw,guest -o uid=phg
 | 
			
		||||
		mount.cifs //storage.lan.c3voc.de/fuse ${fuse} -o rw,guest -o uid=phg
 | 
			
		||||
		mount.cifs //storage.lan.c3voc.de/video ${video} -o rw,guest -o uid=phg
 | 
			
		||||
		mount.cifs //storage.lan.c3voc.de/tmp ${tmp} -o rw,guest -o uid=phg
 | 
			
		||||
		;;
 | 
			
		||||
	aws)
 | 
			
		||||
		mount.cifs //aws.lan.c3voc.de/fuse $fuse -o rw,guest -o uid=phg
 | 
			
		||||
                mount.cifs //aws.lan.c3voc.de/video $video -o rw,guest -o uid=phg
 | 
			
		||||
		mount.cifs //aws.lan.c3voc.de/tmp $tmp -o rw,guest -o uid=phg
 | 
			
		||||
		mount.cifs //aws.lan.c3voc.de/fuse ${fuse} -o rw,guest -o uid=phg
 | 
			
		||||
        mount.cifs //aws.lan.c3voc.de/video ${video} -o rw,guest -o uid=phg
 | 
			
		||||
		mount.cifs //aws.lan.c3voc.de/tmp ${tmp} -o rw,guest -o uid=phg
 | 
			
		||||
		;;
 | 
			
		||||
	umount)
 | 
			
		||||
		;;
 | 
			
		||||
| 
						 | 
				
			
			@ -54,6 +54,6 @@ case $1 in
 | 
			
		|||
		echo "Mountpoint does not exist."
 | 
			
		||||
		echo "Please use one of the following:"
 | 
			
		||||
		for i in "${options[@]}"; do
 | 
			
		||||
                	echo "    - $i"
 | 
			
		||||
                	echo "    - ${i}"
 | 
			
		||||
        	done
 | 
			
		||||
esac
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,13 +1,14 @@
 | 
			
		|||
#! /bin/sh
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# https://wiki.archlinux.org/index.php/GNOME/Keyring
 | 
			
		||||
# Launch sxhkd
 | 
			
		||||
sxhkd &
 | 
			
		||||
# Launch polybar(s)
 | 
			
		||||
$HOME/.config/polybar/launch.sh &
 | 
			
		||||
{{@@ env['HOME'] @@}}/.config/polybar/launch.sh &
 | 
			
		||||
# Set windomanager name to LG3D to get JAVA programs back to work
 | 
			
		||||
wmname LG3D
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,11 +1,11 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Set lock screen background
 | 
			
		||||
lockscreen="$HOME/.config/bspwm/lock.png"
 | 
			
		||||
lockscreen="{{@@ env['HOME'] @@}}/.config/bspwm/lock.png"
 | 
			
		||||
 | 
			
		||||
# Lock all KeePass databases
 | 
			
		||||
keepass --lock-all
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
# 
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
# Thank you code_nomad: http://9m.no/ꪯ鵞
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
;=======================================
 | 
			
		||||
;
 | 
			
		||||
;    {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
;    {{@@ header() @@}}
 | 
			
		||||
;
 | 
			
		||||
;    Polybar configuration for
 | 
			
		||||
;    Dell XPS 15 9560
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
load=$(uptime | grep -ohe 'load average[s:][: ].*' | sed 's/,//g' | awk '{print $3" "$4" "$5}')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
#!/usr/bin/env sh
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Terminate already running bar instances
 | 
			
		||||
| 
						 | 
				
			
			@ -13,4 +14,4 @@ while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
 | 
			
		|||
# Launch bar1 and bar2
 | 
			
		||||
polybar -r -q 9560-top &
 | 
			
		||||
polybar -r -q 9560-bottom &
 | 
			
		||||
$HOME/.config/polybar/refresh_bar_usb_nic.sh &
 | 
			
		||||
{{@@ env['HOME'] @@}}/.config/polybar/refresh_bar_usb_nic.sh &
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
;
 | 
			
		||||
; {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
; {{@@ header() @@}}
 | 
			
		||||
;
 | 
			
		||||
 | 
			
		||||
;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,8 +1,7 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
######################
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
# This script detects if an USB NIC was connected and reloads the bar
 | 
			
		||||
#
 | 
			
		||||
| 
						 | 
				
			
			@ -11,30 +10,30 @@ while true; do
 | 
			
		|||
	# Get PID of the bottom bar
 | 
			
		||||
	pid_bottom_bar=$(ps -x | awk '!/awk/ && /9560-bottom/ {print $1}')
 | 
			
		||||
	# 1st USB port (right)
 | 
			
		||||
	if [[ -z $USB_NIC1 ]]; then
 | 
			
		||||
	if [[ -z ${USB_NIC1} ]]; then
 | 
			
		||||
		USB_NIC1=$(ip link | awk '!/awk/ && /enp0s20f0u1/ {print $2}' | cut -d":" -f1)
 | 
			
		||||
		if [[ -n $USB_NIC1 ]]; then
 | 
			
		||||
			polybar-msg -p $pid_bottom_bar cmd restart
 | 
			
		||||
		if [[ -n ${USB_NIC1} ]]; then
 | 
			
		||||
			polybar-msg -p ${pid_bottom_bar} cmd restart
 | 
			
		||||
		fi
 | 
			
		||||
	elif [[ -n $USB_NIC1 ]]; then
 | 
			
		||||
	elif [[ -n ${USB_NIC1} ]]; then
 | 
			
		||||
		USB_NIC1_CHECK=$(ip link | awk '!/awk/ && /enp0s20f0u1/ {print $2}' | cut -d":" -f1)
 | 
			
		||||
		if [[ -z $USB_NIC1_CHECK ]]; then
 | 
			
		||||
		if [[ -z ${USB_NIC1_CHECK} ]]; then
 | 
			
		||||
			unset USB_NIC1
 | 
			
		||||
			polybar-msg -p $pid_bottom_bar cmd restart
 | 
			
		||||
			polybar-msg -p ${pid_bottom_bar} cmd restart
 | 
			
		||||
		fi
 | 
			
		||||
	fi
 | 
			
		||||
	
 | 
			
		||||
	# 2nd USB port (left)
 | 
			
		||||
	if [[ -z $USB_NIC2 ]]; then
 | 
			
		||||
	if [[ -z ${USB_NIC2} ]]; then
 | 
			
		||||
		USB_NIC2=$(ip link | awk '!/awk/ && /enp0s20f0u2/ {print $2}' | cut -d":" -f1)
 | 
			
		||||
		if [[ -n $USB_NIC2 ]]; then
 | 
			
		||||
			polybar-msg -p $pid_bottom_bar cmd restart
 | 
			
		||||
		if [[ -n ${USB_NIC2} ]]; then
 | 
			
		||||
			polybar-msg -p ${pid_bottom_bar} cmd restart
 | 
			
		||||
		fi
 | 
			
		||||
	elif [[ -n $USB_NIC2 ]]; then
 | 
			
		||||
	elif [[ -n ${USB_NIC2} ]]; then
 | 
			
		||||
		USB_NIC2_CHECK=$(ip link | awk '!/awk/ && /enp0s20f0u2/ {print $2}' | cut -d":" -f1)
 | 
			
		||||
		if [[ -z $USB_NIC2_CHECK ]]; then
 | 
			
		||||
		if [[ -z ${USB_NIC2_CHECK} ]]; then
 | 
			
		||||
			unset USB_NIC2
 | 
			
		||||
			polybar-msg -p $pid_bottom_bar cmd restart
 | 
			
		||||
			polybar-msg -p ${pid_bottom_bar} cmd restart
 | 
			
		||||
		fi
 | 
			
		||||
	fi
 | 
			
		||||
	
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
!
 | 
			
		||||
! {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
! {{@@ header() @@}}
 | 
			
		||||
!
 | 
			
		||||
 | 
			
		||||
! ------------------------------------------------------------------------------
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
##
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
[Unit]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
'feh' '--image-bg' 'black' '--bg-center' '{{@@ env['HOME'] @@}}/.config/bspwm/bg.png' 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,7 @@
 | 
			
		|||
#!/usr/bin/env zsh
 | 
			
		||||
 | 
			
		||||
$HOME/.local/share/kite/kited > /dev/null 2>&1 &
 | 
			
		||||
#
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
{{@@ env['HOME'] @@}}/.local/share/kite/kited > /dev/null 2>&1 &
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
 * {{@@ header() @@}}
 | 
			
		||||
 *
 | 
			
		||||
 * This theme was made using Albert theme creator (https://albertlauncher.github.io/docs/theming/themecreator/).
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Generated by Powerlevel10k configuration wizard on 2020-08-12 at 12:35 CEST.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
POWERLEVEL9K_MODE='awesome-patched'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,16 +0,0 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Set XDG_CONFIG_HOME
 | 
			
		||||
XDG_CONFIG_HOME="$HOME/.config"
 | 
			
		||||
export XDG_CONFIG_HOME
 | 
			
		||||
# SSH Agent (KeeAgent)
 | 
			
		||||
SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
 | 
			
		||||
export SSH_AUTH_SOCK
 | 
			
		||||
# Use vim as editor on X
 | 
			
		||||
VISUAL='vim'
 | 
			
		||||
export VISUAL
 | 
			
		||||
# Use vim as standard editor
 | 
			
		||||
EDITOR='vim'
 | 
			
		||||
export EDITOR
 | 
			
		||||
| 
						 | 
				
			
			@ -1,13 +0,0 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Use vim as editor on X
 | 
			
		||||
VISUAL='vim'
 | 
			
		||||
export VISUAL
 | 
			
		||||
# Use vim as standard editor
 | 
			
		||||
EDITOR='vim'
 | 
			
		||||
export EDITOR
 | 
			
		||||
# Set DOTNET_ROOT enviroment variable
 | 
			
		||||
DOTNET_ROOT=/opt/dotnet
 | 
			
		||||
export DOTNET_ROOT
 | 
			
		||||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
#!/usr/bin/env sh
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
export DOTNET_ROOT=/opt/dotnet
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
" {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
" {{@@ header() @@}}
 | 
			
		||||
 | 
			
		||||
" Copyright (C) 2016-present Arctic Ice Studio <development@arcticicestudio.com>
 | 
			
		||||
" Copyright (C) 2016-present Sven Greb <development@svengreb.de>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
" ----------------------------------------------------------------------------
 | 
			
		||||
"
 | 
			
		||||
" {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
" {{@@ header() @@}}
 | 
			
		||||
"
 | 
			
		||||
" Vim color file
 | 
			
		||||
" Maintainer:   John-Paul Bader <contact@smyck.org>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
"
 | 
			
		||||
" {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
" {{@@ header() @@}}
 | 
			
		||||
"
 | 
			
		||||
 | 
			
		||||
" Enable syntaxhightlighting
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,36 +1,29 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
userresources=$HOME/.Xresources
 | 
			
		||||
usermodmap=$HOME/.Xmodmap
 | 
			
		||||
userresources={{@@ env['HOME'] @@}}/.Xresources
 | 
			
		||||
usermodmap={{@@ env['HOME'] @@}}/.Xmodmap
 | 
			
		||||
sysresources=/etc/X11/xinit/.Xresources
 | 
			
		||||
sysmodmap=/etc/X11/xinit/.Xmodmap
 | 
			
		||||
 | 
			
		||||
# merge in defaults and keymaps
 | 
			
		||||
 | 
			
		||||
if [ -f $sysresources ]; then
 | 
			
		||||
    xrdb -merge $sysresources
 | 
			
		||||
fi
 | 
			
		||||
[[ -f ${sysresources} ]] && xrdb -merge ${sysresources}
 | 
			
		||||
 | 
			
		||||
if [ -f $sysmodmap ]; then
 | 
			
		||||
    xmodmap $sysmodmap
 | 
			
		||||
fi
 | 
			
		||||
[[ -f ${sysmodmap} ]] && xmodmap ${sysmodmap}
 | 
			
		||||
 | 
			
		||||
if [ -f "$userresources" ]; then
 | 
			
		||||
    xrdb -merge "$userresources"
 | 
			
		||||
fi
 | 
			
		||||
[[ -f "${userresources}" ]] && xrdb -merge "${userresources}"
 | 
			
		||||
 | 
			
		||||
if [ -f "$usermodmap" ]; then
 | 
			
		||||
    xmodmap "$usermodmap"
 | 
			
		||||
fi
 | 
			
		||||
[[ -f "${usermodmap}" ]] && xmodmap "${usermodmap}"
 | 
			
		||||
 | 
			
		||||
# start some nice programs
 | 
			
		||||
 | 
			
		||||
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 | 
			
		||||
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
 | 
			
		||||
  [ -x "$f" ] && . "$f"
 | 
			
		||||
  [ -x "${f}" ] && . "${f}"
 | 
			
		||||
 done
 | 
			
		||||
 unset f
 | 
			
		||||
fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
/bin/zsh --login -i ~/.xinitrc
 | 
			
		||||
/bin/zsh --login -i {{@@ env['HOME'] @@}}/.xinitrc
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										25
									
								
								dotfiles/z_profile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								dotfiles/z_profile
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Use vim as editor on X
 | 
			
		||||
VISUAL='vim'
 | 
			
		||||
export VISUAL
 | 
			
		||||
# Use vim as standard editor
 | 
			
		||||
EDITOR='vim'
 | 
			
		||||
export EDITOR
 | 
			
		||||
 | 
			
		||||
{%@@ if profile == 'VWAGWOY00349' @@%}
 | 
			
		||||
[[ $(command -v /opt/homebrew/bin/brew) ]] && eval "$(/opt/homebrew/bin/brew shellenv)"
 | 
			
		||||
{%@@ endif @@%}
 | 
			
		||||
[[ $(command -v pyenv) ]] && eval "$(pyenv init --path)"
 | 
			
		||||
 | 
			
		||||
{%@@ if profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' or profile == 'yoetunheimr' @@%}
 | 
			
		||||
# Set DOTNET_ROOT enviroment variable
 | 
			
		||||
DOTNET_ROOT=/opt/dotnet
 | 
			
		||||
export DOTNET_ROOT
 | 
			
		||||
 | 
			
		||||
# Set XDG_CONFIG_HOME
 | 
			
		||||
XDG_CONFIG_HOME="{{@@ env['HOME'] @@}}/.config"
 | 
			
		||||
export XDG_CONFIG_HOME
 | 
			
		||||
{%@@ endif @@%}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,13 +0,0 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Use vim as editor on X
 | 
			
		||||
VISUAL='vim'
 | 
			
		||||
export VISUAL
 | 
			
		||||
# Use vim as standard editor
 | 
			
		||||
EDITOR='vim'
 | 
			
		||||
export EDITOR
 | 
			
		||||
 | 
			
		||||
[[ $(command -v /opt/homebrew/bin/brew) ]] && eval "$(/opt/homebrew/bin/brew shellenv)"
 | 
			
		||||
[[ $(command -v pyenv) ]] && eval "$(pyenv init --path)"
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -7,12 +7,33 @@
 | 
			
		|||
export _JAVA_AWT_WM_NONREPARENTING=1
 | 
			
		||||
# Disable Ansible cowsay
 | 
			
		||||
export ANSIBLE_NOCOWS=1
 | 
			
		||||
 | 
			
		||||
# Include ~/.bin to PATH
 | 
			
		||||
if [ -d "$HOME/.bin" ] ; then
 | 
			
		||||
	export PATH="$HOME/.bin:$PATH"
 | 
			
		||||
fi
 | 
			
		||||
# Includ ~/.local/bin to PATH
 | 
			
		||||
if [ -d "$HOME/.local/bin" ] ; then
 | 
			
		||||
	export PATH="$HOME/.local/bin:$PATH"
 | 
			
		||||
[[ -d "{{@@ env['HOME'] @@}}/.bin" ]] && export PATH="{{@@ env['HOME'] @@}}/.bin:${PATH}"
 | 
			
		||||
 | 
			
		||||
# Include ~/.local/bin to PATH
 | 
			
		||||
[[ -d "{{@@ env['HOME'] @@}}/.local/bin" ]] && export PATH="{{@@ env['HOME'] @@}}/.local/bin:${PATH}"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{%@@ if profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' or profile == 'yoetunheimr' @@%}
 | 
			
		||||
# Connect to windows ssh pageant
 | 
			
		||||
# https://github.com/BlackReloaded/wsl2-ssh-pageant
 | 
			
		||||
export SSH_AUTH_SOCK={{@@ env['HOME'] @@}}/.ssh/agent.sock
 | 
			
		||||
ss -a | grep -q $SSH_AUTH_SOCK
 | 
			
		||||
if [ $? -ne 0 ]; then
 | 
			
		||||
        rm -f $SSH_AUTH_SOCK
 | 
			
		||||
        (setsid nohup socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:{{@@ env['HOME'] @@}}/.ssh/wsl2-ssh-pageant.exe >/dev/null 2>&1 &)
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Connect to windows gpg agent
 | 
			
		||||
# https://github.com/BlackReloaded/wsl2-ssh-pageant
 | 
			
		||||
export GPG_AGENT_SOCK={{@@ env['HOME'] @@}}/.gnupg/S.gpg-agent
 | 
			
		||||
ss -a | grep -q $GPG_AGENT_SOCK
 | 
			
		||||
if [ $? -ne 0 ]; then
 | 
			
		||||
        rm -rf $GPG_AGENT_SOCK
 | 
			
		||||
        (setsid nohup socat UNIX-LISTEN:$GPG_AGENT_SOCK,fork EXEC:"{{@@ env['HOME'] @@}}/.ssh/wsl2-ssh-pageant.exe --gpg S.gpg-agent" >/dev/null 2>&1 &)
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# X410 (Windows X11 Server)
 | 
			
		||||
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
 | 
			
		||||
{%@@ endif @@%}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,44 +0,0 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Fix for JetBrains with non-re-parenting window managers
 | 
			
		||||
export _JAVA_AWT_WM_NONREPARENTING=1
 | 
			
		||||
# Disable Ansible cowsay
 | 
			
		||||
export ANSIBLE_NOCOWS=1
 | 
			
		||||
 | 
			
		||||
# Include ~/.bin to PATH
 | 
			
		||||
if [ -d "${HOME}/.bin" ] ; then
 | 
			
		||||
	export PATH="${HOME}/.bin:${PATH}"
 | 
			
		||||
fi
 | 
			
		||||
# Include ~/.local/bin to PATH
 | 
			
		||||
if [ -d "${HOME}/.local/bin" ] ; then
 | 
			
		||||
	export PATH="${HOME}/.local/bin:${PATH}"
 | 
			
		||||
fi
 | 
			
		||||
# Inclue ~/.krew/bin to PATH for krew kubectl extensions
 | 
			
		||||
if [ -d "${HOME}/.krew/bin" ] ; then
 | 
			
		||||
	export PATH="${HOME}/.krew/bin:${PATH}"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Connect to windows ssh pageant
 | 
			
		||||
# https://github.com/BlackReloaded/wsl2-ssh-pageant
 | 
			
		||||
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
 | 
			
		||||
ss -a | grep -q $SSH_AUTH_SOCK
 | 
			
		||||
if [ $? -ne 0 ]; then
 | 
			
		||||
        rm -f $SSH_AUTH_SOCK
 | 
			
		||||
        (setsid nohup socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:$HOME/.ssh/wsl2-ssh-pageant.exe >/dev/null 2>&1 &)
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Connect to windows gpg agent
 | 
			
		||||
# https://github.com/BlackReloaded/wsl2-ssh-pageant
 | 
			
		||||
export GPG_AGENT_SOCK=$HOME/.gnupg/S.gpg-agent
 | 
			
		||||
ss -a | grep -q $GPG_AGENT_SOCK
 | 
			
		||||
if [ $? -ne 0 ]; then
 | 
			
		||||
        rm -rf $GPG_AGENT_SOCK
 | 
			
		||||
        (setsid nohup socat UNIX-LISTEN:$GPG_AGENT_SOCK,fork EXEC:"$HOME/.ssh/wsl2-ssh-pageant.exe --gpg S.gpg-agent" >/dev/null 2>&1 &)
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# X410 (Windows X11 Server)
 | 
			
		||||
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1,16 +1,26 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
{%@@ if profile == 'VWAGWOY00349' @@%}
 | 
			
		||||
#### FIG ENV VARIABLES ####
 | 
			
		||||
# Please make sure this block is at the start of this file.
 | 
			
		||||
[ -s {{@@ env['HOME'] @@}}/.fig/shell/pre.sh ] && source {{@@ env['HOME'] @@}}/.fig/shell/pre.sh
 | 
			
		||||
#### END FIG ENV VARIABLES ####
 | 
			
		||||
{%@@ endif @@%}
 | 
			
		||||
 | 
			
		||||
# 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"
 | 
			
		||||
if [[ -r "${XDG_CACHE_HOME:-{{@@ env['HOME'] @@}}/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
 | 
			
		||||
  source "${XDG_CACHE_HOME:-{{@@ env['HOME'] @@}}/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
 | 
			
		||||
[[ ! -f {{@@ env['HOME'] @@}}/.p10k.zsh ]] || source {{@@ env['HOME'] @@}}/.p10k.zsh
 | 
			
		||||
 | 
			
		||||
# If you come from bash you might have to change your $PATH.
 | 
			
		||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
 | 
			
		||||
# export PATH=${HOME}/bin:/usr/local/bin:$PATH
 | 
			
		||||
 | 
			
		||||
# Path to your oh-my-zsh installation.
 | 
			
		||||
  export ZSH={{@@ env['HOME'] @@}}/.oh-my-zsh
 | 
			
		||||
| 
						 | 
				
			
			@ -18,10 +28,10 @@ fi
 | 
			
		|||
# Set name of the theme to load. Optionally, if you set this to "random"
 | 
			
		||||
# it'll load a random theme each time that oh-my-zsh is loaded.
 | 
			
		||||
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
 | 
			
		||||
if [[ $TERM == 'linux' ]]; then
 | 
			
		||||
	ZSH_THEME="agnoster"
 | 
			
		||||
if [[ ${TERM} == 'linux' ]]; then
 | 
			
		||||
  ZSH_THEME="agnoster"
 | 
			
		||||
else
 | 
			
		||||
	ZSH_THEME="powerlevel10k/powerlevel10k"
 | 
			
		||||
  ZSH_THEME="powerlevel10k/powerlevel10k"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Set list of themes to load
 | 
			
		||||
| 
						 | 
				
			
			@ -74,26 +84,27 @@ COMPLETION_WAITING_DOTS="true"
 | 
			
		|||
# Example format: plugins=(rails git textmate ruby lighthouse)
 | 
			
		||||
# Add wisely, as too many plugins slow down shell startup.
 | 
			
		||||
plugins=(
 | 
			
		||||
	archlinux
 | 
			
		||||
	colored-man-pages
 | 
			
		||||
	cp
 | 
			
		||||
	git
 | 
			
		||||
	git-extras
 | 
			
		||||
	gitignore
 | 
			
		||||
	kubectl
 | 
			
		||||
	pip
 | 
			
		||||
	pyenv
 | 
			
		||||
	pylint
 | 
			
		||||
	python
 | 
			
		||||
	screen
 | 
			
		||||
	sublime
 | 
			
		||||
	sudo
 | 
			
		||||
	systemd
 | 
			
		||||
	themes
 | 
			
		||||
	zsh-navigation-tools
 | 
			
		||||
{%@@ if profile == 'yoetunheimr' or profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' @@%}  archlinux
 | 
			
		||||
{%@@ endif @@%}  colored-man-pages
 | 
			
		||||
  cp
 | 
			
		||||
  git
 | 
			
		||||
  git-extras
 | 
			
		||||
  gitignore
 | 
			
		||||
  kubectl
 | 
			
		||||
  pip
 | 
			
		||||
  pyenv
 | 
			
		||||
  pylint
 | 
			
		||||
  python
 | 
			
		||||
  screen
 | 
			
		||||
  sublime
 | 
			
		||||
  sudo
 | 
			
		||||
  systemd
 | 
			
		||||
  themes
 | 
			
		||||
  vscode
 | 
			
		||||
  zsh-navigation-tools
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
source $ZSH/oh-my-zsh.sh
 | 
			
		||||
source ${ZSH}/oh-my-zsh.sh
 | 
			
		||||
 | 
			
		||||
# User configuration
 | 
			
		||||
# export MANPATH="/usr/local/man:$MANPATH"
 | 
			
		||||
| 
						 | 
				
			
			@ -122,27 +133,36 @@ source $ZSH/oh-my-zsh.sh
 | 
			
		|||
# Example aliases
 | 
			
		||||
# alias zshconfig="mate ~/.zshrc"
 | 
			
		||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
 | 
			
		||||
alias dotdrop='eval $(grep -v "^#" ~/.files/.env.public) ~/.files/dotdrop.sh'
 | 
			
		||||
eval $(thefuck --alias)
 | 
			
		||||
[[ -f {{@@ env['HOME'] @@}}/.files/dotdrop.sh ]] && alias dotdrop='eval $(grep -v "^#" {{@@ env['HOME'] @@}}/.files/.env.public) {{@@ env['HOME'] @@}}/.files/dotdrop.sh'
 | 
			
		||||
[[ $(command -v thefuck) ]] && eval $(thefuck --alias)
 | 
			
		||||
{%@@ if profile == 'AINCRAD-wsl' or profile == 'YOETUNHEIMR-wsl' @@%}
 | 
			
		||||
# Use https://github.com/jgaa/shinysocks as simple socks5 proxy for windows
 | 
			
		||||
alias proxy_kubectl="http_proxy=socks5://$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):1080 https_proxy=socks5://$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):1080 kubectl"
 | 
			
		||||
alias pk='proxy_kubectl'
 | 
			
		||||
[[ $(command -v kubectl) ]] && alias proxy_kubectl="http_proxy=socks5://$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):1080 https_proxy=socks5://$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):1080 kubectl"
 | 
			
		||||
[[ $(command -v kubectl) ]] && alias pk='proxy_kubectl'
 | 
			
		||||
{%@@ endif @@%}
 | 
			
		||||
 | 
			
		||||
# Initialize pyenv
 | 
			
		||||
[[ $(command -v pyenv) ]] && eval "$(pyenv init -)"
 | 
			
		||||
 | 
			
		||||
# Enable pipx completions
 | 
			
		||||
if [ -f "$HOME/.local/bin/pipx" ]; then
 | 
			
		||||
	autoload -U bashcompinit
 | 
			
		||||
	bashcompinit
 | 
			
		||||
	eval "$(register-python-argcomplete pipx)"
 | 
			
		||||
if [ -f "{{@@ env['HOME'] @@}}/.local/bin/pipx" ]; then
 | 
			
		||||
  autoload -U bashcompinit
 | 
			
		||||
  bashcompinit
 | 
			
		||||
  eval "$(register-python-argcomplete pipx)"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
 | 
			
		||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
 | 
			
		||||
{%@@ if profile == 'VWAGWOY00349' @@%}
 | 
			
		||||
#### FIG ENV VARIABLES ####
 | 
			
		||||
# Please make sure this block is at the end of this file.
 | 
			
		||||
[ -s {{@@ env['HOME'] @@}}/.fig/fig.sh ] && source {{@@ env['HOME'] @@}}/.fig/fig.sh
 | 
			
		||||
#### END FIG ENV VARIABLES ####
 | 
			
		||||
{%@@ endif @@%}
 | 
			
		||||
 | 
			
		||||
# Functions (or more complex aliases)
 | 
			
		||||
wttr() {
 | 
			
		||||
    if [ -z "$1" ]; then
 | 
			
		||||
    if [ -z "${1}" ]; then
 | 
			
		||||
        curl http://wttr.in
 | 
			
		||||
    elif [[ "$1" == "help" ]]; then
 | 
			
		||||
    elif [[ "${1}" == "help" ]]; then
 | 
			
		||||
        cat << EOF
 | 
			
		||||
usage: wttr (City|3-letter airport code|'~Special+Location')
 | 
			
		||||
  City:
 | 
			
		||||
| 
						 | 
				
			
			@ -162,7 +182,6 @@ usage: wttr (City|3-letter airport code|'~Special+Location')
 | 
			
		|||
      wttr '~Kilimanjaro'
 | 
			
		||||
EOF
 | 
			
		||||
    else
 | 
			
		||||
        curl http://wttr.in/$1
 | 
			
		||||
        curl http://wttr.in/${1}
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,178 +0,0 @@
 | 
			
		|||
#
 | 
			
		||||
# {{@@ env['dotdrop_warning'] @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
#### FIG ENV VARIABLES ####
 | 
			
		||||
# Please make sure this block is at the start of this file.
 | 
			
		||||
[ -s ~/.fig/shell/pre.sh ] && source ~/.fig/shell/pre.sh
 | 
			
		||||
#### END FIG ENV VARIABLES ####
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
 | 
			
		||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
 | 
			
		||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
 | 
			
		||||
 | 
			
		||||
# If you come from bash you might have to change your $PATH.
 | 
			
		||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
 | 
			
		||||
 | 
			
		||||
# Path to your oh-my-zsh installation.
 | 
			
		||||
  export ZSH={{@@ env['HOME'] @@}}/.oh-my-zsh
 | 
			
		||||
 | 
			
		||||
# Set name of the theme to load. Optionally, if you set this to "random"
 | 
			
		||||
# it'll load a random theme each time that oh-my-zsh is loaded.
 | 
			
		||||
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
 | 
			
		||||
if [[ ${TERM} == 'linux' ]]; then
 | 
			
		||||
	ZSH_THEME="agnoster"
 | 
			
		||||
else
 | 
			
		||||
	ZSH_THEME="powerlevel10k/powerlevel10k"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Set list of themes to load
 | 
			
		||||
# Setting this variable when ZSH_THEME=random
 | 
			
		||||
# cause zsh load theme from this variable instead of
 | 
			
		||||
# looking in ~/.oh-my-zsh/themes/
 | 
			
		||||
# An empty array have no effect
 | 
			
		||||
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
 | 
			
		||||
 | 
			
		||||
# Uncomment the following line to use case-sensitive completion.
 | 
			
		||||
# CASE_SENSITIVE="true"
 | 
			
		||||
 | 
			
		||||
# Uncomment the following line to use hyphen-insensitive completion. Case
 | 
			
		||||
# sensitive completion must be off. _ and - will be interchangeable.
 | 
			
		||||
# HYPHEN_INSENSITIVE="true"
 | 
			
		||||
 | 
			
		||||
# Uncomment the following line to disable bi-weekly auto-update checks.
 | 
			
		||||
# DISABLE_AUTO_UPDATE="true"
 | 
			
		||||
 | 
			
		||||
# Uncomment the following line to change how often to auto-update (in days).
 | 
			
		||||
# export UPDATE_ZSH_DAYS=13
 | 
			
		||||
 | 
			
		||||
# Uncomment the following line to disable colors in ls.
 | 
			
		||||
# DISABLE_LS_COLORS="true"
 | 
			
		||||
 | 
			
		||||
# Uncomment the following line to disable auto-setting terminal title.
 | 
			
		||||
# DISABLE_AUTO_TITLE="true"
 | 
			
		||||
 | 
			
		||||
# Uncomment the following line to enable command auto-correction.
 | 
			
		||||
# ENABLE_CORRECTION="true"
 | 
			
		||||
 | 
			
		||||
# Uncomment the following line to display red dots whilst waiting for completion.
 | 
			
		||||
COMPLETION_WAITING_DOTS="true"
 | 
			
		||||
 | 
			
		||||
# Uncomment the following line if you want to disable marking untracked files
 | 
			
		||||
# under VCS as dirty. This makes repository status check for large repositories
 | 
			
		||||
# much, much faster.
 | 
			
		||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
 | 
			
		||||
 | 
			
		||||
# Uncomment the following line if you want to change the command execution time
 | 
			
		||||
# stamp shown in the history command output.
 | 
			
		||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
 | 
			
		||||
# HIST_STAMPS="mm/dd/yyyy"
 | 
			
		||||
 | 
			
		||||
# Would you like to use another custom folder than $ZSH/custom?
 | 
			
		||||
# ZSH_CUSTOM=/path/to/new-custom-folder
 | 
			
		||||
 | 
			
		||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
 | 
			
		||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
 | 
			
		||||
# Example format: plugins=(rails git textmate ruby lighthouse)
 | 
			
		||||
# Add wisely, as too many plugins slow down shell startup.
 | 
			
		||||
plugins=(
 | 
			
		||||
	colored-man-pages
 | 
			
		||||
	cp
 | 
			
		||||
	git
 | 
			
		||||
	git-extras
 | 
			
		||||
	gitignore
 | 
			
		||||
	kubectl
 | 
			
		||||
	pip
 | 
			
		||||
	pyenv
 | 
			
		||||
	pylint
 | 
			
		||||
	python
 | 
			
		||||
	screen
 | 
			
		||||
	sublime
 | 
			
		||||
	sudo
 | 
			
		||||
	systemd
 | 
			
		||||
	themes
 | 
			
		||||
  vscode
 | 
			
		||||
	zsh-navigation-tools
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
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"
 | 
			
		||||
[[ -f ${HOME}/.files/dotdrop.sh ]] && alias dotdrop='eval $(grep -v "^#" ~/.files/.env.public) ~/.files/dotdrop.sh'
 | 
			
		||||
[[ $(command -v thefuck) ]] && eval $(thefuck --alias)
 | 
			
		||||
 | 
			
		||||
# Enable pipx completions
 | 
			
		||||
if [ -f "${HOME}/.local/bin/pipx" ]; then
 | 
			
		||||
	autoload -U bashcompinit
 | 
			
		||||
	bashcompinit
 | 
			
		||||
	eval "$(register-python-argcomplete pipx)"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Initialize pyenv
 | 
			
		||||
[[ $(command -v pyenv) ]] && eval "$(pyenv init -)"
 | 
			
		||||
 | 
			
		||||
#### FIG ENV VARIABLES ####
 | 
			
		||||
# Please make sure this block is at the end of this file.
 | 
			
		||||
[ -s ~/.fig/fig.sh ] && source ~/.fig/fig.sh
 | 
			
		||||
#### END FIG ENV VARIABLES ####
 | 
			
		||||
 | 
			
		||||
# Functions (or more complex aliases)
 | 
			
		||||
wttr() {
 | 
			
		||||
    if [ -z "$1" ]; then
 | 
			
		||||
        curl http://wttr.in
 | 
			
		||||
    elif [[ "$1" == "help" ]]; then
 | 
			
		||||
        cat << EOF
 | 
			
		||||
usage: wttr (City|3-letter airport code|'~Special+Location')
 | 
			
		||||
  City:
 | 
			
		||||
    Just write down the name of the city.
 | 
			
		||||
    e.G.:
 | 
			
		||||
      wttr London
 | 
			
		||||
  3-letter airport code:
 | 
			
		||||
    Use 3-letter airport codes in order to get the weather information at a certain airport.
 | 
			
		||||
    e.G.:
 | 
			
		||||
      wttr muc #for Munich Internation Airpot, Germany
 | 
			
		||||
  Special Location:
 | 
			
		||||
    Let's say you'd like to get the weather for a geographical location other than a town or city -
 | 
			
		||||
    maybe an attraction in a city, a mountain name, or some special location.
 | 
			
		||||
    Add the character '~' before the name to look up that special location name before the weather is then retrieved.
 | 
			
		||||
    e.G.:
 | 
			
		||||
      wttr '~Eiffel+Tower'
 | 
			
		||||
      wttr '~Kilimanjaro'
 | 
			
		||||
EOF
 | 
			
		||||
    else
 | 
			
		||||
        curl http://wttr.in/$1
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue