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
export PATH="$HOME/.bin/:$HOME/.scripts/:$PATH"
export PATH="$HOME/.local/bin/:$HOME/.scripts/:$PATH"
[ -f ~/.gscripts/gprofile ] && source ~/.gscripts/gprofile
# UTILITIES
# Theme
[ -f ~/.bin/colorSchemeApply ] && source ~/.bin/colorSchemeApply
[ -f ~/.bin/colorSchemeApplyFzf ] && source ~/.bin/colorSchemeApplyFzf
[ -f ~/.local/bin/colorSchemeApply ] && source ~/.local/bin/colorSchemeApply
[ -f ~/.local/bin/colorSchemeApplyFzf ] && source ~/.local/bin/colorSchemeApplyFzf
# 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
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,12 +1,18 @@
#!/usr/bin/env bash
state="$(grep -o '\w\+$' /proc/acpi/bbswitch)"
if [ "$state" == "ON" ]
if [ -f /proc/acpi/bbswitch ]
then
echo ""
elif [ "$state" == "OFF" ]
then
echo ""
echo -n 
state="$(grep -o '\w\+$' /proc/acpi/bbswitch)"
if [ "$state" == "ON" ]
then
echo ""
elif [ "$state" == "OFF" ]
then
echo ""
else
echo "?"
fi
else
echo "?"
echo
fi

View file

@ -84,7 +84,7 @@ tray-transparent = false
[bar/secondary]
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]
@ -177,9 +177,7 @@ toggle-off-foreground = #55
[module/bbswitch]
type = custom/script
exec = ~/.config/polybar/bbswitch
exec-if = test -f /proc/acpi/bbswitch
interval = 5
format-prefix = 
format-foreground = ${theme.redF}
[module/todo]
@ -242,6 +240,13 @@ interval = 1
format-foreground = ${theme.greenF}
label =  %gb_free%
[module/keystore]
type = custom/script
exec = ~/.config/polybar/keystore
; exec-if = pgrep openvpn
interval = 5
format-foreground = ${theme.greenF}
[module/vpncheck]
type = custom/script
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
scheme="$1"
if [ -z "$scheme" ]
then
echo Please specify a scheme
exit 1
fi
# 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)
curl "https://raw.githubusercontent.com/chriskempson/base16-shell/master/scripts/base16-${scheme}.sh" > ~/.bin/colorSchemeApply
chmod +x ~/.bin/colorSchemeApply
curl "https://raw.githubusercontent.com/chriskempson/base16-shell/master/scripts/base16-${scheme}.sh" > ~/.local/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)
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
# FZF
curl "https://raw.githubusercontent.com/nicodebo/base16-fzf/master/bash/base16-${scheme}.config" > ~/.bin/colorSchemeApplyFzf
chmod +x ~/.bin/colorSchemeApplyFzf
curl "https://raw.githubusercontent.com/nicodebo/base16-fzf/master/bash/base16-${scheme}.config" > ~/.local/bin/colorSchemeApplyFzf
chmod +x ~/.local/bin/colorSchemeApplyFzf
# qutebrowser
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 bar (might change bar in the future, so...)
# TODO qutebrowser (need to fiddle with the config thing)

View file

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

3
vimrc
View file

@ -52,7 +52,7 @@ else
endif
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.vim'
Plug 'ervandew/supertab'
@ -91,6 +91,7 @@ nmap <F3> :Autoformat<CR>
""" PYMODE """
let g:pymode_virtualenv = 1
let g:pymode_lint_ignore = ["W0401"]
let g:pymode_lint_cwindow = 0