This commit is contained in:
Geoffrey Frogeye 2018-08-19 11:29:59 +02:00
parent 27a817fff3
commit 9f65e9b248
12 changed files with 75 additions and 28 deletions

6
bashrc
View file

@ -142,14 +142,14 @@ export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"'
# CUSTOM SCRIPTS # CUSTOM SCRIPTS
export PATH="$HOME/.bin/:$HOME/.scripts/:$PATH" export PATH="$HOME/.local/bin/:$HOME/.scripts/:$PATH"
[ -f ~/.gscripts/gprofile ] && source ~/.gscripts/gprofile [ -f ~/.gscripts/gprofile ] && source ~/.gscripts/gprofile
# UTILITIES # UTILITIES
# Theme # Theme
[ -f ~/.bin/colorSchemeApply ] && source ~/.bin/colorSchemeApply [ -f ~/.local/bin/colorSchemeApply ] && source ~/.local/bin/colorSchemeApply
[ -f ~/.bin/colorSchemeApplyFzf ] && source ~/.bin/colorSchemeApplyFzf [ -f ~/.local/bin/colorSchemeApplyFzf ] && source ~/.local/bin/colorSchemeApplyFzf
# Bash completion # Bash completion
[ -f /etc/bash_completion ] && source /etc/bash_completion [ -f /etc/bash_completion ] && source /etc/bash_completion

2
bin/.gitignore vendored
View file

@ -1,2 +0,0 @@
*
!.gitignore

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh #!/usr/bin/env bash
# Remove SSH and GPG keys from keystores
ssh-add -D
echo RELOADAGENT | gpg-connect-agent
dm-tool lock dm-tool lock
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then

3
config/nvim/init.vim Normal file
View file

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

View file

@ -1,5 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [ -f /proc/acpi/bbswitch ]
then
echo -n 
state="$(grep -o '\w\+$' /proc/acpi/bbswitch)" state="$(grep -o '\w\+$' /proc/acpi/bbswitch)"
if [ "$state" == "ON" ] if [ "$state" == "ON" ]
then then
@ -10,3 +13,6 @@ then
else else
echo "?" echo "?"
fi fi
else
echo
fi

View file

@ -84,7 +84,7 @@ tray-transparent = false
[bar/secondary] [bar/secondary]
inherit = bar/base inherit = bar/base
modules-right = cpu memory temperature vpncheck ethMore wlanMore filesystem linuxmismatch bbswitch xbacklight volume date modules-right = cpu memory temperature keystore vpncheck ethMore wlanMore filesystem linuxmismatch bbswitch xbacklight volume date
[module/filesystem] [module/filesystem]
@ -177,9 +177,7 @@ toggle-off-foreground = #55
[module/bbswitch] [module/bbswitch]
type = custom/script type = custom/script
exec = ~/.config/polybar/bbswitch exec = ~/.config/polybar/bbswitch
exec-if = test -f /proc/acpi/bbswitch
interval = 5 interval = 5
format-prefix = 
format-foreground = ${theme.redF} format-foreground = ${theme.redF}
[module/todo] [module/todo]
@ -242,6 +240,13 @@ interval = 1
format-foreground = ${theme.greenF} format-foreground = ${theme.greenF}
label =  %gb_free% label =  %gb_free%
[module/keystore]
type = custom/script
exec = ~/.config/polybar/keystore
; exec-if = pgrep openvpn
interval = 5
format-foreground = ${theme.greenF}
[module/vpncheck] [module/vpncheck]
type = custom/script type = custom/script
exec = echo  exec = echo 

9
config/polybar/keystore Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
output="$(ssh-add -l)"
if [ $? -ne 0 ]; then
echo
else
echo -n " "
echo "$output" | wc -l
fi

3
config/rofi/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
theme.config
theme.rasi

8
config/rofi/config Normal file
View file

@ -0,0 +1,8 @@
#include "theme.config"
rofi.theme: theme
rofi.cycle: true
rofi.case-sensitive: false
rofi.scroll-method: 0
rofi.show-match: true
rofi.lazy-grab: false
rofi.matching: fuzzy

View file

