├── .gitignore
├── Makefile
├── README.rst
├── Xcolors
├── astromouse
├── gjm
└── swayr
├── Xresources
├── acpid
├── events
│ ├── powerbtn
│ └── sleep
├── powerbtn.sh
└── sleep.sh
├── alacritty
└── alacritty.yml
├── autoinstall_cygwin.bat
├── bash_aliases
├── bash_functions
├── bash_profile
├── bashrc
├── beets
├── config.yaml
└── whitelist.txt
├── bin
├── build_vim_locally.sh
├── color_palette.sh
├── color_palette_256.sh
├── convert_to_json
├── createfloppy.sh
├── cronic
├── docker_clean.sh
├── flac2mp3.sh
├── gitbranch.sh
├── m4a2mp3.sh
├── mkv2avi.sh
├── mp42avi.sh
├── multistopwatch
├── openwifishare.sh
├── pingtest.sh
├── servit
├── startmongo.sh
├── tagrename
├── toggle_touchpad.sh
├── update-grive.sh
├── vivaldi
├── watch_corona.sh
├── winbox
├── wma2mp3.sh
└── xauth_clean.sh
├── bootstrapping
└── python
│ ├── MANIFEST.in
│ ├── README.rst
│ ├── fabfile.py
│ ├── projectname
│ ├── __init__.py
│ └── version.txt
│ └── setup.py
├── bspwm
└── bspwmrc
├── compton.conf
├── conky
├── conky-work.conf
├── conky.conf
├── conky_nolaptop.conf
└── conky_work.conf
├── cookiecutter
├── env.sh
└── python
│ ├── cookiecutter.json
│ └── {{ cookiecutter.app_name }}
│ ├── .gitignore
│ ├── .gitlab-ci.yml
│ ├── .ycm_extra_conf.py
│ ├── CHANGELOG.md
│ ├── MANIFEST.in
│ ├── README.rst
│ ├── fabfile.py
│ ├── pytest.ini
│ ├── setup.py
│ ├── sonar-project.properties
│ ├── tests
│ ├── __init__.py
│ └── test_sample.py
│ ├── tox.ini
│ └── {{ cookiecutter.app_name }}
│ ├── __init__.py
│ └── version.txt
├── digrc
├── docs
└── compile_vim.rst
├── fabric-completion.bash
├── git-prompt.sh
├── gitconfig_home
├── gitconfig_work
├── host_specific.d
├── BBS-nexus.ipsw.dt.ept.lu.sh
├── coss-dev01.dtt.ptech.lu.sh
├── proxmox
├── proxmox.gefoo.org
└── w10ptech166.sh
├── i3
├── config
├── config-work
├── i3status.conf
└── scripts
│ ├── conky-wrapper.sh
│ ├── conkyrc
│ ├── hdmi_switch.sh
│ ├── i3lockscreen.sh
│ ├── jukebox_listen.sh
│ ├── jukebox_playing.py
│ ├── tmux-chat.sh
│ ├── toggle_touchpad.sh
│ └── wallpapers.sh
├── inputrc
├── installers
├── README.md
├── gh
│ └── install.sh
├── install_bat.sh
├── ran
│ └── install.sh
├── tmux
│ └── install.sh
└── vim
│ └── install.sh
├── ipython
├── README
├── ipythonrc
└── profile_default
│ ├── ipython_config.py
│ └── startup
│ └── README
├── irssi
└── config
├── lib
├── bash_colors
└── bash_functions
├── mc
├── bindings
├── ini
├── mc.ext
└── panels.ini
├── minttyrc
├── nerd_fonts.lst
├── nvimrc
├── polybar
├── config
└── scripts
│ └── updates-arch-combined.sh
├── psqlrc
├── pylintrc
├── pythonrc
├── rofi
└── flat-orange.rasi
├── roxterm
├── Colours
│ ├── Mine
│ ├── Smyck
│ ├── coffee_bear
│ ├── extract_from_xcolors.sh
│ └── zenburn
├── Global
├── Profiles
│ ├── Default
│ └── MyProfile
└── Shortcuts
│ └── Default
├── sqliterc
├── sshrc
├── sxhkd
└── sxhkdrc
├── taskrc
├── tmux.conf
├── tmux18-256color.ti
├── vim
└── UltiSnips
│ ├── python.snippets
│ └── yaml.snippets
├── vimrc
├── xinitrc
└── xsession
/.gitignore:
--------------------------------------------------------------------------------
1 | ; VIM configuration folder
2 | vim/bundle/
3 | vim/plugged/
4 | vim/autoload/
5 |
6 | ; NVIM configuration folder
7 | nvim/
8 |
9 | ipython/profile_default/history.sqlite
10 | ipython/profile_default/security/
11 | ipython/profile_default/db/
12 | terminal-color-theme/
13 |
14 | ; HTOPrc can be ignored as it changes when you changes views in the client
15 | htop/htoprc
16 |
17 | ; Binary links
18 | bin/nvim
19 | bin/vim
20 |
21 | ; Ignore cookiecutter python environment if present
22 | cookiecutter/env
23 |
24 | ; Ignore installed dependencies
25 | bin/cookiecutter
26 | bin/fzf
27 | bin/tmux
28 | fzf/
29 | bash-git-prompt/
30 |
31 | ; Ignore installer downloads
32 | installers/**/*.tar.gz
33 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | #
2 | # Makefile for dotfiles
3 | #
4 | # You can use this Makefile to install individual dotfiles or install all of
5 | # them at once. Each makefile rule first cleans the exisiting dotfile by
6 | # removing it and replacing it with a symlink to the specific file in
7 | # ~/dotfiles.
8 | #
9 | # !!! Make sure you backup your stuff first !!!
10 | #
11 | # make install_irssi expects a FREENODEPASS to replace __irssipassword__ in
12 | # the config. So you should use make install_irssi FREENODEPASS=somepass or
13 | # make all FREENODEPASS=somepass
14 | #
15 | SHELL=/bin/bash
16 |
17 | help:
18 | @echo 'Makefile for dotfiles '
19 | @echo ' '
20 | @echo 'Usage: '
21 | @echo ' make all install everything '
22 | @echo ' make install_fonts install custom fonts '
23 | @echo ' make install_bash install bashrc '
24 | @echo ' make install_asdf install asdf '
25 | @echo ' make install_vim install vim files '
26 | @echo ' make install_git_home install git home files '
27 | @echo ' make install_git_work install git work files '
28 | @echo ' make install_taskwarrior installs taskrc '
29 | @echo ' make install_i3 install i3 files '
30 | @echo ' make install_bspwm install bspwm files '
31 | @echo ' make install_python install ipython files '
32 | @echo ' make install_irssi install irssi --irssipassword=X '
33 | @echo ' make install_tmux install tmux conf files '
34 | @echo ' make install_sqlite install sqlite conf files '
35 | @echo ' make install_conky installs conky config '
36 | @echo ' make install_conky_work installs conky work config '
37 | @echo ' make install_psql installs psqlrc '
38 | @echo ' make install_roxterm installs roxterm files '
39 | @echo ' make install_winbox downloads and installs winbox '
40 | @echo ' '
41 | @echo 'All install commands are also available as clean commands to remove '
42 | @echo 'installed files '
43 | @echo ' '
44 |
45 |
46 | all: install_fonts install_bash install_vim install_git_home install_i3 \
47 | install_irssi install_python install_tmux install_psql
48 | @echo ""
49 | @echo "dotfiles - Making yourself at home"
50 | @echo "=================================="
51 | @echo ""
52 | @echo "All done."
53 |
54 | install_fonts: clean_fonts
55 | DEST_FOLDER=~/.local/share/fonts ; \
56 | [ -d $$DEST_FOLDER ] || mkdir -p $$DEST_FOLDER ; \
57 | readarray -t NERD_FONTS < `pwd`/nerd_fonts.lst ; \
58 | for nerd_font in $${NERD_FONTS[@]}; do \
59 | wget $$nerd_font -O $$DEST_FOLDER/font.zip && \
60 | cd $$DEST_FOLDER && unzip -o -q font.zip && \
61 | rm -f ~/.local/share/fonts/font.zip; \
62 | done;
63 | fc-cache -fv
64 |
65 | clean_fonts:
66 | rm -Rf ~/.loca/share/fonts
67 | fc-cache -fv
68 |
69 | install_bash: clean_bash install_bat
70 | ln -sf `pwd`/bashrc ~/.bashrc
71 | ln -sf `pwd`/bash_aliases ~/.bash_aliases
72 | ln -sf `pwd`/bash_profile ~/.bash_profile
73 | ln -sf `pwd`/inputrc ~/.inputrc
74 | ln -sf `pwd`/bin ~/bin
75 | ln -sf `pwd`/inputrc ~/.inputrc
76 | [ -d ~/.config ] || mkdir ~/.config
77 | ln -sf `pwd`/htop ~/.config/
78 | [ -d terminal-color-theme ] || git clone --recursive https://github.com/sona-tar/terminal-color-theme.git
79 | [ -d fzf ] || git clone --depth 1 https://github.com/junegunn/fzf.git `pwd`/fzf
80 | cd fzf && git pull && ./install --bin
81 | ln -sf `pwd`/fzf/bin/fzf `pwd`/bin
82 |
83 | clean_bash:
84 | rm -Rf ~/.inputrc
85 | rm -Rf ~/.bashrc
86 | rm -Rf ~/.bash_aliases
87 | rm -Rf ~/.bash_profile
88 | rm -Rf ~/bin
89 | rm -Rf ~/.inputrc
90 | rm -Rf ~/.config/htop
91 |
92 | install_asdf: clean_asdf
93 | ln -sf `pwd`/tool-versions ~/.tool-versions
94 | [ -d ~/.asdf/ ] || \
95 | git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.1
96 | cd ~/ && source ~/.asdf/asdf.sh && \
97 | cat ~/.tool-versions | cut -d' ' -f1 | grep "^[^\#]" | xargs -i asdf plugin add {}
98 | cd ~/ && source ~/.asdf/asdf.sh && \
99 | asdf install
100 |
101 | clean_asdf:
102 | rm -Rf ~/.tool-versions
103 | rm -Rf ~/.asdf
104 |
105 | install_vim: clean_vim
106 | @echo Installing Vim-Plug
107 | curl -fLo `pwd`/vim/autoload/plug.vim --create-dirs \
108 | https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
109 | @echo Place vim config files
110 | ln -sf `pwd`/vimrc ~/.vimrc
111 | ln -sf `pwd`/vim ~/.vim
112 |
113 | clean_vim:
114 | rm -Rf ~/.vimrc
115 | rm -Rf ~/.vim
116 | rm -Rf ~/.vimdb
117 |
118 | install_nvim: clean_nvim
119 | @echo Installing vundle for neovim
120 | git clone https://github.com/gmarik/Vundle.vim.git `pwd`/nvim/bundle/Vundle.vim
121 | ln -sf `pwd`/nvimrc ~/.nvimrc
122 | ln -sf `pwd`/nvim ~/.nvim
123 |
124 | clean_nvim:
125 | rm -Rf ~/.nvimrc
126 | rm -Rf ~/.nvim
127 |
128 | install_git_home: clean_git_home
129 | ln -sf `pwd`/gitconfig_home ~/.gitconfig
130 |
131 | clean_git_home:
132 | rm -Rf ~/.gitconfig
133 |
134 | install_git_work: clean_git_work
135 | ln -sf `pwd`/gitconfig_work ~/.gitconfig
136 |
137 | clean_git_work:
138 | rm -Rf ~/.gitconfig
139 |
140 | install_i3: clean_i3
141 | ln -sf `pwd`/xinitrc ~/.xinitrc
142 | ln -sf `pwd`/Xresources ~/.Xresources
143 | ln -sf `pwd`/xession ~/.xsession
144 | ln -sf `pwd`/i3 ~/.i3
145 | ln -sf `pwd`/compton.conf ~/.config/compton.conf
146 |
147 | clean_i3:
148 | rm -Rf ~/.xinitrc
149 | rm -Rf ~/.xsession
150 | rm -Rf ~/.Xdefaults
151 | rm -Rf ~/.Xresources
152 | rm -Rf ~/.i3
153 | rm -Rf ~/.config/polybar
154 | rm -Rf ~/.config/compton.conf
155 |
156 | install_bspwm: clean_bspwm
157 | ln -sf `pwd`/xinitrc ~/.xinitrc
158 | ln -sf `pwd`/Xresources ~/.Xresources
159 | ln -sf `pwd`/xession ~/.xsession
160 | ln -sf `pwd`/bspwm ~/.config/bspwm
161 | ln -sf `pwd`/polybar ~/.config/polybar
162 | ln -sf `pwd`/sxhkd ~/.config/sxhkd
163 | ln -sf `pwd`/compton.conf ~/.config/compton.conf
164 |
165 | clean_bspwm:
166 | rm -Rf ~/.xinitrc
167 | rm -Rf ~/.xsession
168 | rm -Rf ~/.Xdefaults
169 | rm -Rf ~/.Xresources
170 | rm -Rf ~/.config/bspwm
171 | rm -Rf ~/.config/polybar
172 | rm -Rf ~/.config/sxhkd
173 | rm -Rf ~/.config/compton.conf
174 |
175 | install_irssi:
176 | ifneq "$(IRSSIUSER)" ""
177 | cp `pwd`/irssi ~/.irssi -R
178 | sed -i 's/__irssiuser__/$(IRSSIUSER)/g' ~/.irssi/config
179 | sed -i 's/__irssipass__/$(IRSSIPASS)/g' ~/.irssi/config
180 | else
181 | @echo ""
182 | @echo "Make sure to specific IRSSIUSER=somevalue environment variable."
183 | @echo ""
184 | endif
185 |
186 | clean_irssi:
187 | rm -Rf ~/.irssi
188 |
189 | install_python: clean_python
190 | ln -sf `pwd`/pylintrc ~/.pylintrc
191 | ln -sf `pwd`/ipython ~/.config/ipython
192 |
193 | clean_python:
194 | rm -Rf ~/.pylintrc
195 | rm -Rf ~/.config/ipython
196 |
197 | install_tmux: clean_tmux
198 | [ -d ~/.tmux ] || mkdir ~/.tmux
199 | [ -d ~/.tmux/tmux-power ] || git clone https://github.com/wfxr/tmux-power.git ~/.tmux/tmux-power
200 | ln -sf `pwd`/tmux.conf ~/.tmux.conf
201 | [ -d ~/.ssh ] || mkdir ~/.ssh
202 | ln -sf `pwd`/sshrc ~/.ssh/rc
203 | tic `pwd`/tmux18-256color.ti
204 |
205 | clean_tmux:
206 | rm -Rf ~/.tmux.conf
207 | rm -Rf ~/.tmux-powerlinerc
208 | rm -Rf ~/.bin/tmux-powerline/themes/my_theme.sh
209 | rm -Rf ~/.bin/tmux-powerline
210 | rm -Rf ~/.ssh/rc
211 |
212 | install_sqlite: clean_sqlite
213 | ln -sf `pwd`/sqliterc ~/.sqliterc
214 |
215 | clean_sqlite:
216 | rm -Rf ~/.sqliterc
217 |
218 | install_conky:
219 | ln -sf `pwd`/conky/conky.conf ~/.conkyrc
220 |
221 | clean_conky:
222 | rm -Rf ~/.taskrc
223 |
224 | install_taskwarrior:
225 | ln -sf `pwd`/taskrc ~/.taskrc
226 |
227 | clean_taskwarrior:
228 | rm -Rf ~/.conkyrc
229 |
230 | install_conky_work:
231 | ln -sf `pwd`/conky/conky_work.conf ~/.conkyrc
232 |
233 | clean_conky_work:
234 | rm -Rf ~/.conkyrc
235 |
236 | install_psql:
237 | ln -sf `pwd`/psqlrc ~/.psqlrc
238 |
239 | clean_psql:
240 | rm -Rf ~/.psqlrc
241 |
242 | install_roxterm:
243 | ln -sf `pwd`/roxterm ~/.config/roxterm.sourceforge.net
244 |
245 | clean_roxterm:
246 | rm -Rf ~/.config/roxterm.sourceforge.net
247 |
248 | install_winbox: clean_winbox
249 | @echo 'Installing Winbox 3.27 to /opt/winbox'
250 | [ -d /opt/winbox ] || sudo install -d -o `whoami` /opt/winbox
251 | cd /opt/winbox && wget -O winbox.exe https://mt.lv/winbox64
252 |
253 | clean_winbox:
254 | @echo 'Removing Winbox from /opt/winbox/winbox.exe'
255 | if [ -f /opt/winbox/winbox.exe ]; then rm /opt/winbox/winbox.exe; fi
256 |
257 | install_bat:
258 | @echo 'Install bat (cat on steroids)'
259 | installers/install_bat.sh
260 |
--------------------------------------------------------------------------------
/README.rst:
--------------------------------------------------------------------------------
1 | My Dotfiles
2 | ===========
3 |
4 | My custom dotfiles, use them as you please. The included *Makefile* will
5 | install the appropriate files into your home folder.
6 |
--------------------------------------------------------------------------------
/Xcolors/astromouse:
--------------------------------------------------------------------------------
1 | *color0: #1c1c1c
2 | *color8: #3d3a3a
3 | *color1: #d770af
4 | *color9: #d28abf
5 | *color2 : #9acc79
6 | *color10: #8fb676
7 | *color3: #d0d26b
8 | *color11: #c8bc45
9 | *color4 : #77b6c5
10 | *color12: #8fa7b9
11 | *color5: #a488d9
12 | *color13: #bd89de
13 | *color6: #7fcab3
14 | *color14: #6ec2a8
15 | *color7: #8d8d8d
16 | *color15: #dad3d3
17 |
--------------------------------------------------------------------------------
/Xcolors/gjm:
--------------------------------------------------------------------------------
1 | ! vim: set filetype=xdefaults :
2 | ! gjm scheme
3 | ! *background: rgba:0000/0000/0000/dddd
4 |
5 | *cursorColor: #cee318
6 |
7 | *background: #1C1C1C
8 | *foreground: #c5c5c5
9 |
10 | ! black
11 | *color0: #1C1C1C
12 | *color8: #666666
13 |
14 | ! red
15 | *color1: #ff005b
16 | *color9: #ff00a0
17 |
18 | ! green
19 | *color2: #cee318
20 | *color10: #ccff00
21 |
22 | ! yellow
23 | *color3: #ffe755
24 | *color11: #ff9f00
25 |
26 | ! blue
27 | *color4: #048ac7
28 | *color12: #48c6ff
29 |
30 | ! magenta
31 | *color5: #833c9f
32 | *color13: #be67e1
33 |
34 | ! cyan
35 | *color6: #0ac1cd
36 | *color14: #63e7f0
37 |
38 | ! white
39 | *color7: #e5e5e5
40 | *color15: #f3f3f3
41 |
42 |
--------------------------------------------------------------------------------
/Xcolors/swayr:
--------------------------------------------------------------------------------
1 | ! swayr color scheme
2 |
3 | *background: #1c1709
4 | *foreground: #c2b9a1
5 |
6 | *color0: #1c1709
7 | *color8: #4f4939
8 |
9 | *color1: #8e4317
10 | *color9: #f07935
11 |
12 | *color2: #787200
13 | *color10: #d9d138
14 |
15 | *color3: #945c00
16 | *color11: #ffab26
17 |
18 | *color4: #315094
19 | *color12: #8aa9ed
20 |
21 | *color5: #5c2e40
22 | *color13: #ff8cb8
23 |
24 | *color6: #00617d
25 | *color14: #43bfe0
26 |
27 | *color7: #c2b9a1
28 | *color15: #f2e8c9
29 |
--------------------------------------------------------------------------------
/Xresources:
--------------------------------------------------------------------------------
1 |
2 | ! URxvt configuration
3 | !
4 | ! * http://wiki.gentoo.org/wiki/Rxvt-unicode
5 | ! ------------------------------------------------------------------------------
6 |
7 | !URxvt.font: xft:Ubuntu Mono:pixelsize=14:style=Regular
8 | URxvt.font: xft:Anonymous Pro for Powerline:pixelsize=14:antialias=3:autohint=1:hintstyle=3
9 | URxvt.allow_bold: true
10 | URxvt.inheritPixmap: true
11 | URxvt.transparent: true
12 | URxvt.antialias: true
13 | URxvt.hinting: true
14 | URxvt.shading: 30
15 | URxvt.depth: 32
16 | URxvt.tintColor: gray30
17 | URxvt.internalBorder: 0
18 | URxvt.jumpScroll: true
19 | URxvt.urgentOnBell: true
20 | URxvt.visualBell: false
21 | URxvt.loginShell: false
22 | URxvt.perl-ext-common: default,matcher,searchable-scrollback
23 | URxvt.pointerBlank: true
24 | URxvt.saveLines: 4000
25 | URxvt.secondaryScroll: true
26 | URxvt.scrollBar: false
27 | URxvt.scrollTtyKeypress:true
28 | URxvt.scrollWithBuffer: true
29 | URxvt.urlLauncher: /usr/bin/chromium-browser
30 | URxvt.colorUL: #c5f779
31 | URxvt.underlineColor: #c5f779
32 | URxvt.cursorColor: gray
33 | URxvt.background: #0F0F0F
34 | URxvt.foreground: #F5DEB3
35 |
36 | !URxvt.iso14755: false
37 | !URxvt.iso14755_52: false
38 |
39 |
40 | ! Xft configuration
41 | !
42 | ! ------------------------------------------------------------------------------
43 | Xft*dpi: 96
44 | Xft*antialias: true
45 | Xft*autohint: true
46 | Xft*rgba: vbgr
47 | Xft*hinting: full
48 | Xft*hintstyle: hintslight
49 |
50 |
51 |
52 | ! Xterm -- xcolors.net (Zenburn)
53 | !
54 | ! ------------------------------------------------------------------------------
55 | xterm*faceName: Anonymous Pro for Powerline
56 | xterm*faceSize: 11
57 | xterm*locale: true
58 | xterm*antialias: true
59 | xterm*hinting: true
60 | xterm*lcdfilter: 1
61 |
62 | xterm*ScrollBar: off
63 | xterm*TitleBar: off
64 | xterm*toolBar: false
65 | xterm*Border: off
66 | xterm*AllowIconInput: on
67 | xterm*termtype: vt100
68 | xterm*Title: off
69 | xterm*clientDecoration: none
70 | xterm*visualBell: false
71 |
72 | xterm*cutNewLine: false
73 | xterm*cutToBeginningOfLine: false
74 | xterm*charClass: 33:48,35:48,37:48,42:48,45-47:48,64:48,95:48,126:48
75 |
76 |
77 |
78 | ! XScreensaver
79 | !
80 | ! ------------------------------------------------------------------------------
81 | xscreensaver.mode: random
82 | xscreensaver.timeout: 0:10:00
83 | xscreensaver.cycle: 0:10:00
84 | xscreensaver.lockTimeout: 0:00:00
85 | xscreensaver.passwdTimeout: 0:00:30
86 | xscreensaver.dpmsEnabled: False
87 | xscreensaver.dpmsQuickoffEnabled: False
88 | xscreensaver.dpmsStandby: 1:00:00
89 | xscreensaver.dpmsSuspend: 1:00:00
90 | xscreensaver.dpmsOff: 2:00:00
91 | xscreensaver.grabDesktopImages: True
92 | xscreensaver.grabVideoFrames: False
93 | xscreensaver.chooseRandomImages: True
94 |
95 | ! This can be a local directory name, or the URL of an RSS or Atom feed.
96 | xscreensaver.imageDirectory: /home/frank/pictures/wallpapers
97 | xscreensaver.nice: 10
98 | xscreensaver.memoryLimit: 0
99 | xscreensaver.lock: False
100 | xscreensaver.verbose: False
101 | xscreensaver.timestamp: True
102 | xscreensaver.fade: True
103 | xscreensaver.unfade: False
104 | xscreensaver.fadeSeconds: 0:00:03
105 | xscreensaver.fadeTicks: 20
106 | xscreensaver.splash: True
107 | xscreensaver.splashDuration: 0:00:05
108 | xscreensaver.visualID: default
109 | xscreensaver.captureStderr: True
110 | xscreensaver.ignoreUninstalledPrograms: False
111 |
112 | xscreensaver.textMode: file
113 | xscreensaver.textLiteral: XScreenSaver
114 | xscreensaver.textFile:
115 | xscreensaver.textProgram: fortune
116 | xscreensaver.textURL: http://en.wikipedia.org/w/index.php?title=Special:NewPages&feed=rss
117 |
118 | xscreensaver.overlayTextForeground: #FFFF00
119 | xscreensaver.overlayTextBackground: #000000
120 | xscreensaver.overlayStderr: True
121 | xscreensaver.font: *-medium-r-*-140-*-m-*
122 |
123 | ! The default is to use these extensions if available (as noted.)
124 | xscreensaver.sgiSaverExtension: True
125 | xscreensaver.xidleExtension: True
126 | xscreensaver.procInterrupts: True
127 |
128 | ! Turning this on makes pointerHysteresis not work.
129 | xscreensaver.xinputExtensionDev: False
130 |
131 | ! Set this to True if you are experiencing longstanding XFree86 bug #421
132 | ! (xscreensaver not covering the whole screen)
133 | xscreensaver.GetViewPortIsFullOfLies: False
134 |
135 | ! This is what the "Demo" button on the splash screen runs (/bin/sh syntax.)
136 | xscreensaver.demoCommand: xscreensaver-demo
137 |
138 | ! This is what the "Prefs" button on the splash screen runs (/bin/sh syntax.)
139 | xscreensaver.prefsCommand: xscreensaver-demo -prefs
140 |
141 | ! This is the URL loaded by the "Help" button on the splash screen,
142 | ! and by the "Documentation" menu item in xscreensaver-demo.
143 | xscreensaver.helpURL: http://www.jwz.org/xscreensaver/man.html
144 |
145 | ! loadURL -- how the "Help" buttons load the helpURL (/bin/sh syntax.)
146 | xscreensaver.loadURL: firefox '%s' || mozilla '%s' || netscape '%s'
147 |
148 | ! manualCommand -- how the "Documentation" buttons display man pages.
149 | xscreensaver.manualCommand: xterm -sb -fg black -bg gray75 -T '%s manual' -e /bin/sh -c 'man "%s" ; read foo'
150 |
151 | ! The format used for printing the date and time in the password dialog box
152 | ! To show the time only: %I:%M %p
153 | ! For 24 hour time: %H:%M
154 | xscreensaver.dateFormat: %d-%b-%y (%a); %I:%M %p
155 |
156 | ! This command is executed by the "New Login" button on the lock dialog.
157 | ! (That button does not appear on the dialog if this program does not exist.)
158 | ! For Gnome: probably "gdmflexiserver -ls". KDE, probably "kdmctl reserve".
159 | ! Or maybe yet another wheel-reinvention, "lxdm -c USER_SWITCH".
160 | xscreensaver.newLoginCommand: kdmctl reserve
161 | xscreensaver.installColormap: True
162 | xscreensaver.pointerPollTime: 0:00:05
163 | xscreensaver.pointerHysteresis: 10
164 | xscreensaver.initialDelay: 0:00:00
165 | xscreensaver.windowCreationTimeout: 0:00:30
166 | xscreensaver.bourneShell: /bin/sh
167 |
168 | ! Resources for the password and splash-screen dialog boxes of
169 | ! the "xscreensaver" daemon.
170 | xscreensaver.Dialog.headingFont: *-helvetica-bold-r-*-*-*-180-*-*-*-iso8859-1
171 | xscreensaver.Dialog.bodyFont: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
172 | xscreensaver.Dialog.labelFont: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
173 | xscreensaver.Dialog.unameFont: *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1
174 | xscreensaver.Dialog.buttonFont: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
175 | xscreensaver.Dialog.dateFont: *-helvetica-medium-r-*-*-*-80-*-*-*-iso8859-1
176 |
177 | ! Helvetica asterisks look terrible.
178 | xscreensaver.passwd.passwdFont: *-courier-medium-r-*-*-*-140-*-*-*-iso8859-1
179 |
180 |
181 | xscreensaver.Dialog.foreground: #000000
182 | xscreensaver.Dialog.background: #E6E6E6
183 | xscreensaver.Dialog.Button.foreground: #000000
184 | xscreensaver.Dialog.Button.background: #F5F5F5
185 |
186 | !*Dialog.Button.pointBackground: #EAEAEA
187 | !*Dialog.Button.clickBackground: #C3C3C3
188 | xscreensaver.Dialog.text.foreground: #000000
189 | xscreensaver.Dialog.text.background: #FFFFFF
190 | xscreensaver.passwd.thermometer.foreground: #4464AC
191 | xscreensaver.passwd.thermometer.background: #FFFFFF
192 | xscreensaver.Dialog.topShadowColor: #FFFFFF
193 | xscreensaver.Dialog.bottomShadowColor: #CECECE
194 | xscreensaver.Dialog.logo.width: 210
195 | xscreensaver.Dialog.logo.height: 210
196 | xscreensaver.Dialog.internalBorderWidth: 24
197 | xscreensaver.Dialog.borderWidth: 1
198 | xscreensaver.Dialog.shadowThickness: 2
199 |
200 | xscreensaver.passwd.heading.label: XScreenSaver %s
201 | xscreensaver.passwd.body.label: This screen is locked.
202 | xscreensaver.passwd.unlock.label: OK
203 | xscreensaver.passwd.login.label: New Login
204 | xscreensaver.passwd.user.label: Username:
205 | xscreensaver.passwd.thermometer.width: 8
206 | xscreensaver.passwd.asterisks: True
207 | xscreensaver.passwd.uname: True
208 |
209 | !
210 | ! KeepassX Colors
211 | !
212 | ! ------------------------------------------------------------------------------
213 | keepassx*background: #cfcfcf
214 | keepassx*foreground: #222222
215 |
216 | ! ROFI Theme
217 | !
218 | !
219 | ! ------------------------------------------------------------------------------
220 | rofi.theme: /home/frank/dotfiles/rofi/flat-orange.rasi
221 |
222 |
223 |
224 | !
225 | ! Include Xcolors
226 | ! ------------------------------------------------------------------------------
227 | #include "/home/frank/dotfiles/Xcolors/gjm"
228 |
229 |
230 |
231 | ! vim: set filetype=xdefaults
232 |
--------------------------------------------------------------------------------
/acpid/events/powerbtn:
--------------------------------------------------------------------------------
1 | # /etc/acpi/events/powerbtn
2 | # This is called when the user presses the power button and calls
3 | # /etc/acpi/powerbtn.sh for further processing.
4 |
5 | # Optionally you can specify the placeholder %e. It will pass
6 | # through the whole kernel event message to the program you've
7 | # specified.
8 |
9 | # We need to react on "button power.*" and "button/power.*" because
10 | # of kernel changes.
11 |
12 | event=button[ /]power
13 | action=/etc/acpi/powerbtn.sh
14 |
--------------------------------------------------------------------------------
/acpid/events/sleep:
--------------------------------------------------------------------------------
1 | event=button/lid
2 | action=/etc/acpi/sleep.sh %e
3 |
--------------------------------------------------------------------------------
/acpid/powerbtn.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # /etc/acpi/powerbtn.sh
3 | # Initiates a shutdown when the power putton has been
4 | # pressed.
5 |
6 | [ -r /usr/share/acpi-support/power-funcs ] && . /usr/share/acpi-support/power-funcs
7 |
8 | # getXuser gets the X user belonging to the display in $displaynum.
9 | # If you want the foreground X user, use getXconsole!
10 | getXuser() {
11 | user=`pinky -fw | awk '{ if ($2 == ":'$displaynum'" || $(NF) == ":'$displaynum'" ) { print $1; exit; } }'`
12 | if [ x"$user" = x"" ]; then
13 | startx=`pgrep -n startx`
14 | if [ x"$startx" != x"" ]; then
15 | user=`ps -o user --no-headers $startx`
16 | fi
17 | fi
18 | if [ x"$user" != x"" ]; then
19 | userhome=`getent passwd $user | cut -d: -f6`
20 | export XAUTHORITY=$userhome/.Xauthority
21 | else
22 | export XAUTHORITY=""
23 | fi
24 | export XUSER=$user
25 | }
26 |
27 | # Skip if we just in the middle of resuming.
28 | test -f /var/lock/acpisleep && exit 0
29 |
30 | # If the current X console user is running a power management daemon that
31 | # handles suspend/resume requests, let them handle policy This is effectively
32 | # the same as 'acpi-support's '/usr/share/acpi-support/policy-funcs' file.
33 |
34 | [ -r /usr/share/acpi-support/power-funcs ] && getXconsole
35 | PMS="gnome-settings-daemon kpowersave xfce4-power-manager"
36 | PMS="$PMS guidance-power-manager.py dalston-power-applet"
37 |
38 | if pidof x $PMS > /dev/null; then
39 | exit
40 | elif test "$XUSER" != "" && pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop --user $XUSER kded kded loadedModules | grep -q klaptopdaemon; then
41 | exit
42 | elif test "$XUSER" != "" && test -x /usr/bin/qdbus; then
43 | kded4pid=$(pgrep -n -u $XUSER kded4)
44 | if test "$kded4pid" != ""; then
45 | dbusaddr=$(su - $XUSER -c "grep -z DBUS_SESSION_BUS_ADDRESS /proc/$kded4pid/environ")
46 | if test "$dbusaddr" != "" && su - $XUSER -c "export $dbusaddr; qdbus org.kde.kded" | grep -q powerdevil; then
47 | exit
48 | fi
49 | fi
50 | fi
51 |
52 | # If all else failed, just initiate a plain shutdown.
53 | /sbin/shutdown -h now "Power button pressed"
54 |
--------------------------------------------------------------------------------
/acpid/sleep.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # if launched through a lid event and lid is open, do nothing
4 | echo "$1" | grep "button/lid" && grep -q open /proc/acpi/button/lid/LID/state && exit 0
5 |
6 | # sync filesystem and clock
7 | sync
8 | /sbin/hwclock --systohc
9 |
10 | # switch to console
11 | FGCONSOLE=`fgconsole`
12 | chvt 6
13 |
14 | # go to sleep
15 | sleep 5 && echo -n "mem" > /sys/power/state
16 |
17 | # readjust the clock (it might be off a bit after suspend)
18 | /sbin/hwclock --adjust
19 | /sbin/hwclock --hctosys
20 |
21 | # turn on the backlight and switch back to X
22 | chvt $FGCONSOLE
23 |
--------------------------------------------------------------------------------
/autoinstall_cygwin.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | REM -- Automates cygwin installation
3 | REM -- Source: https://github.com/rtwolf/auto-cygwin-install
4 | REM -- Based on: https://gist.github.com/wjrogers/1016065
5 |
6 | SETLOCAL
7 |
8 | REM -- Change to the directory of the executing batch file
9 | CD %~dp0
10 |
11 | REM -- Configure our paths
12 | SET SITE=http://cygwin.mirrors.pair.com/
13 | SET LOCALDIR=%CD%
14 | SET ROOTDIR=C:/cygwin
15 |
16 | REM -- These are the packages we will install (in addition to the default packages)
17 | SET PACKAGES=mintty,wget,ctags,diffutils,git,git-completion,git-svn,stgit,mercurial
18 | REM -- These are necessary for apt-cyg install, do not change. Any duplicates will be ignored.
19 | SET PACKAGES=%PACKAGES%,wget,tar,gawk,bzip2,subversion
20 |
21 | REM -- Do it!
22 | ECHO *** INSTALLING DEFAULT PACKAGES
23 | setup --quiet-mode --no-desktop --download --local-install --no-verify -s %SITE% -l "%LOCALDIR%" -R "%ROOTDIR%"
24 | ECHO.
25 | ECHO.
26 | ECHO *** INSTALLING CUSTOM PACKAGES
27 | setup -q -d -D -L -X -s %SITE% -l "%LOCALDIR%" -R "%ROOTDIR%" -P %PACKAGES%
28 |
29 | REM -- Show what we did
30 | ECHO.
31 | ECHO.
32 | ECHO cygwin installation updated
33 | ECHO - %PACKAGES%
34 | ECHO.
35 |
36 | ECHO apt-cyg installing.
37 | set PATH=%ROOTDIR%/bin;%PATH%
38 | %ROOTDIR%/bin/bash.exe -c 'svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/'
39 | %ROOTDIR%/bin/bash.exe -c 'chmod +x /bin/apt-cyg'
40 | ECHO apt-cyg installed if it says somin like "A /bin" and "A /bin/apt-cyg" and "Exported revision 18" or some other number.
41 |
42 | ENDLOCAL
43 |
44 | PAUSE
45 | EXIT /B 0
46 |
--------------------------------------------------------------------------------
/bash_aliases:
--------------------------------------------------------------------------------
1 | # enable color support of ls and also add handy aliases
2 |
3 | if [ -x /usr/bin/dircolors ]; then
4 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
5 | alias ls='ls --color=auto'
6 | alias grep='grep --color=auto'
7 | alias fgrep='fgrep --color=auto'
8 | alias egrep='egrep --color=auto'
9 | fi
10 |
11 |
12 | # Logging aliases
13 | # -----------------------------------------------------------------------------
14 | #
15 | alias lmess='journalctl -f'
16 | alias lapache='colortail -f /var/log/apache2/*.log'
17 | alias lapacheerr='colortail -n 50 -f /var/log/apache2/error.log'
18 | alias lauth='colortail -n 50 -f /var/log/auth.log'
19 | alias ldaemon='colortail -n 50 -f /var/log/daemon.log'
20 | alias lsyslog='colortail -n 50 -f /var/log/syslog'
21 | alias lfetchmail='colortail -n 50 -f /var/log/fetchmail.log'
22 | alias lfirebird='colortail -n 50 -f /var/log/firebird.log'
23 | alias liptables='/sbin/iptables -L -n -v'
24 | alias lmail='colortail -n 50 -f /var/log/mail.log'
25 | alias lmysql='colortail -n 50 -f /var/log/mysql/mysql.log'
26 | alias lopencms='colortail -f /var/lib/tomcat6/webapps/ROOT/WEB-INF/logs/opencms.log'
27 | alias ltomcat='colortail -f /var/log/tomcat6/*'
28 | alias lsamba='colortail -n 50 -f /var/log/samba/log.*'
29 | alias ldrbd='watch -n1 cat /proc/drbd'
30 | alias lpgstat='sudo -u postgres psql -c "select * from pg_stat_activity;"'
31 |
32 |
33 | # Standard Posix aliases
34 | # -----------------------------------------------------------------------------
35 | #
36 | alias ls='ls --color=auto'
37 | alias la='ls -lhaF --color=auto'
38 | alias lt='ls -lhFtr --color=auto'
39 | alias lta='ls -lahFtr--color=auto'
40 | alias ll='ls -alF'
41 | alias la='ls -A'
42 | alias l='ls -CF'
43 | alias mv='mv -iv'
44 | alias rd='rmdir'
45 | alias rm='rm -i --preserve-root'
46 | alias less='less -r'
47 | alias dusort='du -hs $(ls -d */) 2>/dev/null | sort -nr'
48 | alias chmox='chmod +x '
49 | alias sc='systemctl'
50 | alias pong='ping 8.8.8.8'
51 | alias dmesg="dmesg --color=auto --reltime --human --nopager --decode"
52 | alias tree="tree --dirsfirst -C"
53 | alias cat="bat -p"
54 | alias versiondate="date '+%Y.%m.%d.01'"
55 |
56 |
57 | # Archlinux Stuff
58 | # -----------------------------------------------------------------------------
59 | #
60 | complete -cf sudo # Autocompletion for sudo
61 | complete -cf man # Autocompletion for man
62 |
63 |
64 | # Ubuntu Stuff
65 | # -----------------------------------------------------------------------------
66 | #
67 | alias aupdate='sudo aptitude update'
68 | alias aupgrade='sudo aptitude update && sudo aptitude upgrade'
69 | alias aptpkgsizes='dpkg-query -Wf "${Installed-Size}\t${Package}\n" | sort -n'
70 |
71 |
72 | # Exim Aliases (http://bradthemad.org/tech/notes/exim_cheatsheet.php)
73 | # -----------------------------------------------------------------------------
74 | #
75 | alias eximqueue='sudo exim -bp' # Show list of messages in queue
76 | alias eximshow='sudo exim -Mvb' # Show body of a message
77 | alias eximlog='sudo exim -Mvl' # Show log of a message
78 | alias eximremove='sudo exim -Mrm' # Removes a message from the queue
79 | alias eximdeliver='sudo exim -M' # Deliver a message wether its
80 | # frozen or not
81 | alias eximremovefrozen='sudo exim -z -i | xargs exim -Mrm' # Removes all frozen
82 | # messages
83 |
84 |
85 | # Openssl aliases
86 | # -----------------------------------------------------------------------------
87 | #
88 | alias osslenddate='openssl x509 -enddate -noout -in ' # Get expiration date
89 |
90 |
91 | # Python Stuff
92 | # -----------------------------------------------------------------------------
93 | #
94 | alias pyserve='python3 -m ComplexHTTPServer' # Needs ComplexHTTPServer
95 | alias venv='virtualenv env &&
96 | ./env/bin/pip install -U pip wheel' # prepare virtualenv
97 | alias venv3='python3 -m venv env &&
98 | ./env/bin/pip install -U pip wheel' # prepare virtualenv py3
99 | alias inotebook='ipython notebook --notebook-dir ~/workspace/notebooks/'
100 | alias jsonpp="python3 -mjson.tool"
101 |
102 |
103 | # ANSIBLE stuff
104 | # -----------------------------------------------------------------------------
105 | #
106 | alias ansi='cd $ANSIBLE_HOME'
107 | alias vault='$ANSIBLE_HOME/env/bin/ansible-vault'
108 | alias play='$ANSIBLE_HOME/env/bin/ansible-playbook'
109 | alias mkansiblerole='mkdir -p {tasks,handlers,files,defaults}'
110 | alias freerad_rules='cd $ANSIBLE_HOME/playbooks/server_setup/freeradius/files/freerad/auth_rules'
111 | alias freerad_profiles='cd $ANSIBLE_HOME/playbooks/server_setup/freeradius/files/freerad/auth_profiles'
112 |
113 |
114 | # Dotfiles stuff
115 | # -----------------------------------------------------------------------------
116 | #
117 | alias dotfiles='cd ~/dotfiles'
118 |
119 |
120 |
121 | # Perl stuff
122 | # -----------------------------------------------------------------------------
123 | #
124 | alias perlshell='perl -d -e 1'
125 |
126 |
127 | # Docker aliases
128 | # -----------------------------------------------------------------------------
129 | #
130 | alias dis="docker images --format '{{.Size}}\t{{.Repository}}\t{{.Tag}}\t{{.ID}}' | column -t | sort -hs"
131 |
132 |
133 | # Radius related aliases
134 | # -----------------------------------------------------------------------------
135 | #
136 | alias sniffrad="radsniff -x -szopp -S"
137 |
138 |
139 | # Git related aliases
140 | # -----------------------------------------------------------------------------
141 | #
142 | alias pushall="git co master && git push && git push --tags && git co develop && git push"
143 |
144 |
145 | # Neovim Alias
146 | # -----------------------------------------------------------------------------
147 | #
148 | alias vim="nvim"
149 | alias vi="nvim"
150 |
151 |
152 | # vim: filetype=sh
153 |
--------------------------------------------------------------------------------
/bash_functions:
--------------------------------------------------------------------------------
1 | # Collection of helper functions
2 | # -----------------------------------------------------------------------------
3 | #
4 | . "$HOME/dotfiles/lib/bash_colors"
5 | . "$HOME/dotfiles/git-prompt.sh"
6 |
7 | # Public: Verifies if a command exists on the system
8 | #
9 | # Takes a arbitary binary or file an verifies if that file exists
10 | #
11 | # $1 - File to verify
12 | #
13 | # Examples
14 | # command_exits foo
15 | #
16 | # Produces an exit code of 0 if command exists
17 | command_exists() {
18 | # shellcheck disable=SC2039
19 | type "$1" &> /dev/null ;
20 | }
21 |
22 | # Public: Alternative man command
23 | #
24 | # Overwrites the man command with some color enhancements
25 | man() {
26 | # shellcheck disable=SC2046
27 | env \
28 | LESS_TERMCAP_mb=$(printf "\e[1;94m") \
29 | LESS_TERMCAP_md=$(printf "\e[1;94m") \
30 | LESS_TERMCAP_me=$(printf "\e[0m") \
31 | LESS_TERMCAP_se=$(printf "\e[0m") \
32 | LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
33 | LESS_TERMCAP_ue=$(printf "\e[0m") \
34 | LESS_TERMCAP_us=$(printf "\e[1;32m") \
35 | man "$@"
36 | }
37 |
38 |
39 | # Public: Backup up File
40 | #
41 | # Creates a copy of a file with the current timestamp preceding the filename
42 | #
43 | # $1 - File to backup #
44 | # Examples
45 | # buf my_filename.txt
46 | #
47 | # Creates a backup of `filename.txt` to `20200101-12_00-filename.txt`
48 | buf() {
49 | test -f "$1" || echo "$1 does not exist" && return 1
50 | cp "$1" "$(date +%Y%m%d-%H_%M)-$1";
51 | }
52 |
53 |
54 | # Fetch last exit code and produce either checkmark or crossmark depndening on
55 | # the exit-code
56 | exit_code() {
57 | if [ $? -eq 0 ]; then
58 | echo "${GREEN112}✓${RESET}"
59 | else
60 | echo "${RED}❌${RESET}"
61 | fi
62 | }
63 |
64 |
65 | # Public: Prompt Command for PS1
66 | prompt_command_function() {
67 | EXIT_CODE=$(exit_code)
68 | SIZE="$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')"
69 | GIT_PS1_DESCRIBE_STYLE="contains"
70 | GIT_BRANCH=$(__git_ps1) # Using bash-git-prompt https://github.com/magicmonty/bash-git-prompt
71 |
72 | # Save history
73 | history -a; history -c; history -r
74 |
75 | PS1_LINE1="${RESET}${BAR}┌(${BLUE111}\u@\h${BAR})─(${YELLOW220}\j${BAR})─(${WHITE}\t${BAR})${RED}${GIT_BRANCH}${RESET}"
76 | PS1_LINE2="${RESET}${BAR}└─(${GREEN112}\w${BAR})─(${GREEN112}${SIZE}${BAR})-(${EXIT_CODE}${BAR})──> ${RESET}$ "
77 | PS1="$PS1_LINE1\n$PS1_LINE2"
78 | }
79 |
80 |
81 | # Public: Login on docker registry with openshift creds
82 | oc_docker_login() {
83 | which oc
84 | oc whoami
85 | which docker
86 | docker login \
87 | --username "$(oc whoami)" \
88 | --password "$(oc whoami -t)" \
89 | registry.ipsw.dt.ept.lu
90 | }
91 |
92 | # Git Tag Alias show only latest 10 tags
93 | gitags() {
94 | git tag --sort=-v:refname | head -n 10 | tac
95 | }
96 |
97 |
98 | # vim: set filetype=sh:
99 |
--------------------------------------------------------------------------------
/bash_profile:
--------------------------------------------------------------------------------
1 | #
2 | # ~/.bash_profile
3 | #
4 | [[ -f ~/.bashrc ]] && . ~/.bashrc
5 |
--------------------------------------------------------------------------------
/bashrc:
--------------------------------------------------------------------------------
1 | # bashrc
2 | #
3 | # Author: Frank Lazzarini
4 |
5 | # Standard
6 | # -----------------------------------------------------------------------------
7 | #
8 | [ -z "$PS1" ] && return
9 |
10 |
11 | # Bash history settings
12 | # -----------------------------------------------------------------------------
13 | #
14 | export HISTCONTROL=ignoredups:ignorespace:erasedups # don't put duplicated to history
15 | export HISTSIZE=10000 # History size length
16 | export HISTFILESIZE=20000 # Hitstory filesize
17 | shopt -s histappend # append to hist after each cmd
18 | shopt -s checkwinsize # Check window size after each
19 | # command update LINES COLUMNS
20 |
21 |
22 | # Bash Completion
23 | # -----------------------------------------------------------------------------
24 | #
25 | if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
26 | source /etc/bash_completion
27 | fi
28 |
29 |
30 | # Global Environment Variables
31 | # -----------------------------------------------------------------------------
32 | #
33 | EDITOR_CMD=vim
34 | export XDG_CONFIG_HOME=$HOME/.config
35 | export EDITOR=$EDITOR_CMD
36 | export VISUAL=$EDITOR_CMD
37 | export DOTFILES=$HOME/dotfiles
38 | export GOPATH="$HOME/src"
39 | export GTI_SPEED=5000
40 | export DEVELOPMENT_PORTS="50020,50025"
41 |
42 |
43 | # Launchpad.net Env vars
44 | # -----------------------------------------------------------------------------
45 | #
46 | export DEBFULLNAME="Frank Lazzarini"
47 | export DEBEMAIL="flazzarini@gmail.com"
48 | export GPGKEY=C502163F
49 |
50 | # Python Env vars
51 | # -----------------------------------------------------------------------------
52 | #
53 | export PYTHONWARNINGS=default # Give python warnings
54 |
55 |
56 |
57 | # Keychain
58 | # -----------------------------------------------------------------------------
59 | #
60 | if [ -f "$HOME/.ssh/id_rsa" ]; then
61 | eval $(keychain --eval id_rsa)
62 | fi
63 |
64 |
65 | # Customizations
66 | # -----------------------------------------------------------------------------
67 | #
68 | [ -x /usr/bin/lesspipe ] && \
69 | eval "$(SHELL=/bin/sh lesspipe)" # makes less suck less
70 |
71 |
72 | # Expand PATH variables with custom folders
73 | # -----------------------------------------------------------------------------
74 | #
75 | FOLDERS="
76 | $HOME/bin
77 | $HOME/opt/nodeenc/node_modules/.bin
78 | $HOME/node_modules/.bin
79 | $HOME/.local/bin
80 | $HOME/.cargo/bin
81 | "
82 | for FOLDER in $FOLDERS; do
83 | [ -d "$FOLDER" ] && PATH="$FOLDER:$PATH"
84 | done
85 |
86 |
87 | # Source extra bash files
88 | # -----------------------------------------------------------------------------
89 | #
90 | # Add custom bash functions
91 | # Ticket opened https://github.com/koalaman/shellcheck/issues/769
92 | # shellcheck disable=SC1090
93 | [ -f "$DOTFILES/bash_functions" ] && source "$DOTFILES/bash_functions"
94 |
95 | # Adds custom bash_aliases
96 | # shellcheck disable=SC1090
97 | [ -f "$DOTFILES/bash_aliases" ] && source "$DOTFILES/bash_aliases"
98 |
99 | # Adds Host specific configurations
100 | # shellcheck disable=SC1090
101 | [ -f "$DOTFILES/host_specific.d/$HOSTNAME.sh" ] && source "$DOTFILES/host_specific.d/$HOSTNAME.sh"
102 |
103 | # Adds fzf key bindings
104 | # shellcheck disable=SC1090
105 | [ -f "$DOTFILES/fzf/shell/key-bindings.bash" ] && source "$DOTFILES/fzf/shell/key-bindings.bash"
106 |
107 |
108 |
109 | # My Prompt
110 | # -----------------------------------------------------------------------------
111 | #
112 | # Remap TERM environment variable
113 | case "$TERM" in
114 | xterm*|rxvt-unicode*) TERM="xterm-256color" ;;
115 | alacritty) TERM="xterm-256color" ;;
116 | esac
117 |
118 | # If we have a colorful terminal set color_prompt to yes
119 | case "$TERM" in
120 | xterm-256color) color_prompt=yes ;;
121 | tmux-256color) color_prompt=yes ;;
122 | screen-256color) color_prompt=yes ;;
123 | rxvt-unicode-256color) color_prompt=yes ;;
124 | alacritty) color_prompt=yes ;;
125 | esac
126 |
127 | if [ "$color_prompt" = yes ]; then
128 | # Set prompt
129 | PROMPT_COMMAND=prompt_command_function
130 |
131 | # Set color theme
132 | # COLOR_THEME=molokai
133 |
134 | # Ticket opened https://github.com/koalaman/shellcheck/issues/769
135 | # shellcheck disable=SC1090
136 | # source ~/dotfiles/terminal-color-theme/color-theme-${COLOR_THEME}/${COLOR_THEME}.sh
137 | else
138 |
139 | # shellcheck disable=SC2153
140 | PS1="${GREEN}\u@${BLUE}\h${RESET}:${RESET}\w \$ "
141 | fi
142 |
143 | # Load direnv if available on the system
144 | # direnv reads `.envrc` files from directories and sets environment variables
145 | # based on these files
146 | if [ -f /usr/bin/direnv ]; then
147 | eval "$(/usr/bin/direnv hook bash)"
148 | fi
149 |
150 | unset color_prompt force_color_prompt
151 |
152 |
153 | # Load pyenv stuff
154 | export PYENV_ROOT="$HOME/.pyenv"
155 | command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
156 | eval "$(pyenv init -)"
157 |
158 | # Citrix Receiver
159 | export ICAROOT="/opt/icaclient/linuxx64"
160 |
161 | # Use ASDF
162 | test -f "$HOME/.asdf/asdf.sh" && source $HOME/.asdf/asdf.sh
163 |
164 | # Enable Fabric Bash Completion
165 | source "$HOME/dotfiles/fabric-completion.bash"
166 |
--------------------------------------------------------------------------------
/beets/config.yaml:
--------------------------------------------------------------------------------
1 | directory: /home/frank/downloads/__tagged/
2 | move: yes
3 |
4 | paths:
5 | default: $genre/$albumartist/$album/$track - $title
6 | comp: Soundtracks/$album%aunique{}/$track - $title
7 |
8 | ui:
9 | color: yes
10 |
11 | per_disc_numbering: no
12 |
13 | plugins: embedart lastgenre info
14 |
15 | embedart:
16 | auto: yes
17 |
18 | lastgenre:
19 | whitelist: ~/dotfiles/beets/whitelist.txt
20 | count: 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/beets/whitelist.txt:
--------------------------------------------------------------------------------
1 | Alternative
2 | Rock
3 | Metal
4 | Heavy Metal
5 | Stoner Rock
6 | Progressive Rock
7 | Electronic
8 | Electronica
9 | Classical
10 | Hip-Hop
11 |
--------------------------------------------------------------------------------
/bin/build_vim_locally.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | BASE_COMPILE_PATH=`realpath ~/downloads/tmp_build_vim`
4 | PREFIX_PATH=`realpath ~/opt/vim/`
5 |
6 | # Change directory to ~/downloads
7 | mkdir -p $BASE_COMPILE_PATH && cd $BASE_COMPILE_PATH
8 |
9 | [ -f $BASE_COMPILE_PATH/vim ] || cd $BASE_COMPILE_PATH && git clone --depth 1 https://github.com/vim/vim.git
10 | cd $BASE_COMPILE_PATH/vim && git checkout master && git pull
11 |
12 | cd $BASE_COMPILE_PATH/vim && ./configure \
13 | --enable-python3interp=yes \
14 | --enable-luainterp=yes \
15 | --with-features=huge \
16 | --prefix=$PREFIX_PATH
17 |
18 | cd $BASE_COMPILE_PATH/vim && make && make install
19 |
--------------------------------------------------------------------------------
/bin/color_palette.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Print tmux color palette.
3 | # Idea from http://superuser.com/questions/285381/how-does-the-tmux-color-palette-work
4 |
5 | for i in $(seq 0 4 255); do
6 | for j in $(seq $i $(expr $i + 3)); do
7 | for k in $(seq 1 $(expr 3 - ${#j})); do
8 | printf " "
9 | done
10 | printf "\x1b[38;5;${j}mcolour${j}"
11 | [[ $(expr $j % 4) != 3 ]] && printf " "
12 | done
13 | printf "\n"
14 | done
15 |
--------------------------------------------------------------------------------
/bin/color_palette_256.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | for code in {0..255}; do
4 | echo -e "\e[38;05;${code}m $code: Test"
5 | done
6 |
--------------------------------------------------------------------------------
/bin/convert_to_json:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | import argparse
4 | import json
5 |
6 | parser = argparse.ArgumentParser(
7 | description="Converts stdin dict to json",
8 | )
9 | parser.add_argument("input_dict", help="Dict as string to parse")
10 | args = parser.parse_args()
11 |
12 | dict_to_convert = eval(args.input_dict)
13 | print(json.dumps(dict_to_convert, indent=4))
14 |
--------------------------------------------------------------------------------
/bin/createfloppy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Setup environment
4 | FORMAT=$(which mkfs.vfat 2>/dev/null)
5 | MOUNT=$(which mount 2>/dev/null)
6 | TMP='/tmp'
7 | shopt -s dotglob
8 |
9 | # Verify binaries exist
10 | MISSING=''
11 | [ ! -e "$FORMAT" ] && MISSING+='mkfs.vfat, '
12 | [ ! -e "$MOUNT" ] && MISSING+='mount, '
13 | if [ -n "$MISSING" ]; then
14 | echo "Error: cannot find the following binaries: ${MISSING%%, }"
15 | exit
16 | fi
17 |
18 | # Verify arguments
19 | if [ ! -d "$1" ]; then
20 | echo "Error: You must specify a directory containing the floppy disk files"
21 | exit
22 | else
23 | DISK=$(basename "${1}")
24 | IMG="${TMP}/${DISK}.img"
25 | TEMP="${TMP}/temp_${DISK}"
26 | fi
27 |
28 | # Load loopback module if necessary
29 | if [ ! -e /dev/loop0 ]; then
30 | sudo modprobe loop
31 | sleep 1
32 | fi
33 |
34 | # Create disk image
35 | ${FORMAT} -C "${IMG}" 1440
36 | mkdir "${TEMP}"
37 | sudo $MOUNT -o loop,uid=$UID -t vfat "${IMG}" "${TEMP}"
38 | cp -f "${DISK}"/* "${TEMP}"/
39 | sudo umount "${TEMP}"
40 | rmdir "${TEMP}"
41 | mv "${IMG}" .
42 |
--------------------------------------------------------------------------------
/bin/cronic:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Cronic v3 - cron job report wrapper
4 | # Copyright 2007-2016 Chuck Houpt. No rights reserved, whatsoever.
5 | # Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/
6 |
7 | set -eu
8 |
9 | TMP=$(mktemp -d)
10 | OUT=$TMP/cronic.out
11 | ERR=$TMP/cronic.err
12 | TRACE=$TMP/cronic.trace
13 |
14 | set +e
15 | "$@" >$OUT 2>$TRACE
16 | RESULT=$?
17 | set -e
18 |
19 | PATTERN="^${PS4:0:1}\\+${PS4:1}"
20 | if grep -aq "$PATTERN" $TRACE
21 | then
22 | ! grep -av "$PATTERN" $TRACE > $ERR
23 | else
24 | ERR=$TRACE
25 | fi
26 |
27 | if [ $RESULT -ne 0 -o -s "$ERR" ]
28 | then
29 | echo "Cronic detected failure or error output for the command:"
30 | echo "$@"
31 | echo
32 | echo "RESULT CODE: $RESULT"
33 | echo
34 | echo "ERROR OUTPUT:"
35 | cat "$ERR"
36 | echo
37 | echo "STANDARD OUTPUT:"
38 | cat "$OUT"
39 | if [ $TRACE != $ERR ]
40 | then
41 | echo
42 | echo "TRACE-ERROR OUTPUT:"
43 | cat "$TRACE"
44 | fi
45 | fi
46 |
47 | rm -rf "$TMP"
48 |
--------------------------------------------------------------------------------
/bin/docker_clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | docker ps --filter "status=exited" | grep 'months ago' | awk '{ print $1 }' |xargs --no-run-if-empty docker rm
3 | docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
4 | docker volume rm $(docker volume ls -qf dangling=true)
5 |
--------------------------------------------------------------------------------
/bin/flac2mp3.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | for a in *.flac; do
3 | # give output correct extension
4 | OUTF="${a[@]/%flac/mp3}"
5 |
6 | # get the tags
7 | ARTIST=$(metaflac "$a" --show-tag=ARTIST | sed s/.*=//g)
8 | TITLE=$(metaflac "$a" --show-tag=TITLE | sed s/.*=//g)
9 | ALBUM=$(metaflac "$a" --show-tag=ALBUM | sed s/.*=//g)
10 | GENRE=$(metaflac "$a" --show-tag=GENRE | sed s/.*=//g)
11 | TRACKNUMBER=$(metaflac "$a" --show-tag=TRACKNUMBER | sed s/.*=//g)
12 | DATE=$(metaflac "$a" --show-tag=DATE | sed s/.*=//g)
13 |
14 | # stream flac into the lame encoder
15 | flac -c -d "$a" | lame --alt-preset insane --add-id3v2 --pad-id3v2 --ignore-tag-errors \
16 | --ta "$ARTIST" --tt "$TITLE" --tl "$ALBUM" --tg "${GENRE:-12}" \
17 | --tn "${TRACKNUMBER:-0}" --ty "$DATE" - "$OUTF"
18 | done
19 |
--------------------------------------------------------------------------------
/bin/gitbranch.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Display the current git branch
4 | #
5 | # SYNOPSIS
6 | # ========
7 | #
8 | # gitbranch [prefix [suffix]]
9 | #
10 | # prefix - prefix the output with this value
11 | # If no suffix is specified, this value will also be used as
12 | # suffix. You can pass an empty string to suppress this behaviour.
13 | #
14 | # suffix - append this value to the output
15 | #
16 | # ---------------------------------------------------------------------------
17 |
18 | BRANCH_NAME="`git name-rev --name-only --always HEAD 2>/dev/null`"
19 | PREFIX=""
20 | SUFFIX=""
21 |
22 | if [[ $# == 1 ]]; then
23 | PREFIX=$1
24 | SUFFIX=$1
25 | elif [[ $# == 2 ]]; then
26 | PREFIX=$1
27 | SUFFIX=$2
28 | fi
29 |
30 | if [[ $BRANCH_NAME != "" ]]; then
31 | echo "${PREFIX}${BRANCH_NAME}${SUFFIX}";
32 | else
33 | echo "";
34 | fi
35 |
--------------------------------------------------------------------------------
/bin/m4a2mp3.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #convert m4a to mp3
4 |
5 | FILES="*.m4a"
6 |
7 | for F in $FILES
8 |
9 | do
10 | newname=`basename "$F" .m4a`
11 | echo $newname
12 | ffmpeg -i "$F" -acodec libmp3lame -ac 2 -ab 192k -ar 44100 "$newname.mp3"
13 | done
14 |
--------------------------------------------------------------------------------
/bin/mkv2avi.sh:
--------------------------------------------------------------------------------
1 | for f in *.mkv; do
2 | ffmpeg -i "$f" -vcodec libxvid -qscale 5 -r 25 -g 240 -bf 2 -acodec libmp3lame -ab 160k -ar 48000 -async 48000 -ac 2 -pass 1 -an -f rawvideo -y /dev/null
3 | ffmpeg -i "$f" -vcodec libxvid -qscale 5 -r 25 -g 240 -bf 2 -acodec libmp3lame -ab 160k -ar 48000 -async 48000 -ac 2 -pass 2 -f avi "${f%.mkv}.avi"
4 | done
5 |
--------------------------------------------------------------------------------
/bin/mp42avi.sh:
--------------------------------------------------------------------------------
1 | for f in *.mp4; do
2 | mencoder "$f" -channels 6 -ovc xvid -xvidencopts fixed_quant=4 -vf harddup -oac pcm -o "${f%.mp4}.avi"
3 | done
4 |
--------------------------------------------------------------------------------
/bin/multistopwatch:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 | import sys
3 | import termios
4 | import tty
5 | from argparse import ArgumentParser
6 | from contextlib import contextmanager
7 | from datetime import timedelta
8 | from subprocess import call
9 | from threading import Thread
10 | from time import sleep
11 |
12 | TIMERS = {}
13 | GLOBALS = {
14 | 'current_key': None
15 | }
16 |
17 |
18 | @contextmanager
19 | def without_cursor():
20 | call(['setterm', '-cursor', 'off'])
21 | yield
22 | call(['setterm', '-cursor', 'on'])
23 |
24 |
25 | def getch():
26 | fd = sys.stdin.fileno()
27 | old_settings = termios.tcgetattr(fd)
28 | try:
29 | tty.setraw(sys.stdin.fileno())
30 | ch = sys.stdin.read(1)
31 | finally:
32 | termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
33 | return ch
34 |
35 |
36 | def parse_args():
37 | parser = ArgumentParser()
38 | parser.add_argument('-s', '--single',
39 | help='Only show the currently active timer',
40 | action='store_true', default=False)
41 | return parser.parse_args()
42 |
43 |
44 | class Timer(Thread):
45 |
46 | def __init__(self, name):
47 | super().__init__(name=name)
48 | self.seconds = 0
49 | self.paused = False
50 | self.daemon = True
51 | self.stopped = False
52 |
53 | def run(self):
54 | while not self.stopped:
55 | if not self.paused:
56 | self.seconds += 1
57 | sleep(1)
58 |
59 | def pause(self):
60 | self.paused = True
61 |
62 | def resume(self):
63 | self.paused = False
64 |
65 | def stop(self):
66 | self.stopped = True
67 |
68 |
69 | def colorise(key, value):
70 | if key == GLOBALS['current_key']:
71 | itemformat = '\033[1;32m%s: %8s\033[0;0m'
72 | else:
73 | itemformat = '%s: %8s'
74 | return itemformat % (key, value)
75 |
76 |
77 | class Monitor(Thread):
78 |
79 | def __init__(self, single):
80 | super().__init__()
81 | self.daemon = True
82 | self.keep_running = True
83 | self.single = single
84 |
85 | def run(self):
86 | while self.keep_running:
87 | if self.single:
88 | self.print_single()
89 | else:
90 | self.print_multiple()
91 | sleep(1)
92 |
93 | def print_multiple(self):
94 | data = [(timer.name, timedelta(seconds=timer.seconds))
95 | for timer in TIMERS.values()]
96 | items = [colorise(*row) for row in sorted(data)]
97 | if items:
98 | print('\r', ' | '.join(items))
99 |
100 | def print_single(self):
101 | timer = TIMERS.get(GLOBALS['current_key'], None)
102 | if not timer:
103 | return
104 | print('\r',
105 | colorise(GLOBALS['current_key'],
106 | timedelta(seconds=timer.seconds)), end='')
107 |
108 | def stop(self):
109 | self.keep_running = False
110 |
111 |
112 | def main():
113 |
114 | args = parse_args()
115 |
116 | print('Press "q" to quit, "p" to pause/resume the active counter')
117 | print('Press any other button to start a timer with that name')
118 | print('\nAll keys (except "p" and "q") are case *sensitive*!')
119 | print('... so you can have a timer "T" and "t"')
120 |
121 | monitor = Monitor(args.single)
122 | monitor.start()
123 |
124 | last_active = None
125 | paused = False
126 | while True:
127 | char = getch()
128 | if char.lower() == 'q':
129 | GLOBALS['current_key'] = None
130 | break
131 | if char.lower() == 'p':
132 | if paused and last_active:
133 | TIMERS[last_active].resume()
134 | paused = False
135 | GLOBALS['current_key'] = last_active
136 | elif not paused:
137 | for timer in TIMERS.values():
138 | timer.pause()
139 | paused = True
140 | GLOBALS['current_key'] = None
141 | else:
142 | raise Exception('Something went wrong')
143 | continue
144 |
145 | last_active = char
146 | GLOBALS['current_key'] = char
147 |
148 | if char not in TIMERS:
149 | TIMERS[char] = Timer(char)
150 | TIMERS[char].start()
151 | for k, v in TIMERS.items():
152 | if k == char:
153 | v.resume()
154 | else:
155 | v.pause()
156 |
157 | for timer in TIMERS.values():
158 | timer.stop()
159 |
160 | for timer in TIMERS.values():
161 | timer.join()
162 |
163 | monitor.stop()
164 | monitor.join()
165 |
166 | if args.single:
167 | print('\n\n--- Report ------------')
168 | for name, timer in sorted(TIMERS.items()):
169 | delta = timedelta(seconds=timer.seconds)
170 | print('\r', colorise(name, delta))
171 |
172 | if __name__ == "__main__":
173 | with without_cursor():
174 | main()
175 |
--------------------------------------------------------------------------------
/bin/openwifishare.sh:
--------------------------------------------------------------------------------
1 | ETH0ADD="192.168.11.1"
2 | ETH0NET="255.255.255.0"
3 |
4 | # Deactivate ufw
5 | sudo /etc/init.d/ufw stop
6 | sudo iptables -F
7 |
8 | # Bring up Ethernet connection for sharing
9 | sudo ifconfig eth0 down
10 | sudo ifconfig eth0 up
11 | sudo ifconfig eth0 $ETH0ADD netmask $ETH0NET
12 |
13 | # Next we need to activate IP forwarding, and setup iptables to NAT:
14 | sudo sysctl -w net.ipv4.ip_forward=1
15 | sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
16 |
17 | # The following may be worth trying if the client gets Host Prohibited responses:
18 | sudo iptables -F FORWARD
19 | sudo iptables -A FORWARD -j ACCEPT
20 | sudo iptables -nvL
21 |
--------------------------------------------------------------------------------
/bin/pingtest.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if ping -c 1 -W 2 $1 > /dev/null; then
4 | echo "\${color3}UP"
5 | else
6 | echo "\${color4}DOWN"
7 | fi
8 |
--------------------------------------------------------------------------------
/bin/servit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | import http.server
3 | import argparse
4 |
5 |
6 | class MyHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
7 | def end_headers(self):
8 | self.send_my_headers()
9 | http.server.SimpleHTTPRequestHandler.end_headers(self)
10 |
11 | def send_my_headers(self):
12 | self.send_header(
13 | "Cache-Control", "no-cache, no-store, must-revalidate"
14 | )
15 | self.send_header("Pragma", "no-cache")
16 | self.send_header("Expires", "0")
17 |
18 |
19 | if __name__ == '__main__':
20 | parser = argparse.ArgumentParser(description="Serves static files via HTTP")
21 | parser.add_argument("port", help="Port to bind to")
22 | args = parser.parse_args()
23 | http.server.test(HandlerClass=MyHTTPRequestHandler, port=int(args.port))
24 |
--------------------------------------------------------------------------------
/bin/startmongo.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | datapath="/mnt/storage/data/mongo/"
4 | mongod="/opt/mongodb/bin/mongod"
5 |
6 | $mongod --dbpath $datapath
7 |
--------------------------------------------------------------------------------
/bin/tagrename:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | cd "/home/frank/.wine/drive_c/TagRename" && wine TagRename.exe
3 |
--------------------------------------------------------------------------------
/bin/toggle_touchpad.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | LOCKFILE="/tmp/touchpad-off.lck"
4 |
5 | if [ -f "$LOCKFILE" ]; then
6 | echo "Enabling touchpad"
7 | xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 0
8 | rm -f $LOCKFILE
9 | else
10 | echo "Disabling touchpad"
11 | xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 1
12 | touch $LOCKFILE
13 | fi
14 |
--------------------------------------------------------------------------------
/bin/update-grive.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # update-grive.sh
4 | #
5 | # Monitor a folder defined in this file for changes and run grive to
6 | # synchronize changes to google drive
7 |
8 | FOLDER="/home/frank/gdrive/"
9 | GRIVE=`which grive`
10 | INOTIFYWAIT=`which inotifywait`
11 | TIMEOUT=300
12 |
13 | # Preflight checks
14 | if [ -z $INOTIFYWAIT ]; then
15 | echo "Please make sure you have inotifywait installed"
16 | exit 1
17 | fi
18 |
19 | if [ -z $GRIVE ]; then
20 | echo "Please make sure you have grive installed"
21 | exit 1
22 | fi
23 |
24 |
25 | while true; do
26 | $INOTIFYWAIT -t $TIMEOUT -e modify -e move -e create -r $FOLDER
27 | cd $FOLDER && $GRIVE
28 | done
29 |
--------------------------------------------------------------------------------
/bin/vivaldi:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | /usr/bin/vivaldi-stable --disable-seccomp-filter-sandbox
3 |
--------------------------------------------------------------------------------
/bin/watch_corona.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | while true; do
3 | clear && curl https://corona-stats.online/luxembourg
4 | sleep 300
5 | done
6 |
--------------------------------------------------------------------------------
/bin/winbox:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cd /opt/winbox && wine winbox.exe
4 |
--------------------------------------------------------------------------------
/bin/wma2mp3.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #convert wma to mp3
4 |
5 | FILES="*.wma"
6 |
7 | for F in $FILES
8 |
9 | do
10 | newname=`basename "$F" .wma`
11 | echo $newname
12 | ffmpeg -i "$F" -acodec libmp3lame -ac 2 -ab 192k -ar 44100 "$newname.mp3"
13 | done
14 |
--------------------------------------------------------------------------------
/bin/xauth_clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | xauth list | cut -f1 -d\ | xargs -i xauth remove {}
3 |
--------------------------------------------------------------------------------
/bootstrapping/python/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include README.rst
2 | include project/version.txt
3 |
--------------------------------------------------------------------------------
/bootstrapping/python/README.rst:
--------------------------------------------------------------------------------
1 | Project Name
2 | ============
3 |
4 | Description about the project.
5 |
6 |
--------------------------------------------------------------------------------
/bootstrapping/python/fabfile.py:
--------------------------------------------------------------------------------
1 | import fabric.api as fab
2 |
3 | PYREPO_DIR = "/path/to/pyrepo"
4 | PACKAGE_NAME = 'projectname'
5 |
6 | fab.env.roledefs = {
7 | 'pyrepo': ['hostname'],
8 | 'doc': ['hostname'],
9 | }
10 |
11 |
12 | @fab.roles('pyrepo')
13 | @fab.task
14 | def publish():
15 | fab.local("python setup.py sdist")
16 | tar_filename = fab.local("python setup.py --fullname", capture=True)
17 | fab.put("dist/{local_name}.tar.gz".format(local_name=tar_filename),
18 | PYREPO_DIR)
19 |
20 |
21 | @fab.task
22 | def doc():
23 | from os.path import abspath
24 | opts = {'builddir': '_build',
25 | 'sphinx': abspath('env/bin/sphinx-build')}
26 | cmd = ('{sphinx} -b html '
27 | '-d {builddir}/doctrees . {builddir}/html')
28 | with fab.lcd('doc'):
29 | fab.local(cmd.format(**opts))
30 |
--------------------------------------------------------------------------------
/bootstrapping/python/projectname/__init__.py:
--------------------------------------------------------------------------------
1 | import logging
2 | import pkg_resources
3 |
4 | __version__ = pkg_resources.resource_string(__name__, "version.txt").strip()
5 | LOG = logging.getLogger(__name__)
6 |
--------------------------------------------------------------------------------
/bootstrapping/python/projectname/version.txt:
--------------------------------------------------------------------------------
1 | 1.0
2 |
--------------------------------------------------------------------------------
/bootstrapping/python/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup, find_packages
2 | from os.path import join
3 |
4 | NAME = "projectname"
5 | DESCRIPTION = "A project description."
6 | AUTHOR = "Frank Lazzarini"
7 | AUTHOR_EMAIL = "flazzarini@gmail.com"
8 | VERSION = open(join(NAME, 'version.txt')).read().strip()
9 | LONG_DESCRIPTION = open("README.rst").read()
10 |
11 | setup(
12 | name=NAME,
13 | version=VERSION,
14 | description=DESCRIPTION,
15 | long_description=LONG_DESCRIPTION,
16 | author=AUTHOR,
17 | author_email=AUTHOR_EMAIL,
18 | license="Private",
19 | include_package_data=True,
20 | install_requires=[
21 | ],
22 | entry_points={
23 | 'console_scripts': []
24 | },
25 | dependency_links=[],
26 | packages=find_packages(exclude=["tests.*", "tests"]),
27 | zip_safe=False,
28 | )
29 |
--------------------------------------------------------------------------------
/bspwm/bspwmrc:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | # Autostart
4 | setxkbmap -layout gb &
5 | xset r rate 200 50 &
6 | synclient TouchpadOff=1 &
7 | sxhkd -c ~/.config/sxhkd/sxhkdrc &
8 |
9 | bspc monitor -d I II III IV V VI VII VIII IX
10 |
11 | # Styling
12 | bspc config border_width 2
13 | bspc config window_gap 12
14 | bspc config split_ratio 0.52
15 | bspc config borderless_monocle true
16 | bspc config gapless_monocle true
17 |
18 | # Rules
19 | bspc rule -a TelegramDesktop desktop='^5'
20 | bspc rule -a Gimp desktop='^8' state=floating follow=on
21 | bspc rule -a Chromium desktop='^2'
22 | bspc rule -a mplayer2 state=floating
23 | bspc rule -a Kupfer.py focus=on
24 | bspc rule -a Screenkey manage=off
25 |
26 | # Start additional tools
27 | polybar -c ~/.config/polybar/config.ini main &
28 | telegram-desktop &
29 | # synergy &
30 | # netctl-gui --minimized &
31 | udiskie -t &
32 | volumeicon &
33 | alacritty &
34 | blueman-tray &
35 | feh --bg-center "`find ~/pictures/wallpapers/ | shuf -n 1`" &
36 |
--------------------------------------------------------------------------------
/compton.conf:
--------------------------------------------------------------------------------
1 | # Shadow
2 | shadow = true; # Enabled client-side shadows on windows.
3 | no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
4 | no-dnd-shadow = true; # Don't draw shadows on DND windows.
5 | clear-shadow = true; # Zero the part of the shadow's mask behind the
6 | # window. Fix some weirdness with ARGB windows.
7 | shadow-radius = 7; # The blur radius for shadows. (default 12)
8 | shadow-offset-x = -7; # The left offset for shadows. (default -15)
9 | shadow-offset-y = -7; # The top offset for shadows. (default -15)
10 | shadow-opacity = 0.7; # The translucency for shadows. (default .75)
11 | # shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0)
12 | # shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0)
13 | # shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0)
14 | shadow-exclude = [
15 | "n:e:Notification"
16 | ]; # Exclude conditions for shadows.
17 | shadow-ignore-shaped = true; # Avoid drawing shadow on all shaped windows
18 | # (see also: --detect-rounded-corners)
19 |
20 | # Opacity
21 | menu-opacity = 0.9; # The opacity for menus. (default 1.0)
22 | inactive-opacity = 0.0; # Default opacity of inactive windows. (0.0 - 1.0)
23 | # active-opacity = 0.8; # Default opacity for active windows. (0.0 - 1.0)
24 | # frame-opacity = 0.8; # Opacity of window titlebars and borders. (0.1 - 1.0)
25 | # inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacity' overrides
26 | # value of _NET_WM_OPACITY. Bad choice.
27 | alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing
28 | # it may result in less X resource usage,
29 | # Yet fading may look bad.
30 | # inactive-dim = 0.2; # Dim inactive windows. (0.0 - 1.0)
31 | # inactive-dim-fixed = true; # Do not let dimness adjust based on window opacity.
32 | # blur-background = true; # Blur background of transparent windows.
33 | # Bad performance with X Render backend.
34 | # GLX backend is preferred.
35 | # blur-background-frame = true; # Blur background of opaque windows with transparent
36 | # frames as well.
37 | blur-background-fixed = false; # Do not let blur radius adjust based on window opacity.
38 | blur-background-exclude = [
39 | "window_type = 'dock'",
40 | "window_type = 'desktop'"
41 | ];
42 | # Exclude conditions for background blur.
43 |
44 | # Fading
45 | fading = true; # Fade windows during opacity changes.
46 | # fade-delta = 30; # The time between steps in a fade in milliseconds. (default 10).
47 | fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
48 | fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
49 | # no-fading-openclose = true; # Avoid fade windows in/out when opening/closing.
50 | fade-exclude = [ ]; # Exclude conditions for fading.
51 |
52 | # Other
53 | backend = "xrender" # Backend to use: "xrender" or "glx". GLX backend is typically
54 | # much faster but depends on a sane driver.
55 | mark-wmwin-focused = true; # Try to detect WM windows and mark them as active.
56 | mark-ovredir-focused = true; # Mark all non-WM but override-redirect windows active (e.g. menus).
57 | use-ewmh-active-win = false; # Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused
58 | # instead of using FocusIn/Out events. Usually more reliable but
59 | # depends on a EWMH-compliant WM.
60 | detect-rounded-corners = true; # Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
61 | detect-client-opacity = true; # Detect _NET_WM_OPACITY on client windows, useful for window
62 | # managers not passing _NET_WM_OPACITY of client windows to frame
63 | # windows.
64 | refresh-rate = 0; # For --sw-opti: Specify refresh rate of the screen. 0 for auto.
65 | vsync = "none"; # "none", "drm", "opengl", "opengl-oml", "opengl-swc", "opengl-mswc"
66 | # See man page for more details.
67 | dbe = false; # Enable DBE painting mode. Rarely needed.
68 | paint-on-overlay = true; # Painting on X Composite overlay window. Recommended.
69 | sw-opti = false; # Limit compton to repaint at most once every 1 / refresh_rate.
70 | # Incompatible with certain VSync methods.
71 | unredir-if-possible = false; # Unredirect all windows if a full-screen opaque window is
72 | # detected, to maximize performance for full-screen windows.
73 | focus-exclude = [ ]; # A list of conditions of windows that should always be considered
74 | # focused.
75 | detect-transient = true; # Use WM_TRANSIENT_FOR to group windows, and consider windows in
76 | # the same group focused at the same time.
77 | detect-client-leader = true; # Use WM_CLIENT_LEADER to group windows.
78 | invert-color-include = [ ]; # Conditions for windows to be painted with inverted color.
79 |
80 | # GLX backend # GLX backend fine-tune options. See man page for more info.
81 | # glx-no-stencil = true; # Recommended.
82 | glx-copy-from-front = false; # Useful with --glx-swap-method,
83 | # glx-use-copysubbuffermesa = true; # Recommended if it works. Breaks VSync.
84 | # glx-no-rebind-pixmap = true; # Recommended if it works.
85 | glx-swap-method = "undefined"; # See man page.
86 |
87 | # Window type settings
88 | wintypes:
89 | {
90 | tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; };
91 | # fade: Fade the particular type of windows.
92 | # shadow: Give those windows shadow
93 | # opacity: Default opacity for the type of windows.
94 | # focus: Whether to always consider windows of this type focused.
95 | };
96 |
--------------------------------------------------------------------------------
/conky/conky-work.conf:
--------------------------------------------------------------------------------
1 | use_xft yes
2 | xftfont Terminus:size=8
3 | xftalpha 0.8
4 | update_interval 2.0
5 | total_run_times 0
6 | own_window yes
7 | own_window_transparent yes
8 | own_window_argb_visual yes
9 | own_window_type normal
10 | own_window_class conky-semi
11 | own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
12 | background no
13 | double_buffer yes
14 | minimum_size 300 400
15 | maximum_width 350
16 | draw_shades no
17 | draw_outline no
18 | draw_borders no
19 | draw_graph_borders yes
20 | default_shade_color black
21 | default_outline_color white
22 | default_bar_size 150 5
23 | default_gauge_size 20 20
24 | imlib_cache_size 0
25 | draw_shades no
26 | alignment top_right
27 | gap_x 5
28 | gap_y 15
29 | no_buffers yes
30 | uppercase no
31 | cpu_avg_samples 2
32 | override_utf8_locale no
33 | default_color ECEAE4
34 | color1 9F907D
35 | color2 01C400
36 | color3 7A9C48
37 | color4 9C4848
38 |
39 |
40 |
41 | TEXT
42 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Info ${color slate grey}${hr 2}${font}
43 | ${color1}Date ${alignr}${color slate grey}${time %a,}${color}${time %e %B %G}
44 | ${color1}Time ${alignr}${color}${time %T}
45 |
46 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}System ${color slate grey}${hr 2}${font}
47 | ${color1}Hostname ${alignr}${color}${nodename}
48 | ${color1}${sysname} ${alignr}${color}${kernel}-${machine}
49 | ${color1}CPU ${alignr}${color}${freq_g}GHz
50 | ${color1}Loadaverage ${alignr}${color}${loadavg 1} ${loadavg 2} ${loadavg 3}
51 | ${color1}Uptime ${alignr}${color}${uptime}
52 | ${color1}Cpu Temperature ${alignr}${color}${execi 10 sensors | grep 'Core 0:' | awk '{print $3}' | sed 's/°//g'}
53 |
54 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Processors ${color slate grey}${hr 2}${font}
55 | ${color1}Core 1 ${alignr}${color}${cpu cpu1}% ${cpubar cpu1}
56 | ${color1}Core 2 ${alignr}${color}${cpu cpu2}% ${cpubar cpu2}
57 | ${color1}Core 3 ${alignr}${color}${cpu cpu3}% ${cpubar cpu3}
58 | ${color1}Core 4 ${alignr}${color}${cpu cpu4}% ${cpubar cpu4}
59 |
60 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Memory ${color slate grey}${hr 2}${font}
61 | ${color1}Memory ${color}${alignr}${memeasyfree} / ${memmax}
62 | ${color1}Currently ${color}${alignr}${memperc}% ${membar}
63 |
64 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Filesystem ${color slate grey}${hr 2}${font}
65 | ${color1}/ ${color}${alignc}${fs_used /} / ${fs_size /} ${color}${alignr}${fs_free_perc /} %
66 | ${color}${fs_bar 5,300 /}
67 |
68 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Networking ${color slate grey}${hr 2}${font}
69 | ${color1}Ip ${alignr}${color}${addr eth0}
70 | ${color1}Download ${alignr}${color}${downspeed eth0}${downspeedgraph eth0 10,100}
71 | ${color1}Upload ${alignr}${color}${upspeed eth0}${upspeedgraph eth0 10,100}
72 | ${color1}Total Down/Up ${alignr}${color}${totaldown eth0}${color1}/${color}${totalup eth0}
73 |
74 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Top Processes ${color slate grey}${hr 2}${font}
75 | ${color1}${top name 1} ${alignr}${color}${top cpu 1} ${top mem 1}
76 | ${color1}${top name 2} ${alignr}${color}${top cpu 2} ${top mem 2}
77 | ${color1}${top name 3} ${alignr}${color}${top cpu 3} ${top mem 3}
78 | ${color1}${top name 4} ${alignr}${color}${top cpu 4} ${top mem 4}
79 | ${color1}${top name 5} ${alignr}${color}${top cpu 5} ${top mem 5}
80 |
81 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Messages ${color slate grey}${hr 2}${font}
82 | ${color1}${execpi 15 tail -n 10 /var/log/syslog | awk -F`hostname`' ' '{print $2}'}
83 |
84 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Server Monitoring ${color slate grey}${hr 2}${font}
85 | ${color}bbs-nexus ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-nexus.ipsw.dt.ept.lu}
86 | ${color}bbs-goon ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-goon.ipsw.dt.ept.lu}
87 | ${color}bbs-arbiter ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-arbiter.ipsw.dt.ept.lu}
88 | ${color}bbs-evolution ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-evolution.ipsw.dt.ept.lu}
89 | ${color}bbs-overmind ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-overmind.ipsw.dt.ept.lu}
90 | ${color}bbs-pylon ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-pylon.ipsw.dt.ept.lu}
91 | ${color}bbs-iperf ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-iperf.ipsw.dt.ept.lu}
92 |
--------------------------------------------------------------------------------
/conky/conky.conf:
--------------------------------------------------------------------------------
1 | # Kde settings
2 | #own_window yes
3 | #own_window_transparent yes
4 | #own_window_argb_visual yes
5 | #own_window_type normal
6 | #own_window_class conky-semi
7 | #own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
8 | #background no
9 |
10 | use_xft yes
11 | xftfont Terminus:size=8
12 | xftalpha 0.8
13 | update_interval 2.0
14 | total_run_times 0
15 | own_window yes
16 | own_window_transparent yes
17 | own_window_argb_visual yes
18 | own_window_type normal
19 | own_window_class conky-semi
20 | own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
21 | background no
22 | double_buffer yes
23 | minimum_size 300 200
24 | draw_shades no
25 | draw_outline no
26 | draw_borders no
27 | draw_graph_borders yes
28 | default_shade_color black
29 | default_outline_color white
30 | default_bar_size 150 5
31 | default_gauge_size 20 20
32 | imlib_cache_size 0
33 | draw_shades no
34 | alignment top_right
35 | gap_x 5
36 | gap_y 35
37 | no_buffers yes
38 | uppercase no
39 | cpu_avg_samples 2
40 | override_utf8_locale no
41 | default_color ECEAE4
42 | color1 9f907d
43 | color2 01C400
44 |
45 |
46 |
47 | TEXT
48 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Info ${color slate grey}${hr 2}${font}
49 | ${color1}Date ${alignr}${color slate grey}${time %a,}${color}${time %e %B %G}
50 | ${color1}Time ${alignr}${color}${time %T}
51 |
52 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}System ${color slate grey}${hr 2}${font}
53 | ${color1}Hostname ${alignr}${color}${nodename}
54 | ${color1}${sysname} ${alignr}${color}${kernel}-${machine}
55 | ${color1}CPU ${alignr}${color}${freq_g}GHz
56 | ${color1}Loadaverage ${alignr}${color}${loadavg 1} ${loadavg 2} ${loadavg 3}
57 | ${color1}Uptime ${alignr}${color}${uptime}
58 | ${color1}Battery Status ${alignr}${color}${battery_short BAT1}
59 | ${color1}Cpu Temperature ${alignr}${color}${acpitemp}C
60 | ${color1}Hdd Temperature ${alignr}${color}${hddtemp /dev/sda}C
61 |
62 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Processors ${color slate grey}${hr 2}${font}
63 | ${color1}Core 1 ${alignr}${color}${cpu cpu1}% ${cpubar cpu1}
64 | ${color1}Core 2 ${alignr}${color}${cpu cpu2}% ${cpubar cpu2}
65 |
66 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Memory ${color slate grey}${hr 2}${font}
67 | ${color1}Memory ${color}${alignr}${memeasyfree} / ${memmax}
68 | ${color1}Currently ${color}${alignr}${memperc}% ${membar}
69 |
70 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Filesystem ${color slate grey}${hr 2}${font}
71 | ${color1}/ ${color}${alignc}${fs_used /} / ${fs_size /} ${color}${alignr}${fs_free_perc /} %
72 | ${color}${fs_bar 5,300 /}
73 |
74 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Networking ${color slate grey}${hr 2}${font}
75 | ${if_existing /proc/net/route wlan0}${color1}Ip ${color}${alignr}${addr wlan0}
76 | ${color1}AP ${color}${alignr}${wireless_essid wlan0}
77 | ${color1}Signal ${color}${alignr}${wireless_link_qual_perc wlan0}${wireless_link_bar 10,100 wlan0}
78 | ${color1}Download ${alignr}${color}${downspeed wlan0}${downspeedgraph wlan0 10,100}
79 | ${color1}Upload ${alignr}${color}${upspeed wlan0}${upspeedgraph wlan0 10,100}
80 | ${color1}Total Down/Up ${alignr}${color}${totaldown wlan0}${color1}/${color}${totalup wlan0}
81 | ${else}${if_existing /proc/net/route eth0}${color1}Ip ${color}${alignr}${addr eth0}
82 | ${color1}Download ${alignr}${color}${downspeed eth0}${downspeedgraph eth0 10,100}
83 | ${color1}Upload ${alignr}${color}${upspeed eth0}${upspeedgraph eth0 10,100}
84 | ${color1}Total Down/Up ${alignr}${color}${totaldown eth0}${color1}/${color}${totalup eth0}${endif}${endif}
85 |
86 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Top Processes ${color slate grey}${hr 2}${font}
87 | ${color1}${top name 1} ${alignr}${color}${top cpu 1} ${top mem 1}
88 | ${color1}${top name 2} ${alignr}${color}${top cpu 2} ${top mem 2}
89 | ${color1}${top name 3} ${alignr}${color}${top cpu 3} ${top mem 3}
90 | ${color1}${top name 4} ${alignr}${color}${top cpu 4} ${top mem 4}
91 | ${color1}${top name 5} ${alignr}${color}${top cpu 5} ${top mem 5}
92 |
--------------------------------------------------------------------------------
/conky/conky_nolaptop.conf:
--------------------------------------------------------------------------------
1 | # Kde settings
2 | #own_window yes
3 | #own_window_transparent yes
4 | #own_window_argb_visual yes
5 | #own_window_type normal
6 | #own_window_class conky-semi
7 | #own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
8 | #background no
9 |
10 | use_xft yes
11 | xftfont Terminus:size=8
12 | xftalpha 0.8
13 | update_interval 2.0
14 | total_run_times 0
15 | own_window yes
16 | own_window_transparent yes
17 | own_window_argb_visual yes
18 | own_window_type normal
19 | own_window_class conky-semi
20 | own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
21 | background no
22 | double_buffer yes
23 | minimum_size 300 200
24 | draw_shades no
25 | draw_outline no
26 | draw_borders no
27 | draw_graph_borders yes
28 | default_shade_color black
29 | default_outline_color white
30 | default_bar_size 150 5
31 | default_gauge_size 20 20
32 | imlib_cache_size 0
33 | draw_shades no
34 | alignment top_right
35 | gap_x 5
36 | gap_y 35
37 | no_buffers yes
38 | uppercase no
39 | cpu_avg_samples 2
40 | override_utf8_locale no
41 | default_color ECEAE4
42 | color1 9f907d
43 | color2 01C400
44 |
45 |
46 |
47 | TEXT
48 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Info ${color slate grey}${hr 2}${font}
49 | ${color1}Date ${alignr}${color slate grey}${time %a,}${color}${time %e %B %G}
50 | ${color1}Time ${alignr}${color}${time %T}
51 |
52 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}System ${color slate grey}${hr 2}${font}
53 | ${color1}Hostname ${alignr}${color}${nodename}
54 | ${color1}${sysname} ${alignr}${color}${kernel}-${machine}
55 | ${color1}CPU ${alignr}${color}${freq_g}GHz
56 | ${color1}Loadaverage ${alignr}${color}${loadavg 1} ${loadavg 2} ${loadavg 3}
57 | ${color1}Uptime ${alignr}${color}${uptime}
58 | ${color1}Cpu Temperature${alignr}${color}${acpitemp}C
59 | ${color1}Hdd Temperature${alignr}${color}${hddtemp /dev/sda}C
60 |
61 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Processors ${color slate grey}${hr 2}${font}
62 | ${color1}Core 1 ${alignr}${color}${cpu cpu1}% ${cpubar cpu1}
63 | ${color1}Core 2 ${alignr}${color}${cpu cpu2}% ${cpubar cpu2}
64 | ${color1}Core 3 ${alignr}${color}${cpu cpu3}% ${cpubar cpu3}
65 | ${color1}Core 4 ${alignr}${color}${cpu cpu4}% ${cpubar cpu4}
66 | ${color1}Core 5 ${alignr}${color}${cpu cpu5}% ${cpubar cpu5}
67 | ${color1}Core 6 ${alignr}${color}${cpu cpu6}% ${cpubar cpu6}
68 |
69 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Memory ${color slate grey}${hr 2}${font}
70 | ${color1}Memory ${color}${alignr}${memeasyfree} / ${memmax}
71 | ${color1}Currently ${color}${alignr}${memperc}% ${membar}
72 |
73 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Filesystem ${color slate grey}${hr 2}${font}
74 | ${color1}/ ${color}${alignc}${fs_used /} / ${fs_size /} ${color}${alignr}${fs_free_perc /} %
75 | ${color}${fs_bar 5,300 /}
76 |
77 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Networking ${color slate grey}${hr 2}${font}
78 | ${if_existing /proc/net/route wlan0}${color1}Ip ${color}${alignr}${addr wlan0}
79 | ${color1}AP ${color}${alignr}${wireless_essid wlan0}
80 | ${color1}Signal ${color}${alignr}${wireless_link_qual_perc wlan0}${wireless_link_bar 10,100 wlan0}
81 | ${color1}Download ${alignr}${color}${downspeed wlan0}${downspeedgraph wlan0 10,100}
82 | ${color1}Upload ${alignr}${color}${upspeed wlan0}${upspeedgraph wlan0 10,100}
83 | ${color1}Total Down/Up ${alignr}${color}${totaldown wlan0}${color1}/${color}${totalup wlan0}
84 | ${else}${if_existing /proc/net/route eth0}${color1}Ip ${color}${alignr}${addr eth0}
85 | ${color1}Download ${alignr}${color}${downspeed eth0}${downspeedgraph eth0 10,100}
86 | ${color1}Upload ${alignr}${color}${upspeed eth0}${upspeedgraph eth0 10,100}
87 | ${color1}Total Down/Up ${alignr}${color}${totaldown eth0}${color1}/${color}${totalup eth0}${endif}${endif}
88 |
89 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Top Processes ${color slate grey}${hr 2}${font}
90 | ${color1}${top name 1} ${alignr}${color}${top cpu 1} ${top mem 1}
91 | ${color1}${top name 2} ${alignr}${color}${top cpu 2} ${top mem 2}
92 | ${color1}${top name 3} ${alignr}${color}${top cpu 3} ${top mem 3}
93 | ${color1}${top name 4} ${alignr}${color}${top cpu 4} ${top mem 4}
94 | ${color1}${top name 5} ${alignr}${color}${top cpu 5} ${top mem 5}
95 |
96 |
--------------------------------------------------------------------------------
/conky/conky_work.conf:
--------------------------------------------------------------------------------
1 | use_xft yes
2 | xftfont Terminus:size=8
3 | xftalpha 0.8
4 | update_interval 2.0
5 | total_run_times 0
6 | own_window yes
7 | own_window_transparent yes
8 | own_window_argb_visual yes
9 | own_window_type normal
10 | own_window_class conky-semi
11 | own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
12 | background no
13 | double_buffer yes
14 | minimum_size 300 400
15 | maximum_width 350
16 | draw_shades no
17 | draw_outline no
18 | draw_borders no
19 | draw_graph_borders yes
20 | default_shade_color black
21 | default_outline_color white
22 | default_bar_size 150 5
23 | default_gauge_size 20 20
24 | imlib_cache_size 0
25 | draw_shades no
26 | alignment top_right
27 | gap_x 5
28 | gap_y 15
29 | no_buffers yes
30 | uppercase no
31 | cpu_avg_samples 2
32 | override_utf8_locale no
33 | default_color ECEAE4
34 | color1 9F907D
35 | color2 01C400
36 | color3 7A9C48
37 | color4 9C4848
38 |
39 | TEXT
40 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Info ${color slate grey}${hr 2}${font}
41 | ${color1}Date ${alignr}${color slate grey}${time %a,}${color}${time %e %B %G}
42 | ${color1}Time ${alignr}${color}${time %T}
43 |
44 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}System ${color slate grey}${hr 2}${font}
45 | ${color1}Hostname ${alignr}${color}${nodename}
46 | ${color1}${sysname} ${alignr}${color}${kernel}-${machine}
47 | ${color1}CPU ${alignr}${color}${freq_g}GHz
48 | ${color1}Loadaverage ${alignr}${color}${loadavg 1} ${loadavg 2} ${loadavg 3}
49 | ${color1}Uptime ${alignr}${color}${uptime}
50 | ${color1}Cpu Temperature ${alignr}${color}${execi 10 sensors | grep 'Core 0:' | awk '{print $3}' | sed 's/°//g'}
51 |
52 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Processors ${color slate grey}${hr 2}${font}
53 | ${color1}Core 1 ${alignr}${color}${cpu cpu1}% ${cpubar cpu1}
54 | ${color1}Core 2 ${alignr}${color}${cpu cpu2}% ${cpubar cpu2}
55 | ${color1}Core 3 ${alignr}${color}${cpu cpu3}% ${cpubar cpu3}
56 | ${color1}Core 4 ${alignr}${color}${cpu cpu4}% ${cpubar cpu4}
57 |
58 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Memory ${color slate grey}${hr 2}${font}
59 | ${color1}Memory ${color}${alignr}${memeasyfree} / ${memmax}
60 | ${color1}Currently ${color}${alignr}${memperc}% ${membar}
61 |
62 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Filesystem ${color slate grey}${hr 2}${font}
63 | ${color1}/ ${color}${alignc}${fs_used /} / ${fs_size /} ${color}${alignr}${fs_free_perc /} %
64 | ${color}${fs_bar 5,300 /}
65 |
66 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Networking ${color slate grey}${hr 2}${font}
67 | ${color1}Ip ${alignr}${color}${addr eth0}
68 | ${color1}Download ${alignr}${color}${downspeed eth0}${downspeedgraph eth0 10,100}
69 | ${color1}Upload ${alignr}${color}${upspeed eth0}${upspeedgraph eth0 10,100}
70 | ${color1}Total Down/Up ${alignr}${color}${totaldown eth0}${color1}/${color}${totalup eth0}
71 |
72 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Top Processes ${color slate grey}${hr 2}${font}
73 | ${color1}${top name 1} ${alignr}${color}${top cpu 1} ${top mem 1}
74 | ${color1}${top name 2} ${alignr}${color}${top cpu 2} ${top mem 2}
75 | ${color1}${top name 3} ${alignr}${color}${top cpu 3} ${top mem 3}
76 | ${color1}${top name 4} ${alignr}${color}${top cpu 4} ${top mem 4}
77 | ${color1}${top name 5} ${alignr}${color}${top cpu 5} ${top mem 5}
78 |
79 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Messages ${color slate grey}${hr 2}${font}
80 | ${color1}${execpi 15 tail -n 10 /var/log/syslog | awk -F`hostname`' ' '{print $2}'}
81 |
82 | ${font AvantGardeLTMedium:bold:size=10}${color Tan1}Server Monitoring ${color slate grey}${hr 2}${font}
83 | ${color}bbs-nexus ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-nexus.ipsw.dt.ept.lu}
84 | ${color}bbs-goon ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-goon.ipsw.dt.ept.lu}
85 | ${color}bbs-arbiter ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-arbiter.ipsw.dt.ept.lu}
86 | ${color}bbs-evolution ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-evolution.ipsw.dt.ept.lu}
87 | ${color}bbs-overmind ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-overmind.ipsw.dt.ept.lu}
88 | ${color}bbs-pylon ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-pylon.ipsw.dt.ept.lu}
89 | ${color}bbs-iperf ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-iperf.ipsw.dt.ept.lu}
90 | ${color}bbs-sam-a ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-sam-a.ipsw.dt.ept.lu}
91 | ${color}bbs-sam-b ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-sam-b.ipsw.dt.ept.lu}
92 | ${color}bbs-sam-test ${alignr}${execpi 10 ~/bin/pingtest.sh bbs-sam-test.ipsw.dt.ept.lu}
93 |
--------------------------------------------------------------------------------
/cookiecutter/env.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | pip3 install --user cookiecutter
3 |
--------------------------------------------------------------------------------
/cookiecutter/python/cookiecutter.json:
--------------------------------------------------------------------------------
1 | {
2 | "app_name": "foobar",
3 | "app_description": "Foobar description",
4 | "app_longdescription": "Foobar full description"
5 | }
6 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 | MANIFEST
27 |
28 | # PyInstaller
29 | # Usually these files are written by a python script from a template
30 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
31 | *.manifest
32 | *.spec
33 |
34 | # Installer logs
35 | pip-log.txt
36 | pip-delete-this-directory.txt
37 |
38 | # Unit test / coverage reports
39 | htmlcov/
40 | .tox/
41 | .nox/
42 | .coverage
43 | .coverage.*
44 | .cache
45 | nosetests.xml
46 | coverage.xml
47 | *.cover
48 | .hypothesis/
49 | .pytest_cache/
50 |
51 | # Translations
52 | *.mo
53 | *.pot
54 |
55 | # Django stuff:
56 | *.log
57 | local_settings.py
58 | db.sqlite3
59 |
60 | # Flask stuff:
61 | instance/
62 | .webassets-cache
63 |
64 | # Scrapy stuff:
65 | .scrapy
66 |
67 | # Sphinx documentation
68 | doc/_build/
69 |
70 | # PyBuilder
71 | target/
72 |
73 | # Jupyter Notebook
74 | .ipynb_checkpoints
75 |
76 | # IPython
77 | profile_default/
78 | ipython_config.py
79 |
80 | # pyenv
81 | .python-version
82 |
83 | # celery beat schedule file
84 | celerybeat-schedule
85 |
86 | # SageMath parsed files
87 | *.sage.py
88 |
89 | # Environments
90 | .env
91 | .venv
92 | env/
93 | venv/
94 | ENV/
95 | env.bak/
96 | venv.bak/
97 |
98 | # Spyder project settings
99 | .spyderproject
100 | .spyproject
101 |
102 | # Rope project settings
103 | .ropeproject
104 |
105 | # mkdocs documentation
106 | /site
107 |
108 | # mypy
109 | .mypy_cache/
110 | .dmypy.json
111 | dmypy.json
112 |
113 | # Pyre type checker
114 | .pyre/
115 |
116 | # Project specific
117 | .~lock.*
118 | *.swp
119 | my__*.*
120 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
3 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/.ycm_extra_conf.py:
--------------------------------------------------------------------------------
1 | def Settings(**kwargs):
2 | return {
3 | 'interpreter_path': './env/bin/python'
4 | }
5 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## 0.0.0
4 | ### Fixed
5 | - FOOBAR
6 |
7 | ### Added
8 | - FOOBAZ
9 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include README.rst
2 | include {{ cookiecutter.app_name }}/version.txt
3 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/README.rst:
--------------------------------------------------------------------------------
1 | {{ cookiecutter.app_name|title }}
2 | ============
3 |
4 | {{ cookiecutter.app_longdescription }}
5 |
6 |
7 | Overview
8 | --------
9 |
10 |
11 | Installation
12 | ------------
13 |
14 | To install using pip:
15 |
16 | ::
17 |
18 | $ pip install {{ cookiecutter.app_name }}
19 |
20 |
21 | Example
22 | -------
23 |
24 | TBD
25 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/fabfile.py:
--------------------------------------------------------------------------------
1 | import os
2 | import re
3 | import sys
4 | from collections import namedtuple
5 | from configparser import ConfigParser
6 | from datetime import datetime
7 | from fileinput import input as finput
8 | from functools import partial
9 | from netrc import netrc
10 | from os import listdir
11 | from os.path import join
12 |
13 | from fabric import task
14 | from fabric.connection import Connection
15 |
16 | Credentials = namedtuple('Credentials', 'username, password')
17 |
18 | def get_package_name(conn):
19 | """Return package name"""
20 | localrun = partial(
21 | conn.run,
22 | replace_env=False, env={"PTYHON_WARNINGS": "ignore"}
23 | )
24 | result = localrun("env/bin/python setup.py --name")
25 | return result.stdout.strip("\n")
26 |
27 |
28 | def get_package_description(conn):
29 | """Return package description"""
30 | localrun = partial(
31 | conn.run,
32 | replace_env=False, env={"PTYHON_WARNINGS": "ignore"}
33 | )
34 | result = localrun("env/bin/python setup.py --description")
35 | return result.stdout.strip("\n")
36 |
37 |
38 | def get_version(conn):
39 | """Returns version of the package (dev if develop branch)"""
40 | localrun = partial(
41 | conn.run,
42 | replace_env=False, env={"PTYHON_WARNINGS": "ignore"}
43 | )
44 | branch_output = localrun("git rev-parse --abbrev-ref HEAD")
45 | branch = branch_output.stdout.strip("\n")
46 |
47 | if branch == 'develop':
48 | return "dev"
49 |
50 | version_output = localrun("./env/bin/python setup.py --version")
51 | return version_output.stdout.strip("\n")
52 |
53 | def get_credentials(sitename: str) -> Credentials:
54 | """Retrieves username and password from .netrc file"""
55 | netrc_instance = netrc()
56 | result = netrc_instance.authenticators(sitename)
57 | if not result:
58 | raise Exception("Please add your credentials to "
59 | "your ~/.netrc file for site %s" % sitename)
60 |
61 | return Credentials(result[0], result[2])
62 |
63 | @task
64 | def develop(conn):
65 | """Creates development environment"""
66 | localrun = partial(
67 | conn.run,
68 | replace_env=False, env={"PTYHON_WARNINGS": "ignore"}
69 | )
70 | localrun("[ -d env ] || python3 -m venv env")
71 | localrun("env/bin/pip install -U pip setuptools")
72 | localrun("env/bin/pip install wheel")
73 | localrun("env/bin/pip install -e .[test,dev,doc]")
74 |
75 |
76 | @task
77 | def publish(conn, executed_in_ci=False):
78 | """Publish to pyrepo"""
79 | localrun = partial(
80 | conn.run,
81 | replace_env=False, env={"PTYHON_WARNINGS": "ignore"}
82 | )
83 | verify_pip_config(conn, executed_in_ci=executed_in_ci)
84 |
85 | localrun("./env/bin/python setup.py clean")
86 | localrun("./env/bin/python setup.py bdist bdist_wheel")
87 | filename = localrun(
88 | "./env/bin/python setup.py --fullname").stdout.strip("\n")
89 |
90 | dist_file = "dist/%s-py3-none-any.whl" % (filename)
91 | localrun(
92 | "./env/bin/twine upload -r pypi.gefoo.org %s" % dist_file,
93 | )
94 |
95 |
96 | @task
97 | def doc(conn):
98 | """Builds doc"""
99 | conn.run("rm -Rf doc/_build/*")
100 | conn.run("rm -Rf doc/api-doc/*.rst")
101 | conn.run("find doc/ -name '*.rst' -exec touch {} \;")
102 | conn.run("./env/bin/sphinx-build --color -aE doc doc/_build", pty=True)
103 |
104 |
105 | @task
106 | def publish_doc(conn, username=None, password=None, branch='develop'):
107 | """Publishes doc to https://docs.gefoo.org"""
108 | if not username or not password:
109 | credentials = get_credentials("docs.gefoo.org")
110 | else:
111 | credentials = Credentials(username, password)
112 |
113 | doc(conn)
114 | conn.run("cd doc/_build && zip -r doc.zip *")
115 | package = get_package_name(conn)
116 | description = get_package_description(conn)
117 |
118 | print("Got branch %s" % branch)
119 | if branch and branch != "master":
120 | version = 'develop'
121 | else:
122 | version = get_version(conn)
123 |
124 | conn.run(
125 | """\
126 | cd doc/_build && \
127 | curl -X POST \
128 | --user {username}:{password} \
129 | -F filedata=@doc.zip \
130 | -F name="{package}" \
131 | -F version="{version}" \
132 | -F description="{description}" \
133 | https://docs.gefoo.org/hmfd
134 | """.format(username=credentials.username,
135 | password=credentials.password,
136 | package=package,
137 | version=version,
138 | description=description))
139 |
140 |
141 | @task
142 | def test(conn):
143 | """Run tests"""
144 | localrun = partial(
145 | conn.run,
146 | replace_env=False, env={"PTYHON_WARNINGS": "ignore"}
147 | )
148 | localrun("[ -d .pytest_cache ] && rm -Rf .pytest_cache")
149 | localrun(
150 | "env/bin/pytest-watch %s/ tests/ -- --lf --color yes" % (
151 | get_package_name(conn)
152 | )
153 | )
154 |
155 |
156 | @task
157 | def test_cov(conn):
158 | """Run tests with coverage checks"""
159 | localrun = partial(
160 | conn.run,
161 | replace_env=False, env={"PTYHON_WARNINGS": "ignore"}
162 | )
163 | localrun(
164 | "env/bin/py.test --cov=%s --cov-report=term" % get_package_name(conn))
165 |
166 |
167 | @task
168 | def test_covhtml(conn):
169 | """Run tests with coverage checks as html report"""
170 | localrun = partial(
171 | conn.run,
172 | replace_env=False, env={"PTYHON_WARNINGS": "ignore"}
173 | )
174 | localrun(
175 | "env/bin/py.test --cov=%s --cov-report=html" % get_package_name(conn))
176 |
177 |
178 | def verify_pip_config(conn, executed_in_ci=False):
179 | """
180 | Verifies if your pip configuration contains `pypi.gefoo.org` and sets
181 | credentials if executed in CI
182 | """
183 | # Skip this check when executed in CI, we are probably relying on
184 | # Environment Variables
185 | if executed_in_ci:
186 | twine_env_vars = [
187 | 'TWINE_USERNAME',
188 | 'TWINE_PASSWORD',
189 | 'TWINE_REPOSITORY',
190 | ]
191 | for twine_env_var in twine_env_vars:
192 | if not os.environ.get(twine_env_var):
193 | print("Make sure you have %r set" % (twine_env_var))
194 | return
195 |
196 | result = conn.run("cat ~/.pypirc | grep -e \"^\[pypi.gefoo.org\]$\"")
197 | if result.exited != 0:
198 | raise Exception(
199 | "pypi.gefoo.org repository is not configured in your ~/.pypirc")
200 | return
201 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/pytest.ini:
--------------------------------------------------------------------------------
1 | [pytest]
2 | log_cli = 0
3 | log_cli_level = DEBUG
4 | log_cli_format = %(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)
5 | log_cli_date_format=%Y-%m-%d %H:%M:%S
6 |
7 | norecursedirs = .git env log
8 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup, find_packages
2 | from os.path import join
3 |
4 | NAME = "{{ cookiecutter.app_name }}"
5 | DESCRIPTION = "{{ cookiecutter.app_description }}"
6 | AUTHOR = "Frank Lazzarini"
7 | AUTHOR_EMAIL = "flazzarini@gmail.com"
8 | VERSION = open(join(NAME, "version.txt")).read().strip()
9 | LONG_DESCRIPTION = open("README.rst").read()
10 |
11 | setup(
12 | name=NAME,
13 | version=VERSION,
14 | description=DESCRIPTION,
15 | long_description=LONG_DESCRIPTION,
16 | author=AUTHOR,
17 | author_email=AUTHOR_EMAIL,
18 | license="Private",
19 | include_package_data=True,
20 | install_requires=[
21 | "requests >=2.18.4, <3.0",
22 | ],
23 | entry_points={
24 | "console_scripts": []
25 | },
26 | extras_require={
27 | "dev": [
28 | "sphinx",
29 | "sphinx-rtd-theme",
30 | ],
31 | "test": [
32 | "pylint",
33 | "pyroma",
34 | "pytest",
35 | "pytest-cov",
36 | "pytest-xdist",
37 | "radon",
38 | ]
39 | },
40 | dependency_links=[],
41 | packages=find_packages(exclude=["tests.*", "tests"]),
42 | zip_safe=False,
43 | classifiers=[
44 | "Programming Language :: Python :: 3 :: Only",
45 | "Programming Language :: Python :: 3.5",
46 | ],
47 | )
48 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/sonar-project.properties:
--------------------------------------------------------------------------------
1 | sonar.projectKey = {{ cookiecutter.app_name }}
2 | sonar.projectName = {{ cookiecutter.app_name }}
3 |
4 | sonar.host.url = https://sonarqube.gefoo.org
5 |
6 | sonar.sources = {{ cookiecutter.app_name }}/
7 | sonar.language = py
8 | sonar.exclusions = *.xml
9 |
10 | sonar.python.pylint = ./env/bin/pylint
11 | sonar.python.pylint.reportPath = pylint-report.txt
12 |
13 | sonar.python.coverage.reportPath=coverage.xml
14 |
15 | sonar.coverage.exclusions = **__init__**,tests/**
16 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/flazzarini/dotfiles/b7b1cee45cdfefad422b39bfe60f7828f90342cc/cookiecutter/python/{{ cookiecutter.app_name }}/tests/__init__.py
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/tests/test_sample.py:
--------------------------------------------------------------------------------
1 | import unittest
2 |
3 |
4 | class TestSample(unittest.TestCase):
5 | def test_true(self):
6 | self.assertTrue(True)
7 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/tox.ini:
--------------------------------------------------------------------------------
1 | [tox]
2 | minversion=2.3.1
3 | envlist = py37,py38,flake8,linters,docs
4 |
5 | [testenv]
6 | deps =
7 | pytest
8 | commands =
9 | pytest
10 |
11 | # Release tooling
12 | [testenv:build]
13 | basepython = python3
14 | skip_install = true
15 | deps =
16 | wheel
17 | setuptools
18 | commands =
19 | python setup.py -q sdist bdist_wheel
20 |
21 | # Flake8 Configuration
22 | [flake8]
23 | # Ignore some flake8-docstrings errors
24 | # NOTE(sigmavirus24): While we're still using flake8 2.x, this ignore line
25 | # defaults to selecting all other errors so we do not need select=E,F,W,I,D
26 | # Once Flake8 3.0 is released and in a good state, we can use both and it will
27 | # work well \o/
28 | ignore = D203, W503, E203
29 | exclude =
30 | .tox,
31 | .git,
32 | __pycache__,
33 | build,
34 | dist,
35 | tests/*,
36 | *.pyc,
37 | *.egg-info,
38 | .cache,
39 | .eggs
40 | max-complexity = 10
41 | import-order-style = google
42 | application-import-names = {{ cookiecutter.app_name }}
43 | format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
44 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/{{ cookiecutter.app_name }}/__init__.py:
--------------------------------------------------------------------------------
1 | import logging
2 | import pkg_resources
3 |
4 | __version__ = pkg_resources.resource_string(__name__, "version.txt").strip()
5 | LOG = logging.getLogger(__name__)
6 |
--------------------------------------------------------------------------------
/cookiecutter/python/{{ cookiecutter.app_name }}/{{ cookiecutter.app_name }}/version.txt:
--------------------------------------------------------------------------------
1 | 1.0
2 |
--------------------------------------------------------------------------------
/digrc:
--------------------------------------------------------------------------------
1 | +nostats +nocomments +nocmd +noquestion +recurse
2 |
--------------------------------------------------------------------------------
/docs/compile_vim.rst:
--------------------------------------------------------------------------------
1 | Vim Compilation Notes
2 | =====================
3 |
4 | * ./configure --enable-python3interp --enable-perlinterp --prefix=/home/users/frank/opt/vim
5 | * make
6 | * make install
7 |
--------------------------------------------------------------------------------
/fabric-completion.bash:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Bash completion support for Fabric (http://fabfile.org/)
4 | #
5 | # https://stackoverflow.com/questions/31810895/how-can-i-create-command-autocompletion-for-fabric
6 | #
7 |
8 | _fab() {
9 | local cur
10 | COMPREPLY=()
11 | # Variable to hold the current word
12 | cur="${COMP_WORDS[COMP_CWORD]}"
13 |
14 | # Build a list of the available tasks
15 | local cmds=$(fab --complete 2>/dev/null)
16 |
17 | # Generate possible matches and store them in the
18 | # array variable COMPREPLY
19 | COMPREPLY=($(compgen -W "${cmds}" $cur))
20 | }
21 |
22 | # Assign the auto-completion function for our command.
23 | complete -F _fab fab
24 |
--------------------------------------------------------------------------------
/gitconfig_home:
--------------------------------------------------------------------------------
1 | [user]
2 | name = Frank Lazzarini
3 | email = flazzarini@gmail.com
4 |
5 | [color]
6 | ui = auto
7 | diff = auto
8 | status = auto
9 | branch = auto
10 | branchdfh = auto
11 | grep = auto
12 |
13 | [alias]
14 | st = status -s
15 | co = checkout
16 | ci = commit
17 |
18 | ; Show abbreviated log with a branch graph
19 | lg = log --all -n20 --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
20 | lga = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
21 | lgl = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
22 | ; Show abbreviated log with timestamps
23 | sl = log --pretty=format:'%Cgreen%ai%Cblue %h%Creset %s'
24 | ; Show log detailed history
25 | lgd = log --stat --abbrev-commit
26 | ; Show summary (git tags/branches)
27 | lgs = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --simplify-by-decoration
28 | ; Show last 10 tags
29 | tagl = ! git tag --sort=-version:refname | head -n 10
30 |
31 |
32 | [tag]
33 | ; Sort tags by version
34 | sort = v:refname
35 |
36 | [core]
37 | excludesfile = ~/.gitignore
38 | editor=vim
39 |
40 |
41 | [diff]
42 | tool=vimdiff
43 |
44 |
45 | [difftool]
46 | ; don't always ask for confirmation to open the diff tool
47 | prompt = false
48 |
49 |
50 | [push]
51 | ; By default, push to the tracking remote.
52 | default = tracking
53 |
54 |
55 | ; vi: ft=gitconfig
56 | [filter "lfs"]
57 | clean = git-lfs clean -- %f
58 | smudge = git-lfs smudge -- %f
59 | process = git-lfs filter-process
60 | required = true
61 |
--------------------------------------------------------------------------------
/gitconfig_work:
--------------------------------------------------------------------------------
1 | [user]
2 | name = Frank Lazzarini
3 | email = frank.lazzarini@post.lu
4 |
5 | ;
6 | ; Automatically colorize console output
7 | ;
8 | [color]
9 | diff = auto
10 | status = auto
11 | branch = auto
12 | branchdfh = auto
13 | grep = auto
14 |
15 | ;
16 | ; Aliases
17 | ;
18 | [alias]
19 | ; simple shortcuts
20 | st = status -sb
21 | co = checkout
22 | ci = commit
23 |
24 | ; Show abbreviated log with a branch graph
25 | lg = log --all -n20 --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
26 | lga = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
27 | lgl = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
28 | ; Show abbreviated log with timestamps
29 | sl = log --pretty=format:'%Cgreen%ai%Cblue %h%Creset %s'
30 | ; Show log detailed history
31 | lgd = log --stat --abbrev-commit
32 | ; Show summary (git tags/branches)
33 | lgs = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --simplify-by-decoration
34 | ; Show last 10 tags
35 | tagl = ! git tag --sort=-version:refname | head -n 10
36 |
37 | [core]
38 | ; my global ignores file
39 | excludesfile = ~/.gitignore
40 |
41 | ; Let's use vim as the default editor
42 | editor=nvim
43 |
44 | [tag]
45 | ; Sort tags by version
46 | sort = v:refname
47 |
48 | [diff]
49 | ; ... and vimdiff as diff tool
50 | tool=vimdiff
51 |
52 | [pull]
53 | ff = only
54 |
55 |
56 | [difftool]
57 | ; don't always ask for confirmation to open the diff tool
58 | prompt = false
59 |
60 |
61 | [push]
62 | ; By default, push to the tracking remote.
63 | default = tracking
64 |
65 |
66 | [submodule]
67 | recurse = true
68 |
69 |
70 | [url "https://"]
71 | ; Redirect git:// to https:// (git:// not working at work)
72 | insteadOf = git://
73 |
74 | ; vi: ft=gitconfig
75 | [credential "https://github.com"]
76 | helper =
77 | helper = !/home/users/frank/.local/bin/gh auth git-credential
78 | [safe]
79 | directory = /mnt/local/nfs-exports/configsaver_files
80 |
--------------------------------------------------------------------------------
/host_specific.d/BBS-nexus.ipsw.dt.ept.lu.sh:
--------------------------------------------------------------------------------
1 | # Host specific environment variables for BBS-nexus.ipsw.dt.ept.lu
2 | export DEVOPS_PATH="$HOME/devops"
3 |
4 |
5 | # ANSIBLE variables
6 | # -----------------------------------------------------------------------------
7 | #
8 | # Folder variables
9 | export ANSIBLE_ROOT="$DEVOPS_PATH/ansible"
10 | export ANSIBLE_CONFIG_ROOT="$ANSIBLE_ROOT/config"
11 | export ANSIBLE_HOME="$ANSIBLE_ROOT/ansible"
12 |
13 | # ACTUAL ANSIBLE CONFIGS
14 | export ANSIBLE_CONFIG="$ANSIBLE_CONFIG_ROOT/ansible.cfg"
15 | export ANSIBLE_VAULT_PASSWORD_FILE="$ANSIBLE_CONFIG_ROOT/vault_password"
16 | export TOWER_HOST="https://awx.dtt.ptech.lu"
17 |
18 |
19 | # Development variables
20 | # -----------------------------------------------------------------------------
21 | #
22 | export DEVELOPMENT_PORTS=50020,50030
23 |
24 |
25 | # Postgresql Env Vars
26 | # -----------------------------------------------------------------------------
27 | #
28 | export PGUSER="ti11642"
29 | export PGPASS="$HOME/.pgpass"
30 |
31 | # TMP Config
32 | # -----------------------------------------------------------------------------
33 | #
34 | export TMPDIR=/tmp/frank
35 |
36 |
37 |
--------------------------------------------------------------------------------
/host_specific.d/coss-dev01.dtt.ptech.lu.sh:
--------------------------------------------------------------------------------
1 | # Host specific environment variables for BBS-nexus.ipsw.dt.ept.lu
2 | export DEVOPS_PATH="$HOME/devops"
3 |
4 |
5 | # ANSIBLE variables
6 | # -----------------------------------------------------------------------------
7 | #
8 | # Folder variables
9 | export ANSIBLE_ROOT="$DEVOPS_PATH/ansible"
10 | export ANSIBLE_CONFIG_ROOT="$ANSIBLE_ROOT/config"
11 | export ANSIBLE_HOME="$ANSIBLE_ROOT/ansible"
12 |
13 | # ACTUAL ANSIBLE CONFIGS
14 | export ANSIBLE_CONFIG="$ANSIBLE_CONFIG_ROOT/ansible.cfg"
15 | export ANSIBLE_VAULT_PASSWORD_FILE="$ANSIBLE_CONFIG_ROOT/vault_password"
16 | export TOWER_HOST="https://awx.dtt.ptech.lu"
17 |
18 |
19 | # Development variables
20 | # -----------------------------------------------------------------------------
21 | #
22 | export DEVELOPMENT_PORTS=50020,50030
23 |
24 |
25 | # Postgresql Env Vars
26 | # -----------------------------------------------------------------------------
27 | #
28 | export PGUSER="ti11642"
29 | export PGPASS="$HOME/.pgpass"
30 |
31 | # TMP Config
32 | # -----------------------------------------------------------------------------
33 | #
34 | export TMPDIR=/tmp/frank
35 |
36 | # Openshift configuration
37 | # -----------------------------------------------------------------------------
38 | #
39 | export OC_EDITOR=nvim
40 |
--------------------------------------------------------------------------------
/host_specific.d/proxmox:
--------------------------------------------------------------------------------
1 | proxmox.gefoo.org
--------------------------------------------------------------------------------
/host_specific.d/proxmox.gefoo.org:
--------------------------------------------------------------------------------
1 | # Host specific environment variables for proxmox.gefoo.org
2 |
3 | # ANSIBLE variables
4 | # -----------------------------------------------------------------------------
5 | #
6 | export ANSIBLE_HOME="$HOME/workspace/ansible"
7 | export ANSIBLE_CONFIG="$ANSIBLE_HOME/ansible.cfg"
8 | export ANSIBLE_VAULT_PASSWORD_FILE="$HOME/.vault_password"
9 |
--------------------------------------------------------------------------------
/host_specific.d/w10ptech166.sh:
--------------------------------------------------------------------------------
1 | # Host specific environment variables for w10ptech166
2 | export DISPLAY=:0
3 |
--------------------------------------------------------------------------------
/i3/config:
--------------------------------------------------------------------------------
1 | # i3 config
2 | #
3 | # --> https://gist.github.com/1817571
4 | # --> http://i3wm.org/docs/userguide.html
5 | #
6 |
7 |
8 | # Apparence
9 | # ------------------------------------------------------------------------------
10 |
11 | font xft:Droid Sans Mono 9
12 |
13 | # Colors border backgrd text
14 | #client.focused #9fbc00 #9fbc00 #111111
15 | client.focused #252525 #252525 #cccccc
16 | client.unfocused #444444 #444444 #315858
17 | client.focused_inactive #444444 #444444 #9b9bab
18 | client.urgent #383a3b #383a3b #ee0000
19 |
20 | new_window pixel 1
21 | new_float pixel 2
22 |
23 |
24 | # i3Bar Settings
25 | bar {
26 | # status_command ~/.i3/scripts/conky-wrapper.sh
27 | status_command py3status -c ~/.i3/i3status.conf
28 | position bottom
29 | font xft:Droid Sans Mono 9
30 | workspace_buttons yes
31 |
32 | colors {
33 | background #161616
34 | statusline #605c5a
35 | focused_workspace #161616 #909737 #ffffff
36 | active_workspace #161616 #161616 #a5a5a5
37 | inactive_workspace #161616 #545454 #a5a5a5
38 | urgent_workspace #161616 #545454 #a5a5a5
39 | }
40 | }
41 |
42 |
43 | # Window class settings
44 | for_window [class="Roxterm"] border 1pixel
45 | for_window [class="XTerm"] border 1pixel
46 | for_window [class="URxvt"] border 1pixel
47 | for_window [class="mplayer"] border none
48 | for_window [class="Chromium-browser"] border none
49 | for_window [class="Chromium"] border none
50 | for_window [class="Firefox"] border none
51 | for_window [class="vlc"] border none
52 | for_window [class="VirtualBox"] floating enabled
53 | for_window [class="Stream"] floating enabled
54 | for_window [class="winff"] floating enabled
55 | for_window [class="Thunar"] floating enabled
56 | for_window [class="Pavucontrol"] floating enabled
57 | for_window [class="jive"] floating enabled
58 | for_window [class="winbox.exe"] border pixel 1
59 | for_window [title="Hangouts - flazzarini@gmail.com"] move container to workspace "[3] hangouts"
60 | for_window [window_role="pop-up"] floating enabled
61 |
62 |
63 |
64 | # General settings
65 | # ------------------------------------------------------------------------------
66 | set $term roxterm
67 | set $mod Mod4
68 |
69 |
70 | # Bindings
71 | #
72 | # xev | grep -A2 --line-buffered '^KeyRelease' | \
73 | # sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
74 | #
75 | # ------------------------------------------------------------------------------
76 | bindsym $mod+d exec PATH=$PATH:$HOME/bin dmenu_run -p "Run:" -nb "#0F0F0F" -nf "#F5DEB3" -sb "#4C7899" -fn "Droid Sans Mono 9"
77 | bindsym $mod+c exec $term
78 | bindsym $mod+Return exec $term
79 | bindsym $mod+l exec xscreensaver-command -lock
80 | bindsym $mod+p exec ~/.i3/scripts/jukebox_listen.sh
81 | bindsym $mod+m exec ~/.i3/scripts/toggle_touchpad.sh
82 | bindsym $mod+e exec thunar
83 |
84 |
85 | bindcode 121 exec amixer -q sset Master toggle
86 | bindcode 122 exec amixer -q sset Master 5%-
87 | bindcode 123 exec amixer -q sset Master 5%+
88 | bindsym $mod+Shift+a exec "pavucontrol"
89 | bindsym $mod+Shift+s exec "arandr"
90 |
91 |
92 | # Workspace Names
93 | # ------------------------------------------------------------------------------
94 | workspace "[1] dev" output LVDS1
95 | workspace "[2] www" output LVDS1
96 | workspace "[3] hangouts" output LVDS1
97 | workspace "[4] misc" output LVDS1
98 | workspace "[5] dwld" output LVDS1
99 |
100 | # Autostart stuff
101 | # ------------------------------------------------------------------------------
102 | exec --no-startup-id compton --config ~/.config/compton.conf
103 | exec --no-startup-id exec ~/.i3/scripts/wallpapers.sh
104 | exec --no-startup-id xscreensaver -no-splash
105 | exec --no-startup-id thunar --daemon
106 | exec --no-startup-id /usr/bin/volumeicon
107 | #exec --no-startup-id ~/bin/update-grive.sh
108 | #exec --no-startup-id exec ~/bin/update-grive.sh
109 | #exec --no-startup-id i3-msg 'workspace 3'; exec ~/.i3/scripts/tmux-chat.sh; workspace 1
110 |
111 | # Quake Style Terminal Emulator
112 | exec --no-startup-id xterm -name qterm
113 | for_window [instance="qterm"] floating enable;
114 | for_window [instance="qterm"] move scratchpad; [instance="qterm"] scratchpad show; move position 0px 22px; resize shrink height 300px; resize grow width 683px; move scratchpad
115 | bindsym $mod+t [instance="qterm"] scratchpad show
116 |
117 |
118 | # Use Mouse+$mod to drag floating windows to their wanted position
119 | floating_modifier $mod
120 |
121 | # kill focused window
122 | bindsym $mod+Shift+Q kill
123 |
124 | # alternatively, you can use the cursor keys:
125 | bindsym $mod+Left focus left
126 | bindsym $mod+Down focus down
127 | bindsym $mod+Up focus up
128 | bindsym $mod+Right focus right
129 |
130 | # move focused window
131 | bindsym $mod+Shift+J move left
132 | bindsym $mod+Shift+K move down
133 | bindsym $mod+Shift+L move up
134 | bindsym $mod+Shift+colon move right
135 |
136 | # alternatively, you can use the cursor keys:
137 | bindsym $mod+Shift+Left move left
138 | bindsym $mod+Shift+Down move down
139 | bindsym $mod+Shift+Up move up
140 | bindsym $mod+Shift+Right move right
141 |
142 | # split in horizontal orientation
143 | bindsym $mod+h split h
144 |
145 | # split in vertical orientation
146 | bindsym $mod+v split v
147 |
148 | # enter fullscreen mode for the focused container
149 | bindsym $mod+f fullscreen
150 |
151 | # change container layout (stacked, tabbed, default)
152 | #bindsym $mod+s layout stacking
153 | #bindsym $mod+w layout tabbed
154 | #bindsym $mod+e layout default
155 |
156 | # toggle tiling / floating
157 | bindsym $mod+Shift+space floating toggle
158 |
159 | # change focus between tiling / floating windows
160 | bindsym $mod+space focus mode_toggle
161 |
162 | # switch to workspace
163 | bindsym $mod+1 workspace "[1] dev"
164 | bindsym $mod+2 workspace "[2] www"
165 | bindsym $mod+3 workspace "[3] hangouts"
166 | bindsym $mod+4 workspace "[4] misc"
167 | bindsym $mod+5 workspace "[5] dwld"
168 | bindsym $mod+6 workspace 6
169 | bindsym $mod+7 workspace 7
170 | bindsym $mod+8 workspace 8
171 | bindsym $mod+9 workspace 9
172 | bindsym $mod+0 workspace 10
173 |
174 | # Move window to specific workspace
175 | bindsym $mod+Shift+1 move workspace "[1] dev"
176 | bindsym $mod+Shift+2 move workspace "[2] www"
177 | bindsym $mod+Shift+3 move workspace "[3] hangouts"
178 | bindsym $mod+Shift+4 move workspace "[4] misc"
179 | bindsym $mod+Shift+5 move workspace "[5] dwld"
180 |
181 |
182 | bindsym $mod+Ctrl+Right workspace next
183 | bindsym $mod+Ctrl+Left workspace prev
184 |
185 | # move focused container to workspace
186 | bindsym $mod+Shift+exclam move workspace 1
187 | bindsym $mod+Shift+quotedbl move workspace 2
188 | bindsym $mod+Shift+sterling move workspace 3
189 | bindsym $mod+Shift+dollar move workspace 4
190 | bindsym $mod+Shift+percent move workspace 5
191 | bindsym $mod+Shift+asciicircum move workspace 6
192 | bindsym $mod+Shift+ampersand move workspace 7
193 | bindsym $mod+Shift+asterisk move workspace 8
194 | bindsym $mod+Shift+parenleft move workspace 9
195 | bindsym $mod+Shift+parenright move workspace 10
196 |
197 | # reload the configuration file
198 | bindsym $mod+Shift+C reload
199 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
200 | bindsym $mod+Shift+R restart
201 | # exit i3 (logs you out of your X session)
202 | bindsym $mod+Shift+E exit
203 |
204 | # resize window (you can also use the mouse for that)
205 | mode "resize" {
206 | # These bindings trigger as soon as you enter the resize mode
207 |
208 | # They resize the border in the direction you pressed, e.g.
209 | # when pressing left, the window is resized so that it has
210 | # more space on its left
211 |
212 | bindsym j resize shrink left 10 px or 10 ppt
213 | bindsym Shift+J resize grow left 10 px or 10 ppt
214 |
215 | bindsym k resize shrink down 10 px or 10 ppt
216 | bindsym Shift+K resize grow down 10 px or 10 ppt
217 |
218 | bindsym l resize shrink up 10 px or 10 ppt
219 | bindsym Shift+L resize grow up 10 px or 10 ppt
220 |
221 | bindsym semicolon resize shrink right 10 px or 10 ppt
222 | bindsym Shift+colon resize grow right 10 px or 10 ppt
223 |
224 | # same bindings, but for the arrow keys
225 | bindsym Left resize shrink left 10 px or 10 ppt
226 | bindsym Shift+Left resize grow left 10 px or 10 ppt
227 |
228 | bindsym Down resize shrink down 10 px or 10 ppt
229 | bindsym Shift+Down resize grow down 10 px or 10 ppt
230 |
231 | bindsym Up resize shrink up 10 px or 10 ppt
232 | bindsym Shift+Up resize grow up 10 px or 10 ppt
233 |
234 | bindsym Right resize shrink right 10 px or 10 ppt
235 | bindsym Shift+Right resize grow right 10 px or 10 ppt
236 |
237 | # back to normal: Enter or Escape
238 | bindsym Return mode "default"
239 | bindsym Escape mode "default"
240 | }
241 |
242 | bindsym $mod+r mode "resize"
243 |
--------------------------------------------------------------------------------
/i3/config-work:
--------------------------------------------------------------------------------
1 | # i3 config
2 | #
3 | # --> https://gist.github.com/1817571
4 | # --> http://i3wm.org/docs/userguide.html
5 | #
6 |
7 |
8 | # Apparence
9 | # ------------------------------------------------------------------------------
10 |
11 | font xft:Droid Sans Mono 9
12 |
13 | # Colors border backgrd text
14 | #client.focused #9fbc00 #9fbc00 #111111
15 | client.focused #252525 #252525 #cccccc
16 | client.unfocused #444444 #444444 #315858
17 | client.focused_inactive #444444 #444444 #9b9bab
18 | client.urgent #383a3b #383a3b #ee0000
19 |
20 |
21 | # i3Bar Settings
22 | bar {
23 | #status_command i3status -c ~/.i3/i3status.conf
24 | status_command ~/.i3/scripts/conky-wrapper.sh
25 | position bottom
26 | font xft:Droid Sans Mono 9
27 | workspace_buttons yes
28 |
29 | colors {
30 | statusline #999999
31 | background #252525
32 |
33 | # class border backgrd text
34 | focused_workspace #292929 #292929 #cccccc
35 | active_workspace #252525 #252525 #696f89
36 | inactive_workspace #252525 #252525 #6b6b6b
37 | urgent_workspace #252525 #252525 #c7a551
38 | }
39 | }
40 |
41 | # Window class settings
42 | for_window [class="Roxterm"] border none
43 | for_window [class="XTerm"] border 1pixel
44 | for_window [class="URxvt"] border 1pixel
45 | for_window [class="mplayer"] border none
46 | for_window [class="Chromium-browser"] border none
47 | for_window [class="Google-chrome"] border none
48 | for_window [class="Chromium"] border none
49 | for_window [class="Firefox"] border none
50 | for_window [class="Thunderbird"] border none
51 | for_window [class="vlc"] border none
52 | for_window [class="VirtualBox"] floating enabled
53 | for_window [class="Wicd-client.py"] floating enabled
54 | for_window [class="Stream"] floating enabled
55 | for_window [class="winff"] floating enabled
56 | for_window [class="Thunar"] floating enabled
57 | for_window [class="Pavucontrol"] floating enabled
58 | for_window [class="jive"] floating enabled
59 | for_window [class="libreoffice"] floating enabled
60 | for_window [class="Wfica"] floating enabled
61 |
62 |
63 | # General settings
64 | # ------------------------------------------------------------------------------
65 | set $term roxterm
66 | set $mod Mod4
67 |
68 |
69 | # Bindings
70 | #
71 | # xev | grep -A2 --line-buffered '^KeyRelease' | \
72 | # sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
73 | #
74 | # ------------------------------------------------------------------------------
75 | bindsym $mod+d exec dmenu_run -p "Run:" -nb "#0F0F0F" -nf "#F5DEB3" -sb "#4C7899"
76 | bindsym $mod+c exec $term
77 | bindsym $mod+Return exec $term
78 | bindsym $mod+l exec xscreensaver-command -lock
79 | bindsym $mod+p exec ~/.i3/scripts/jukebox_listen.sh
80 | bindsym $mod+m exec ~/.i3/scripts/toggle_touchpad.sh
81 | bindsym $mod+e exec thunar
82 |
83 |
84 | bindcode 121 exec amixer -q sset Master toggle
85 | bindcode 122 exec amixer -q sset Master 5%-
86 | bindcode 123 exec amixer -q sset Master 5%+
87 | bindsym $mod+a exec "urxvtc -e alsamixer"
88 | bindsym $mod+Shift+a exec "pavucontrol"
89 | bindsym $mod+Shift+s exec "arandr"
90 | bindsym $mod+Shift+m exec "~/.i3/scripts/jukebox.sh"
91 |
92 |
93 | # Workspace Names
94 | # ------------------------------------------------------------------------------
95 | #workspace "[1] dev" output LVDS1
96 | #workspace "[2] www" output LVDS1
97 | #workspace "[3] chat" output LVDS1
98 | #workspace "[4] misc" output LVDS1
99 | workspace "[1] dev" output VGA-1-1
100 | workspace "[2] dev" output DVI-I-1
101 | workspace "[3] www" output HDMI-1-1
102 | workspace "[4] mail" output VGA-1
103 |
104 |
105 | # Autostart stuff
106 | # ------------------------------------------------------------------------------
107 | exec --no-startup-id wicd-client -t
108 | exec --no-startup-id exec ~/.i3/scripts/wallpapers.sh
109 | exec --no-startup-id xscreensaver -no-splash
110 | #exec --no-startup-id i3-msg 'workspace 3'; exec ~/.i3/scripts/tmux-chat.sh; workspace 1
111 |
112 |
113 |
114 | # Use Mouse+$mod to drag floating windows to their wanted position
115 | floating_modifier $mod
116 |
117 | # kill focused window
118 | bindsym $mod+Shift+Q kill
119 |
120 | # alternatively, you can use the cursor keys:
121 | bindsym $mod+Left focus left
122 | bindsym $mod+Down focus down
123 | bindsym $mod+Up focus up
124 | bindsym $mod+Right focus right
125 |
126 | # move focused window
127 | bindsym $mod+Shift+J move left
128 | bindsym $mod+Shift+K move down
129 | bindsym $mod+Shift+L move up
130 | bindsym $mod+Shift+colon move right
131 |
132 | # alternatively, you can use the cursor keys:
133 | bindsym $mod+Shift+Left move left
134 | bindsym $mod+Shift+Down move down
135 | bindsym $mod+Shift+Up move up
136 | bindsym $mod+Shift+Right move right
137 |
138 | # split in horizontal orientation
139 | bindsym $mod+h split h
140 |
141 | # split in vertical orientation
142 | bindsym $mod+v split v
143 |
144 | # enter fullscreen mode for the focused container
145 | bindsym $mod+f fullscreen
146 |
147 | # change container layout (stacked, tabbed, default)
148 | #bindsym $mod+s layout stacking
149 | #bindsym $mod+w layout tabbed
150 | #bindsym $mod+e layout default
151 |
152 | # toggle tiling / floating
153 | bindsym $mod+Shift+space floating toggle
154 |
155 | # change focus between tiling / floating windows
156 | bindsym $mod+space focus mode_toggle
157 |
158 | # switch to workspace
159 | bindsym $mod+1 workspace "[1] dev"
160 | bindsym $mod+2 workspace "[2] dev"
161 | bindsym $mod+3 workspace "[3] www"
162 | bindsym $mod+4 workspace "[4] mail"
163 | bindsym $mod+5 workspace 5
164 | bindsym $mod+6 workspace 6
165 | bindsym $mod+7 workspace 7
166 | bindsym $mod+8 workspace 8
167 | bindsym $mod+9 workspace 9
168 | bindsym $mod+0 workspace 10
169 |
170 | # Move window to specific workspace
171 | bindsym $mod+Shift+1 move workspace "[1] dev"
172 | bindsym $mod+Shift+2 move workspace "[2] dev"
173 | bindsym $mod+Shift+3 move workspace "[3] www"
174 | bindsym $mod+Shift+4 move workspace "[4] mail"
175 |
176 | bindsym $mod+Ctrl+Right workspace next
177 | bindsym $mod+Ctrl+Left workspace prev
178 |
179 | # move focused container to workspace
180 | bindsym $mod+Shift+exclam move workspace 1
181 | bindsym $mod+Shift+quotedbl move workspace 2
182 | bindsym $mod+Shift+sterling move workspace 3
183 | bindsym $mod+Shift+dollar move workspace 4
184 | bindsym $mod+Shift+percent move workspace 5
185 | bindsym $mod+Shift+asciicircum move workspace 6
186 | bindsym $mod+Shift+ampersand move workspace 7
187 | bindsym $mod+Shift+asterisk move workspace 8
188 | bindsym $mod+Shift+parenleft move workspace 9
189 | bindsym $mod+Shift+parenright move workspace 10
190 |
191 | # reload the configuration file
192 | bindsym $mod+Shift+C reload
193 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
194 | bindsym $mod+Shift+R restart
195 | # exit i3 (logs you out of your X session)
196 | bindsym $mod+Shift+E exit
197 |
198 | # resize window (you can also use the mouse for that)
199 | mode "resize" {
200 | # These bindings trigger as soon as you enter the resize mode
201 |
202 | # They resize the border in the direction you pressed, e.g.
203 | # when pressing left, the window is resized so that it has
204 | # more space on its left
205 |
206 | bindsym j resize shrink left 10 px or 10 ppt
207 | bindsym Shift+J resize grow left 10 px or 10 ppt
208 |
209 | bindsym k resize shrink down 10 px or 10 ppt
210 | bindsym Shift+K resize grow down 10 px or 10 ppt
211 |
212 | bindsym l resize shrink up 10 px or 10 ppt
213 | bindsym Shift+L resize grow up 10 px or 10 ppt
214 |
215 | bindsym semicolon resize shrink right 10 px or 10 ppt
216 | bindsym Shift+colon resize grow right 10 px or 10 ppt
217 |
218 | # same bindings, but for the arrow keys
219 | bindsym Left resize shrink left 10 px or 10 ppt
220 | bindsym Shift+Left resize grow left 10 px or 10 ppt
221 |
222 | bindsym Down resize shrink down 10 px or 10 ppt
223 | bindsym Shift+Down resize grow down 10 px or 10 ppt
224 |
225 | bindsym Up resize shrink up 10 px or 10 ppt
226 | bindsym Shift+Up resize grow up 10 px or 10 ppt
227 |
228 | bindsym Right resize shrink right 10 px or 10 ppt
229 | bindsym Shift+Right resize grow right 10 px or 10 ppt
230 |
231 | # back to normal: Enter or Escape
232 | bindsym Return mode "default"
233 | bindsym Escape mode "default"
234 | }
235 |
236 | bindsym $mod+r mode "resize"
237 |
--------------------------------------------------------------------------------
/i3/i3status.conf:
--------------------------------------------------------------------------------
1 | general {
2 | colors = true
3 | interval = 20
4 | color_good = "#33912A"
5 | color_bad = "#912A2A"
6 | color_degraded = "#91912A"
7 | }
8 |
9 | order += "online_status"
10 | order += "sysdata"
11 | order += "load"
12 | order += "netdata"
13 | order += "uptime"
14 | order += "battery_level"
15 | order += "clock"
16 |
17 |
18 | online_status {
19 | format_offline = ""
20 | format_online = ""
21 | timeout = 20
22 | url = "http://www.gefoo.org"
23 | }
24 |
25 | sysdata {
26 | format = "[\?color=cpu CPU {cpu_usage}%] [\?color=mem Mem {mem_used}/{mem_total} GB ({mem_used_percent}%)]"
27 | }
28 |
29 | load {
30 | format = "%1min"
31 | }
32 |
33 | netdata {
34 | format = "{nic:wlp3s0} {down} {up}"
35 | }
36 |
37 | uptime {
38 | format = "[\?if=weeks {weeks} weeks ][\?if=days {days} days ] [\?if=hours {hours} hours ][\?if=minutes {minutes} minutes ]"
39 | }
40 |
41 | battery_level {
42 | format = "{icon} {percent}"
43 | }
44 |
45 | clock {
46 | format = "{Europe/Luxembourg}"
47 | format_time = "%Y-%m-%d %H:%M:%S"
48 | }
49 |
50 |
51 | #wireless wlan0 {
52 | # format_up = "W: (%quality at %essid) %ip"
53 | # format_down = "W: down"
54 | #}
55 | #
56 | #ethernet eth0 {
57 | # # if you use %speed, i3status requires root privileges
58 | # format_up = "E: %ip (%speed)"
59 | # format_down = "E: down"
60 | #}
61 | #
62 | #
63 | #volume master {
64 | # format = "♪: %volume"
65 | # device = "default"
66 | # mixer = "Master"
67 | # mixer_idx = 0
68 | #}
69 |
--------------------------------------------------------------------------------
/i3/scripts/conky-wrapper.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Send the header so that i3bar knows we want to use JSON:
4 | echo "{\"version\":1}"
5 |
6 | # Begin the endless array.
7 | echo "[[]"
8 |
9 | # Now send blocks with information forever:
10 | exec conky -c $HOME/.i3/scripts/conkyrc
11 |
--------------------------------------------------------------------------------
/i3/scripts/conkyrc:
--------------------------------------------------------------------------------
1 | background no
2 | out_to_console yes
3 | out_to_x no
4 | update_interval 1
5 | total_run_times 0
6 | short_units yes
7 | pad_percents 3
8 | override_utf8_locale yes
9 |
10 | TEXT
11 |
12 | ,[
13 |
14 | {
15 | "full_text": " ♪ ${exec amixer get Master | egrep -o "[0-9]+%" | head -n1}",
16 | "color": "\#268BD2"
17 | },
18 |
19 | {
20 | "full_text": " ≈ ${if_existing /sys/class/net/wlp3s0/operstate up}wlp3s0 ${addr wlp3s0}${endif}${if_existing /sys/class/net/eth0/operstate up}eth0 ${addr eth0}${endif}${if_existing /sys/class/net/eth1/operstate up}eth1${endif}",
21 | "color": "\#268BD2"
22 | },
23 |
24 | {
25 | "full_text": " ▲ ${if_existing /sys/class/net/wlp3s0/operstate up}${totalup wlp3s0}${endif}${if_existing /sys/class/net/eth0/operstate up}${totalup eth0}${endif}${if_existing /sys/class/net/eth1/operstate up}${totalup eth1}${endif}",
26 | "color": "\#268BD2"
27 | },
28 |
29 | {
30 | "full_text": " ▼ ${if_existing /sys/class/net/wlp3s0/operstate up}${totaldown wlp3s0}${endif}${if_existing /sys/class/net/eth0/operstate up}${totaldown eth0}${endif}${if_existing /sys/class/net/eth1/operstate up}${totaldown eth1}${endif}",
31 | "color": "\#268BD2"
32 | },
33 |
34 | {
35 | "full_text": "CPU ${cpubar}",
36 | "color": "\#268BD2"
37 | },
38 |
39 | {
40 | "full_text": "MEM ${membar}",
41 | "color": "\#268BD2"
42 | },
43 |
44 | {
45 | "full_text": "⌇ ${battery}",
46 | "color": ${if_match ${battery_percent} <= 30}"\#ff7a63"${else}"\#268BD2"${endif}
47 | },
48 |
49 | {
50 | "full_text": "⌚ ${time %a %d %b} ${time %H:%M}",
51 | "color": "\#D1D1D1"
52 | }
53 | ]
54 |
--------------------------------------------------------------------------------
/i3/scripts/hdmi_switch.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [ ! -z "`xrandr | grep 'HDMI1 connected'`" ]; then
4 | xrandr --output LVDS1 --off
5 | xrandr --output HDMI1 --auto
6 | else
7 | xrandr --output LVDS1 --auto
8 | xrandr --output HDMI1 --off
9 | fi
10 |
--------------------------------------------------------------------------------
/i3/scripts/i3lockscreen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Take screenshot of the desktop. Use this image to show as background on
4 | # the lock screen
5 |
6 | scrot /tmp/i3lockscreen.png
7 | i3lock -i /tmp/i3lockscreen.png
8 |
--------------------------------------------------------------------------------
/i3/scripts/jukebox_listen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | VLC=`which cvlc`
4 |
5 | if [ -n $VLC ]; then
6 |
7 | # Check if vlc is running
8 | if [ -e "/tmp/vlc.socket" ]; then
9 |
10 | # Running so pause vlc
11 | echo -n "quit" | nc -U /tmp/vlc.socket
12 |
13 | else
14 | # Start vlc
15 |
16 | cvlc -L -I oldrc --rc-unix "/tmp/vlc.socket" --rc-fake-tty -L http://mixer.gefoo.org:8000/jukebox.ogg
17 |
18 | fi
19 | echo "Please install vlc"
20 | fi
21 |
--------------------------------------------------------------------------------
/i3/scripts/jukebox_playing.py:
--------------------------------------------------------------------------------
1 | import urllib.request
2 | import json
3 |
4 | try:
5 | url = "http://mixer.gefoo.org/playing"
6 | req = urllib.request.Request(url, None)
7 |
8 | # Read response
9 | resp = urllib.request.urlopen(req).readall().decode('utf-8')
10 |
11 | if json.loads(resp):
12 | res = json.loads(resp)
13 | print("{0} - {1}".format(res['artist'],
14 | res['title']))
15 | except urllib.URLError:
16 | print("No Connection")
17 |
--------------------------------------------------------------------------------
/i3/scripts/tmux-chat.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | tmux new-session -s "chat" -n centerim -d centerim
4 | tmux new-window -t "chat:1" -n irssi irssi
5 |
6 |
--------------------------------------------------------------------------------
/i3/scripts/toggle_touchpad.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | status=`synclient | grep TouchpadOff | tr -d ' '`
4 |
5 | if [ $status == 'TouchpadOff=1' ]; then
6 | synclient TouchpadOff=0
7 | else
8 | synclient TouchpadOff=1
9 | fi
10 |
--------------------------------------------------------------------------------
/i3/scripts/wallpapers.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | while true; do
4 | find ~/pictures/wallpapers/ -type f \( -name '*.jpg' -o -name '*.png' \) -print0 |
5 | shuf -n1 -z | xargs -0 feh --bg-fill --auto-zoom
6 | sleep 25m
7 | done
8 |
--------------------------------------------------------------------------------
/inputrc:
--------------------------------------------------------------------------------
1 | # To the extent possible under law, the author(s) have dedicated all
2 | # copyright and related and neighboring rights to this software to the
3 | # public domain worldwide. This software is distributed without any warranty.
4 | # You should have received a copy of the CC0 Public Domain Dedication along
5 | # with this software.
6 | # If not, see .
7 |
8 | # base-files version 4.1-1
9 |
10 | # ~/.inputrc: readline initialization file.
11 |
12 | # The latest version as installed by the Cygwin Setup program can
13 | # always be found at /etc/defaults/etc/skel/.inputrc
14 |
15 | # Modifying /etc/skel/.inputrc directly will prevent
16 | # setup from updating it.
17 |
18 | # The copy in your home directory (~/.inputrc) is yours, please
19 | # feel free to customise it to create a shell
20 | # environment to your liking. If you feel a change
21 | # would be benifitial to all, please feel free to send
22 | # a patch to the cygwin mailing list.
23 |
24 | # the following line is actually
25 | # equivalent to "\C-?": delete-char
26 | "\e[3~": delete-char
27 |
28 | # VT
29 | "\e[1~": beginning-of-line
30 | "\e[4~": end-of-line
31 |
32 | # kvt
33 | "\e[H": beginning-of-line
34 | "\e[F": end-of-line
35 |
36 | # rxvt and konsole (i.e. the KDE-app...)
37 | "\e[7~": beginning-of-line
38 | "\e[8~": end-of-line
39 |
40 | # VT220
41 | "\eOH": beginning-of-line
42 | "\eOF": end-of-line
43 |
44 | # Disable Visual Bell
45 | set bell-style none
46 |
47 | # Allow 8-bit input/output
48 | #set meta-flag on
49 | #set convert-meta off
50 | #set input-meta on
51 | #set output-meta on
52 | $if Bash
53 | # Don't ring bell on completion
54 | set bell-style none
55 |
56 | # or, don't beep at me - show me
57 | #set bell-style visible
58 |
59 | # Filename completion/expansion
60 | #set completion-ignore-case on
61 | #set show-all-if-ambiguous on
62 |
63 | # Expand homedir name
64 | #set expand-tilde on
65 |
66 | # Append "/" to all dirnames
67 | #set mark-directories on
68 | #set mark-symlinked-directories on
69 |
70 | # Match all files
71 | #set match-hidden-files on
72 |
73 | # 'Magic Space'
74 | # Insert a space character then performs
75 | # a history expansion in the line
76 | #Space: magic-space
77 |
78 | # Improved version of recall
79 | "\e[A": history-search-backward
80 | "\e[B": history-search-forward
81 |
82 | # Colored Tab completion
83 | set colored-stats on
84 |
85 | $endif
86 |
--------------------------------------------------------------------------------
/installers/README.md:
--------------------------------------------------------------------------------
1 | Collection of customer installers
2 |
--------------------------------------------------------------------------------
/installers/gh/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | VERSION="2.0.0"
4 | DOWNURL="https://github.com/cli/cli/releases/download/v${VERSION}/gh_${VERSION}_linux_amd64.tar.gz"
5 |
6 | BUILD="gh_${VERSION}_linux_amd64"
7 | DOWNLOAD="./$BUILD.tar.gz"
8 |
9 | # Actual download and install application
10 | wget -O $DOWNLOAD $DOWNURL
11 | tar xzf $DOWNLOAD
12 | mkdir -p ~/opt/gh/bin
13 | cp -r $BUILD/* ~/opt/gh/
14 | rm -f $DOWNLOAD
15 | rm -rf $BUILD
16 | ln ~/opt/gh/bin/gh ~/.local/bin/
17 |
--------------------------------------------------------------------------------
/installers/install_bat.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | get_build_ext() {
4 | arch=$(lscpu | grep Architecture | cut -d ":" -f 2 | xargs)
5 | declare -A map
6 | map["x86_64"]="x86_64-unknown-linux-gnu"
7 | map["x86"]="i686-unknown-linux-gnu"
8 | map["arm"]="arm-unknown-linux-gnueabihf"
9 | echo "${map[$arch]}"
10 | }
11 |
12 | VERSION="0.13.0"
13 | BASEURL="https://github.com/sharkdp/bat/releases/download/v$VERSION"
14 | FILEBASE="bat-v$VERSION"
15 |
16 | BUILDEXT=$(get_build_ext)
17 | BUILD=$FILEBASE-$BUILDEXT
18 | DOWNLOAD="/tmp/bat-$VERSION.tar.gz"
19 |
20 | # Actual download and install application
21 | wget -O $DOWNLOAD $BASEURL/$BUILD.tar.gz
22 | tar xzf $DOWNLOAD $BUILD/bat
23 | [ -d $HOME/.local/bin ] || mkdir -p $HOME/.local/bin
24 | mv $BUILD/bat $HOME/.local/bin/
25 | rm $DOWNLOAD && rm -rf $BUILD
26 |
--------------------------------------------------------------------------------
/installers/ran/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | VERSION="0.1.6"
4 | DOWNURL="https://github.com/m3ng9i/ran/releases/download/v${VERSION}/ran_linux_amd64.zip"
5 |
6 | BUILD="ran_${VERSION}_linux_amd64"
7 | DOWNLOAD="./$BUILD.zip"
8 |
9 | # Actual download and install application
10 | wget -O $DOWNLOAD $DOWNURL
11 | unzip $DOWNLOAD
12 | mkdir -p ~/opt/ran/bin
13 | cp ran_linux_amd64 ~/opt/ran/bin/ran
14 | rm -f ran_linux_amd64 *.zip
15 | ln ~/opt/ran/bin/ran ~/.local/bin/
16 |
--------------------------------------------------------------------------------
/installers/tmux/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | VERSION="3.3"
4 | DOWNURL="https://github.com/tmux/tmux/archive/$VERSION.tar.gz"
5 |
6 | BUILD="tmux-$VERSION"
7 | DOWNLOAD="./$BUILD.tar.gz"
8 |
9 | # Actual download and install application
10 | wget -O $DOWNLOAD $DOWNURL
11 | tar xzf $DOWNLOAD
12 | ( cd $BUILD && sh autogen.sh )
13 | ( cd $BUILD && ./configure \
14 | --prefix="$HOME/opt/tmux" )
15 | ( cd $BUILD && make )
16 | mkdir -p ~/opt/tmux/bin
17 | cp $BUILD/tmux ~/opt/tmux/bin/
18 | rm -f $DOWNLOAD
19 | rm -rf $BUILD
20 |
--------------------------------------------------------------------------------
/installers/vim/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | VERSION="9.0.1216"
6 | DOWNURL="https://github.com/vim/vim/archive/v$VERSION.tar.gz"
7 |
8 | BUILD="vim-$VERSION"
9 | DOWNLOAD="./$BUILD.tar.gz"
10 |
11 | # Actual download and install application
12 | test -f $DOWNLOAD || wget -O $DOWNLOAD $DOWNURL
13 | test -d $BUILD || tar xzf $DOWNLOAD
14 |
15 | # Issue when compiling against pyenv python
16 | # https://github.com/ycm-core/YouCompleteMe/issues/3580
17 | export LDFLAGS="-rdynamic"
18 | export PY_CONF=/home/users/frank/.pyenv/versions/3.10.9/lib/python3.10/config-3.10-x86_64-linux-gnu
19 | export PY_INCL=/home/users/frank/.pyenv/versions/3.10.9/include
20 |
21 | cd $BUILD
22 | make distclean
23 | ./configure \
24 | --prefix="$HOME/opt/vim" \
25 | --disable-darwin \
26 | --disable-smack \
27 | --enable-multibyte \
28 | --enable-python3interp \
29 | --enable-cscope \
30 | --with-python3-config-dir=$PY_CONF \
31 | --includedir=$PY_INCL \
32 | --with-features=huge
33 |
34 | make && make install
35 |
--------------------------------------------------------------------------------
/ipython/README:
--------------------------------------------------------------------------------
1 | This is the IPython directory.
2 |
3 | For more information on configuring IPython, do:
4 |
5 | ipython config -h
6 |
--------------------------------------------------------------------------------
/ipython/profile_default/startup/README:
--------------------------------------------------------------------------------
1 | This is the IPython startup directory
2 |
3 | .py and .ipy files in this directory will be run *prior* to any code or files specified
4 | via the exec_lines or exec_files configurables whenever you load this profile.
5 |
6 | Files will be run in lexicographical order, so you can control the execution order of files
7 | with a prefix, e.g.::
8 |
9 | 00-first.py
10 | 50-middle.py
11 | 99-last.ipy
12 |
--------------------------------------------------------------------------------
/irssi/config:
--------------------------------------------------------------------------------
1 | servers = (
2 | {
3 | address = "gefoo.org";
4 | chatnet = "Gefoo";
5 | port = "5555";
6 | autoconnect = "yes";
7 | password = "__irssiuser__:__irssipass_";
8 | autoconnect = "yes";
9 | },
10 | );
11 |
12 | chatnets = {
13 | Freenode = {
14 | type = "IRC";
15 | autosendcmd = "/msg Nickserv identify __irssipass__";
16 | max_kicks = "4";
17 | max_msgs = "5";
18 | max_whois = "4";
19 | max_query_chans = "5";
20 | };
21 | Twice = {
22 | type = "IRC";
23 | max_kicks = "4";
24 | max_msgs = "5";
25 | max_whois = "4";
26 | max_query_chans = "5";
27 | };
28 | };
29 |
30 | channels = (
31 | {
32 | name = "#linux-ha";
33 | chatnet = "Gefoo";
34 | autojoin = "Yes";
35 | },
36 | {
37 | name = "#fosdem";
38 | chatnet = "Gefoo";
39 | autojoin = "Yes";
40 | },
41 | {
42 | name = "##closure-tools";
43 | chatnet = "Gefoo";
44 | autojoin = "Yes";
45 | },
46 | {
47 | name = "#i3";
48 | chatnet = "Gefoo";
49 | autojoin = "Yes";
50 | },
51 | );
52 |
53 | aliases = {
54 | J = "join";
55 | WJOIN = "join -window";
56 | WQUERY = "query -window";
57 | LEAVE = "part";
58 | BYE = "quit";
59 | EXIT = "quit";
60 | SIGNOFF = "quit";
61 | DESCRIBE = "action";
62 | DATE = "time";
63 | HOST = "userhost";
64 | LAST = "lastlog";
65 | SAY = "msg *";
66 | WI = "whois";
67 | WII = "whois $0 $0";
68 | WW = "whowas";
69 | W = "who";
70 | N = "names";
71 | M = "msg";
72 | T = "topic";
73 | C = "clear";
74 | CL = "clear";
75 | K = "kick";
76 | KB = "kickban";
77 | KN = "knockout";
78 | BANS = "ban";
79 | B = "ban";
80 | MUB = "unban *";
81 | UB = "unban";
82 | IG = "ignore";
83 | UNIG = "unignore";
84 | SB = "scrollback";
85 | UMODE = "mode $N";
86 | WC = "window close";
87 | WN = "window new hide";
88 | SV = "say Irssi $J ($V) - http://irssi.org/";
89 | GOTO = "sb goto";
90 | CHAT = "dcc chat";
91 | RUN = "SCRIPT LOAD";
92 | CALC = "exec - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi";
93 | SBAR = "STATUSBAR";
94 | INVITELIST = "mode $C +I";
95 | Q = "QUERY";
96 | "MANUAL-WINDOWS" = "set use_status_window off;set autocreate_windows off;set autocreate_query_level none;set autoclose_windows off;set reuse_unused_windows on;save";
97 | EXEMPTLIST = "mode $C +e";
98 | ATAG = "WINDOW SERVER";
99 | UNSET = "set -clear";
100 | RESET = "set -default";
101 | };
102 |
103 | statusbar = {
104 | # formats:
105 | # when using {templates}, the template is shown only if it's argument isn't
106 | # empty unless no argument is given. for example {sb} is printed always,
107 | # but {sb $T} is printed only if $T isn't empty.
108 |
109 | items = {
110 | # start/end text in statusbars
111 | barstart = "{sbstart}";
112 | barend = "{sbend}";
113 |
114 | topicbarstart = "{topicsbstart}";
115 | topicbarend = "{topicsbend}";
116 |
117 | # treated "normally", you could change the time/user name to whatever
118 | time = "{sb $Z}";
119 | user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}}";
120 |
121 | # treated specially .. window is printed with non-empty windows,
122 | # window_empty is printed with empty windows
123 | window = "{sb $winref:$tag/$itemname{sbmode $M}}";
124 | window_empty = "{sb $winref{sbservertag $tag}}";
125 | prompt = "{prompt $[.15]itemname}";
126 | prompt_empty = "{prompt $winname}";
127 | topic = " $topic";
128 | topic_empty = " Irssi v$J - http://www.irssi.org";
129 |
130 | # all of these treated specially, they're only displayed when needed
131 | lag = "{sb Lag: $0-}";
132 | act = "{sb Act: $0-}";
133 | more = "-- more --";
134 | };
135 |
136 | # there's two type of statusbars. root statusbars are either at the top
137 | # of the screen or at the bottom of the screen. window statusbars are at
138 | # the top/bottom of each split window in screen.
139 | default = {
140 | # the "default statusbar" to be displayed at the bottom of the window.
141 | # contains all the normal items.
142 | window = {
143 | disabled = "no";
144 |
145 | # window, root
146 | type = "window";
147 | # top, bottom
148 | placement = "bottom";
149 | # number
150 | position = "1";
151 | # active, inactive, always
152 | visible = "active";
153 |
154 | # list of items in statusbar in the display order
155 | items = {
156 | barstart = { priority = "100"; };
157 | time = { };
158 | user = { };
159 | window = { };
160 | window_empty = { };
161 | lag = { priority = "-1"; };
162 | act = { priority = "10"; };
163 | more = { priority = "-1"; alignment = "right"; };
164 | barend = { priority = "100"; alignment = "right"; };
165 | };
166 | };
167 |
168 | # statusbar to use in inactive split windows
169 | window_inact = {
170 | type = "window";
171 | placement = "bottom";
172 | position = "1";
173 | visible = "inactive";
174 | items = {
175 | barstart = { priority = "100"; };
176 | window = { };
177 | window_empty = { };
178 | more = { priority = "-1"; alignment = "right"; };
179 | barend = { priority = "100"; alignment = "right"; };
180 | };
181 | };
182 |
183 | # we treat input line as yet another statusbar :) It's possible to
184 | # add other items before or after the input line item.
185 | prompt = {
186 | type = "root";
187 | placement = "bottom";
188 | # we want to be at the bottom always
189 | position = "100";
190 | visible = "always";
191 | items = {
192 | prompt = { priority = "-1"; };
193 | prompt_empty = { priority = "-1"; };
194 | # treated specially, this is the real input line.
195 | input = { priority = "10"; };
196 | };
197 | };
198 |
199 | # topicbar
200 | topic = {
201 | type = "root";
202 | placement = "top";
203 | position = "1";
204 | visible = "always";
205 | items = {
206 | topicbarstart = { priority = "100"; };
207 | topic = { };
208 | topic_empty = { };
209 | topicbarend = { priority = "100"; alignment = "right"; };
210 | };
211 | };
212 | };
213 | };
214 |
215 | settings = {
216 | core = {
217 | real_name = "Frank Lazzarini";
218 | user_name = "latz";
219 | nick = "latz";
220 | };
221 | "fe-text" = { actlist_sort = "refnum"; };
222 | };
223 |
--------------------------------------------------------------------------------
/lib/bash_colors:
--------------------------------------------------------------------------------
1 | # Bash colors
2 | # http://misc.flogisoft.com/bash/tip_colors_and_formatting
3 |
4 | # Standard 8 color definitions
5 | RESET="\[\033[0m\]"
6 | ESC="${RESET}\[\e["
7 | GREEN="${ESC}01;32m\]"
8 | RED="${ESC}01;31m\]"
9 | BLUE="${ESC}01;34m\]"
10 | CYAN="${ESC}01;36m\]"
11 | PURPLE="${ESC}01;35m\]"
12 | WHITE="${ESC}01;37m\]"
13 | YELLOW="${ESC}01;33m\]"
14 |
15 | # 256 Color definitions
16 | YELLOW142="${ESC}38;05;142m\]"
17 | YELLOW220="${ESC}38;05;220m\]"
18 | YELLOW229="${ESC}38;05;229m\]"
19 | GREEN113="${ESC}38;05;113m\]"
20 | GREEN112="${ESC}38;05;112m\]"
21 | BLUE111="${ESC}38;05;111m\]"
22 | GRAY241="${ESC}38;05;241m\]"
23 | GRAY242="${ESC}38;05;242m\]"
24 | GRAY247="${ESC}38;05;247m\]"
25 |
26 | # PS1 Variables
27 | BAR=${GRAY241}
28 |
29 | # vim: set ft=bash
30 |
--------------------------------------------------------------------------------
/lib/bash_functions:
--------------------------------------------------------------------------------
1 | function find_git_branch() {
2 | local branch
3 | if branch=`git rev-parse --abbrev-ref HEAD 2> /dev/null`; then
4 | if [[ "$branch" == "HEAD" ]]; then
5 | branch="(detached head)"
6 | fi
7 | git_branch="($branch)"
8 | else
9 | git_branch=""
10 | fi
11 | }
12 |
--------------------------------------------------------------------------------
/mc/ini:
--------------------------------------------------------------------------------
1 |
2 | [Midnight-Commander]
3 | verbose=1
4 | pause_after_run=1
5 | shell_patterns=1
6 | auto_save_setup=1
7 | preallocate_space=0
8 | auto_menu=0
9 | use_internal_view=1
10 | use_internal_edit=0
11 | clear_before_exec=1
12 | confirm_delete=1
13 | confirm_overwrite=1
14 | confirm_execute=0
15 | confirm_history_cleanup=1
16 | confirm_exit=1
17 | confirm_directory_hotlist_delete=1
18 | safe_delete=0
19 | mouse_repeat_rate=100
20 | double_click_speed=250
21 | use_8th_bit_as_meta=0
22 | confirm_view_dir=0
23 | mouse_move_pages_viewer=1
24 | mouse_close_dialog=0
25 | fast_refresh=0
26 | drop_menus=0
27 | wrap_mode=1
28 | old_esc_mode=0
29 | old_esc_mode_timeout=1000000
30 | cd_symlinks=1
31 | show_all_if_ambiguous=0
32 | max_dirt_limit=10
33 | use_file_to_guess_type=1
34 | alternate_plus_minus=0
35 | only_leading_plus_minus=1
36 | show_output_starts_shell=0
37 | xtree_mode=0
38 | num_history_items_recorded=60
39 | file_op_compute_totals=1
40 | classic_progressbar=1
41 | vfs_timeout=60
42 | ftpfs_directory_timeout=900
43 | use_netrc=1
44 | ftpfs_retry_seconds=30
45 | ftpfs_always_use_proxy=0
46 | ftpfs_use_passive_connections=1
47 | ftpfs_use_passive_connections_over_proxy=0
48 | ftpfs_use_unix_list_options=1
49 | ftpfs_first_cd_then_ls=1
50 | fish_directory_timeout=900
51 | editor_tab_spacing=8
52 | editor_word_wrap_line_length=72
53 | editor_fill_tabs_with_spaces=0
54 | editor_return_does_auto_indent=0
55 | editor_backspace_through_tabs=0
56 | editor_fake_half_tabs=1
57 | editor_option_save_mode=0
58 | editor_option_save_position=1
59 | editor_option_auto_para_formatting=0
60 | editor_option_typewriter_wrap=0
61 | editor_edit_confirm_save=1
62 | editor_syntax_highlighting=1
63 | editor_persistent_selections=1
64 | editor_cursor_beyond_eol=0
65 | editor_visible_tabs=1
66 | editor_visible_spaces=1
67 | editor_line_state=0
68 | editor_simple_statusbar=0
69 | editor_check_new_line=0
70 | editor_show_right_margin=0
71 | editor_group_undo=0
72 | nice_rotating_dash=1
73 | mcview_remember_file_position=0
74 | auto_fill_mkdir_name=1
75 | copymove_persistent_attr=1
76 | select_flags=6
77 | editor_backup_extension=~
78 | mcview_eof=
79 | ignore_ftp_chattr_errors=true
80 | keymap=mc.keymap
81 | skin=default
82 |
83 | editor_cursor_after_inserted_block=0
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | [Layout]
94 | message_visible=1
95 | keybar_visible=1
96 | xterm_title=1
97 | output_lines=0
98 | command_prompt=1
99 | menubar_visible=1
100 | free_space=1
101 |
102 | horizontal_split=0
103 | vertical_equal=1
104 | left_panel_size=100
105 | horizontal_equal=1
106 | top_panel_size=12
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | [Misc]
117 | timeformat_recent=%b %e %H:%M
118 | timeformat_old=%b %e %Y
119 | ftp_proxy_host=gate
120 | ftpfs_password=anonymous@
121 | display_codepage=UTF-8
122 | source_codepage=Other_8_bit
123 | autodetect_codeset=
124 | clipboard_store=
125 | clipboard_paste=
126 |
127 | spell_language=en
128 |
129 | [Colors]
130 | base_color=
131 | xterm-256color=
132 | color_terminals=
133 |
134 | screen-256color=
135 |
136 | rxvt-unicode-256color=
137 |
138 | [Panels]
139 | show_mini_info=true
140 | kilobyte_si=false
141 | mix_all_files=false
142 | show_backups=true
143 | show_dot_files=false
144 | fast_reload=false
145 | fast_reload_msg_shown=false
146 | mark_moves_down=true
147 | reverse_files_only=true
148 | auto_save_setup_panels=false
149 | navigate_with_arrows=false
150 | panel_scroll_pages=true
151 | mouse_move_pages=true
152 | filetype_mode=true
153 | permission_mode=false
154 | torben_fj_mode=false
155 | quick_search_mode=2
156 |
157 | [Panelize]
158 | Find *.orig after patching=find . -name \\*.orig -print
159 | Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm +011 \\) -o \\( -perm -02000 -a -perm +01 \\) \\) -print
160 | Find rejects after patching=find . -name \\*.rej -print
161 |
--------------------------------------------------------------------------------
/mc/panels.ini:
--------------------------------------------------------------------------------
1 |
2 | [New Left Panel]
3 | display=listing
4 | reverse=0
5 | case_sensitive=1
6 | exec_first=0
7 | sort_order=name
8 | list_mode=full
9 | user_format=half type name | size | perm
10 | user_status0=half type name | size | perm
11 | user_status1=half type name | size | perm
12 | user_status2=half type name | size | perm
13 | user_status3=half type name | size | perm
14 | user_mini_status=0
15 |
16 | [New Right Panel]
17 | display=listing
18 | reverse=0
19 | case_sensitive=1
20 | exec_first=0
21 | sort_order=name
22 | list_mode=full
23 | user_format=half type name | size | perm
24 | user_status0=half type name | size | perm
25 | user_status1=half type name | size | perm
26 | user_status2=half type name | size | perm
27 | user_status3=half type name | size | perm
28 | user_mini_status=0
29 |
30 | [Dirs]
31 | other_dir=/home/frank/.config/mc
32 | current_is_left=false
33 |
--------------------------------------------------------------------------------
/minttyrc:
--------------------------------------------------------------------------------
1 | BellType=0
2 | BoldAsFont=no
3 | BoldAsColour=yes
4 | Font=Anonymice Powerline
5 | FontHeight=12
6 | FontSmoothing=full
7 | Term=xterm-256color
8 | Transparency=off
9 | CursorType=block
10 | WindowShortcuts=no
11 | Columns=160
12 | Rows=50
13 | Blue=202,169,250
14 | BoldBlue=202,169,250
15 |
--------------------------------------------------------------------------------
/nerd_fonts.lst:
--------------------------------------------------------------------------------
1 | https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/AnonymousPro.zip
2 | https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/Hack.zip
3 | https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/Inconsolata.zip
4 | https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/OpenDyslexic.zip
5 | https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/Terminus.zip
6 |
--------------------------------------------------------------------------------
/nvimrc:
--------------------------------------------------------------------------------
1 | " Vundle Stuff
2 | " -----------------------------------------------------------------------------
3 | set rtp+=~/.nvim/bundle/Vundle.vim
4 | call vundle#begin("~/.nvim/bundle")
5 |
6 | " Vundle
7 | Plugin 'gmarik/Vundle.vim'
8 |
9 | " Colorschemes
10 | Plugin 'nanotech/jellybeans.vim'
11 | Plugin 'flazz/vim-colorschemes'
12 |
13 | " Plugins
14 | Plugin 'Lokaltog/vim-powerline'
15 | Plugin 'kien/ctrlp.vim'
16 | Plugin 'klen/python-mode'
17 | Plugin 'ervandew/supertab'
18 | Plugin 'lepture/vim-jinja'
19 |
20 | call vundle#end()
21 |
22 |
23 | " Display
24 | " -----------------------------------------------------------------------------
25 | " set number
26 | " set foldcolumn=2 " display up to 4 folds
27 | " set nowrap " Prevent wrapping
28 | set title " display title in X.
29 | colorscheme jellybeans
30 |
31 |
32 |
33 | " Vim Settings
34 | " -----------------------------------------------------------------------------
35 | filetype plugin indent on " required
36 | set nocompatible " be iMproved
37 | filetype off " vundle required
38 |
39 | set encoding=utf-8 " use UTF-8
40 | set t_Co=256 " 256 colours
41 | set background=dark " the darker the better
42 | syntax on " syntax highlighting
43 |
44 |
45 |
46 | " Powerline specific
47 | " -----------------------------------------------------------------------------
48 | set laststatus=2 " always show status bar
49 | set cmdheight=2 " set cmd height to 2
50 | let g:Powerline_symbols = 'fancy'
51 |
52 |
53 |
54 | " Indentation settings
55 | " -----------------------------------------------------------------------------
56 | set autoindent " always set autoindenting on
57 | set shiftwidth=4 " Force indentation to be 4 spaces
58 | set tabstop=4 " -- idem --
59 | set list " EOL, trailing spaces, tabs: show them.
60 | set lcs=tab:├─ " Tabs are shown as ├──
61 | set lcs+=trail:␣ " Show trailing spaces as ␣
62 | set expandtab " always expand tabs to spaces
63 | set backspace=2 " make backspace behave like in most other apps
64 |
65 |
66 |
67 | " Visual Mode settings
68 | " -----------------------------------------------------------------------------
69 | set hlsearch " Hightlight searches
70 | set ignorecase " Ignore case when searching
71 | set smartcase " Override the ignorecase when search
72 | " contains upper letters
73 | vnoremap < ' multiple times in visual mode
74 | vnoremap > >gv " indent '<' multiple times in visual mode
75 | "nnoremap n nzz " on next find center screen
76 |
77 |
78 |
79 | " Code Style settings
80 | " -----------------------------------------------------------------------------
81 | "
82 | " Folding
83 | "
84 | set foldmethod=indent " Folding method
85 | set foldlevel=99 " Folding level
86 | nnoremap za " Open up folding
87 | vnoremap zf " Close folding
88 | "
89 | " Text Bubbling (http://vimcasts.org/episodes/bubbling-text/)
90 | "
91 | nmap ddkP " Single line up
92 | nmap ddp " Single line down
93 | vmap xkP`[V`] " Visual mode multiple lines up
94 | vmap xp`[V`] " Visual mode multiple lines down
95 |
96 |
97 |
98 | " python-mode settings
99 | " -----------------------------------------------------------------------------
100 | set completeopt-=preview " Do not pop up pydoc on completing
101 | let g:pymode_folding = 1
102 | let g:pymode_lint_checker = "pyflakes,pep8,mccabe"
103 | let g:pymode_lint_mccabe_complexity = 9
104 | let g:pymode_doc = 0
105 | let g:pymode_rope = 0
106 | let g:pymode_rope_complete_on_dot = 0
107 |
108 |
109 |
110 | " Keyboard maps
111 | " -----------------------------------------------------------------------------
112 | set pastetoggle= " F2 for paste mode
113 | nnoremap :set hlsearch! " Activate or disactive Search Highlighting
114 | let mapleader = "," " , is easier to reach than the default
115 | map a ggVG " select all
116 | vmap Q gq " wrap 80col paragraph vertically
117 |
118 |
119 |
120 | " Compile RestructeredText with rst2html
121 | " -----------------------------------------------------------------------------
122 | function! Compilerst()
123 | execute 'silent !rst2html % > /tmp/rsttemp.html'
124 | execute 'silent !firefox /tmp/rsttemp.html &'
125 | execute 'redraw!'
126 | endfunction
127 | nnoremap :call Compilerst()
128 |
129 |
130 |
131 | " Spell check per filetype
132 | " -----------------------------------------------------------------------------
133 | autocmd BufRead,BufNewFile *.md setlocal spell spelllang=en_us
134 | autocmd BufRead,BufNewFile *.rst setlocal spell spelllang=en_us
135 | autocmd BufRead,BufNewFile *.txt setlocal spell spelllang=en_us
136 | autocmd FileType gitcommit setlocal spell spelllang=en_us
137 |
138 |
139 |
140 | " Specific settings for filetypes
141 | " -----------------------------------------------------------------------------
142 | autocmd BufRead,BufNewFile *.rst setlocal tw=80
143 | autocmd FileType javascript set tabstop=2 sw=2
144 |
--------------------------------------------------------------------------------
/polybar/config:
--------------------------------------------------------------------------------
1 | ;==========================================================
2 | ;
3 | ;
4 | ; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
5 | ; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
6 | ; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
7 | ; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
8 | ; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
9 | ; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
10 | ;
11 | ;
12 | ; To learn more about how to configure Polybar
13 | ; go to https://github.com/polybar/polybar
14 | ;
15 | ; The README contains a lot of information
16 | ;
17 | ;==========================================================
18 |
19 | [colors]
20 | ;background = ${xrdb:color0:#222}
21 | background = #222
22 | background-alt = #444
23 | ;foreground = ${xrdb:color7:#222}
24 | foreground = #dfdfdf
25 | foreground-alt = #555
26 | primary = #ffb52a
27 | secondary = #e60053
28 | alert = #bd2c40
29 |
30 | [bar/mybar]
31 | ;monitor = ${env:MONITOR:HDMI-1}
32 | width = 100%
33 | height = 27
34 | ;offset-x = 1%
35 | ;offset-y = 1%
36 | radius = 6.0
37 | fixed-center = false
38 |
39 | background = ${colors.background}
40 | foreground = ${colors.foreground}
41 |
42 | line-size = 3
43 | line-color = #f00
44 |
45 | border-size = 4
46 | border-color = #00000000
47 |
48 | padding-left = 0
49 | padding-right = 2
50 |
51 | module-margin-left = 1
52 | module-margin-right = 2
53 |
54 | font-0 = misc fixed:pixelsize=10;1
55 | font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
56 | font-2 = siji:pixelsize=10;1
57 |
58 | modules-left = bspwm
59 | ; modules-center = mpd
60 | modules-right = filesystem pulseaudio xkeyboard memory cpu wlan battery temperature updates-arch-combined date
61 |
62 | tray-position = right
63 | tray-padding = 2
64 | ;tray-background = #0063ff
65 |
66 | wm-restack = bspwm
67 | ;wm-restack = i3
68 |
69 | ;override-redirect = true
70 |
71 | ;scroll-up = bspwm-desknext
72 | ;scroll-down = bspwm-deskprev
73 |
74 | ;scroll-up = i3wm-wsnext
75 | ;scroll-down = i3wm-wsprev
76 |
77 | cursor-click = pointer
78 | cursor-scroll = ns-resize
79 |
80 | [module/xwindow]
81 | type = internal/xwindow
82 | label = %title:0:30:...%
83 |
84 | [module/xkeyboard]
85 | type = internal/xkeyboard
86 | blacklist-0 = num lock
87 |
88 | format-prefix = " "
89 | format-prefix-foreground = ${colors.foreground-alt}
90 | format-prefix-underline = ${colors.secondary}
91 |
92 | label-layout = %layout%
93 | label-layout-underline = ${colors.secondary}
94 |
95 | label-indicator-padding = 2
96 | label-indicator-margin = 1
97 | label-indicator-background = ${colors.secondary}
98 | label-indicator-underline = ${colors.secondary}
99 |
100 | [module/filesystem]
101 | type = internal/fs
102 | interval = 60
103 |
104 | mount-0 = /
105 | mount-1 = /home
106 | mount-2 = /var
107 |
108 | label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
109 | label-unmounted = %mountpoint% not mounted
110 | label-unmounted-foreground = ${colors.foreground-alt}
111 |
112 | [module/bspwm]
113 | type = internal/bspwm
114 |
115 | label-focused = %index%
116 | label-focused-background = ${colors.background-alt}
117 | label-focused-underline= ${colors.primary}
118 | label-focused-padding = 2
119 |
120 | label-occupied = %index%
121 | label-occupied-padding = 2
122 |
123 | label-urgent = %index%!
124 | label-urgent-background = ${colors.alert}
125 | label-urgent-padding = 2
126 |
127 | label-empty = %index%
128 | label-empty-foreground = ${colors.foreground-alt}
129 | label-empty-padding = 2
130 |
131 | ; Separator in between workspaces
132 | ; label-separator = |
133 |
134 | [module/i3]
135 | type = internal/i3
136 | format =
137 | index-sort = true
138 | wrapping-scroll = false
139 |
140 | ; Only show workspaces on the same output as the bar
141 | ;pin-workspaces = true
142 |
143 | label-mode-padding = 2
144 | label-mode-foreground = #000
145 | label-mode-background = ${colors.primary}
146 |
147 | ; focused = Active workspace on focused monitor
148 | label-focused = %index%
149 | label-focused-background = ${colors.background-alt}
150 | label-focused-underline= ${colors.primary}
151 | label-focused-padding = 2
152 |
153 | ; unfocused = Inactive workspace on any monitor
154 | label-unfocused = %index%
155 | label-unfocused-padding = 2
156 |
157 | ; visible = Active workspace on unfocused monitor
158 | label-visible = %index%
159 | label-visible-background = ${self.label-focused-background}
160 | label-visible-underline = ${self.label-focused-underline}
161 | label-visible-padding = ${self.label-focused-padding}
162 |
163 | ; urgent = Workspace with urgency hint set
164 | label-urgent = %index%
165 | label-urgent-background = ${colors.alert}
166 | label-urgent-padding = 2
167 |
168 | ; Separator in between workspaces
169 | ; label-separator = |
170 |
171 |
172 | [module/mpd]
173 | type = internal/mpd
174 | format-online =
175 |
176 | icon-prev =
177 | icon-stop =
178 | icon-play =
179 | icon-pause =
180 | icon-next =
181 |
182 | label-song-maxlen = 25
183 | label-song-ellipsis = true
184 |
185 | [module/xbacklight]
186 | type = internal/xbacklight
187 |
188 | format =