@ -4,12 +4,17 @@
# and apply them into my configuration # and apply them into my configuration
scheme="$1" scheme="$1"
if [ -z "$scheme" ]
then
echo Please specify a scheme
exit 1
fi
# TODO Verify if scheme is known # TODO Verify if scheme is known
# Shell (allows to use all colors in Vim while still having nice colors in the rest of the terminal) # Shell (allows to use all colors in Vim while still having nice colors in the rest of the terminal)
curl "https://raw.githubusercontent.com/chriskempson/base16-shell/master/scripts/base16-${scheme}.sh" > ~/.bin/colorSchemeApply curl "https://raw.githubusercontent.com/chriskempson/base16-shell/master/scripts/base16-${scheme}.sh" > ~/.local/bin/colorSchemeApply
chmod +x ~/.bin/colorSchemeApply chmod +x ~/.local/bin/colorSchemeApply
# Xressources (I'm not sure if this is really needed with shell overriding these but i3 load those resources) # Xressources (I'm not sure if this is really needed with shell overriding these but i3 load those resources)
curl "https://raw.githubusercontent.com/chriskempson/base16-xresources/master/xresources/base16-${scheme}-256.Xresources" > ~/.Xresources.d/theme curl "https://raw.githubusercontent.com/chriskempson/base16-xresources/master/xresources/base16-${scheme}-256.Xresources" > ~/.Xresources.d/theme
@ -18,12 +23,16 @@ curl "https://raw.githubusercontent.com/chriskempson/base16-xresources/master/xr
echo -e "let base16colorspace=256\nset termguicolors\ncolorscheme base16-${scheme}" > ~/.vim/colorscheme.vim echo -e "let base16colorspace=256\nset termguicolors\ncolorscheme base16-${scheme}" > ~/.vim/colorscheme.vim
# FZF # FZF
curl "https://raw.githubusercontent.com/nicodebo/base16-fzf/master/bash/base16-${scheme}.config" > ~/.bin/colorSchemeApplyFzf curl "https://raw.githubusercontent.com/nicodebo/base16-fzf/master/bash/base16-${scheme}.config" > ~/.local/bin/colorSchemeApplyFzf
chmod +x ~/.bin/colorSchemeApplyFzf chmod +x ~/.local/bin/colorSchemeApplyFzf
# qutebrowser # qutebrowser
curl "https://raw.githubusercontent.com/theova/base16-qutebrowser/4a17eea8a39f722c2cee95fb44d4a87f5eb2518f/themes/base16-${scheme}.config.py" > ~/.config/qutebrowser/theme.py curl "https://raw.githubusercontent.com/theova/base16-qutebrowser/4a17eea8a39f722c2cee95fb44d4a87f5eb2518f/themes/base16-${scheme}.config.py" > ~/.config/qutebrowser/theme.py
# rofi
curl "https://raw.githubusercontent.com/0xdec/base16-rofi/master/themes/base16-${scheme}.rasi" > ~/.config/rofi/theme.rasi
curl "https://raw.githubusercontent.com/0xdec/base16-rofi/master/themes/base16-${scheme}.config" > ~/.config/rofi/theme.config
# TODO dunst (template online, but not to my liking) # TODO dunst (template online, but not to my liking)
# TODO bar (might change bar in the future, so...) # TODO bar (might change bar in the future, so...)
# TODO qutebrowser (need to fiddle with the config thing) # TODO qutebrowser (need to fiddle with the config thing)

View file

@ -190,8 +190,8 @@ if [ $ARCH == 1 ]; then
altInst gopass altInst gopass
else else
inst pass inst pass
wget -qO ~/.bin/ https://raw.githubusercontent.com/pepa65/tldr-bash-client/master/tldr wget -qO ~/.local/bin/ https://raw.githubusercontent.com/pepa65/tldr-bash-client/master/tldr
chmod +x ~/.bin/tldr chmod +x ~/.local/bin/tldr
fi fi
tldr -u tldr -u
if [[ $ARCH == 1 && $ADMIN == 1 ]]; then if [[ $ARCH == 1 && $ADMIN == 1 ]]; then
@ -254,7 +254,7 @@ if [ $GUI == 1 ]; then
cmake .. cmake ..
make -j`nproc` make -j`nproc`
strip bin/polybar strip bin/polybar
mv bin/polybar ~/.bin/ mv bin/polybar ~/.local/bin/
rm -rf $TMP rm -rf $TMP
fi fi
fi fi
@ -287,10 +287,10 @@ if [ $GUI == 1 ]; then
if [ $ARCH == 1 ]; then if [ $ARCH == 1 ]; then
altInst sct altInst sct
elif [ $TERMUX != 1 ]; then elif [ $TERMUX != 1 ]; then
if [ ! -f $HOME/.bin/sct ]; then if [ ! -f $HOME/.local/bin/sct ]; then
TMP=$(mktemp /tmp/XXXXXXXXXX.c) TMP=$(mktemp /tmp/XXXXXXXXXX.c)
wget https://gist.githubusercontent.com/ajnirp/208c03d3aa7f02c743d2/raw/55bf3eed25739173d8be57b5179ed5542cf40ed6/sct.c -O $TMP wget https://gist.githubusercontent.com/ajnirp/208c03d3aa7f02c743d2/raw/55bf3eed25739173d8be57b5179ed5542cf40ed6/sct.c -O $TMP
cc $TMP --std=c99 -lX11 -lXrandr -o $HOME/.bin/sct cc $TMP --std=c99 -lX11 -lXrandr -o $HOME/.local/bin/sct
rm $TMP rm $TMP
fi fi
fi fi
@ -323,8 +323,8 @@ if [ $EXTRA == 1 ]; then
systemdUserUnit vdirsyncer.timer systemdUserUnit vdirsyncer.timer
else else
# translate-shell # translate-shell
curl -L git.io/trans > ~/.bin/trans curl -L git.io/trans > ~/.local/bin/trans
chmod +x ~/.bin/trans chmod +x ~/.local/bin/trans
fi fi
# Extra GUI # Extra GUI

3
vimrc
View file

@ -52,7 +52,7 @@ else
endif endif
Plug 'zchee/deoplete-jedi' Plug 'zchee/deoplete-jedi'
" Plug 'python-mode/python-mode', { 'branch': 'develop' } Plug 'python-mode/python-mode', { 'branch': 'develop' }
Plug 'junegunn/fzf', {'do': './install --bin'} Plug 'junegunn/fzf', {'do': './install --bin'}
Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'
Plug 'ervandew/supertab' Plug 'ervandew/supertab'
@ -91,6 +91,7 @@ nmap <F3> :Autoformat<CR>
""" PYMODE """ """ PYMODE """
let g:pymode_virtualenv = 1
let g:pymode_lint_ignore = ["W0401"] let g:pymode_lint_ignore = ["W0401"]
let g:pymode_lint_cwindow = 0 let g:pymode_lint_cwindow = 0