├── 3rd-party └── .gitignore ├── Xdefaults.d ├── .gitignore ├── custom.xga ├── Makefile ├── custom.x1 ├── default.colors ├── win ├── bigfont ├── neon.colors ├── tangobright.colors ├── gruvbox-light.xresources ├── tango.colors ├── custom.cip ├── gruvbox-dark.xresources ├── tw-colors ├── pixelfont ├── custom.ghul └── custom.hoth ├── config ├── mpv │ ├── .gitignore │ ├── input.conf │ ├── config │ └── setup-scripts.sh ├── ncdu │ └── config ├── herbstluftwm │ ├── icons │ │ ├── cip │ │ ├── float │ │ ├── im │ │ ├── irc │ │ ├── mail │ │ ├── music │ │ ├── video │ │ ├── vim │ │ ├── web │ │ ├── xn │ │ ├── xbm8x8 │ │ │ ├── ac.xbm │ │ │ ├── arch.xbm │ │ │ ├── bug_01.xbm │ │ │ ├── cat.xbm │ │ │ ├── cpu.xbm │ │ │ ├── dish.xbm │ │ │ ├── fox.xbm │ │ │ ├── full.xbm │ │ │ ├── fwd.xbm │ │ │ ├── half.xbm │ │ │ ├── mail.xbm │ │ │ ├── mem.xbm │ │ │ ├── next.xbm │ │ │ ├── note.xbm │ │ │ ├── play.xbm │ │ │ ├── plug.xbm │ │ │ ├── prev.xbm │ │ │ ├── rwd.xbm │ │ │ ├── stop.xbm │ │ │ ├── temp.xbm │ │ │ ├── test.xbm │ │ │ ├── usb.xbm │ │ │ ├── ac_01.xbm │ │ │ ├── clock.xbm │ │ │ ├── empty.xbm │ │ │ ├── eye_l.xbm │ │ │ ├── eye_r.xbm │ │ │ ├── fs_01.xbm │ │ │ ├── fs_02.xbm │ │ │ ├── info_03.xbm │ │ │ ├── pause.xbm │ │ │ ├── bug_02.xbm │ │ │ ├── pacman.xbm │ │ │ ├── phones.xbm │ │ │ ├── shroom.xbm │ │ │ ├── spkr_03.xbm │ │ │ ├── usb_02.xbm │ │ │ ├── info_01.xbm │ │ │ ├── info_02.xbm │ │ │ ├── scorpio.xbm │ │ │ ├── spkr_01.xbm │ │ │ ├── spkr_02.xbm │ │ │ ├── wifi_01.xbm │ │ │ ├── wifi_02.xbm │ │ │ ├── bat_full_01.xbm │ │ │ ├── bluetooth.xbm │ │ │ ├── diskette.xbm │ │ │ ├── mouse_01.xbm │ │ │ ├── net_up_01.xbm │ │ │ ├── net_up_02.xbm │ │ │ ├── net_up_03.xbm │ │ │ ├── net_wired.xbm │ │ │ ├── bat_low_01.xbm │ │ │ ├── bat_low_02.xbm │ │ │ ├── bat_full_02.xbm │ │ │ ├── net_down_01.xbm │ │ │ ├── net_down_02.xbm │ │ │ ├── net_down_03.xbm │ │ │ ├── bat_empty_01.xbm │ │ │ ├── bat_empty_02.xbm │ │ │ ├── README │ │ │ └── arch_10x10.xbm │ │ └── own │ │ │ └── info_01.xbm │ ├── no-panel.sh │ ├── wselect.sh │ ├── restart.sh │ ├── gapped-dmenu.sh │ ├── panel.sh │ ├── fastterminal.sh │ ├── floatmon.sh │ ├── exec_on_tag.sh │ ├── toggleexternalmonitor.sh │ ├── pivot.sh │ ├── config-snippets │ │ └── overlap-borders.sh │ ├── thinklight.sh │ ├── calendar.sh │ ├── closeorkill.sh │ ├── xmobar.sh │ ├── themes │ │ ├── black-bar.css │ │ ├── separate-tabs.css │ │ └── rezlooks-gil-ouch-green.css │ └── x1-docking-station.sh ├── qutebrowser │ ├── .gitignore │ ├── userscripts │ │ ├── dict-jp-lookup │ │ ├── user-agent-switcher │ │ ├── reload-config │ │ └── data-href │ ├── user_agents │ └── password_fill_rc ├── alacritty │ ├── .gitignore │ ├── set-font.sh │ └── font.toml ├── pacaur │ └── config ├── pdfpc │ └── pdfpcrc ├── alot │ └── config ├── zathura │ └── zathurarc ├── hledger-iadd │ └── config.conf ├── openbox │ └── autostart.sh ├── katarakt-stylesheet.qss ├── conky │ ├── calendar.sh │ └── conky.conf ├── luakit │ ├── checkupdate.sh │ ├── increase.lua │ └── style.css ├── nvim │ └── ginit.vim ├── mygtkmenu.conf ├── rofi-bibbrowserrc └── doom │ └── packages.el ├── ghci ├── inputrc ├── spelling ├── README.md └── wordlist-german.txt ├── tigrc ├── etc ├── initcpio │ ├── hooks │ │ └── textmessage │ └── install │ │ └── textmessage ├── textmessage.sh ├── rc-local.service └── luksmount.sh ├── vitrc ├── openbox-themes ├── README.md ├── SuseOpenbox │ └── openbox-3 │ │ └── bullet.xbm ├── CappuchinoOpenbox │ └── openbox-3 │ │ └── bullet.xbm ├── MintOpenboxBlue │ └── openbox-3 │ │ └── bullet.xbm ├── SithWmOpenbox │ └── openbox-3 │ │ └── bullet.xbm ├── TangoGreenOpenbox │ └── openbox-3 │ │ └── bullet.xbm ├── MintOpenboxBlueGlossy │ └── openbox-3 │ │ └── bullet.xbm ├── MintOpenboxBlueGrey │ └── openbox-3 │ │ └── bullet.xbm └── ClearlooksClassicOpenbox │ └── openbox-3 │ └── bullet.xbm ├── utils ├── scan-fix-white-bg.sh ├── pdfbook.sh ├── yank-parameter ├── hdmi-audio.sh ├── pulse-use-default-sink.sh ├── alacritty-change-font.sh ├── minitouch ├── fix-mime-filename.sh ├── i3lock.sh ├── open ├── folderplaylist.sh ├── git-sendpr ├── no-internet.sh ├── now-playing-announce ├── MakefileForLatex.mk ├── ruprint ├── disable-ir-camera.sh ├── byzanz-interactive-hlwm ├── oneko.sh ├── scan-utils │ └── Makefile ├── audacity-marks-to-cue ├── sxiv-helper.sh ├── mpd-year-stat.sh ├── on-suspend.py ├── mpv-append.sh ├── stack-bindir.sh ├── mpd-playlist-all ├── mkusbdrive ├── pdf-wdiff.sh ├── mpd-boot.sh ├── rsnapshot-standalone.sh ├── with-same-pwd ├── pdftk-duplex.sh ├── pan2man ├── latex-clean ├── mosh-port.sh ├── scan-fix-pdf.sh ├── dirsize-plot.sh ├── ocr ├── adf2mp3.py ├── aur-build ├── dec2bin.sh ├── mpd-cp-state.sh ├── latex-include-tree.py ├── scan.sh ├── flac2mp3.sh ├── print-ls8 └── lscolors ├── mplayer.conf ├── calcrc ├── wtf └── ocaml.asciidoc ├── .gitignore ├── lsfiles.sh ├── xdg ├── netctl-rofi.desktop ├── suspend.desktop ├── screen-off.desktop ├── unison-buero.desktop ├── unison-musik.desktop ├── scrot2clip.desktop ├── qrscan.desktop ├── open-unknown-mime-fallback └── mutt-mailto.py ├── bash.d ├── settings.dachs ├── render.awk ├── mephisto └── render256.awk ├── ascii ├── gentoo ├── fu ├── forever-alone ├── logo.sh ├── snow.sh ├── mkissue ├── lockscreen.sh ├── hlwm-info.sh └── pipes.sh ├── shelllib.sh ├── open-alacritty-here.desktop ├── Makefile ├── menu ├── utf8select.sh ├── rofi-file-open.sh ├── hlwm-windowmenu.sh ├── rofi-netctl ├── hlwm-workspace.sh └── rofi-pass.sh ├── pandoc ├── filters │ └── notes.py └── defaults │ └── notes.yaml ├── latex-template ├── git-exclude ├── add-page-numbers.tex ├── blank-a4.tex ├── Makefile └── template.tex ├── bash_profile ├── pinforc ├── zprofile ├── finch-gntrc ├── emacs ├── mkmandir.sh ├── checkpackages.sh ├── setup-taskwarrior.sh ├── fetch-3rd-party.sh ├── gitconfig ├── configparty.md ├── README.md ├── ncmpcpp-config ├── setup-mpdscribble.sh ├── taskrc.cip ├── latexmkrc ├── mk-mpdconf.sh ├── abcde.conf ├── gvimrc └── screenrc /3rd-party/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /Xdefaults.d/.gitignore: -------------------------------------------------------------------------------- 1 | custom 2 | -------------------------------------------------------------------------------- /config/mpv/.gitignore: -------------------------------------------------------------------------------- 1 | scripts/ 2 | -------------------------------------------------------------------------------- /config/ncdu/config: -------------------------------------------------------------------------------- 1 | --color dark 2 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/cip: -------------------------------------------------------------------------------- 1 | xbm8x8/cat.xbm -------------------------------------------------------------------------------- /ghci: -------------------------------------------------------------------------------- 1 | :set prompt "\ESC[34mλ> \ESC[m" 2 | -------------------------------------------------------------------------------- /inputrc: -------------------------------------------------------------------------------- 1 | set completion-ignore-case on 2 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/float: -------------------------------------------------------------------------------- 1 | xbm8x8/fs_02.xbm -------------------------------------------------------------------------------- /config/herbstluftwm/icons/im: -------------------------------------------------------------------------------- 1 | xbm8x8/pacman.xbm -------------------------------------------------------------------------------- /config/herbstluftwm/icons/irc: -------------------------------------------------------------------------------- 1 | own/info_01.xbm -------------------------------------------------------------------------------- /config/herbstluftwm/icons/mail: -------------------------------------------------------------------------------- 1 | xbm8x8/mail.xbm -------------------------------------------------------------------------------- /config/herbstluftwm/icons/music: -------------------------------------------------------------------------------- 1 | xbm8x8/note.xbm -------------------------------------------------------------------------------- /config/herbstluftwm/icons/video: -------------------------------------------------------------------------------- 1 | xbm8x8/mem.xbm -------------------------------------------------------------------------------- /config/herbstluftwm/icons/vim: -------------------------------------------------------------------------------- 1 | xbm8x8/bug_02.xbm -------------------------------------------------------------------------------- /config/herbstluftwm/icons/web: -------------------------------------------------------------------------------- 1 | xbm8x8/dish.xbm -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xn: -------------------------------------------------------------------------------- 1 | xbm8x8/empty.xbm -------------------------------------------------------------------------------- /config/qutebrowser/.gitignore: -------------------------------------------------------------------------------- 1 | autoconfig.yml 2 | -------------------------------------------------------------------------------- /config/alacritty/.gitignore: -------------------------------------------------------------------------------- 1 | font-overwrite.yml 2 | -------------------------------------------------------------------------------- /spelling/README.md: -------------------------------------------------------------------------------- 1 | # Wordlist 2 | 3 | Wordlists for aspell 4 | -------------------------------------------------------------------------------- /config/pacaur/config: -------------------------------------------------------------------------------- 1 | builddir=$HOME/tmp.aur/ 2 | clean=false 3 | -------------------------------------------------------------------------------- /config/herbstluftwm/no-panel.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | exit 0 4 | -------------------------------------------------------------------------------- /Xdefaults.d/custom.xga: -------------------------------------------------------------------------------- 1 | 2 | *.background: #1d1d1d 3 | *.foreground: #fefefe 4 | -------------------------------------------------------------------------------- /config/mpv/input.conf: -------------------------------------------------------------------------------- 1 | [ multiply speed 0.9438743126816935 2 | ] multiply speed 1.059463094352953 3 | -------------------------------------------------------------------------------- /tigrc: -------------------------------------------------------------------------------- 1 | color cursor black green 2 | color title-blur black blue 3 | color title-focus black blue 4 | -------------------------------------------------------------------------------- /Xdefaults.d/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: xdefaults 2 | 3 | xdefaults: 4 | xrdb -cpp cpp -load ~/.Xdefaults 5 | 6 | 7 | -------------------------------------------------------------------------------- /etc/initcpio/hooks/textmessage: -------------------------------------------------------------------------------- 1 | # vim:set ft=sh: 2 | 3 | run_hook() { 4 | /bin/bash /etc/textmessage.sh 5 | } 6 | 7 | -------------------------------------------------------------------------------- /config/pdfpc/pdfpcrc: -------------------------------------------------------------------------------- 1 | option toolbox true 2 | option windowed-mode both 3 | option next-height 40 4 | option pointer-size 15 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/wselect.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ~/.bash_settings 4 | 5 | 6 | ~/git/herbstluftwm/scripts/wselect.sh "$@" 7 | 8 | -------------------------------------------------------------------------------- /vitrc: -------------------------------------------------------------------------------- 1 | 2 | # read tasks again after sync 3 | map \$=:!r task sync 4 | 5 | # quit without asking for confirmation 6 | map q=:q 7 | -------------------------------------------------------------------------------- /config/alot/config: -------------------------------------------------------------------------------- 1 | # vim: ft=ini 2 | 3 | theme = tw 4 | quit_on_last_bclose = True 5 | 6 | [bindings] 7 | / = prompt 'search ' 8 | q = bclose 9 | x = exit 10 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/ac.xbm: -------------------------------------------------------------------------------- 1 | #define ac_width 8 2 | #define ac_height 8 3 | static unsigned char ac_bits[] = { 4 | 0xFF, 0xF8, 0xF0, 0xF6, 0x6F, 0x0F, 0x1F, 0xFF }; 5 | -------------------------------------------------------------------------------- /config/qutebrowser/userscripts/dict-jp-lookup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | url="https://www.wadoku.de/search/$QUTE_SELECTED_TEXT" 4 | echo "open -t $url" >> "$QUTE_FIFO" 5 | 6 | 7 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/arch.xbm: -------------------------------------------------------------------------------- 1 | #define arch_width 8 2 | #define arch_height 8 3 | static unsigned char arch_bits[] = { 4 | 0x08, 0x08, 0x1C, 0x1C, 0x36, 0x22, 0x77, 0x41 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/bug_01.xbm: -------------------------------------------------------------------------------- 1 | #define bug_width 8 2 | #define bug_height 8 3 | static unsigned char bug_bits[] = { 4 | 0xC3, 0x24, 0x18, 0xDB, 0x3C, 0x7E, 0xBD, 0x99 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/cat.xbm: -------------------------------------------------------------------------------- 1 | #define cat_width 8 2 | #define cat_height 8 3 | static unsigned char cat_bits[] = { 4 | 0x81, 0xC3, 0xBD, 0xFF, 0x99, 0xFF, 0x7E, 0xBD }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/cpu.xbm: -------------------------------------------------------------------------------- 1 | #define cpu_width 8 2 | #define cpu_height 8 3 | static unsigned char cpu_bits[] = { 4 | 0xDB, 0x81, 0x3C, 0xBD, 0xBD, 0x3C, 0x81, 0xDB }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/dish.xbm: -------------------------------------------------------------------------------- 1 | #define dish_width 8 2 | #define dish_height 8 3 | static unsigned char dish_bits[] = { 4 | 0x81, 0x7B, 0x46, 0x4E, 0x5C, 0x3E, 0x77, 0xC3 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/fox.xbm: -------------------------------------------------------------------------------- 1 | #define fox_width 8 2 | #define fox_height 8 3 | static unsigned char fox_bits[] = { 4 | 0x81, 0xC3, 0xBD, 0xFF, 0x99, 0xDB, 0x7E, 0x18 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/full.xbm: -------------------------------------------------------------------------------- 1 | #define full_width 8 2 | #define full_height 8 3 | static unsigned char full_bits[] = { 4 | 0x3C, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/fwd.xbm: -------------------------------------------------------------------------------- 1 | #define fwd_width 8 2 | #define fwd_height 8 3 | static unsigned char fwd_bits[] = { 4 | 0x00, 0x12, 0x36, 0x7E, 0x7E, 0x36, 0x12, 0x00 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/half.xbm: -------------------------------------------------------------------------------- 1 | #define half_width 8 2 | #define half_height 8 3 | static unsigned char half_bits[] = { 4 | 0x3C, 0x4E, 0x8F, 0x8F, 0x8F, 0x8F, 0x4E, 0x3C }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/mail.xbm: -------------------------------------------------------------------------------- 1 | #define mail_width 8 2 | #define mail_height 8 3 | static unsigned char mail_bits[] = { 4 | 0x00, 0xFF, 0x7E, 0xBD, 0xDB, 0xE7, 0xFF, 0x00 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/mem.xbm: -------------------------------------------------------------------------------- 1 | #define mem_width 8 2 | #define mem_height 8 3 | static unsigned char mem_bits[] = { 4 | 0xAA, 0x00, 0xFE, 0xFE, 0xFE, 0xFE, 0x00, 0xAA }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/next.xbm: -------------------------------------------------------------------------------- 1 | #define next_width 8 2 | #define next_height 8 3 | static unsigned char next_bits[] = { 4 | 0x00, 0x42, 0x4E, 0x7E, 0x7E, 0x4E, 0x42, 0x00 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/note.xbm: -------------------------------------------------------------------------------- 1 | #define note_width 8 2 | #define note_height 8 3 | static unsigned char note_bits[] = { 4 | 0xFC, 0xFC, 0x84, 0x84, 0x84, 0x84, 0xE7, 0xE7 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/play.xbm: -------------------------------------------------------------------------------- 1 | #define play_width 8 2 | #define play_height 8 3 | static unsigned char play_bits[] = { 4 | 0x00, 0x06, 0x1E, 0x7E, 0x7E, 0x1E, 0x06, 0x00 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/plug.xbm: -------------------------------------------------------------------------------- 1 | #define plug_width 8 2 | #define plug_height 8 3 | static unsigned char plug_bits[] = { 4 | 0x03, 0x0F, 0x1E, 0x3E, 0x3C, 0x58, 0xA0, 0xC0 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/prev.xbm: -------------------------------------------------------------------------------- 1 | #define prev_width 8 2 | #define prev_height 8 3 | static unsigned char prev_bits[] = { 4 | 0x00, 0x42, 0x72, 0x7E, 0x7E, 0x72, 0x42, 0x00 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/rwd.xbm: -------------------------------------------------------------------------------- 1 | #define rwd_width 8 2 | #define rwd_height 8 3 | static unsigned char rwd_bits[] = { 4 | 0x00, 0x48, 0x6C, 0x7E, 0x7E, 0x6C, 0x48, 0x00 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/stop.xbm: -------------------------------------------------------------------------------- 1 | #define stop_width 8 2 | #define stop_height 8 3 | static unsigned char stop_bits[] = { 4 | 0x00, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x00 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/temp.xbm: -------------------------------------------------------------------------------- 1 | #define temp_width 8 2 | #define temp_height 8 3 | static unsigned char temp_bits[] = { 4 | 0xC8, 0xE0, 0x72, 0x28, 0x16, 0x09, 0x09, 0x06 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/test.xbm: -------------------------------------------------------------------------------- 1 | #define test_width 8 2 | #define test_height 8 3 | static unsigned char test_bits[] = { 4 | 0x0E, 0x13, 0x21, 0x41, 0x82, 0x84, 0xC8, 0x70 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/usb.xbm: -------------------------------------------------------------------------------- 1 | #define usb_width 8 2 | #define usb_height 8 3 | static unsigned char usb_bits[] = { 4 | 0x70, 0x88, 0xC4, 0xE2, 0x7E, 0x32, 0x09, 0x07 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/ac_01.xbm: -------------------------------------------------------------------------------- 1 | #define ac_01_width 8 2 | #define ac_01_height 8 3 | static unsigned char ac_01_bits[] = { 4 | 0x30, 0x28, 0xE4, 0x27, 0x27, 0xE4, 0x28, 0x30 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/clock.xbm: -------------------------------------------------------------------------------- 1 | #define clock_width 8 2 | #define clock_height 8 3 | static unsigned char clock_bits[] = { 4 | 0x3C, 0x5E, 0xEF, 0xF7, 0x87, 0xFF, 0x7E, 0x3C }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/empty.xbm: -------------------------------------------------------------------------------- 1 | #define empty_width 8 2 | #define empty_height 8 3 | static unsigned char empty_bits[] = { 4 | 0x3C, 0x42, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3C }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/eye_l.xbm: -------------------------------------------------------------------------------- 1 | #define eye_l_width 8 2 | #define eye_l_height 8 3 | static unsigned char eye_l_bits[] = { 4 | 0x00, 0x00, 0x1B, 0x02, 0x02, 0x84, 0xF9, 0x02 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/eye_r.xbm: -------------------------------------------------------------------------------- 1 | #define eye_r_width 8 2 | #define eye_r_height 8 3 | static unsigned char eye_r_bits[] = { 4 | 0x00, 0x00, 0xD8, 0x40, 0x40, 0x21, 0x9F, 0x40 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/fs_01.xbm: -------------------------------------------------------------------------------- 1 | #define fs_01_width 8 2 | #define fs_01_height 8 3 | static unsigned char fs_01_bits[] = { 4 | 0x46, 0x99, 0xBC, 0x66, 0x66, 0x3D, 0x99, 0x62 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/fs_02.xbm: -------------------------------------------------------------------------------- 1 | #define fs_02_width 8 2 | #define fs_02_height 8 3 | static unsigned char fs_02_bits[] = { 4 | 0xF1, 0x5B, 0x3D, 0x67, 0xE6, 0xBC, 0xDA, 0x8F }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/info_03.xbm: -------------------------------------------------------------------------------- 1 | #define info_width 8 2 | #define info_height 8 3 | static unsigned char info_bits[] = { 4 | 0x38, 0x38, 0x00, 0x3C, 0x38, 0x38, 0x38, 0x7C }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/pause.xbm: -------------------------------------------------------------------------------- 1 | #define pause_width 8 2 | #define pause_height 8 3 | static unsigned char pause_bits[] = { 4 | 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00 }; 5 | -------------------------------------------------------------------------------- /config/zathura/zathurarc: -------------------------------------------------------------------------------- 1 | 2 | # key bindings 3 | map navigate previous 4 | map navigate next 5 | map + zoom in 6 | map - zoom out 7 | 8 | map quit 9 | 10 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/bug_02.xbm: -------------------------------------------------------------------------------- 1 | #define bug_02_width 8 2 | #define bug_02_height 8 3 | static unsigned char bug_02_bits[] = { 4 | 0xC3, 0x24, 0x24, 0xDB, 0x3C, 0x7E, 0x99, 0x42 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/pacman.xbm: -------------------------------------------------------------------------------- 1 | #define pacman_width 8 2 | #define pacman_height 8 3 | static unsigned char pacman_bits[] = { 4 | 0x3C, 0x6E, 0xE7, 0xFF, 0x07, 0x1F, 0x7E, 0x3C }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/phones.xbm: -------------------------------------------------------------------------------- 1 | #define phones_width 8 2 | #define phones_height 8 3 | static unsigned char phones_bits[] = { 4 | 0x3C, 0x42, 0x81, 0x81, 0xA5, 0xE7, 0xE7, 0x66 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/shroom.xbm: -------------------------------------------------------------------------------- 1 | #define shroom_width 8 2 | #define shroom_height 8 3 | static unsigned char shroom_bits[] = { 4 | 0x3C, 0x42, 0x81, 0x81, 0xFF, 0x3C, 0x3C, 0x3C }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/spkr_03.xbm: -------------------------------------------------------------------------------- 1 | #define ysick_width 8 2 | #define ysick_height 8 3 | static unsigned char ysick_bits[] = { 4 | 0x4C, 0x93, 0x93, 0x97, 0x97, 0x93, 0x93, 0x4C }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/usb_02.xbm: -------------------------------------------------------------------------------- 1 | #define usb_02_width 8 2 | #define usb_02_height 8 3 | static unsigned char usb_02_bits[] = { 4 | 0x10, 0x50, 0x54, 0x54, 0x34, 0x18, 0x10, 0x10 }; 5 | -------------------------------------------------------------------------------- /config/hledger-iadd/config.conf: -------------------------------------------------------------------------------- 1 | # Write this to ~/.config/hledger-iadd/config.conf 2 | 3 | # Format used to parse dates 4 | #date-format = "[[%y/]%m/]%d" 5 | date-format = "%d[.[%m[.[%y]]]]" 6 | -------------------------------------------------------------------------------- /config/mpv/config: -------------------------------------------------------------------------------- 1 | # For pitch correction: 2 | # -af scaletempo=speed=pitch --audio-pitch-correction=no 3 | 4 | hwdec=auto 5 | 6 | [big-cache] 7 | #cache=123400 8 | #demuxer-readahead-secs=20 9 | -------------------------------------------------------------------------------- /openbox-themes/README.md: -------------------------------------------------------------------------------- 1 | # openbox-themes 2 | 3 | A collection of openbox themes. Install by copying the directories 4 | to `~/.themes/` 5 | 6 | My absolute faviourite is `TangoGreenOpenbox`. 7 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/own/info_01.xbm: -------------------------------------------------------------------------------- 1 | #define info_01_width 8 2 | #define info_01_height 8 3 | static unsigned char info_01_bits[] = { 4 | 0x7e, 0xff, 0xff, 0xff, 0x7e, 0x18, 0x08, 0x00 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/info_01.xbm: -------------------------------------------------------------------------------- 1 | #define info_01_width 8 2 | #define info_01_height 8 3 | static unsigned char info_01_bits[] = { 4 | 0x3C, 0x66, 0xFF, 0xE7, 0xE7, 0xE7, 0x66, 0x3C }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/info_02.xbm: -------------------------------------------------------------------------------- 1 | #define info_02_width 8 2 | #define info_02_height 8 3 | static unsigned char info_02_bits[] = { 4 | 0xFF, 0xE7, 0xFF, 0xE7, 0xE7, 0xE7, 0xE7, 0xFF }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/scorpio.xbm: -------------------------------------------------------------------------------- 1 | #define scorpio_width 8 2 | #define scorpio_height 8 3 | static unsigned char scorpio_bits[] = { 4 | 0x42, 0x81, 0xDB, 0x3C, 0xDB, 0x5A, 0x99, 0x30 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/spkr_01.xbm: -------------------------------------------------------------------------------- 1 | #define spkr_01_width 8 2 | #define spkr_01_height 8 3 | static unsigned char spkr_01_bits[] = { 4 | 0x08, 0x4C, 0x8F, 0xAF, 0xAF, 0x8F, 0x4C, 0x08 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/spkr_02.xbm: -------------------------------------------------------------------------------- 1 | #define spkr_02_width 8 2 | #define spkr_02_height 8 3 | static unsigned char spkr_02_bits[] = { 4 | 0x08, 0x0C, 0x0F, 0x1F, 0x1F, 0x0F, 0x0C, 0x08 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/wifi_01.xbm: -------------------------------------------------------------------------------- 1 | #define wifi_01_width 8 2 | #define wifi_01_height 8 3 | static unsigned char wifi_01_bits[] = { 4 | 0x80, 0xA0, 0xA8, 0xAB, 0xAB, 0xA8, 0xA0, 0x80 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/wifi_02.xbm: -------------------------------------------------------------------------------- 1 | #define wifi_02_width 8 2 | #define wifi_02_height 8 3 | static unsigned char wifi_02_bits[] = { 4 | 0x40, 0x90, 0xA4, 0xA9, 0xA9, 0xA4, 0x90, 0x40 }; 5 | -------------------------------------------------------------------------------- /openbox-themes/SuseOpenbox/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 8 2 | #define bullet_height 8 3 | static unsigned char bullet_bits[] = { 4 | 0x04, 0x0c, 0x18, 0x30, 0x30, 0x18, 0x0c, 0x04 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/bat_full_01.xbm: -------------------------------------------------------------------------------- 1 | #define bat_full_width 8 2 | #define bat_full_height 8 3 | static unsigned char bat_full_bits[] = { 4 | 0x18, 0x7E, 0x42, 0x5A, 0x5A, 0x5A, 0x42, 0x7E }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/bluetooth.xbm: -------------------------------------------------------------------------------- 1 | #define bluetooth_width 8 2 | #define bluetooth_height 8 3 | static unsigned char bluetooth_bits[] = { 4 | 0x18, 0x2A, 0x6C, 0x38, 0x38, 0x6C, 0x2A, 0x18 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/diskette.xbm: -------------------------------------------------------------------------------- 1 | #define diskette_width 8 2 | #define diskette_height 8 3 | static unsigned char diskette_bits[] = { 4 | 0xFF, 0x81, 0x81, 0x81, 0xBD, 0xB5, 0xB5, 0xFE }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/mouse_01.xbm: -------------------------------------------------------------------------------- 1 | #define mouse_01_width 8 2 | #define mouse_01_height 8 3 | static unsigned char mouse_01_bits[] = { 4 | 0xEE, 0xEE, 0xEE, 0x82, 0xFE, 0xFE, 0xFE, 0x7C }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/net_up_01.xbm: -------------------------------------------------------------------------------- 1 | #define net_up_01_width 8 2 | #define net_up_01_height 8 3 | static unsigned char net_up_01_bits[] = { 4 | 0x18, 0x3C, 0x7E, 0xFF, 0x3C, 0x3C, 0x3C, 0x78 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/net_up_02.xbm: -------------------------------------------------------------------------------- 1 | #define net_up_02_width 8 2 | #define net_up_02_height 8 3 | static unsigned char net_up_02_bits[] = { 4 | 0x18, 0x3C, 0x7E, 0xFF, 0x3C, 0x3C, 0x3C, 0x1E }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/net_up_03.xbm: -------------------------------------------------------------------------------- 1 | #define net_up_03_width 8 2 | #define net_up_03_height 8 3 | static unsigned char net_up_03_bits[] = { 4 | 0x10, 0x38, 0x7C, 0xFE, 0x38, 0x38, 0x38, 0x38 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/net_wired.xbm: -------------------------------------------------------------------------------- 1 | #define net_wired_width 8 2 | #define net_wired_height 8 3 | static unsigned char net_wired_bits[] = { 4 | 0x00, 0x1C, 0x1C, 0x7F, 0x7F, 0x7F, 0x55, 0x7F }; 5 | -------------------------------------------------------------------------------- /openbox-themes/CappuchinoOpenbox/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 8 2 | #define bullet_height 8 3 | static unsigned char bullet_bits[] = { 4 | 0x04, 0x0c, 0x18, 0x30, 0x30, 0x18, 0x0c, 0x04 }; 5 | -------------------------------------------------------------------------------- /openbox-themes/MintOpenboxBlue/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 8 2 | #define bullet_height 8 3 | static unsigned char bullet_bits[] = { 4 | 0x04, 0x0c, 0x18, 0x30, 0x30, 0x18, 0x0c, 0x04 }; 5 | -------------------------------------------------------------------------------- /openbox-themes/SithWmOpenbox/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 8 2 | #define bullet_height 8 3 | static unsigned char bullet_bits[] = { 4 | 0x04, 0x0c, 0x18, 0x30, 0x30, 0x18, 0x0c, 0x04 }; 5 | -------------------------------------------------------------------------------- /openbox-themes/TangoGreenOpenbox/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 8 2 | #define bullet_height 8 3 | static unsigned char bullet_bits[] = { 4 | 0x04, 0x0c, 0x18, 0x30, 0x30, 0x18, 0x0c, 0x04 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/bat_low_01.xbm: -------------------------------------------------------------------------------- 1 | #define bat_low_01_width 8 2 | #define bat_low_01_height 8 3 | static unsigned char bat_low_01_bits[] = { 4 | 0x18, 0x7E, 0x42, 0x42, 0x42, 0x5A, 0x42, 0x7E }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/bat_low_02.xbm: -------------------------------------------------------------------------------- 1 | #define bat_low_02_width 8 2 | #define bat_low_02_height 8 3 | static unsigned char bat_low_02_bits[] = { 4 | 0x00, 0x7F, 0x41, 0xC5, 0xC5, 0x41, 0x7F, 0x00 }; 5 | -------------------------------------------------------------------------------- /openbox-themes/MintOpenboxBlueGlossy/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 8 2 | #define bullet_height 8 3 | static unsigned char bullet_bits[] = { 4 | 0x04, 0x0c, 0x18, 0x30, 0x30, 0x18, 0x0c, 0x04 }; 5 | -------------------------------------------------------------------------------- /openbox-themes/MintOpenboxBlueGrey/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 8 2 | #define bullet_height 8 3 | static unsigned char bullet_bits[] = { 4 | 0x04, 0x0c, 0x18, 0x30, 0x30, 0x18, 0x0c, 0x04 }; 5 | -------------------------------------------------------------------------------- /utils/scan-fix-white-bg.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ::() { 4 | echo ":: $*" >&2 5 | "$@" 6 | } 7 | 8 | THRESHOLD=${THRESHOLD:-80} 9 | 10 | :: mogrify -white-threshold "$THRESHOLD%" "$@" 11 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/bat_full_02.xbm: -------------------------------------------------------------------------------- 1 | #define bat_full_02_width 8 2 | #define bat_full_02_height 8 3 | static unsigned char bat_full_02_bits[] = { 4 | 0x00, 0x7F, 0x41, 0xDD, 0xDD, 0x41, 0x7F, 0x00 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/net_down_01.xbm: -------------------------------------------------------------------------------- 1 | #define net_down_01_width 8 2 | #define net_down_01_height 8 3 | static unsigned char net_down_01_bits[] = { 4 | 0x1E, 0x3C, 0x3C, 0x3C, 0xFF, 0x7E, 0x3C, 0x18 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/net_down_02.xbm: -------------------------------------------------------------------------------- 1 | #define net_down_02_width 8 2 | #define net_down_02_height 8 3 | static unsigned char net_down_02_bits[] = { 4 | 0x78, 0x3C, 0x3C, 0x3C, 0xFF, 0x7E, 0x3C, 0x18 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/net_down_03.xbm: -------------------------------------------------------------------------------- 1 | #define net_down_03_width 8 2 | #define net_down_03_height 8 3 | static unsigned char net_down_03_bits[] = { 4 | 0x38, 0x38, 0x38, 0x38, 0xFE, 0x7C, 0x38, 0x10 }; 5 | -------------------------------------------------------------------------------- /mplayer.conf: -------------------------------------------------------------------------------- 1 | # Write your default config options here! 2 | msgcolor=1 3 | msgmodule=1 4 | ao=pulse 5 | 6 | # alter pitch by one semitone: 7 | # -af scaletempo=speed=pitch -speed 1.05946309 8 | 9 | 10 | -------------------------------------------------------------------------------- /openbox-themes/ClearlooksClassicOpenbox/openbox-3/bullet.xbm: -------------------------------------------------------------------------------- 1 | #define bullet_width 8 2 | #define bullet_height 8 3 | static unsigned char bullet_bits[] = { 4 | 0x04, 0x0c, 0x18, 0x30, 0x30, 0x18, 0x0c, 0x04 }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/bat_empty_01.xbm: -------------------------------------------------------------------------------- 1 | #define bat_empty_01_width 8 2 | #define bat_empty_01_height 8 3 | static unsigned char bat_empty_01_bits[] = { 4 | 0x18, 0x7E, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7E }; 5 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/bat_empty_02.xbm: -------------------------------------------------------------------------------- 1 | #define bat_empty_02_width 8 2 | #define bat_empty_02_height 8 3 | static unsigned char bat_empty_02_bits[] = { 4 | 0x00, 0x7F, 0x41, 0xC1, 0xC1, 0x41, 0x7F, 0x00 }; 5 | -------------------------------------------------------------------------------- /utils/pdfbook.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # A wrapper around pdfbook2 with sane defaults: 4 | # Just keep the margin of the original PDF. 5 | # 6 | exec pdfbook2 --paper=a4paper -i 0 -o 0 -t 0 -b 0 -n "$@" 7 | 8 | -------------------------------------------------------------------------------- /calcrc: -------------------------------------------------------------------------------- 1 | /* 2 | vim: ft=c 3 | */ 4 | PI = pi() 5 | Pi = PI 6 | pi = PI 7 | e = exp(1) 8 | 9 | jpy = 0.00772816288 10 | define binom(n,k) { return n! / k! / (n-k)! ; } 11 | 12 | epsilon(1e-100) 13 | display(100) 14 | 15 | -------------------------------------------------------------------------------- /wtf/ocaml.asciidoc: -------------------------------------------------------------------------------- 1 | Ocaml errors 2 | ============ 3 | 4 | Spot the 'syntax error': 5 | 6 | ---- 7 | type dllist = 8 | | Empty 9 | | NonEmpty 10 | 11 | fromList xs = Empty 12 | ---- 13 | 14 | 15 | // vim: ft=asciidoc 16 | -------------------------------------------------------------------------------- /config/mpv/setup-scripts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # setup scripts dir 4 | 5 | ::() { 6 | echo ":: $*" >&2 7 | "$@" 8 | } 9 | :: mkdir -p ~/.config/mpv/scripts/ 10 | :: ln -sf /usr/lib/mpv/mpris.so ~/.config/mpv/scripts/ 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ignore all backups 2 | *~ 3 | # ignore swap files 4 | .*.swp 5 | # ignore some special annoying files 6 | config/zathura/bookmarks 7 | 8 | config/qutebrowser/bookmarks/ 9 | config/qutebrowser/quickmarks 10 | config/qutebrowser/qsettings/ 11 | -------------------------------------------------------------------------------- /config/herbstluftwm/restart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | STATEFILE=~/.config/herbstluftwm/state 5 | 6 | ~/dev/c/herbstluftwm/scripts/savestate.sh > "$STATEFILE" || 7 | ~/git/herbstluftwm/scripts/savestate.sh > "$STATEFILE" 8 | herbstclient wmexec "$@" 9 | 10 | -------------------------------------------------------------------------------- /lsfiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # list all relevant files for specified hostname 4 | hostname="$1" 5 | 6 | gitdir="$HOME/dotfiles" 7 | source "$gitdir/config.sh" 8 | 9 | for i in ${!files[@]} ; do 10 | echo "${files[$i]}" 11 | done 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /utils/yank-parameter: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #echo ">>> $1 <<<" 4 | # yank the given parameter to the clipboard 5 | printf '%s' "$1" | xclip -selection clipboard -i 6 | # yank the given parameter to the primary selection 7 | printf '%s' "$1" | xclip -selection primary -i 8 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/README: -------------------------------------------------------------------------------- 1 | This set of icons is mostly created keeping dzen2 in mind. 2 | If you're missing an icon or have suggestions how to improve 3 | the ones already existing, please contact me at 4 | 5 | 6 | Thanks for downloading! 7 | -------------------------------------------------------------------------------- /config/openbox/autostart.sh: -------------------------------------------------------------------------------- 1 | # Autostart-bash-script by twi 2 | 3 | # DO NOT ACTIVATE THIS! 4 | #. $GLOBALAUTOSTART 5 | 6 | 7 | case "$HOSTNAME" in 8 | x1) 9 | xfce4-panel -d & 10 | ;; 11 | *) 12 | lxpanel& 13 | ;; 14 | esac 15 | -------------------------------------------------------------------------------- /config/herbstluftwm/icons/xbm8x8/arch_10x10.xbm: -------------------------------------------------------------------------------- 1 | #define arch_10x10_width 10 2 | #define arch_10x10_height 10 3 | static unsigned char arch_10x10_bits[] = { 4 | 0x10, 0x00, 0x10, 0x00, 0x38, 0x00, 0x38, 0x00, 0x7C, 0x00, 0x7C, 0x00, 5 | 0xEE, 0x00, 0xC6, 0x00, 0xC7, 0x01, 0x01, 0x01 }; 6 | -------------------------------------------------------------------------------- /config/katarakt-stylesheet.qss: -------------------------------------------------------------------------------- 1 | QLineEdit { 2 | background: rgba(0,0,0,85%); 3 | color: white; 4 | selection-color: black; 5 | selection-background-color: #9fbc00; 6 | margin: 0px; 7 | padding: 4px; 8 | border-top-right-radius: 6px; 9 | opacity: 200; 10 | } 11 | -------------------------------------------------------------------------------- /xdg/netctl-rofi.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Version=1.0 4 | Name=Netctl Rofi 5 | GenericName=Menü an Netzwerkprofilen 6 | Comment= 7 | Exec=~/dotfiles/menu/rofi-netctl 8 | Icon=network-wireless 9 | Terminal=false 10 | Type=Application 11 | Categories= 12 | MimeType= 13 | -------------------------------------------------------------------------------- /xdg/suspend.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Version=1.0 4 | Name=Sitzung in Standby 5 | GenericName=Standby und sperren 6 | Comment=Danach Sperren 7 | Exec=bash -c 'playerctl pause ; systemctl suspend -i ; sleep 10 ; xset -b' 8 | Icon=screensaver 9 | Terminal=false 10 | Type=Application 11 | Categories= 12 | MimeType= 13 | -------------------------------------------------------------------------------- /etc/initcpio/install/textmessage: -------------------------------------------------------------------------------- 1 | # vim: set ft=sh: 2 | 3 | build() { 4 | SCRIPT="textmessage" 5 | add_binary /bin/bash 6 | add_file /etc/textmessage.sh 7 | add_runscript 8 | } 9 | 10 | help () 11 | { 12 | cat<&2 7 | "$@" 8 | } 9 | 10 | ask() { 11 | echo -n "==> $1 [y/n] " 12 | read -n 1 reply 13 | echo 14 | if [[ "${reply^^}" == 'Y' ]] ; then 15 | return 0 16 | else 17 | return 1 18 | fi 19 | } 20 | 21 | fail() { 22 | echo "$*" >&2 ; exit 1 23 | } 24 | -------------------------------------------------------------------------------- /spelling/wordlist-german.txt: -------------------------------------------------------------------------------- 1 | personal_ws-1.1 de_DE 1 2 | Funktor 3 | Funktors 4 | Koalgebra 5 | Koalgebren 6 | koalgebraisch 7 | koalgebraische 8 | zustandsbasierte 9 | zustandsbasierten 10 | Äquivarianz 11 | äquivariant 12 | Strukturerhaltung 13 | Kategorientheorie 14 | Bindungsfunktor 15 | Transposition 16 | Transpositionen 17 | Gruppenoperation 18 | Gruppenoperationen 19 | Infix 20 | Variablennamen 21 | Potenzmenge 22 | Strukturerhaltung 23 | -------------------------------------------------------------------------------- /utils/alacritty-change-font.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | values=( 4 | 'Bitstream Vera Sans Mono' 5 | 'terminus' 6 | ) 7 | font="${values[0]}" 8 | 9 | for socket in /run/user/`id -u`/Alacritty-${DISPLAY}-*.sock ; do 10 | if [ -e "$socket" ] ; then 11 | ALACRITTY_SOCKET="$socket" \ 12 | alacritty msg \ 13 | config --window-id '-1' \ 14 | font.normal.family="$font" 15 | fi 16 | done 17 | 18 | -------------------------------------------------------------------------------- /open-alacritty-here.desktop: -------------------------------------------------------------------------------- 1 | # Put this in ~/.local/share/kservices5/ServiceMenus/ 2 | # It will create a context menu entry in dolphin 3 | [Desktop Entry] 4 | Type=Service 5 | X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory 6 | Actions=openQTerminalHere; 7 | X-KDE-AuthorizeAction=shell_access 8 | 9 | [Desktop Action openQTerminalHere] 10 | Name=Open Alacritty here 11 | Icon=utilities-terminal 12 | Exec=/usr/bin/alacritty --working-directory %f 13 | -------------------------------------------------------------------------------- /config/alacritty/set-font.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | case "$1" in 4 | monospace) 5 | fontfamily=terminus 6 | ;; 7 | *) 8 | fontfamily='Bitstream Vera Sans Mono' 9 | ;; 10 | esac 11 | 12 | cat > ~/.config/alacritty/font-overwrite.yml < \e[0mmodules missing in local config" 8 | echo -e "\e[1;42m < \e[0mmodules missing in global config" 9 | echo 10 | echo "Diffs found:" 11 | echo -e "$(diff <(f rc.lua) <(f /etc/xdg/luakit/rc.lua ) | 12 | grep -E '^[<>]' | 13 | sed 's/^> /\\e[1;41m > \\e[0m/' | 14 | sed 's/^< /\\e[1;42m < \\e[0m/' | 15 | cat 16 | )" 17 | 18 | -------------------------------------------------------------------------------- /config/herbstluftwm/panel.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | if false ; then # [ $HOSTNAME = hoth ] ; then 5 | geo=$(herbstclient attr monitors."$1".geometry) 6 | x_coord=${geo#*+} 7 | y_coord=${x_coord#*+} 8 | x_coord=${x_coord%+*} 9 | if [ "$x_coord" -lt "1920" ] ; then 10 | # no panel on hoth on left monitor 11 | exit 0 12 | else 13 | exec ~/git/barpyrus/barpyrus.py "$@" 14 | fi 15 | else 16 | exec ~/git/barpyrus/barpyrus.py "$@" 17 | fi 18 | -------------------------------------------------------------------------------- /xdg/open-unknown-mime-fallback: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # (currently unused) 4 | 5 | file="$1" 6 | # make file path absolute 7 | if [[ "${file:0:1}" != / ]] ; then 8 | file="$PWD/$file" 9 | fi 10 | basename="${file##*/}" 11 | extension="${file##*.}" 12 | 13 | case "$extension" in 14 | gp3|gp4) 15 | exec tuxguitar-bin "$file" 16 | ;; 17 | *) 18 | notify-send "Unknown extension $extension" \ 19 | "No application for $basename" 20 | ;; 21 | esac 22 | 23 | 24 | -------------------------------------------------------------------------------- /utils/minitouch: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | print_help() { 4 | cat <&2 13 | "$@" 14 | } 15 | 16 | inc_mtime() { 17 | mtime=$(stat -c %Y "$1") 18 | let mtime++ 19 | :: touch -d "@$mtime" "$1" 20 | } 21 | 22 | if [[ $# -eq 0 ]] ; then 23 | print_help >&2 24 | exit 1 25 | else 26 | for file in "$@" ; do 27 | inc_mtime "$file" 28 | done 29 | fi 30 | 31 | -------------------------------------------------------------------------------- /utils/fix-mime-filename.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | oldname="$1" 4 | newname=$(perl -MEncode=from_to -pe 'from_to $_, "MIME-Header", "utf-8"' <<< "$oldname") 5 | 6 | ::() { 7 | echo ":: $*" >&2 8 | "$@" 9 | } 10 | 11 | if [[ "$oldname" == "$newname" ]] ; then 12 | echo "no changes in \"$oldname\" regarding mime-encoding" 13 | else 14 | echo "mv -i \"$oldname\" \"$newname\" ?" 15 | read -n 1 -p "[yn] " res 16 | echo 17 | if [[ "$res" == "y" ]] ; then 18 | :: mv -i "$oldname" "$newname" 19 | fi 20 | fi 21 | -------------------------------------------------------------------------------- /utils/i3lock.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # from simigern 4 | geometry=$(xwininfo -root | grep 'geometry' | awk '{print $2}') 5 | #xwd -root \ 6 | # | convert xwd:- -scale 5% -scale '!'"${geometry}" png:- \ 7 | # | exec i3lock -f -i /dev/stdin 8 | 9 | # newer i3lock versions read the image twice, and so we need to do the following: 10 | img_path="$HOME/.i3lock-blur.png" 11 | xwd -root | convert xwd:- -scale 5% -scale '!'"${geometry}" png:- > "$img_path" 12 | chmod 600 "$img_path" 13 | i3lock --nofork -f -i "$img_path" 14 | rm "$img_path" 15 | -------------------------------------------------------------------------------- /utils/open: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # wrapper around xdg-open 3 | 4 | for file in "$@" ; do 5 | 6 | filetype=$(XDG_CURRENT_DESKTOP='X-Generic' xdg-mime query filetype "$file") 7 | default=$(XDG_CURRENT_DESKTOP='X-Generic' xdg-mime query default "$filetype") 8 | 9 | echo -e "Opening \e[32m${file##*/}\e[0m of type \e[32m$filetype\e[0m with \e[33m${default%.desktop}\e[0m" >&2 10 | # Force a generic DE such that xdg-mime is used to open the right file browser 11 | XDG_CURRENT_DESKTOP='X-Generic' xdg-open "$file" 1>/dev/null 2>/dev/null & 12 | 13 | done 14 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: all install xdefaults xrdb xdg checkpackages 3 | 4 | install: 5 | ./lsfiles.sh | dryrun=0 ./link.sh - 6 | 7 | all: install dry-run dryrun xdg man checkpackages 8 | 9 | dryrun: 10 | ./lsfiles.sh | dryrun=1 ./link.sh - 11 | 12 | dry-run: 13 | ./lsfiles.sh | dryrun=1 ./link.sh - 14 | 15 | xrdb: xdefaults 16 | 17 | # xrdb -cpp cpp -merge ~/.Xdefaults 18 | xdefaults: 19 | xrdb -cpp cpp -load ~/.Xdefaults 20 | 21 | xdg: 22 | xdg/setup.sh 23 | 24 | man: 25 | ./mkmandir.sh 26 | 27 | checkpackages: 28 | ./checkpackages.sh 29 | 30 | -------------------------------------------------------------------------------- /menu/utf8select.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | utf8db="$HOME/dotfiles/menu/utf8db" 4 | 5 | if line=$(grep -v '^#' "$utf8db"|grep -v '^$' \ 6 | |rofi -dmenu -i -p 'Zeichen' -columns 3) ; then 7 | #echo you selected "$line" 8 | # char is everything after the last space 9 | char=${line##* } 10 | #echo "you selected $char" 11 | #xdotool key "$char" 12 | echo -n "$char" |xclip -selection clipboard -i 13 | echo -n "$char" |xclip -selection primary -i 14 | # it is written to clipboard, now type it 15 | xdotool key shift+Insert 16 | fi 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /utils/folderplaylist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # find -mindepth 1 -type d | while read -r d; do pushd "$d" ; [ -f play.m3u ] && continue ; echo "$d" ; ~/dotfiles/utils/folderplaylist.sh > play.m3u ; popd; done 4 | 5 | # or for named playlists: 6 | # find -mindepth 1 -type d | while read -r d; do pushd "$d" ; x="${d#./}" ; echo "${x//\// }" ; ~/dotfiles/utils/folderplaylist.sh > "${x//\// }".m3u ; popd; done 7 | find -iname '*.mp3' | while read line ; do 8 | echo $(id3v2 -l "$line" |grep ^TRCK|sed 's,^.* ,,') "$line" 9 | done|sort -n|sed 's,[^ ]* \(\./\)*,,' | sed 's,$,\r,' 10 | 11 | -------------------------------------------------------------------------------- /Xdefaults.d/default.colors: -------------------------------------------------------------------------------- 1 | ! -------------------------------------------------- 2 | ! vim: nu:ai:si:et:ts=4:sw=4:ft=xdefaults 3 | ! -------------------------------------------------- 4 | 5 | ! with white background 6 | urxvt*background: white 7 | urxvt*foreground: black 8 | *color0: black 9 | *color1: red3 10 | *color2: green3 11 | *color3: yellow3 12 | *color4: blue2 13 | *color5: magenta3 14 | *color6: cyan3 15 | *color7: gray90 16 | *color8: gray50 17 | *color9: red 18 | *color10: green 19 | *color11: yellow 20 | *color12: rgb:5c/5c/ff 21 | *color13: magenta 22 | *color14: cyan 23 | *color15: white 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Xdefaults.d/win: -------------------------------------------------------------------------------- 1 | Xft.dpi:                96 2 | Xft.antialias:          true 3 | Xft.hinting:            true 4 | Xft.hintstyle:          hintfull 5 | Xft.rgba:               rgb 6 | 7 | Xcursor.theme:          Classic-White 8 | #xterm*boldFont: xft:mono:bold:antialias=false:pixelsize=10 9 | #xterm*font:             xft:mono:bold:antialias=false:size=9 10 | xterm*font: -*-fixed-*-*-*-*-*-200-*-*-*-*-* 11 | xterm*boldFont: -*-fixed-*-*-*-*-*-200-*-*-*-*-* 12 | xterm.reverseVideo:     true 13 | xterm.scrollBar:        false 14 | xterm.transparent:      false 15 | xterm*foreground: white 16 | xterm*background: black 17 | 18 | -------------------------------------------------------------------------------- /utils/git-sendpr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # move commits to a feature branch 4 | set -e 5 | 6 | targetbranch="$1" 7 | currentbranch=$(git branch --show-current) 8 | 9 | git push origin HEAD:"${targetbranch}" 10 | 11 | # the commit we will reset $currentbranch back to 12 | lastcommit="HEAD~1" 13 | lastcommit=$(git rev-parse "$lastcommit") 14 | 15 | # detach from the current branch 16 | git checkout --detach "HEAD" 17 | # reset the branch first 18 | git branch -f "$currentbranch" "$lastcommit" 19 | # and then go back there, taking the changes with us: 20 | git checkout --merge "$currentbranch" 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /utils/no-internet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # disable all non-localhost network for processes in the 4 | # no-internet group 5 | 6 | ::() { 7 | echo ":: $*" >&2 8 | "$@" 9 | } 10 | 11 | for tables in iptables ip6tables ; do 12 | :: $tables -A OUTPUT -m owner --gid-owner no-internet -d localhost -j ACCEPT 13 | :: $tables -A OUTPUT -m owner --gid-owner no-internet -j DROP 14 | done 15 | 16 | # In order to make it work: add a visudo-line like 17 | # %users ALL=(:no-internet) NOPASSWD: ALL 18 | 19 | # to make sound working under sudo, add 20 | 21 | # Defaults env_keep += "XDG_RUNTIME_DIR" 22 | 23 | 24 | -------------------------------------------------------------------------------- /pandoc/filters/notes.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # from https://stackoverflow.com/a/61234067/4400896 3 | # requires the archlinux package: python-pandocfilters 4 | # (but does not work for me at the moment because python 5 | # does not find the pandocfilters package even though it is 6 | # installed) 7 | import pandocfilters 8 | #from import toJSONFilter, Null 9 | 10 | def behead(key, value, format, meta): 11 | if key == "Header" and value[0] == 1 and "title" not in meta: 12 | meta["title"] = {"t": "MetaInlines", "c": value[2]} 13 | return Null() 14 | 15 | if __name__ == "__main__": 16 | toJSONFilter(behead) 17 | -------------------------------------------------------------------------------- /etc/rc-local.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Run /etc/rc.local on reboot and after suspend 3 | ConditionPathExists=/etc/rc.local 4 | After=suspend.target 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/etc/rc.local start 9 | 10 | [Install] 11 | WantedBy=suspend.target multi-user.target 12 | #WantedBy=hibernate.target 13 | #WantedBy=hybrid-sleep.target 14 | 15 | ## INSTALLATION: 16 | ## ------------ 17 | # copy this file to /etc/systemd/system/rc-local.service 18 | # systemctl daemon-reload 19 | # systemctl enable rc-local 20 | # 21 | # check that it is installed correctly: 22 | # systemctl status rc-local 23 | # (it also shows the output of /etc/rc.local) 24 | -------------------------------------------------------------------------------- /latex-template/git-exclude: -------------------------------------------------------------------------------- 1 | # put this to .git/info/exclude in git repos managing latex 2 | # 3 | # git ls-files --others --exclude-from=.git/info/exclude 4 | # Lines that start with '#' are comments. 5 | # For a project mostly in C, the following would be a good set of 6 | # exclude patterns (uncomment them if you want to use them): 7 | # *.[oa] 8 | .*.swp 9 | *~ 10 | *.pdf 11 | *.aux 12 | *.fdb_latexmk 13 | *.log 14 | *.out 15 | *.pdf 16 | *.synctex.gz 17 | *.synctex(busy) 18 | *.toc 19 | *.bbl 20 | *.blg 21 | *.idx 22 | *.ilg 23 | *.fls 24 | *.ind 25 | *.zip 26 | *.dvi 27 | *.eps 28 | *.bcf 29 | *.run.xml 30 | *.nav 31 | *.snm 32 | *.vrb 33 | *.vtc 34 | *.spl 35 | -------------------------------------------------------------------------------- /latex-template/add-page-numbers.tex: -------------------------------------------------------------------------------- 1 | \documentclass[11pt,a4paper]{article} 2 | % add page numbers to a PDF file 3 | % compile this with lualatex 4 | \usepackage{fancyhdr} 5 | \usepackage{lmodern} 6 | \usepackage[ 7 | margin=2.2cm, 8 | ]{geometry} 9 | %\pagecolor{red} 10 | \usepackage{fontspec} 11 | \setmainfont{LiberationSerif} 12 | \usepackage{pdfpages} 13 | \fancypagestyle{customplain}{% 14 | \fancyhf{}% 15 | \fancyhf[cf]{\thepage}% 16 | \renewcommand*\headrulewidth{0pt}} 17 | 18 | \pagestyle{customplain} 19 | \begin{document} 20 | % pagecommand={} means: avoid the pagestyle 'empty' 21 | \includepdf[pagecommand={},pages={1-},scale=1]{orig.pdf} 22 | \end{document} 23 | -------------------------------------------------------------------------------- /utils/now-playing-announce: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # announce currently played track in mpd to some irc channel in weechat 3 | # requirements: mpc 4 | 5 | notes=( ♩ ♪ ♬ ♫ ) 6 | put_notes() { 7 | echo -n "${notes[$((RANDOM % ${#notes[@]}))]}" 8 | echo -n "${notes[$((RANDOM % ${#notes[@]}))]}" 9 | } 10 | 11 | m() { 12 | ~/dotfiles/menu/playerctl.sh metadata "$1" 13 | } 14 | 15 | msg_prefix=${msg_prefix:-np: $(put_notes) } 16 | msg_suffix=${msg_suffix:- $(put_notes)} 17 | msg="$(m artist) — $(m title) ($(m album))" 18 | 19 | msg="${msg_prefix}${msg}${msg_suffix}" 20 | echo "$msg" 21 | echo -n "$msg" | xclip -i 22 | echo -n "$msg" | xclip -i -selection clipboard 23 | 24 | 25 | -------------------------------------------------------------------------------- /config/qutebrowser/password_fill_rc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Show all password fields in the menu 4 | query_entries() { 5 | # safe queried url for choose_entry 6 | export queried_url="$1" 7 | mapfile -t files < <(find -L "$PREFIX" -iname '*.gpg' -printf '%P\n' |sed 's,\.gpg$,,') 8 | } 9 | 10 | # Even if there is only one entry, always show a menu 11 | # for user confirmation. 12 | choose_entry() { 13 | MENU_COMMAND=( 14 | rofi -dmenu 15 | -p "qutebrowser> " 16 | -filter "$queried_url" 17 | -mesg $'Pick a password entry for '"${QUTE_URL//&/&}"'' 18 | ) 19 | file=$( printf "%s\n" "${files[@]}" | "${MENU_COMMAND[@]}" ) 20 | } 21 | 22 | 23 | -------------------------------------------------------------------------------- /utils/MakefileForLatex.mk: -------------------------------------------------------------------------------- 1 | src = $(shell grep -l '\\begin{document}' *.tex) 2 | pdf = $(src:.tex=.pdf) 3 | pdftrimmed = $(pdf:.pdf=-trimmed.pdf) 4 | 5 | .PHONY: all clean install trimmed info 6 | 7 | all: $(pdf) $(pdftrimmed) 8 | 9 | trimmed: $(pdftrimmed) 10 | 11 | %-trimmed.pdf: %.tex 12 | latexmk -pdf -jobname=$(patsubst %.pdf,%,$@) -synctex=1 $< 13 | 14 | %.pdf: %.tex $(wildcard *.bib *.sty) 15 | latexmk -pdf -synctex=1 $< 16 | 17 | clean: 18 | rm -f $(wildcard *.out *.bbl *.bcf *.vtc *.fls *.log *.aux *.blg) 19 | rm -f $(wildcard *.fdb_latexmk) 20 | rm -f $(pdftrimmed) $(pdf) 21 | 22 | info: 23 | @echo Detected '(main)' TeX--Files: ${src} 24 | @echo PDF files: ${pdf} 25 | @echo Trimmed PDF files: ${pdftrimmed} 26 | -------------------------------------------------------------------------------- /config/herbstluftwm/fastterminal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # give some space very fast for a terminal 4 | # requires bc 5 | 6 | # usage: 7 | 8 | bottom=false 9 | 10 | [ "$1" = -b ] && bottom=true && shift 11 | [ "$1" = -t ] && bottom=false && shift 12 | [ "$1" = -h ] && echo "Usage: $0 [-h] [-b|-t] [RATIO]" && exit 13 | 14 | 15 | ratio=${1:-0.2} 16 | child1="(clients horizontal:0)" 17 | child2="" 18 | focus=0 # 1 means old, 0 means new frame 19 | 20 | if $bottom ; then 21 | focus=$(echo "1-$focus"|bc) 22 | ratio=$(echo "1-$ratio"|bc -l) 23 | child2="$child1" 24 | child1="" 25 | fi 26 | args="vertical:$ratio:$focus" 27 | 28 | herbstclient load "(split $args $child1 $(herbstclient dump) $child2 )" 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /utils/ruprint: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # print via the samba server at Radboud University 4 | 5 | # Usage: ./ruprint PDFFILE 6 | # where PDFFILE is the pdf to be printed. 7 | # the script then asks for the U-number and password. 8 | 9 | ::() { 10 | echo -ne "\e[1;33m:: \e[0;32m" >&2 11 | echo -n "$*" >&2 12 | echo -e "\e[0m" >&2 13 | "$@" 14 | } 15 | set -e 16 | 17 | #ppdurl='https://wiki.cncz.science.ru.nl/images/c/cd/FollowMe.ppd' 18 | 19 | read -p 'RU user, e.g. U1234: ' ruid 20 | 21 | ruid="${ruid//$'\t'/}" 22 | psfile=/tmp/print-$(date +%Y-%m-%d-%H-%M).ps 23 | 24 | :: pdftops -paper A4 -duplex "$1" "$psfile" 25 | :: smbclient --configfile=/dev/null -U 'ru\'"${ruid,,}" //print.hosting.ru.nl/FollowMe -c "print $psfile" 26 | 27 | :: rm "$psfile" 28 | -------------------------------------------------------------------------------- /config/herbstluftwm/floatmon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | geom=$(xwininfo -root | 4 | grep -E 'Width:|Height:' | 5 | cut -d' ' -f4 | 6 | sed '1s/$/x/' | 7 | tr -d '\n') 8 | 9 | hc() { herbstclient "$@" ; } 10 | 11 | Mod=${Mod:-Mod4} 12 | 13 | # create a floating tag 14 | tag=floating 15 | hc add "$tag" 16 | hc floating "$tag" on 17 | 18 | monitor=floatmon 19 | # create a monitor 20 | if ! hc add_monitor "$geom+0+0" "$tag" "$monitor" ; then 21 | # or move it if it already exists 22 | hc move_monitor "$monitor" "$geom+0+0" 23 | fi 24 | 25 | # remove all padding 26 | hc pad "$monitor" 0 0 0 0 27 | # pin the tag to that monitor 28 | hc lock_tag "$monitor" 29 | 30 | hc keybind "$Mod-Shift-f" move "$tag" 31 | 32 | hc raise_monitor "$monitor" 33 | 34 | -------------------------------------------------------------------------------- /config/herbstluftwm/exec_on_tag.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;} 4 | 5 | tag="$1" 6 | expire="120" # expiry time in seconds 7 | shift 8 | 9 | if [ -z "$1" ] ;then 10 | echo "usage: $0 TAG COMMAND [ARGS ...]" >&2 11 | echo "executes a COMMAND on a specific TAG" >&2 12 | echo "if TAG does not exist, it will be created" >&2 13 | echo "if TAG is empty, current tag will be used" >&2 14 | 15 | fi 16 | 17 | tag=${tag:-$(hc attr tags.focus.name)} 18 | 19 | # ensure tag exists 20 | hc add "$tag" 21 | 22 | # move next window from this process to this tag 23 | # prepend the rule so that it may be overwritten by existing custom rules e.g. 24 | # in the autostart 25 | hc rule prepend maxage="$expire" pid="$$" tag="$tag" once 26 | 27 | exec "$@" 28 | -------------------------------------------------------------------------------- /utils/disable-ir-camera.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # first run this to see the 'locations' of the usb devices: 4 | # for device in $(ls /sys/bus/usb/devices/*/product); do echo $device;cat $device;done 5 | # and then disable it: 6 | # echo '1-5' | sudo tee /sys/bus/usb/drivers/usb/unbind 7 | 8 | for i in /sys/bus/usb/devices/*/product ; do 9 | if grep 'Integrated IR Camera' < "$i" > /dev/null ; then 10 | # get what's in the wildcard 11 | bus=${i#/sys/bus/usb/devices/} 12 | bus=${bus%/product} 13 | if [[ $(id -u) -eq 0 ]] ; then 14 | echo "tee /sys/bus/usb/drivers/usb/unbind <<< $bus" 15 | tee /sys/bus/usb/drivers/usb/unbind <<< $bus 16 | else 17 | echo "sudo tee /sys/bus/usb/drivers/usb/unbind <<< $bus" 18 | sudo tee /sys/bus/usb/drivers/usb/unbind <<< $bus 19 | fi 20 | fi 21 | done 22 | -------------------------------------------------------------------------------- /config/nvim/ginit.vim: -------------------------------------------------------------------------------- 1 | " Enable Mouse 2 | set mouse=a 3 | 4 | " Set Editor Font 5 | if exists(':GuiFont') 6 | " Use GuiFont! to ignore font errors 7 | GuiFont Bitstream\ Vera\ Sans\ Mono:h8 8 | endif 9 | 10 | " Disable GUI Tabline 11 | if exists(':GuiTabline') 12 | GuiTabline 0 13 | endif 14 | 15 | " Disable GUI Popupmenu 16 | if exists(':GuiPopupmenu') 17 | GuiPopupmenu 0 18 | endif 19 | 20 | " Enable GUI ScrollBar 21 | if exists(':GuiScrollBar') 22 | GuiScrollBar 1 23 | endif 24 | 25 | " Right Click Context Menu (Copy-Cut-Paste) 26 | nnoremap :call GuiShowContextMenu() 27 | inoremap :call GuiShowContextMenu() 28 | xnoremap :call GuiShowContextMenu()gv 29 | snoremap :call GuiShowContextMenu()gv 30 | -------------------------------------------------------------------------------- /Xdefaults.d/bigfont: -------------------------------------------------------------------------------- 1 | ! -------------------------------------------------- 2 | ! vim: nu:ai:si:et:ts=4:sw=4:ft=xdefaults 3 | ! -------------------------------------------------- 4 | 5 | ! with white background 6 | !urxvt*background: #f8f8f8 7 | !urxvt*foreground: #2e3436 8 | !urxvt*background: black 9 | !urxvt*foreground: white 10 | !*color0: #555753 11 | !*color1: #ef2929 12 | !*color2: #4e9a06 13 | !*color3: #edd400 14 | !*color4: #204a87 15 | !*color5: #5c3566 16 | !*color6: #8f5902 17 | !*color7: #888a85 18 | !*color8: #babdb6 19 | !*color9: #cc0000 20 | !*color10: #73d216 21 | !*color11: #fce94f 22 | !*color12: #3465a4 23 | !*color13: #75507b 24 | !*color14: #c17d11 25 | !*color15: #d3d7cf 26 | 27 | 28 | urxvt*font: xft:Bitstream Vera Sans Mono:bold:size=14 29 | urxvt*boldFont: xft:Bitstream Vera Sans Mono:bold:size=14 30 | 31 | -------------------------------------------------------------------------------- /Xdefaults.d/neon.colors: -------------------------------------------------------------------------------- 1 | ! -------------------------------------------------- 2 | ! file: ~/.Xdefaults 3 | ! author: thorsten wssman 4 | ! modified: February 2009 5 | ! vim: nu:ai:si:et:ts=4:sw=4:ft=xdefaults 6 | ! -------------------------------------------------- 7 | 8 | *foreground: #ebebeb 9 | *background: #151515 10 | 11 | !black 12 | *color0: #393939 13 | *color8: #474747 14 | 15 | !red 16 | *color1: #FE005F 17 | *color9: #FE6767 18 | 19 | !green 20 | *color2: #AED600 21 | *color10: #8BE15D 22 | 23 | !yellow 24 | *color3: #FE8E00 25 | *color11: #FEB345 26 | 27 | !blue 28 | *color4: #1165E8 29 | *color12: #5495FE 30 | 31 | !magenta 32 | *color5: #FF5825 33 | *color13: #FF00EC 34 | 35 | !cyan 36 | *color6: #FF3824 37 | *color14: #D3F80A 38 | 39 | !white 40 | *color7: #D1D1D1 41 | *color15: #fefefe 42 | 43 | -------------------------------------------------------------------------------- /etc/luksmount.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # mount a partition that is in a LVM that is in a luks container 4 | 5 | ::() { 6 | echo ":: $*" >&2 7 | "$@" 8 | } 9 | 10 | # the actual luks device: 11 | luksDevice=/dev/disk/by-label/sg2020 12 | # the name used for the decrypted thing, i.e. the lvm physical volume: 13 | luksName=sg2020-pv 14 | # the partition in the above lvm to mount: 15 | partition=/dev/mapper/sg2020--vg-sg2020--backup 16 | 17 | if [[ -b /dev/mapper/$luksName ]] ; then 18 | echo "$luksName is already open" 19 | else 20 | :: cryptsetup luksOpen $luksDevice $luksName 21 | fi 22 | :: vgscan 23 | while sleep 0.3; do 24 | echo "Waiting for $partition to show up..." 25 | if [[ -b "$partition" ]] ; then 26 | break 27 | fi 28 | done 29 | :: fsck "$partition" 30 | :: mount "$partition" 31 | 32 | -------------------------------------------------------------------------------- /bash_profile: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.bash_profile 3 | # 4 | 5 | # extend path-variable 6 | if [ -d "${HOME}/.local/bin" ] ; then 7 | export PATH="${HOME}/.local/bin:${PATH}" 8 | fi 9 | if [ -d "${HOME}/bin" ] ; then 10 | export PATH="${HOME}/bin:${PATH}" 11 | fi 12 | if [ -d "${HOME}/.cabal/bin" ] ;then 13 | export PATH="${HOME}/.cabal/bin:${PATH}" 14 | fi 15 | 16 | # extend man-variable 17 | if [ -d "${HOME}/man" ] ; then 18 | export MANPATH="${HOME}/man:${MANPATH}" 19 | fi 20 | 21 | 22 | [[ -f ~/.bashrc ]] && . ~/.bashrc 23 | 24 | # OPAM configuration 25 | #. /home/thorsten/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true 26 | 27 | #if [ $(tty) = /dev/tty1 ] && ! which emerge 2> /dev/null > /dev/null ; then 28 | if [ $(tty) = /dev/tty1 ] ; then 29 | startx -nolisten tcp 30 | logout 31 | fi 32 | 33 | # vim: ft=sh 34 | -------------------------------------------------------------------------------- /pinforc: -------------------------------------------------------------------------------- 1 | # COLORS 2 | COL_NORMAL = COLOR_DEFAULT, COLOR_DEFAULT, NO_BOLD, NO_BLINK 3 | COL_MENUSELECTED = COLOR_BLACK, COLOR_GREEN, NO_BOLD, NO_BLINK 4 | COL_MENU=COLOR_BLUE,COLOR_DEFAULT,BOLD, NO_BLINK 5 | COL_NOTESELECTED=COLOR_BLACK,COLOR_GREEN,NO_BOLD, NO_BLINK 6 | COL_NOTE=COLOR_CYAN,COLOR_DEFAULT,NO_BOLD, NO_BLINK 7 | COL_TOPLINE=COLOR_GREEN,COLOR_BLACK,NO_BOLD, NO_BLINK 8 | COL_BOTTOMLINE=COLOR_BLACK,COLOR_YELLOW,NO_BOLD, NO_BLINK 9 | COL_MANUALBOLD=COLOR_CYAN,COLOR_DEFAULT,BOLD, NO_BLINK 10 | COL_MANUALITALIC=COLOR_GREEN,COLOR_DEFAULT,BOLD, NO_BLINK 11 | COL_URL=COLOR_MAGENTA,COLOR_DEFAULT,BOLD, NO_BLINK 12 | COL_URLSELECTED=COLOR_RED,COLOR_DEFAULT,NO_BOLD, NO_BLINK 13 | COL_INFOHIGHLIGHT=COLOR_YELLOW,COLOR_DEFAULT,NO_BOLD, NO_BLINK 14 | 15 | # KEYS 16 | KEY_END_1=KEY_END 17 | 18 | # settings 19 | APROPOS=true 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /config/mygtkmenu.conf: -------------------------------------------------------------------------------- 1 | iconsize = 16 2 | 3 | item = _Dateien 4 | cmd = thunar 5 | icon = /usr/share/icons/Tango/16x16/apps/file-manager.png 6 | 7 | item = _Konsole 8 | cmd = urxvt 9 | icon = /usr/share/icons/Tango/16x16/apps/terminal.png 10 | 11 | item = _Browser 12 | cmd = luakit 13 | icon = /usr/share/icons/Tango/16x16/apps/browser.png 14 | 15 | item = _Mail 16 | cmd = urxvt -e mutt 17 | icon = /usr/share/icons/Tango/16x16/apps/mail_generic.png 18 | 19 | item = _Theme 20 | cmd = lxappearance 21 | icon = /usr/share/icons/Tango/16x16/apps/preferences-desktop-theme.png 22 | 23 | item = _Fernsehen 24 | cmd = xdtv 25 | icon = /usr/share/icons/Tango/16x16/categories/gnome-multimedia.png 26 | 27 | item = _Abmelden 28 | cmd = /home/thorsten/scripts/logout-dialog.sh 29 | icon = /usr/share/icons/gnome/16x16/actions/gtk-quit.png 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ascii/forever-alone: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mirror() { 4 | rev | tr '/\\()' '\\/)(' 5 | } 6 | 7 | # y,x,color 8 | colors=( 9 | 0,0,32 10 | 2,3,31 11 | ) 12 | 13 | # construct color replacement 14 | 15 | sedparam='' 16 | 17 | for i in "${colors[@]}" ; do 18 | [ -z "$sedparam" ] || sedparam+=';' 19 | i=( $(tr , ' ' <<< "$i") ) 20 | y=$((1+${i[0]})) ; x=${i[1]} ; c=${i[2]} 21 | sedparam+="$y,${y}s#^\(.\{$x\}\)#\1$(echo -ne \\e[${c}m)#" 22 | done 23 | 24 | colorize() { 25 | #cat | sed 's/\(.*\)/\1\1\1\1\1/' 26 | sed "$sedparam" 27 | } 28 | 29 | cat < /dev/null ; then 11 | # switching to external monitor 12 | # VGA1 connected but not active 13 | xrandr --output VGA1 --auto --output LVDS1 --off 14 | update_hlwm 15 | elif xrandr --current | grep "LVDS1 connected (" > /dev/null ; then 16 | # LVDS1 connected but not active 17 | # switching to internal display 18 | xrandr --output VGA1 --off --output LVDS1 --auto 19 | update_hlwm 20 | setxkbmap us -variant altgr-intl -option compose:menu -option ctrl:nocaps 21 | fi 22 | 23 | 24 | -------------------------------------------------------------------------------- /ascii/logo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | red__="\e[0;31m" 3 | yello="\e[1;32m" 4 | green="\e[0;33m" 5 | blue_="\e[1;34m" 6 | win__="\e[1;37m" 7 | seven="\e[1;36m" 8 | subsc="\e[0;35m" 9 | echo -e " $red__ .-._. $green .-._. $win__ _ ___ __ $seven _____" 10 | echo -e " $red__ / / $green/ / $win__| | / (_)___ ____/ /___ _ _______ $seven/__ /" 11 | echo -e " $red__ /.-._/ $green/.-._/ $win__| | /| / / / __ \/ __ / __ \ | /| / / ___/ $seven / / " 12 | echo -e " $blue_ .-._. $yello .-._. $win__| |/ |/ / / / / / /_/ / /_/ / |/ |/ (__ ) $seven / / " 13 | echo -e " $blue_ / / $yello/ / $win__|__/|__/_/_/ /_/\__,_/\____/|__/|__/____/ $seven/_/ " 14 | echo -e " $blue_/.-._/ $yello/.-._/ ${subsc}Windows 7 Professional Edition (c) Microsoft 2009 " 15 | echo -e "\e[0m" 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /config/herbstluftwm/pivot.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | 5 | connected() { 6 | xrandr | grep "$1 connected.*$2" > /dev/null 7 | } 8 | 9 | case "$HOSTNAME" in 10 | hoth) 11 | rotateoutput='DVI-D-0' 12 | args=( --left-of HDMI-0 ) 13 | ;; 14 | x1) 15 | rotateoutput='HDMI1' 16 | args=( --right-of eDP1 ) 17 | ;; 18 | faui8thorsten) 19 | rotateoutput='DP-5' 20 | args=( --left-of DP-2 ) 21 | ;; 22 | *) 23 | echo "I do not know what to rotate on $HOSTNAME" >&2 24 | exit 1 25 | ;; 26 | esac 27 | 28 | if connected "$rotateoutput" ' left (' ; then 29 | # rotate back to normal 30 | xrandr --output "$rotateoutput" --rotate normal "${args[@]}" 31 | else 32 | xrandr --output "$rotateoutput" --rotate left "${args[@]}" 33 | fi 34 | herbstclient detect_monitors 35 | ~/git/herbstluftwm/share/restartpanels.sh 36 | -------------------------------------------------------------------------------- /utils/byzanz-interactive-hlwm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | msg() { 4 | echo ":: $*" 5 | } 6 | 7 | key="${key:-Mod4-Control-s}" 8 | 9 | get-mouse-location() { 10 | herbstclient --wait byzanz_stop 11 | eval `xdotool getmouselocation --shell` 12 | } 13 | herbstclient keybind "$key" emit_hook byzanz_stop 14 | 15 | msg "Move mouse to top left corner of the recording area,
Then press $key" 16 | get-mouse-location 17 | 18 | tl_x=$X 19 | tl_y=$Y 20 | 21 | msg "Move mouse to bottom right corner of the recording area,
Then press $key" 22 | get-mouse-location 23 | 24 | br_x=$X 25 | br_y=$Y 26 | 27 | msg "Starting in 3…" 28 | sleep 1 29 | msg "Starting in 2…" 30 | sleep 1 31 | msg "Starting in 1…" 32 | sleep 1 33 | msg "GO!" 34 | byzanz-record --exec 'herbstclient --wait byzanz_stop' -x "$tl_x" -y "$tl_y" -w "$((br_x - tl_x))" -h "$((br_y - tl_y))" "$@" 35 | 36 | -------------------------------------------------------------------------------- /utils/oneko.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # reset this via: 4 | # 5 | # killall oneko 6 | # xsetroot -cursor_name left_ptr 7 | 8 | 9 | # spawn a random oneko 10 | 11 | themes=( 12 | -neko 13 | -tora 14 | ) 15 | # colors to use: fillcolor,bordercolor 16 | colors=( 17 | '#DCDCDC,#383838' 18 | '#A88A53,#60430E' 19 | '#FFA500,#6C4600' 20 | '#AFAFAF,#2F2F2F' 21 | '#FFC0CB,#770015' 22 | ) 23 | 24 | count=10 25 | 26 | for i in $(seq 1 $count) ; do 27 | 28 | t=${themes[$((i % ${#themes[@]}))]} 29 | c=${colors[$((i % ${#colors[@]}))]} 30 | x=$((RANDOM % 60 + 10* $i)) 31 | y=$((RANDOM % 60 + 10* $i)) 32 | speed=$((10 + RANDOM % 15)) 33 | 34 | echo oneko -fg "${c##*,}" -bg "${c%%,*}" "$t" -speed "$speed" -position "0x0+${x}+${y}" 35 | oneko -fg "${c##*,}" -bg "${c%%,*}" "$t" -speed "$speed" -position "0x0+${x}+${y}" & 36 | 37 | done 38 | -------------------------------------------------------------------------------- /zprofile: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.zprofile 3 | # 4 | 5 | # extend path-variable 6 | if [ -d "${HOME}/.local/bin" ] ; then 7 | export PATH="${HOME}/.local/bin:${PATH}" 8 | fi 9 | if [ -d "${HOME}/bin" ] ; then 10 | export PATH="${HOME}/bin:${PATH}" 11 | fi 12 | if [ -d "${HOME}/.cabal/bin" ] ;then 13 | export PATH="${HOME}/.cabal/bin:${PATH}" 14 | fi 15 | if [ -d "${HOME}/dotfiles/utils" ] ;then 16 | export PATH="${PATH}:${HOME}/dotfiles/utils" 17 | fi 18 | 19 | # extend man-variable 20 | if [ -d "${HOME}/man" ] ; then 21 | export MANPATH="${HOME}/man:${MANPATH}" 22 | fi 23 | 24 | 25 | # OPAM configuration 26 | #. /home/thorsten/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true 27 | 28 | #if [ $(tty) = /dev/tty1 ] && ! which emerge 2> /dev/null > /dev/null ; then 29 | if [ $(tty) = /dev/tty1 ] ; then 30 | startx -nolisten tcp 31 | logout 32 | fi 33 | 34 | -------------------------------------------------------------------------------- /Xdefaults.d/tangobright.colors: -------------------------------------------------------------------------------- 1 | ! -------------------------------------------------- 2 | ! vim: nu:ai:si:et:ts=4:sw=4:ft=xdefaults 3 | ! -------------------------------------------------- 4 | 5 | ! with white background 6 | urxvt*background: #f8f8f8 7 | urxvt*shading: 170 8 | urxvt*foreground: #2e3436 9 | !urxvt*background: black 10 | !urxvt*foreground: white 11 | !*color0: #555753 12 | URxvt.color0: #dedede 13 | *color0: green 14 | *color8: #babdb6 15 | ! red 16 | *color1: #ef2929 17 | *color9: #ff0000 18 | ! green 19 | *color2: #4e9a06 20 | *color10: #73d216 21 | ! yellow 22 | !*color11: #fce94f 23 | *color3: #C98D00 24 | *color11: #C98D00 25 | ! blue 26 | *color4: #204a87 27 | *color12: #3465a4 28 | ! magenta 29 | *color5: #5c3566 30 | *color13: #75507b 31 | ! brown/cyan 32 | *color6: #8f5902 33 | *color14: #c17d11 34 | ! grey 35 | *color7: #4B4D4A 36 | *color15: #969696 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /latex-template/blank-a4.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a4paper]{article} 2 | %\usepackage[showframe,margin=2cm]{geometry} 3 | 4 | \usepackage[utf8]{inputenc} 5 | \usepackage[T1]{fontenc} 6 | \usepackage{hyperref} 7 | %\usepackage[ngerman]{babel} 8 | 9 | %\setlength{\parindent}{0em} 10 | %\setlength{\parskip}{0.5em} 11 | 12 | \title{Empty A4 Page} 13 | \author{} 14 | 15 | \makeatletter 16 | \hypersetup{ 17 | final, 18 | hidelinks, 19 | urlcolor=black, 20 | pdftitle={\@title}, 21 | pdfauthor={\@author}, 22 | pdfkeywords={}, 23 | pdfduplex={DuplexFlipLongEdge}, 24 | } 25 | \makeatother 26 | \pagestyle{empty} 27 | 28 | \begin{document} 29 | ~ 30 | \end{document} 31 | % another dictionary: 32 | %%% ispell-local-dictionary: "british-ize" 33 | 34 | % vim: tw=80 35 | % 36 | %%% Local Variables: 37 | %%% TeX-PDF-mode:t 38 | %%% ispell-local-dictionary: "german" 39 | %%% TeX-master: t 40 | %%% End: 41 | -------------------------------------------------------------------------------- /ascii/snow.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # from https://www.maketecheasier.com/10-more-funny-andor-useless-linux-commands/ 4 | # who claims to have it from myh3r3.com 5 | 6 | LINES=$(tput lines) 7 | COLUMNS=$(tput cols) 8 | 9 | declare -A snowflakes 10 | declare -A lastflakes 11 | 12 | clear 13 | 14 | function move_flake() { 15 | i="$1" 16 | 17 | if [ "${snowflakes[$i]}" = "" ] || [ "${snowflakes[$i]}" = "$LINES" ]; then 18 | snowflakes[$i]=0 19 | else 20 | if [ "${lastflakes[$i]}" != "" ]; then 21 | printf "\033[%s;%sH \033[1;1H " ${lastflakes[$i]} $i 22 | fi 23 | fi 24 | 25 | printf "\033[%s;%sH*\033[1;1H" ${snowflakes[$i]} $i 26 | 27 | lastflakes[$i]=${snowflakes[$i]} 28 | snowflakes[$i]=$((${snowflakes[$i]}+1)) 29 | } 30 | 31 | while : 32 | do 33 | i=$(($RANDOM % $COLUMNS)) 34 | 35 | move_flake $i 36 | 37 | for x in "${!lastflakes[@]}" 38 | do 39 | move_flake "$x" 40 | done 41 | 42 | sleep 0.1 43 | done 44 | -------------------------------------------------------------------------------- /config/herbstluftwm/config-snippets/overlap-borders.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # a setup to make the borders of neighbor tiling windows overlap 4 | 5 | # the border width: (increase to make the effect more obvious) 6 | w=5 # 1 7 | 8 | # also try to make the borders between windows in different frames overlap: 9 | # if this is activated (set to 1), then 10 | overlapBetweenFrames=1 11 | 12 | 13 | if [[ $overlapBetweenFrames -eq 1 ]] ; then 14 | herbstclient set frame_gap -$w 15 | else 16 | herbstclient set frame_gap 0 17 | fi 18 | herbstclient set frame_border_width 0 19 | herbstclient set frame_padding $w 20 | herbstclient set window_gap -$w 21 | herbstclient set smart_frame_surroundings off 22 | herbstclient set smart_window_surroundings off 23 | herbstclient attr theme.tiling.border_width $w 24 | herbstclient attr theme.tiling.inner_width 0 25 | herbstclient attr theme.tiling.outer_width 0 26 | 27 | 28 | -------------------------------------------------------------------------------- /utils/scan-utils/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # Usage: 3 | # Edit inkscape svg files ending with _p[0-9].svg 4 | # Then run 'make' 5 | # 6 | inkscapesvg = $(wildcard *_p*.svg) 7 | inkscapepdf = $(inkscapesvg:.svg=.pdf) 8 | inkscapejpg = $(inkscapesvg:.svg=.jpg) 9 | filename_pattern = $(wildcard *_p1.svg) 10 | main_final = $(filename_pattern:_p1.svg=_filled.pdf) 11 | 12 | .PHONY: all 13 | 14 | all: $(main_final) 15 | jpg: $(inkscapejpg) 16 | 17 | %_filled.pdf: $(inkscapepdf) Makefile 18 | pdftk $(patsubst %.svg,%.pdf,$(wildcard $(patsubst %_filled.pdf,%,$@)_p*.svg)) cat output $@ 19 | 20 | 21 | %.pdf: %.svg 22 | @echo $< "--->" $@ 23 | inkscape --export-filename=$@ --export-pdf-version=1.5 $< 24 | 25 | %.jpg: %.svg 26 | @echo $< "--->" $@ 27 | inkscape --export-dpi=150 --export-type=png --export-filename=- --export-pdf-version=1.5 $< | convert - -background white -flatten -alpha off $@ 28 | 29 | clean: 30 | rm -f -v $(inkscapepdf) $(main_tax) 31 | -------------------------------------------------------------------------------- /config/herbstluftwm/thinklight.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # make the thinklight blink on urgent windows 4 | 5 | file=${file:-/sys/class/leds/tpacpi\:\:thinklight/brightness} 6 | interval=${interval:-0.2} 7 | cycles=${cycles:-3} 8 | 9 | die() { echo "$*" ; exit 1 ; } 10 | 11 | test -f "$file" || die Error: thinklight file $file does not exist 12 | 13 | herbstclient --idle '(reload|urgent)' on \ 14 | | while read -a hook ; do 15 | echo "${hook[0]}" 16 | if [ "${hook[0]}" = reload ] ; then 17 | kill $$ 18 | break 19 | fi 20 | value=$(< $file ) 21 | if [ "$value" -eq 0 ] 22 | then other_value="255" 23 | else other_value="0" 24 | fi 25 | for i in $(seq 1 $cycles) ; do 26 | echo "$other_value" > $file 27 | sleep $interval 28 | echo "$value" > $file 29 | sleep $interval 30 | done 31 | done 32 | -------------------------------------------------------------------------------- /bash.d/render.awk: -------------------------------------------------------------------------------- 1 | #!/bin/awk -f 2 | 3 | # Setup 4 | BEGIN { 5 | chunksize=int(1000/barlength+0.5); 6 | n=0; 7 | rmax=1; gmax=1; bmax=1; 8 | } 9 | 10 | # Sum the samples in each chunk and find the max value for each color 11 | !(NR%chunksize-1) { 12 | r[n]=$1; g[n]=$2; b[n]=$3; 13 | for (i=1;i rmax) rmax = r[n]; if (g[n] > gmax) gmax = g[n]; if (b[n] > bmax) bmax = b[n]; 15 | n++; 16 | } 17 | 18 | # Draw the moodbar 19 | END { 20 | ORS=""; shade[0]="░"; shade[1]="▒"; shade[2]="▓"; print "["; 21 | for (i=1;i<=barlength;i++) { 22 | r[i]/=rmax*1.25; g[i]/=gmax; b[i]/=bmax; 23 | if (r[i] + g[i] + b[i] < 0.10) print "\033[30m" shade[0]; 24 | else if ((r[i] > g[i]) && (r[i] > b[i])) print "\033[31m" shade[int(r[i]*2.99)]; 25 | else if ((g[i] > r[i]) && (g[i] > b[i])) print "\033[32m" shade[int(g[i]*2.99)]; 26 | else print "\033[34m" shade[int(b[i]*2.99)]; 27 | } 28 | print "\033[0m]\n" 29 | } 30 | 31 | -------------------------------------------------------------------------------- /finch-gntrc: -------------------------------------------------------------------------------- 1 | 2 | [general] 3 | mouse = 1 4 | wm = /usr/lib/gnt/irssi.so 5 | #small-button = true 6 | 7 | [GntWM::binding] 8 | #c-a-n = window-next 9 | 10 | [colorpairs] 11 | normal = white; normal 12 | highlight = green; black 13 | highlightd = red; black 14 | shadow = blue; normal 15 | #title in taskbar and window 16 | title = red; black 17 | titled = green; black 18 | # a focues textbox 19 | text = red; black 20 | #textd = red; black 21 | disabled = gray; black 22 | # when a new message appears 23 | urgent = black; red 24 | 25 | # default colorpairs 26 | #[colorpairs] 27 | #normal = white; black 28 | #highlight = white; blue 29 | #highlightd = black; gray 30 | #shadow = black; darkgray 31 | #title = white; blue 32 | #titled = white; gray 33 | #text = white; blue 34 | #disabled = gray; black 35 | #urgent = green; black 36 | 37 | 38 | 39 | # For the irssi window manager 40 | [Irssi::binding] 41 | a-L = move-right 42 | a-H = move-left 43 | a-J = move-down 44 | a-K = move-up 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /utils/audacity-marks-to-cue: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import argparse 3 | import textwrap 4 | 5 | def convert_timestamp_str(seconds_float): 6 | """convert an audacity timestamp to the usual mm:ss:xx triple """ 7 | sec_str , frac_str = seconds_float.split('.') 8 | sec = int(sec_str) 9 | frac = int(frac_str) 10 | mm = sec // 60 11 | ss = sec % 60 12 | ff = frac // 10000 13 | return f'{mm:02d}:{ss:02d}:{ff:02d}' 14 | 15 | def main(): 16 | parser = argparse.ArgumentParser() 17 | parser.add_argument('TXT', help='the txt file containing the audacity marks') 18 | args = parser.parse_args() 19 | with open(args.TXT) as fh: 20 | lines = fh.readlines() 21 | lines = [l.split('\t') for l in lines] 22 | for idx, l in enumerate(lines): 23 | print(textwrap.dedent(f"""\ 24 | TRACK {idx+1:02d} AUDIO 25 | TITLE "{l[2].strip()}" 26 | INDEX 01 {convert_timestamp_str(l[0])} 27 | """), end='') 28 | 29 | 30 | main() 31 | -------------------------------------------------------------------------------- /utils/sxiv-helper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | file="$1" 5 | filename="${file##*/}" 6 | basedir="${file%/*}" 7 | if [[ "$basedir" == "$file" ]] ; then 8 | # if file did not contain any / then basedir is pwd 9 | basedir=. 10 | fi 11 | 12 | extensions=( 13 | jpg jpeg gif png 14 | tif bmp 15 | ) 16 | 17 | extregexp=$(printf "|.*.%s" "${extensions[@]}") 18 | extregexp=${extregexp#|} 19 | 20 | readarray -t list < <( 21 | find -H "$basedir" -maxdepth 1 -xtype f -printf '%P\n' \ 22 | | grep -iE "$extregexp" \ 23 | | sort -f 24 | ) 25 | 26 | # find index of $file in $list 27 | idx=0 28 | for i in ${!list[@]} ; do 29 | if [ "${list[$i]}" = "$filename" ] ; then 30 | idx=$i 31 | break 32 | fi 33 | done 34 | 35 | show_notifications() { 36 | while read line ; do 37 | notify-send "SXIV ${basedir##*/}" "$line" 38 | done 39 | } 40 | 41 | printf "${basedir//%/%%}/%s\n" "${list[@]}" | sxiv -a -i -n "$((idx+1))" 2>&1 \ 42 | | show_notifications 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /menu/rofi-file-open.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | usage() { 6 | cat <-Return then the menu is 11 | kept open. 12 | EOF 13 | } 14 | 15 | dir="$1" 16 | if [[ -z "$dir" ]] ; then 17 | usage >&2 18 | exit 1 19 | fi 20 | 21 | multiselectkey=$(rofi -h \ 22 | | grep -m 1 -A1 '[-]kb-accept-alt' \ 23 | | tail -n 1 \ 24 | | awk '{print $1 ; }') 25 | 26 | mesg="Type $multiselectkey to open multiple files." 27 | 28 | rofiflags=( 29 | -dmenu 30 | -multi-select 31 | -i 32 | -p 'open' 33 | -mesg "$mesg" 34 | ) 35 | 36 | find -L "$dir" -type f -printf '%P\n' \ 37 | | grep -v '~$\|/\.\|^\.\|.swp$' \ 38 | | sort \ 39 | | rofi "${rofiflags[@]}" \ 40 | | while read line ; do 41 | echo "$line" 42 | xdg-open "$dir/$line" 2> /dev/null 1> /dev/null & 43 | done 44 | 45 | 46 | 47 | 48 | # vim: tw=80 49 | -------------------------------------------------------------------------------- /ascii/mkissue: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # view with: ./mkissue|sed 's,\\\\,\\,g' 3 | 4 | echo -e '\e[H\e[2J' 5 | echo -e ' \e[1;30m| \e[34m\\s \\r' 6 | echo -e ' \e[36;1m/\\\\ \e[37m|| \e[36m| | \e[30m|' 7 | echo -e ' \e[36m/ \\\\ \e[37m|| \e[36m| _ \e[30m| \e[32m\\t' 8 | echo -e ' \e[1;36m/ \e[0;36m.. \e[1m\\\\ \e[37m//==\\\\\\\\ ||/= /==\\\\ ||/=\\\\ \e[36m| | |/ \\\\ | | \\\\ / \e[30m| \e[32m\\d' 9 | echo -e ' \e[0;36m/ . . \\\\ \e[37m|| || || | || || \e[36m| | | | | | X \e[1;30m|' 10 | echo -e ' \e[0;36m/ . . \\\\ \e[37m\\\\\\\\==/| || \\\\==/ || || \e[36m| | | | \\\\_/| / \\\\ \e[1;30m| \e[31m\\U' 11 | echo -e ' \e[0;36m/ .. .. \\\\ \e[0;37mA simple, lightweight linux distribution. \e[1;30m|' 12 | echo -e ' \e[0;36m/_\x27 `_\\\\ \e[1;30m| \e[35m\\l \e[0mon \e[1;33m\\n' 13 | echo -e ' \e[0m' 14 | echo -e '' 15 | -------------------------------------------------------------------------------- /utils/mpd-year-stat.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # show the size of an mpd collection by year 4 | mpc listall -f '%date% %time%' \ 5 | |sed 's,-[^ ]*,,' \ 6 | |grep -v '^ ' \ 7 | |sed 's,:, ,' \ 8 | |awk ' 9 | 10 | BEGIN { 11 | minyear = 3000 12 | maxyear = 0 13 | for (i = 0; i <= 3000; i++) { 14 | l[i] = 0; 15 | } 16 | } 17 | 18 | { 19 | if ($1 > 0) { 20 | minyear = (($1 < minyear) ? $1 : minyear); 21 | } 22 | maxyear = (($1 > maxyear) ? $1 : maxyear); 23 | # accumulate seconds 24 | l[$1] = l[$1] + $2 * 60 + $3 25 | } 26 | 27 | END { 28 | for (i = minyear; i <= maxyear; i++) { 29 | print i " " (l[i] / 60 / 60) 30 | } 31 | } 32 | 33 | ' \ 34 | | gnuplot -p -e " 35 | set xlabel 'Jahr' ; 36 | set ylabel 'Spielzeit in Stunden' ; 37 | set xtics out rotate by -45 ; 38 | set xtics 0,2 scale 0,2 ; 39 | set mxtics 2 ; 40 | set boxwidth 0.8 ; 41 | plot '-' using 1:2 with boxes" 42 | -------------------------------------------------------------------------------- /emacs: -------------------------------------------------------------------------------- 1 | (require 'evil) 2 | (evil-mode 1) 3 | (load-file "/usr/share/emacs/site-lisp/ProofGeneral/generic/proof-site.el") 4 | (add-hook 'coq-mode-hook (lambda () (local-set-key (kbd "C-c RET") 'proof-goto-point))) 5 | (custom-set-variables 6 | ;; custom-set-variables was added by Custom. 7 | ;; If you edit it by hand, you could mess it up, so be careful. 8 | ;; Your init file should contain only one such instance. 9 | ;; If there is more than one, they won't work right. 10 | ;;'(coq-one-command-per-line nil) 11 | ;;'(proof-electric-terminator-enable t) 12 | ; '(proof-three-window-mode-policy (quote hybrid))) 13 | ) 14 | (custom-set-faces 15 | ;; custom-set-faces was added by Custom. 16 | ;; If you edit it by hand, you could mess it up, so be careful. 17 | ;; Your init file should contain only one such instance. 18 | ;; If there is more than one, they won't work right. 19 | ) 20 | ;(add-to-list 'custom-theme-load-path "~/.emacs.d/color-theme/themes/") 21 | ;(load-theme 'zenburn t) 22 | ;;(require 'color-theme-zenburn) 23 | ;;(color-theme-zenburn) 24 | (setq scroll-step 1) 25 | -------------------------------------------------------------------------------- /utils/on-suspend.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # based on https://askubuntu.com/a/184046/547950 4 | 5 | import dbus # for dbus communication (obviously) 6 | import gobject # main loop 7 | from dbus.mainloop.glib import DBusGMainLoop # integration into the main loop 8 | import sys 9 | import subprocess 10 | 11 | def handle_resume_callback(start): 12 | if start: 13 | subprocess.call(sys.argv[1:]) 14 | #print("start == " + str(start)) 15 | 16 | DBusGMainLoop(set_as_default=True) # integrate into main loob 17 | bus = dbus.SystemBus() # connect to dbus system wide 18 | bus.add_signal_receiver( # defince the signal to listen to 19 | handle_resume_callback, # name of callback function 20 | 'PrepareForSleep', # signal name 21 | 'org.freedesktop.login1.Manager', # interface 22 | 'org.freedesktop.login1', # bus name 23 | path='/org/freedesktop/login1', 24 | ) 25 | 26 | loop = gobject.MainLoop() # define mainloop 27 | loop.run() # run main loop 28 | -------------------------------------------------------------------------------- /utils/mpv-append.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | debug() { 4 | #echo ":: $*" >&2 5 | true 6 | } 7 | 8 | socket="$HOME/.config/mpv/mpv-append-socket" 9 | if ! [ -d "${socket%/*}" ] ; then 10 | mkdir -v -p "${socket%/*}" >&2 11 | fi 12 | file="$1" 13 | if ! [[ "$file" =~ ^[/] ]] ; then 14 | # if the filepath is not absolute 15 | # then prepend the current directory 16 | file="$PWD/$file" 17 | fi 18 | filebase="${file##*/}" 19 | pid=$(pidof mpv) || true 20 | if [ -S "$socket" ] && [ -n "$(pidof mpv)" ] ; then 21 | # if socket already exists and mpv is still running, 22 | # communicate with the mpv instance 23 | debug "Sending to mpv pid $pid" 24 | cat < 5 | ! Source: https://github.com/morhetz/gruvbox-generalized 6 | ! Last Modified: 6 Sep 2014 7 | ! ----------------------------------------------------------------------------- 8 | 9 | ! hard contrast: *background: #f9f5d7 10 | *background: #fbf1c7 11 | ! soft contrast: *background: #f2e5bc 12 | *foreground: #3c3836 13 | ! Black + DarkGrey 14 | *color0: #fdf4c1 15 | *color8: #928374 16 | ! DarkRed + Red 17 | *color1: #cc241d 18 | *color9: #9d0006 19 | ! DarkGreen + Green 20 | *color2: #98971a 21 | *color10: #79740e 22 | ! DarkYellow + Yellow 23 | *color3: #d79921 24 | *color11: #b57614 25 | ! DarkBlue + Blue 26 | *color4: #458588 27 | *color12: #076678 28 | ! DarkMagenta + Magenta 29 | *color5: #b16286 30 | *color13: #8f3f71 31 | ! DarkCyan + Cyan 32 | *color6: #689d6a 33 | *color14: #427b58 34 | ! LightGrey + White 35 | *color7: #7c6f64 36 | *color15: #3c3836 37 | -------------------------------------------------------------------------------- /checkpackages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | file="arch-packages" 4 | # Check that all packages specified in `arch-packages` are installed 5 | 6 | incomplete_group_installs() { 7 | # list groups that are not entirely installed 8 | comm -23 <(pacman -Sgg|sort) <(pacman -Qg|sort)|cut -d' ' -f1|uniq 9 | } 10 | 11 | full_group_installs() { 12 | # list groups that are entirely installed 13 | comm -23 <(pacman -Sg|sort) <(incomplete_group_installs|sort) 14 | } 15 | 16 | # query all packages specified in `arch-packages` 17 | # - then substract all packages installed 18 | # - then substract all groups installed 19 | list_missing_packages() { 20 | grep -vE '^(#|$)' < "$file" | sort \ 21 | | pacman -T \ 22 | | sort \ 23 | | comm -23 - <(full_group_installs|sort) 24 | } 25 | 26 | readarray -t not_installed < <(list_missing_packages) 27 | 28 | if [ "${#not_installed[@]}" -eq 0 ] ; then 29 | echo "Everything from $file is installed" 30 | else 31 | echo "The following ${#not_installed[@]} packages in $file are missing:" 32 | printf " %s\n" "${not_installed[@]}" 33 | fi 34 | 35 | -------------------------------------------------------------------------------- /config/rofi-bibbrowserrc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os.path 3 | 4 | # config for rofi-bibbrowser 5 | # https://github.com/t-wissmann/rofi-bibbrowser 6 | 7 | bib_dirs = [ 8 | BibDir('~/uni/literatur/refs.bib'), 9 | ] 10 | 11 | def tryBibDir(path): 12 | global bib_dirs 13 | if os.path.exists(os.path.expanduser(path)): 14 | bib_dirs.append(BibDir(path)) 15 | else: 16 | print(f'path »{path}« does not exist, skipping.', file=sys.stderr) 17 | 18 | publications_bib = os.path.expanduser('~/git/homepage/wissmann-publications.bib') 19 | if not os.path.exists(publications_bib): 20 | publications_bib = '~/uni/publications/wissmann-publications.bib' 21 | bib_dirs.append(BibDir('~/uni/publications', bib=publications_bib)) 22 | 23 | # additional directories with PDFs but without bibtex files: 24 | additional_paths = [ 25 | '~/git/papers/Bars-RNNA/literature', 26 | '~/git/papers/COAX-Literature', 27 | '~/git/papers/coalgpartref/literature', 28 | ] 29 | for p in additional_paths: 30 | if os.path.exists(os.path.expanduser(p)): 31 | bib_dirs.append(BibDir(p, bib='/dev/null')) 32 | -------------------------------------------------------------------------------- /setup-taskwarrior.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # set up an task warrior client to sync with the taskd. 3 | # this is basically the description from 4 | # https://taskwarrior.org/docs/taskserver/taskwarrior.html 5 | 6 | ::() { 7 | echo ":: $*" >&2 8 | "$@" 9 | } 10 | 11 | userkeyname=thorsten_wissmann 12 | mkdir -p ~/.task 13 | :: scp \ 14 | uber:~/taskd/$userkeyname.{cert,key}.pem \ 15 | uber:~/taskd/ca.cert.pem \ 16 | ~/.task 17 | 18 | :: task config taskd.certificate -- ~/.task/$userkeyname.cert.pem 19 | :: task config taskd.key -- ~/.task/$userkeyname.key.pem 20 | :: task config taskd.ca -- ~/.task/ca.cert.pem 21 | 22 | server=$(ssh uber 'cat ~/taskd/config |grep ^server= |cut -d= -f2-') 23 | :: task config taskd.server -- "$server" 24 | 25 | # import the user 26 | for c in $( ssh uber 'find ~/taskd/orgs -name config -printf "%P\n"') ; do 27 | org="${c%%/*}" 28 | id="${c#*/*/}" 29 | id="${id%/*}" 30 | fullname=$(ssh uber "grep ^user= ~/taskd/orgs/$c"|cut -d= -f2-) 31 | echo "Set the users credentials via:" 32 | echo "task config taskd.credentials -- \"$org/$fullname/$id\"" 33 | done 34 | 35 | 36 | -------------------------------------------------------------------------------- /fetch-3rd-party.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | 4 | bins=( 5 | 6 | ) 7 | 8 | ::() { 9 | echo ":: $*" >&2 10 | "$@" 11 | } 12 | 13 | fetch() { 14 | dir="3rd-party/${1##*/}" 15 | if [ -d "$dir" ] ; then 16 | :: git --git-dir="$dir/.git" --work-tree="$dir" pull --ff-only 17 | else 18 | :: git clone "$1" "$dir" 19 | fi 20 | return 0 21 | # we don't link binaries at the moment 22 | #shift 23 | #shift 24 | #while x="$1" ; shift ; do 25 | # file=$(:: find "$dir" -name "$x" | head -n 1) 26 | # if [ -z "$file" ] ; then 27 | # echo "Missing file: $x" 28 | # else 29 | # target="${file##*/}" 30 | # target="${target%.py}" 31 | # :: ln -sf "$(pwd)/$file" "$HOME/bin/$target" 32 | # fi 33 | #done 34 | } 35 | 36 | :: mkdir -p ~/.urxvt/ext/ 37 | fetch https://github.com/regnarg/urxvt-config-reload 38 | #fetch https://github.com/gessen/zsh-fzf-kill 39 | :: ln -sf $HOME/dotfiles/3rd-party/urxvt-config-reload/config-reload ~/.urxvt/ext/ 40 | 41 | # example: 42 | #fetch colortrans https://gist.github.com/MicahElliott/719710 \ 43 | # colortrans.py 44 | 45 | -------------------------------------------------------------------------------- /latex-template/Makefile: -------------------------------------------------------------------------------- 1 | src = $(shell grep -l '\\begin{document}' *.tex) 2 | pdf = $(src:.tex=.pdf) 3 | pdftrimmed = $(pdf:.pdf=-trimmed.pdf) 4 | 5 | .PHONY: all clean install trimmed info just-trimmed 6 | 7 | just-trimmed: $(pdftrimmed) 8 | @echo -ne '\e[1;33m' 9 | @LC_ALL=C make -n -d --no-print-directory all 2>&1 | grep 'Must remake' || true 10 | @echo -ne '\e[0m' 11 | 12 | all: $(pdf) $(pdftrimmed) 13 | 14 | trimmed: $(pdftrimmed) 15 | 16 | %-trimmed.pdf: %.tex 17 | latexmk -pdf -file-line-error -synctex=1 -halt-on-error -jobname=$(patsubst %.pdf,%,$@) $< || ( rm -v *.bcf;false ) 18 | 19 | fast: $(src) 20 | pdflatex -jobname=$(patsubst %.tex,%-trimmed,$<) -synctex=1 $< 21 | 22 | %.pdf: %.tex $(wildcard *.bib *.sty) 23 | latexmk -pdf -file-line-error -synctex=1 -halt-on-error $< || ( rm -v *.bcf;false ) 24 | 25 | clean: 26 | rm -f $(wildcard *.out *.bbl *.bcf *.vtc *.fls *.log *.aux *.blg) 27 | rm -f $(wildcard *.fdb_latexmk *.toc *.vrb *.run.xml *.snm *.nav) 28 | rm -f $(wildcard *.synctex.gz) 29 | rm -f $(pdftrimmed) $(pdf) 30 | 31 | info: 32 | @echo Detected '(main)' TeX--Files: ${src} 33 | @echo PDF files: ${pdf} 34 | @echo Trimmed PDF files: ${pdftrimmed} 35 | -------------------------------------------------------------------------------- /utils/stack-bindir.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cmdname="$0" 4 | 5 | usage() { 6 | cat < /dev/null` 30 | if [[ "$?" -ne 0 ]] ; then 31 | echo "$e not found by stack. skipping." 32 | continue 33 | fi 34 | target="bin/$e" 35 | if [[ -e "$target" ]] && ! [[ -h "$target" ]] ; then 36 | echo "$target exists but is no link. skipping." 37 | continue 38 | fi 39 | ln -v -r -sf "$path" "bin/$e" 40 | fi 41 | done 42 | done 43 | 44 | # vim: tw=80 45 | -------------------------------------------------------------------------------- /bash.d/mephisto: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ### CIP alias 4 | alias cds='cd `date +/local.stand/adm/syslog/%Y/%m/%d/`' 5 | alias cdcf="cd /var/cfengine" 6 | alias cds='cd `date +/local.stand/adm/syslog/%Y/%m/%d/`' 7 | alias cdyp="cd /local/adm/yp/informatik.uni-erlangen.de-master" 8 | alias cdldap="cd /local/adm/ldap/data" 9 | alias ppkeys="rm -f /var/cfengine/ppkeys/root-* && ssh faui02 'rm -f /var/cfengine/ppkeys/root-*'" 10 | export LOGNAME="re06huxa" 11 | ### PATH 12 | PATH="$PATH:/opt/csw/bin:/usr/sfw/bin:/local/gnu-utils/bin:/opt/SUNWspro/bin:/usr/openwin/bin:/usr/dt/bin:/local/openwin+/bin" 13 | PATH="$PATH:/local/cipadm/bin:/local/adm/bin" 14 | 15 | ### settings 16 | export EDITOR='vim' 17 | ### common aliases 18 | alias ls='ls --color=auto' 19 | alias ll='ls -l --color=auto' 20 | alias la='ls -a --color=auto' 21 | alias :r='source ~/.bashrc' 22 | alias cscreen='/local/console/bin/cscreen' 23 | 24 | 25 | ### git settings 26 | export GIT_AUTHOR_NAME="Thorsten Wissmann" 27 | export GIT_AUTHOR_EMAIL="re06huxa@stud.informatik.uni-erlangen.de" 28 | 29 | [ "$USER" = "re06huxa" ] && nickcolor="\[\e[1;32m\]" || nickcolor="\[\e[1;31m\]" 30 | export PS1="$nickcolor\u\[\e[1;34m\] @ $PS1" 31 | 32 | 33 | -------------------------------------------------------------------------------- /Xdefaults.d/tango.colors: -------------------------------------------------------------------------------- 1 | ! -------------------------------------------------- 2 | ! file: ~/.Xdefaults 3 | ! author: thorsten wssman 4 | ! modified: February 2009 5 | ! vim: nu:ai:si:et:ts=4:sw=4:ft=xdefaults 6 | ! -------------------------------------------------- 7 | 8 | 9 | !!! nice tango color theem 10 | urxvt*background: #202020 11 | urxvt*foreground: #EDEDED 12 | ! Black (not tango) + DarkGrey 13 | xterm*background: #202020 14 | xterm*foreground: #EDEDED 15 | ! Black (not tango) + DarkGrey 16 | !urxvt*color0: #596569 17 | urxvt*color0: #202021 18 | !xterm*color0: #596569 19 | xterm*color0: #202020 20 | *color8: #C3A4B9 21 | !*color8: #202021 22 | ! DarkRed + Red 23 | *color1: #F59B5B 24 | *color9: #F24F4F 25 | ! DarkGreen + Green 26 | *color2: #77A44A 27 | *color10: #C3EF98 28 | ! DarkYellow + Yellow 29 | *color3: #F4E35C 30 | *color11: #F6EDA5 31 | ! DarkBlue + Blue 32 | *color4: #74A4B8 33 | *color12: #A6D7EB 34 | ! DarkMangenta + Mangenta 35 | *color5: #C08197 36 | *color13: #D6A8B1 37 | !DarkCyan + Cyan (both not tango) 38 | *color6: #2C9DB4 39 | *color14: #AEF4C0 40 | ! LightGrey + White 41 | !*color7: #E8E8E8 42 | *color7: #444444 43 | *color15: #FFFFFF 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /utils/mpd-playlist-all: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | # load all albums into the playlist in the following order: 5 | # 1. sort by albumartist/artist 6 | # 2. sort their albums by date 7 | # 3. sort by discnumber 8 | # 4. sort by track number 9 | 10 | mpc listall -f '[%albumartist%|%artist%]/%date%/%album%/disc%disc%/track%track%/-///%file%' \ 11 | | sed 's,/disc\([0-9]\)/\(.*\)///,/disc0\1/\2///,' \ 12 | | sed 's,/track\([0-9]\)/\(.*\)///,/track0\1/\2///,' \ 13 | | sort \ 14 | | sed 's,.*///,,' \ 15 | | mpc add 16 | # we use '///' as a marker between the tags and the filepath. 17 | # this works, because we can assume that the filepath in %file% is normalized 18 | # and does not contain '///'. Also, .* is greedy, so the sed command drops 19 | # everything until the last occurrence of '///': 20 | # 21 | # sed 's,.*///,,' <<< "foo///bar///baz" 22 | # 23 | # The first sed command replaces any one-digit track/disc numbers with two-digit numbers 24 | # such that the sorting is w.r.t. their numerical value. We ensure that we only adjust numbers 25 | # before '///'. This however implies that we can not replace all one-digit numbers simultaneously, 26 | # because the matches overlap. 27 | -------------------------------------------------------------------------------- /ascii/lockscreen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | KEY=( 4 | "\\e[0;37m " 5 | "\\e[0;37m " 6 | "\\e[0;37m ___ " 7 | "\\e[0;37m /' _ '\ " 8 | "\\e[0;37m | / \ '----------. " 9 | "\\e[0;37m | \_/ .__ __ \ " 10 | "\\e[0;37m \.___./ \/-\_/ \/ " 11 | "\\e[0;37m " 12 | "\\e[0;37m " 13 | ) 14 | 15 | 16 | TUX1=( 17 | '\e[0;37m ' 18 | '\e[0;37m .--. ' 19 | '\e[0;37m |\e[0;34mo\e[1;33m_\e[0;34mo \e[0;37m| ' 20 | '\e[0;37m |\e[1;33m:_/ \e[0;37m| ' 21 | '\e[0;37m /\e[1;37m/ \ \e[0;37m\ ' 22 | '\e[0;37m |\e[1;37m| | \e[0;37m|' 23 | '\e[1;33m/`\_ _/`\' 24 | '\e[1;33m\___)\e[0;37m=\e[1;33m(___/' 25 | '\e[0;37m ' 26 | ) 27 | 28 | LOCK=( 29 | '\e[0;37m .------. ' 30 | '\e[0;37m | .--. | ' 31 | '\e[0;37m | | | | ' 32 | '\e[0;37m | | | | ' 33 | '\e[0;33m .------------. ' 34 | '\e[0;33m | | ' 35 | '\e[0;33m | | ' 36 | '\e[0;33m | | ' 37 | "\e[0;33m '------------' " 38 | ) 39 | 40 | for i in {0..8} ; do 41 | echo -e "${KEY[$i]} ${TUX1[$i]} ${LOCK[$i]}" 42 | done 43 | 44 | 45 | -------------------------------------------------------------------------------- /config/herbstluftwm/calendar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # pop-up calendar for dzen 4 | # 5 | # (c) 2007, by Robert Manea 6 | # 7 | 8 | width=180 9 | padding=10 10 | monitor=( $(herbstclient list_monitors | 11 | grep '\[FOCUS\]$'|cut -d' ' -f2| 12 | tr x ' '|sed 's/\([-+]\)/ \1/g') ) 13 | x=$((${monitor[2]} + ${monitor[0]} - width - padding)) 14 | 15 | 16 | 17 | TODAY=$(expr `date +'%d'` + 0) 18 | MONTH=`date +'%m'` 19 | YEAR=`date +'%Y'` 20 | 21 | ( 22 | echo '^bg(grey70)^fg(#111111)' 23 | #date +'%A, %d.%m.%Y %H:%M' 24 | 25 | # current month, highlight header and today 26 | cal | sed -e "1 s/^\s*//; 3,$ s/\(.*\)/\1 /; 3,$ s/\(.\{20\}\).*/\1/" \ 27 | | sed -r -e "1,2 s/.*/^fg(white)&^fg()/" \ 28 | -e "s/(^| )($TODAY)($| )/\1^bg(white)^fg(#111)\2^fg()^bg()\3/" 29 | 30 | echo "---------------------" 31 | # next month, hilight header 32 | [ $MONTH -eq 12 ] && YEAR=`expr $YEAR + 1` 33 | cal `expr \( $MONTH + 1 \) % 12` $YEAR \ 34 | | sed -e "1 s/^\s*//; 1,2 s/.*/^fg(white)&^fg()/; 3,$ s/\(.*\)/\1 /; 3,$ s/\(.\{20\}\).*/\1/" 35 | ) \ 36 | | dzen2 -p 60 -fn 'Monospace-9' -x $x -y 20 -w $width -l 17 -sa c -e 'onstart=uncollapse;button1=exit;button3=exit' -bg '#242424' 37 | -------------------------------------------------------------------------------- /Xdefaults.d/custom.cip: -------------------------------------------------------------------------------- 1 | ! -------------------------------------------------- 2 | ! file: ~/.Xdefaults 3 | ! author: thorsten wssman 4 | ! modified: February 2009 5 | ! vim: nu:ai:si:et:ts=4:sw=4:ft=xdefaults 6 | ! -------------------------------------------------- 7 | 8 | *dpi: 96 9 | URxvt.perl-lib: /home/cip/adm/re06huxa/.urxvt/ 10 | !URxvt.fading: 5 11 | !URxvt.fadeColor: #AE00CB 12 | !URxvt.fadeColor: #9fbc00 13 | !URxvt.fadeColor: #9fbc00 14 | 15 | ! probably needs this in your .xinitrc: 16 | ! xset +fp ~/.fonts/ 17 | ! xset fp rehash 18 | 19 | !urxvt*font: -*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-* 20 | !urxvt*boldFont: -*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-* 21 | !!URxvt.keysym.C-1: command:\033]710;-*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-*\007\033]711;-*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-*\007 22 | !URxvt.keysym.C-2: command:\033]710;-*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-*\007\033]711;-*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-*\007 23 | 24 | #include "pixelfont" 25 | 26 | !#include "neon.colors" 27 | URxvt.color0: #222222 28 | URxvt.background: #101010 29 | URxvt.background: rgba:1010/1010/1010/eeee 30 | URxvt.foreground: #EDEDED 31 | URxvt.depth: 32 32 | 33 | !white 34 | *color7: #9d9d9d 35 | *color16: #ffffff 36 | -------------------------------------------------------------------------------- /menu/hlwm-windowmenu.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | object='clients.focus' 5 | object=${object%.} # remove trailing '.' 6 | mesg="Set an attribute of $object. " 7 | mesg+="Anything after the first space will be used as the value" 8 | 9 | rofi_args=( 10 | -monitor -2 # place above window 11 | -location 2 # aligned at top bottom 12 | -width 100 # use full window width 13 | -i # case insensitive 14 | -l 10 15 | -dmenu 16 | -p "$object" 17 | -mesg "$mesg" 18 | ) 19 | 20 | ::() { 21 | echo -e "\e[1;33m:: \e[0;32m$*\e[0m" >&2 22 | "$@" 23 | } 24 | 25 | mapfile -t attributes < <(herbstclient complete_shell 1 set_attr "$object".|grep ' $' ) 26 | 27 | full_hc_cmd=( 28 | chain 29 | ) 30 | 31 | for a in "${attributes[@]}" ; do 32 | a=${a% } 33 | name=${a##*.} 34 | herbstclient complete 2 set_attr "$a" \ 35 | | sed "s.^.$name .g" 36 | done | rofi "${rofi_args[@]}" | \ 37 | { 38 | read -r command 39 | if [[ -z "$command" ]] ; then 40 | echo "no command given" >&2 41 | exit 1 42 | fi 43 | attr=${command%% *} 44 | value=${command#* } 45 | :: herbstclient set_attr "$object.$attr" "$value" 46 | } 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /utils/mkusbdrive: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # a script to format a given drive to be a usb-drive, 4 | # e.g. to make it a standard fat usb-drive after it 5 | # contained a bootable installer or live image. 6 | 7 | set -e 8 | drive="$1" 9 | 10 | ==() { 11 | echo -e "\e[1;33m== \e[0;32m$*\e[0m" >&2 12 | } 13 | 14 | error() { 15 | echo -e "\e[1;31m!! \e[0;31m$*\e[0m" >&2 16 | } 17 | 18 | ::() { 19 | echo -e "\e[1;33m:: \e[0;32m$*\e[0m" >&2 20 | "$@" 21 | } 22 | 23 | 24 | tran=$(lsblk -S "$drive" --noheadings --output "TRAN") 25 | name=$(lsblk -S "$drive" --noheadings --output "VENDOR,MODEL,REV,SERIAL") 26 | 27 | == "$drive: $name" 28 | 29 | if [[ "$tran" != "usb" ]] ; then 30 | error "Device $drive is expected to be 'usb', but is '$tran'" 31 | exit 1 32 | fi 33 | 34 | read -p "New name for $drive: " partitionname 35 | if [[ -z "$partitionname" ]] ; then 36 | exit 1 37 | fi 38 | 39 | # delete mbr and partition table 40 | :: dd if=/dev/zero of="$drive" bs=1M count=1 41 | 42 | # create a partition 43 | # https://superuser.com/a/1132834/622774 44 | # type=0b = W95 FAT32 45 | :: sfdisk "$drive" <<< "type=0b" 46 | :: partprobe 47 | 48 | # create filesystem on first partiton 49 | :: mkfs.fat -n "$partitionname" -F32 "${drive}1" 50 | 51 | -------------------------------------------------------------------------------- /utils/pdf-wdiff.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | old="$1" 4 | new="$2" 5 | 6 | if [[ -z "$old" ]] || [[ -z "$new" ]] ; then 7 | cat < "$OLD_TXT" || true 37 | mypdf2text "$new" > "$NEW_TXT" || true 38 | 39 | git diff --no-index --color=always --word-diff=color --ignore-all-space \ 40 | "$OLD_TXT" "$NEW_TXT" || true 41 | 42 | rm "$OLD_TXT" "$NEW_TXT" 43 | 44 | 45 | 46 | # vim: tw=72 47 | -------------------------------------------------------------------------------- /utils/mpd-boot.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ask() { 4 | local answer 5 | read -s -n 1 -p "$* [yN]" answer 6 | if [[ "$answer" == "y" ]] || [[ "$answer" == "Y" ]] ; then 7 | echo 8 | return 0 9 | else 10 | echo 11 | return 1 12 | fi 13 | } 14 | 15 | start_or_restart() { 16 | # start the given command 17 | # if is already running, restart it 18 | cmdname="$1" 19 | # 1. check if $cmdname is already running under the present user 20 | ps_output=$(ps -U thorsten -x) 21 | if line=$(grep " $cmdname$" <<< "$ps_output") ; then 22 | echo ":: Process $* already running:" 23 | echo " $line" 24 | pid=$(sed 's,^[ ]*\([^ ]\+\) .*$,\1,' <<< "$line"|tr '\n' ' ') 25 | if ask "Kill $pid?" ; then 26 | kill $pid # drop spaces 27 | fi 28 | fi 29 | # 2. run it 30 | echo ":: Starting $*" 31 | nohup "$@" 2>> err.log >> out.log & 32 | } 33 | 34 | start_or_restart mpd 35 | while sleep 1 ; do 36 | echo 'Waiting for mpd...' 37 | if mpc version > /dev/null 2> /dev/null ; then 38 | break 39 | fi 40 | done 41 | start_or_restart mpdscribble 42 | #start_or_restart mpd-mpris 43 | start_or_restart cantata 44 | ~/dotfiles/utils/mpd-volume2pulse.py & 45 | -------------------------------------------------------------------------------- /gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Thorsten Wißmann 3 | email = edu@thorsten-wissmann.de 4 | [color] 5 | ui = auto 6 | [alias] 7 | lastpatch = log -p HEAD^1..HEAD 8 | tree = log --graph --oneline --all --decorate=short 9 | t = log --graph --oneline --all --decorate=short 10 | st = status 11 | wdiff = diff --color-words 12 | bdiff = diff --color-words=. 13 | wshow = show --color-words 14 | bshow = show --color-words=. 15 | hug = push 16 | ca = commit -av 17 | c = commit -v 18 | cv = commit -v 19 | co = commit -v 20 | ap = add -p 21 | deltalog = log --oneline origin/master..HEAD 22 | pff = pull --ff-only 23 | ff = merge --ff-only 24 | mff = merge --ff-only 25 | ldiff = latexdiff --latexmk --ignore-makefile --subtree 26 | # Why didn't this beautiful acronym come to my mind? 27 | wlog = log -p --word-diff=color 28 | [merge] 29 | tool = vimdiff 30 | [push] 31 | default = simple 32 | [difftool.latex] 33 | cmd = git-latexdiff \"$LOCAL\" \"$REMOTE\" 34 | [difftool] 35 | prompt = false 36 | [diff] 37 | noprefix = true # Warning: this breaks format-patch! 38 | # vim: noet 39 | [init] 40 | defaultBranch = main 41 | [filter "lfs"] 42 | clean = git-lfs clean -- %f 43 | smudge = git-lfs smudge -- %f 44 | process = git-lfs filter-process 45 | required = true 46 | -------------------------------------------------------------------------------- /utils/rsnapshot-standalone.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # A script to call rsync with a on-the-fly configuration 4 | # just create a directory in which you want to collect the 5 | # snapshots and place an adjusted version of this file 6 | 7 | # the source ssh-remote: 8 | remotedir=user@server:/home/user/Mail 9 | 10 | # extra args passed to rsync, e.g. to exclude certain directories 11 | rsyncargs='--exclude=.notmuch,exclude=dovecot-uidlist,exclude=dovecot.index.*' 12 | 13 | 14 | # the directory in which this script lives: 15 | basedir=$(cd "$(dirname $0)" ; pwd) 16 | 17 | rsnapshot.conf() { 18 | cat < log.txt 00LOG/ 34 | EOF 35 | } 36 | 37 | subcmd=${1:-snapshot} 38 | if [[ "$subcmd" = 'config' ]] ; then 39 | rsnapshot.conf 40 | else 41 | exec rsnapshot -c <(rsnapshot.conf) "$subcmd" 42 | fi 43 | -------------------------------------------------------------------------------- /utils/with-same-pwd: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # if a urxvt is focused, then run the given command in the same pwd 4 | # as the child process of the focused urxvt 5 | 6 | add_as_arg=false 7 | if [[ "$1" == '--pwd-as-arg' ]] ; then 8 | shift 9 | add_as_arg=true 10 | fi 11 | 12 | ARGS=( "$@" ) 13 | 14 | fallback() { 15 | exec "${ARGS[@]}" 16 | exit 1 17 | } 18 | 19 | has_cmd() { 20 | # only filter stdout but keep the error message 'no cmd in...' 21 | which "$1" 1>/dev/null 22 | } 23 | 24 | has_cmd xdotool || fallback 25 | has_cmd pgrep || fallback 26 | has_cmd xprop || fallback 27 | has_cmd readlink || fallback 28 | has_cmd herbstclient || fallback 29 | 30 | if ! pid=$(herbstclient get_attr clients.focus.pid 2> /dev/null) 31 | then 32 | fallback 33 | fi 34 | 35 | pgrep=$(pgrep -P "$pid") 36 | if [[ $(wc -l <<< "$pgrep") -eq 1 ]] ; then 37 | child_pid=${pgrep} 38 | else 39 | # if $pid has more than one child process, 40 | # then just take the pwd of the process itself 41 | child_pid="$pid" 42 | fi 43 | [[ -n "$child_pid" ]] || fallback 44 | child_pwd=/proc/${child_pid}/cwd 45 | child_pwd=$(readlink -f "$child_pwd") || fallback 46 | 47 | if [[ "$add_as_arg" = 'true' ]] ; then 48 | ARGS+=( "$child_pwd" ) 49 | else 50 | cd "$child_pwd" || true 51 | fi 52 | exec "${ARGS[@]}" 53 | 54 | -------------------------------------------------------------------------------- /utils/pdftk-duplex.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # cat the given PDFs in such a way such that all PDF parts 4 | # start on odd page numbers (i.e. on the right sheet side when printing it in 5 | # duplex). this is achieved by inserting blank a4 pages 6 | 7 | set -e 8 | 9 | ::() { 10 | echo ":: $*" 11 | "$@" 12 | } 13 | 14 | output=output.pdf 15 | blank=$(mktemp --suffix=.pdf) 16 | :: convert xc:none -page A4 "$blank" 17 | 18 | options=1 19 | while [[ "$options" -eq 1 ]] ; do 20 | doshift=1 21 | case "$1" in 22 | -o) 23 | shift 24 | output="$1" 25 | ;; 26 | --output=*) 27 | output="${1#--output=}" 28 | ;; 29 | --) 30 | options=0 31 | ;; 32 | *) 33 | options=0 34 | doshift=0 35 | ;; 36 | esac 37 | if [[ "$doshift" -eq 1 ]] ; then 38 | shift 39 | fi 40 | done 41 | 42 | 43 | FILES=( 44 | ) 45 | for i in "$@" ; do 46 | pages=$(LC_ALL=C pdfinfo "$i" | grep '^Pages:' | cut -d':' -f2) 47 | FILES+=( "$i" ) 48 | printf "# %2d pages for: %s \n" "$pages" "$i" 49 | if [[ "$((pages%2))" -eq 1 ]] ; then 50 | FILES+=( "$blank" ) 51 | fi 52 | done 53 | 54 | :: pdftk "${FILES[@]}" cat output "$output" 55 | :: rm "$blank" 56 | 57 | -------------------------------------------------------------------------------- /configparty.md: -------------------------------------------------------------------------------- 1 | # Config Party 2 | 3 | This file lists highlights of the present `dotfiles` repository which are worth 4 | presenting 5 | 6 | - [nopaste](utils/nopaste) including colored pastes 7 | - tmux screenshot 8 | ``` 9 | ssh uber bash -l <<< 'tmux capture-pane -p -e' | nopaste -c 10 | ``` 11 | - mutt: reprocess current message with procmail 12 | ``` 13 | macro index,pager P "\ 14 | set my_pipe_decode=$pipe_decode\ 15 | set pipe_decode=no\ 16 | procmail\ 17 | set pipe_decode=$my_pipe_decode" 18 | ``` 19 | - [mkmandir.sh](mkmandir.sh) for having a man directory in your home file 20 | - git-latexdiff 21 | - mpv single instance 22 | - coverfetch 23 | - sxiv, sxiv filter, sxiv-helper.sh 24 | - dmenu, rofi 25 | * [rofi-netctl](menu/rofi-netctl) 26 | * [rofi-mpd.sh](menu/rofi-mpd.sh) 27 | * [utf8select.sh](menu/utf8select.sh) 28 | - pass + qutebrowser 29 | - call mpv from browser (especially qutebrowser) 30 | - [vim](vimrc): 31 | * macros for common patterns: xenum, xframe, cuv 32 | * Spell check toggling 33 | * CtrlP 34 | * OmniCompletion when composing mails 35 | * `augroup GPGASCII` 36 | * `set showcmd` 37 | 38 | 39 | // vim: ft=asciidoc 40 | -------------------------------------------------------------------------------- /config/qutebrowser/userscripts/user-agent-switcher: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | fetch_user_agents() { 4 | w3m -cols 1000 -dump "http://www.useragentstring.com/pages/$1/" \ 5 | | grep '^ • ' \ 6 | | sed 's,^ • ,,' \ 7 | | head -n 3 8 | } 9 | 10 | set_user_agent() { 11 | echo "set --print network user-agent \"$1\"" >> "$QUTE_FIFO" 12 | } 13 | 14 | show_rofi_menu() { 15 | res=$(tac <(echo Reset) "$USERAGENTFILE" | rofi "${rofi_default_args[@]}") 16 | case "$res" in 17 | "") 18 | ;; 19 | Reset) 20 | set_user_agent "" 21 | ;; 22 | *) 23 | set_user_agent "$res" 24 | ;; 25 | esac 26 | } 27 | 28 | QUTE_CONFIG_DIR=${QUTE_CONFIG_DIR:-$HOME/.config/qutebrowser} 29 | USERAGENTFILE=${USERAGENTFILE:-$QUTE_CONFIG_DIR/user_agents} 30 | 31 | rofi_default_args=( 32 | -monitor -2 # place above window 33 | -location 6 # aligned at the bottom 34 | -width 100 # use full window width 35 | -i 36 | #-no-custom 37 | #-format i # make rofi return the index 38 | -l 10 39 | -p 'User agent:' -dmenu 40 | ) 41 | 42 | case "$1" in 43 | fetch) 44 | fetch_user_agents Chrome | tee $USERAGENTFILE 45 | ;; 46 | ""|*) 47 | show_rofi_menu 48 | ;; 49 | esac 50 | -------------------------------------------------------------------------------- /Xdefaults.d/gruvbox-dark.xresources: -------------------------------------------------------------------------------- 1 | ! ----------------------------------------------------------------------------- 2 | ! File: gruvbox-dark.xresources 3 | ! Description: Retro groove colorscheme generalized 4 | ! Author: morhetz 5 | ! Source: https://github.com/morhetz/gruvbox-generalized 6 | ! Last Modified: 6 Sep 2014 7 | ! ----------------------------------------------------------------------------- 8 | 9 | ! hard contrast: *background: #1d2021 10 | *background: #282828 11 | ! soft contrast: *background: #32302f 12 | *foreground: white 13 | ! Black + DarkGrey 14 | *color0: black 15 | *color8: #928374 16 | ! DarkRed + Red 17 | *color1: #cc241d 18 | *color9: #fb4934 19 | ! DarkGreen + Green 20 | !*color2: #98971a 21 | *color2: #D6D533 22 | *color10: #b8bb26 23 | ! DarkYellow + Yellow 24 | !*color3: #d79921 25 | *color3: #FACF2A 26 | *color11: #fabd2f 27 | ! DarkBlue + Blue 28 | !*color4: #458588 29 | !*color12: #83a598 30 | ! Brownish colors for DarkBlue + Blue 31 | *color4: #FE8019 32 | *color12: #D65D0E 33 | ! DarkMagenta + Magenta 34 | !*color5: #b16286 35 | !*color13: #d3869b 36 | ! DarkCyan + Cyan 37 | *color6: #689d6a 38 | *color14: #8ec07c 39 | ! LightGrey + White 40 | *color7: #a89984 41 | *color15: #ebdbb2 42 | 43 | ! own modifications 44 | ! DarkMagenta + Magenta 45 | *color5: #C52A48 46 | *color13: #F74B5F 47 | -------------------------------------------------------------------------------- /Xdefaults.d/tw-colors: -------------------------------------------------------------------------------- 1 | 2 | !! --- MOUSE CURSOR --- !! 3 | Xcursor*theme: Vanilla-DMZ 4 | ! 5 | !! --- TERMINAL COLORS --- !! 6 | !xterm*background: #404040 7 | ! theme created from roxterm color-scheme 8 | !xterm*background: black 9 | !URxvt.background: #202020 10 | !URxvt.foreground: #EDEDED 11 | URxvt.background: #1e1e1e 12 | !! brown 13 | !URxvt.background: #221C16 14 | !! green 15 | !URxvt.background: #1E3526 16 | URxvt.foreground: #EFEFEF 17 | ! Black (not tango) + DarkGrey 18 | xterm*background: #202020 19 | xterm*foreground: #EDEDED 20 | ! Black (not tango) + DarkGrey 21 | !URxvt.color0: #596569 22 | URxvt.color0: black 23 | !xterm*color0: #596569 24 | xterm*color0: #202020 25 | *color8: #505050 26 | !*color8: #202021 27 | ! DarkRed + Red 28 | !*color1: #B04020 29 | *color9: #ED4511 30 | !*color9: #DD4010 31 | *color1: #FA2D4D 32 | ! DarkGreen + Green 33 | *color2: #AFD700 34 | *color10: #DAFF30 35 | ! DarkYellow + Yellow 36 | !*color3: #F7CF0A !orig 37 | *color3: #E3BE09 38 | *color11: #FCE70D 39 | ! DarkBlue + Blue 40 | *color4: #92C1C9 41 | !*color4: #224248 42 | *color12: #E396D1 43 | ! DarkMangenta + Mangenta 44 | *color5: #D6156C 45 | *color13: #FE4365 46 | !DarkCyan + Cyan (both not tango) 47 | *color6: #e9b96e 48 | *color14: #c17d11 49 | ! LightGrey + White 50 | !*color7: #E8E8E8 51 | *color7: #a0a0a0 52 | *color15: #ffffff 53 | 54 | -------------------------------------------------------------------------------- /config/herbstluftwm/closeorkill.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # settings: 4 | key="${key:-Alt-F4}" 5 | countdown="${countdown:-2}" # after how many presses of $key is the window killed? 6 | 7 | # adds a keybinding to close the focused window. After $countdown many failed 8 | # attempts to close the window, it is killed using xkill. 9 | 10 | set -o errexit 11 | set -o pipefail 12 | 13 | cmd=( 14 | keybind "$key" chain 15 | , close 16 | , and 17 | : silent new_attr int clients.focus.my_kill_countdown 18 | : set_attr clients.focus.my_kill_countdown "$countdown" 19 | # if the counter was already set and counted down to 0 20 | # then force-kill the client using xkill 21 | , and 22 | : compare clients.focus.my_kill_countdown = "0" 23 | : try substitute ID clients.focus.winid spawn xkill -id ID 24 | : try sprintf BODY 25 | "Killing »%s« (%s) after $countdown failed close attempts." 26 | clients.focus.title clients.focus.winid 27 | spawn notify-send BODY 28 | ) 29 | 30 | # substract 31 | for i in $(seq 1 "$countdown") ; do 32 | cmd+=( 33 | , and 34 | : compare clients.focus.my_kill_countdown = "$i" 35 | : set_attr clients.focus.my_kill_countdown "$((i-1))" 36 | ) 37 | done 38 | 39 | herbstclient "${cmd[@]}" 40 | 41 | -------------------------------------------------------------------------------- /ascii/hlwm-info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | t=$(tput setaf 3) # tree color 3 | n=$(tput setaf 2) # name 4 | v=$(tput setaf 7) # value 5 | f="" #just for alignment :D 6 | 7 | distro="ArchLinux" 8 | if [ -f /etc/debian_version ] ; then 9 | distro="Debian $(cat /etc/debian_version)" 10 | fi 11 | 12 | status= 13 | if ps cu|grep conky > /dev/null ; then 14 | status=$(conky --version|head -1|cut -d' ' -f1,2) 15 | else 16 | status=none 17 | fi 18 | 19 | terminal=urxvt 20 | font='bitstream vera sans' 21 | browser=luakit 22 | 23 | b="$(tput sgr0)$(tput setaf 5)" 24 | logo1="$(tput setaf 3) (() " 25 | logo2="$b /$(tput bold)$(tput setaf 4)°$b\__$(tput bold)$(tput setaf 7)." 26 | logo3="$b \___/" 27 | logo4="$(tput bold)$(tput setaf 3) /\ /\\" 28 | space=" " 29 | 30 | logo1+="$(tput sgr0)" 31 | logo2+="$(tput sgr0)" 32 | logo3+="$(tput sgr0)" 33 | logo4+="$(tput sgr0)" 34 | 35 | cat <&2 26 | exit 1 27 | fi 28 | 29 | { 30 | # First write metadata 31 | cat <$/i,""); 31 | obj.outerHTML = newOuterHTML; 32 | } 33 | } 34 | 35 | EOF 36 | } 37 | 38 | printjs() { 39 | js | sed 's,//.*$,,' | tr '\n' ' ' 40 | } 41 | echo "jseval -q $(printjs)" >> "$QUTE_FIFO" 42 | -------------------------------------------------------------------------------- /latex-template/template.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a4paper,11pt]{article} 2 | \usepackage{ifthen} 3 | \usepackage[margin=2cm]{geometry} 4 | 5 | \usepackage[utf8]{inputenc} 6 | \usepackage[T1]{fontenc} 7 | \usepackage[ngerman]{babel} 8 | \usepackage{lastpage} 9 | \usepackage{fancyhdr} 10 | 11 | \usepackage{hyperref} 12 | 13 | % natbib: 14 | % \usepackage[square,numbers]{natbib} 15 | % \bibliographystyle{abbrvnat} 16 | % \bibliography{refs} 17 | 18 | \pagestyle{fancy} 19 | \fancyhf{} % clear all header and footer fields 20 | %\fancyfoot[L]{\footnotesize } 21 | \fancyfoot[C]{\footnotesize Page \thepage\ / \pageref{LastPage}} 22 | \renewcommand{\headrulewidth}{0pt} 23 | 24 | 25 | \setlength{\parindent}{0em} 26 | \setlength{\parskip}{0.5em} 27 | 28 | \usepackage{tikz} 29 | 30 | \title{Some Title} 31 | \author{Your Name} 32 | 33 | \makeatletter 34 | \hypersetup{ 35 | final, 36 | hidelinks, 37 | urlcolor=black, 38 | pdftitle={\@title}, 39 | pdfauthor={\@author}, 40 | pdfkeywords={}, 41 | % the following enforces duplex printing for some printers! 42 | %pdfduplex={DuplexFlipLongEdge}, 43 | } 44 | \makeatother 45 | 46 | \begin{document} 47 | \maketitle\thispagestyle{fancy} 48 | 49 | Content 50 | \end{document} 51 | % another dictionary: 52 | %%% ispell-local-dictionary: "british-ize" 53 | 54 | % vim: tw=80 55 | % 56 | %%% Local Variables: 57 | %%% TeX-PDF-mode:t 58 | %%% ispell-local-dictionary: "german" 59 | %%% TeX-master: t 60 | %%% End: 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Some dotfiles 2 | 3 | 4 | 5 | ## Snippets 6 | 7 | Add mp3gain to all mp3 files in the current directory and child directories, treating every directory as an album: 8 | ``` 9 | find -mindepth 2 -type f -iname '*.mp3' | sed 's,/[^/]*$,,' | sort | uniq| while read -r dir ; do echo mp3gain -p "$dir"/*.[Mm][Pp]3 ; done 10 | ``` 11 | 12 | Add replaygain to all flac files in the current directory and child 13 | directories, treating every directory as an album. if at least one replaygain 14 | tag is set in one of the files, the entire directory is skipped. Also do things in parallel: 15 | ``` 16 | gain_dir() { 17 | [[ -n "$(metaflac --show-tag=REPLAYGAIN_TRACK_GAIN "$1"/*.[Ff][Ll][Aa][Cc])" ]] && return 0 18 | echo metaflac --add-replay-gain --preserve-modtime "$1"/*.[Ff][Ll][Aa][Cc] 19 | } 20 | export -f gain_dir 21 | find -mindepth 2 -type f -iname '*.flac' | sed 's,/[^/]*$,,' | sort | uniq| parallel gain_dir '{}' 22 | ``` 23 | 24 | ## route ipv4 from one network to the other 25 | ``` 26 | sudo iptables -t nat -A POSTROUTING -o enp0s25 -j MASQUERADE 27 | sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward' 28 | ``` 29 | Plus an appropriate `/etc/dhcpd.conf`. 30 | 31 | 32 | ## Printer packages: Epson Stylus SX340 33 | 34 | - from the arch repos: `iscan iscan-data sane` 35 | - from the aur: `epson-inkjet-printer-escpr` 36 | 37 | 38 | ## Move partition to another host 39 | ``` 40 | ssh oldhost dd bs=4M if=/dev/partition | pv -s 500G | dd bs=4M of=/dev/partition 41 | ``` 42 | -------------------------------------------------------------------------------- /ncmpcpp-config: -------------------------------------------------------------------------------- 1 | 2 | # just uncommend it 3 | #mpd_host = "towi04" 4 | # for editing 5 | #mpd_music_dir = "/home/unterhaltung/musik" 6 | mpd_music_dir = "/mnt/unterhaltung/musik" 7 | # colors 8 | 9 | external_editor = "urxvt -e vim" 10 | 11 | autocenter_mode = "yes" 12 | 13 | song_window_title_format = "{%a — }{%t}|{%f} — mpd" 14 | 15 | # some visual options 16 | clock_display_seconds = "yes" 17 | playlist_display_mode = "columns" 18 | browser_display_mode = "columns" 19 | search_engine_display_mode = "columns" 20 | 21 | alternative_header_first_line_format = "{$4%t$9 von $7%a$9}|{$4%f$9} ($3%l$9)" 22 | alternative_header_second_line_format = "auf $2{%b}|{%D}$9" 23 | user_interface = "alternative" 24 | alternative_ui_separator_color = "black" 25 | 26 | #progressbar_look = "»> " 27 | progressbar_look = "─╼·" 28 | 29 | 30 | progressbar_elapsed_color = "green" 31 | progressbar_color = "black" 32 | 33 | song_columns_list_format = "(7f)[white]{l:Dauer} │ (20)[cyan]{a|D:Künstler} (3f)[white]{n: }(43)[yellow]{t|f:Titel} (30)[cyan]{b} (10f)[green]{y}"" 34 | playlist_separate_albums = no 35 | main_window_color = "default" 36 | #active_column_color = "red" 37 | #current_item_inactive_column_prefix = "" 38 | window_border_color = "black" 39 | active_window_border = "black" 40 | 41 | 42 | #song_list_format = "%l %a %t %b %y" 43 | #song_columns_list_format = "(5f)[green]{lr} (20)[cyan]{a} (35)[]{t} (24)[red]{bE}(1f)[red]{dE} (10f)[magenta]{yE}" 44 | #song_status_format = "{%a - }{%t}{ ({Album: %b}{ #%d}{, Jahr: %y})}" 45 | 46 | -------------------------------------------------------------------------------- /utils/latex-clean: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | print_usage() { 4 | cat <&2 ; exit 1 14 | } 15 | 16 | ask() { 17 | echo -n "==> $1 [y/n] " 18 | read -n 1 reply 19 | echo 20 | if [[ "${reply^^}" == 'Y' ]] ; then 21 | return 0 22 | else 23 | return 1 24 | fi 25 | } 26 | 27 | cmdname="$0" 28 | input_files=( "$@" ) 29 | 30 | if [[ "${#input_files[@]}" -eq 0 ]] ; then 31 | print_usage >&2 32 | fi 33 | 34 | for t in "${input_files[@]}" ; do 35 | fls=${t%%.tex}.fls 36 | if [[ -e "$fls" ]] ; then 37 | mapfile -t output_files < <(grep '^OUTPUT ' "$fls"|cut -d ' ' -f2) 38 | fi 39 | output_files+=( 40 | "${t%%.tex}.blg" 41 | "${t%%.tex}.bbl" 42 | "${t%%.tex}.fdb_latexmk" 43 | "${t%%.tex}.synctex" 44 | "${t%%.tex}.synctex.gz" 45 | "${t%%.tex}."{nav,run.xml,snm,toc} 46 | "${t%%.tex}."aux 47 | "$fls" 48 | ) 49 | existing_output_files=( ) 50 | for o in "${output_files[@]}" ; do 51 | if [[ -e "$o" ]] ; then 52 | existing_output_files+=( "$o" ) 53 | fi 54 | done 55 | 56 | if [[ "${#existing_output_files[@]}" -ge 1 ]] ; then 57 | if ask "Remove the following files? ${existing_output_files[*]}" ; then 58 | rm -v "${existing_output_files[@]}" 59 | fi 60 | fi 61 | done 62 | -------------------------------------------------------------------------------- /utils/mosh-port.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## connect to a given host via this port 4 | ## if this fails, ssh there and kill the orphaned mosh server 5 | port=$1 6 | host=$2 7 | 8 | ::() { 9 | echo ":: $*" >&2 10 | "$@" 11 | } 12 | log() { 13 | echo ">> $*" >&2 14 | } 15 | 16 | log "Check whether port $port is free" 17 | :: mosh -p "$port" "$host" true 18 | 19 | if [ "$?" -eq 10 ] ; then 20 | log "Port $port seems to be used already" 21 | # since we use [-]p, the following command does not return itself as a result 22 | log "ssh'ing to $uber ... " 23 | ssh -t "$host" " 24 | pid=\$( ps aux | sed 's,[ ]* , ,g' \ 25 | | grep mosh-server \ 26 | | grep '[-]p $port' \ 27 | | tee /dev/stderr \ 28 | | cut -d' ' -f 2) 29 | if [ -n \"\$pid\" ] ; then 30 | read -n 1 -p \"Kill the command with pid \$pid? [yn]\" res 31 | echo 32 | if [ \"\$res\" = y ] ; then 33 | echo kill \"\$pid\" 34 | kill \"\$pid\" 35 | else 36 | exit 1 37 | fi 38 | else 39 | echo No mosh-server for port $port found 40 | exit 1 41 | fi 42 | " 43 | # check the exit code of ssh 44 | if [ "$?" -ne 0 ] ; then 45 | log "Nothing changed, exiting ..." 46 | exit 1 47 | fi 48 | else 49 | log "Port $port is free" 50 | fi 51 | 52 | exec mosh -p "$port" "$host" 53 | 54 | -------------------------------------------------------------------------------- /config/luakit/increase.lua: -------------------------------------------------------------------------------- 1 | table.insert(binds.commands, lousy.bind.cmd("inc[rease]", function (w, addend) 2 | local uri = w:get_current().uri 3 | local from, to 4 | local next_from, next_to 5 | -- find first match for a number 6 | next_from,next_to = string.find(uri, "%d+") 7 | while next_from and next_to do 8 | from, to = next_from, next_to 9 | -- find next match 10 | next_from,next_to = string.find(uri, "%d+", to+1) 11 | end 12 | -- if we found a match 13 | if from and to then 14 | local number = string.sub(uri, from, to) -- get number from uri 15 | if type(tonumber(addend)) ~= "number" then 16 | addend = 1 17 | end 18 | number = number + tonumber(addend); -- increase number 19 | local number_len = to - from + 1 20 | -- compose new uri 21 | local new_uri = "" 22 | -- prepend part before number 23 | if from > 0 then 24 | new_uri = new_uri..string.sub(uri, 0, from - 1) 25 | end 26 | -- append the increased number 27 | new_uri = new_uri..string.format("%0"..number_len.."d", number) 28 | -- append part after number 29 | uri_len = string.len(uri) 30 | new_uri = new_uri..string.sub(uri, to + 1, uri_len) 31 | -- now load uri in browser 32 | w:navigate(new_uri) 33 | end 34 | end)) 35 | 36 | 37 | -------------------------------------------------------------------------------- /utils/scan-fix-pdf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | tmpdir=`mktemp -d` 4 | sourcefile="$1" 5 | targetfile="${2:-${1%%.pdf}-fixed.pdf}" 6 | dpi=${dpi} 7 | utils=$HOME/dotfiles/utils 8 | 9 | ::() { 10 | echo -e "\e[1;33m:: \e[0;32m$*\e[0m" >&2 11 | "$@" 12 | } 13 | 14 | ask() { 15 | echo -n "==> $1 [y/n] " 16 | read -n 1 reply 17 | if [[ "${reply^^}" == 'Y' ]] ; then 18 | return 0 19 | else 20 | return 1 21 | fi 22 | } 23 | 24 | if [[ -z "$dpi" ]] ; then 25 | dpi=$( 26 | pdfimages -list "$sourcefile" | 27 | awk '{ if ($3 == "image") { print $13 ; exit } }' 28 | ) 29 | echo "Auto-detecting DPI=$dpi" 30 | fi 31 | 32 | :: gs -dBATCH -dNOPAUSE -sDEVICE=jpeg -r"${dpi}x${dpi}" -sOutputFile="$tmpdir/p-%03d.jpg" "$sourcefile" 33 | 34 | if ask "Create scan effect?" ; then 35 | echo 36 | for img in "$tmpdir"/p-*.jpg ; do 37 | rotation_values=( 0.1 0.15 -0.1 0.02 -0.02 -0.15 ) 38 | rotation=${rotation_values[$((RANDOM%${#rotation_values[@]}))]} 39 | :: mogrify -background '#989898' -rotate "$rotation" -attenuate 0.25 +noise Gaussian "$img" 40 | done 41 | else 42 | echo 43 | fi 44 | 45 | if ask "Make background white?" ; then 46 | echo 47 | export THRESHOLD=${THRESHOLD:-80} 48 | :: $utils/scan-fix-white-bg.sh "$tmpdir"/p-*.jpg 49 | else 50 | echo 51 | fi 52 | 53 | export DPI="$dpi" 54 | export pdf="$targetfile" 55 | :: $utils/ocr "$tmpdir"/p-*.jpg 56 | 57 | if [[ -n "${tmpdir##//}" ]] ; then 58 | :: rm -r "$tmpdir/" 59 | fi 60 | -------------------------------------------------------------------------------- /setup-mpdscribble.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # generate ~/.mpdscribble/mpdscribble.conf based on pass entries 4 | # with the names 'last.fm' and 'libre.fm' 5 | 6 | mkdir -p ~/.mpdscribble 7 | chmod 700 ~/.mpdscribble 8 | 9 | conf=$HOME/.mpdscribble/mpdscribble.conf 10 | 11 | PASSWORD_STORE_DIR=${PASSWORD_STORE_DIR:-$HOME/.password-store} 12 | 13 | print_section() { 14 | local name="$1" 15 | local username="$2" 16 | local password="$3" 17 | case "$name" in 18 | *last.fm*) 19 | url="http://post.audioscrobbler.com/" 20 | ;; 21 | *libre.fm*) 22 | url="http://turtle.libre.fm/" 23 | ;; 24 | *) 25 | echo "Can not derive url from name \"$name\". Skipping this section." >&2 26 | return 1 27 | esac 28 | cat <&2 41 | exit 1 42 | fi 43 | 44 | pattern='(libre.fm|last.fm).gpg$' 45 | 46 | echo "Generating $conf..." >&2 47 | find "$PASSWORD_STORE_DIR" -type f -printf '%P\n' | 48 | grep -E "$pattern" | 49 | sort | 50 | while read path ; do 51 | path="${path%.gpg}" 52 | name="${path##*/}" 53 | username=$(pass show "$path" |sed -n '/^user:/I{s,[^:]*:[ ]\?,,i;p;q}') 54 | password=$(pass show "$path" | head -n 1) 55 | print_section "$name" "$username" "$password" || continue 56 | done | tee "$conf" 57 | 58 | 59 | -------------------------------------------------------------------------------- /Xdefaults.d/pixelfont: -------------------------------------------------------------------------------- 1 | ! -------------------------------------------------- 2 | ! file: ~/.Xdefaults 3 | ! author: thorsten wssman 4 | ! modified: February 2009 5 | ! vim: nu:ai:si:et:ts=4:sw=4:ft=xdefaults 6 | ! -------------------------------------------------- 7 | 8 | ! probably needs this in your .xinitrc: 9 | ! xset +fp ~/.fonts/ 10 | ! xset fp rehash 11 | 12 | !URxvt.font: -*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-* 13 | !URxvt.boldFont: -*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-* 14 | !URxvt.keysym.C-1: command:\033]710;-*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-*\007\033]711;-*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-*\007 15 | !URxvt.keysym.C-2: command:\033]710;-*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-*\007\033]711;-*-montecarlo-medium-*-*-*-*-*-*-*-*-*-*-*\007 16 | 17 | !urxvt*font: 6x13 18 | URxvt.font: -*-terminus-bold-r-normal-*-12-*-*-*-*-*-iso10646-1 19 | URxvt.boldFont: -*-terminus-bold-r-normal-*-12-*-*-*-*-*-iso10646-1 20 | URxvt.keysym.C-1: command:\033]710;xft:Terminus:size=8\007\033]711;xft:Terminus:size=8\007 21 | URxvt.keysym.C-2: command:\033]710;xft:Terminus:bold:size=10\007\033]711;xft:Terminus:bold:size=10\007 22 | URxvt.keysym.C-3: command:\033]710;xft:Terminus:bold:size=12\007\033]711;xft:Terminus:bold:size=12\007 23 | URxvt.keysym.C-4: command:\033]710;xft:Terminus:bold:size=14\007\033]711;xft:Terminus:bold:size=14\007 24 | URxvt.keysym.C-5: command:\033]710;xft:Terminus:bold:size=18\007\033]711;xft:Terminus:bold:size=18\007 25 | URxvt.keysym.C-6: command:\033]710;xft:Terminus:bold:size=20\007\033]711;xft:Terminus:bold:size=20\007 26 | 27 | 28 | -------------------------------------------------------------------------------- /utils/dirsize-plot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -u 5 | set -o pipefail 6 | 7 | 8 | usage() { 9 | cat <&2 24 | exit 1 25 | fi 26 | 27 | gnuplot_config() { 28 | file="$1" 29 | cat < "$tmpfile" 66 | plot_data "$tmpfile" 67 | rm "$tmpfile" 68 | 69 | -------------------------------------------------------------------------------- /utils/ocr: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | files=( "$@" ) 4 | cmdname="$0" 5 | lang="${lang:-deu}" 6 | # output file: $pdf 7 | 8 | usage() { 9 | cat <&2 19 | "$@" 20 | } 21 | 22 | if [ "${files[0]}" = -h ] || [ -z "${files[0]}" ] ; then 23 | usage 24 | exit 0 25 | fi 26 | 27 | # strip extension '.pdf' because tesseract will append it again 28 | pdf=${pdf%.pdf} 29 | # if $pdf is not set 30 | if [[ -z "$pdf" ]] ; then 31 | # pick pdf to be the common prefix of files 32 | pdf=${files[0]} 33 | pdf=${pdf%.*} # drop the file extension anyway 34 | for f in "${files[@]}" ; do 35 | # crop $f to ${#pdf} (the len of $pdf) and see if they agree 36 | while [[ "$pdf" != "${f:0:${#pdf}}" ]] ; do 37 | pdf=${pdf%?} # if they don't aggree, drop the last character 38 | done 39 | done 40 | 41 | while [[ -f "$pdf.pdf" ]] ; do 42 | pdf="${pdf}-ocr" 43 | done 44 | fi 45 | 46 | dpioption="" 47 | if [[ -n "$DPI" ]] ; then 48 | # DPI=300 is mostly correct for scans 49 | # this will be tokenized later, beware of spaces 50 | dpioption="--dpi $DPI" 51 | fi 52 | 53 | # tesseract does not accept the .pdf extension anyway.. 54 | cat <: C","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000 19 | , Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10 20 | , Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10 21 | , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 22 | , Run Memory ["-t","Mem: %"] 10 23 | , Run Swap [] 10 24 | , Run Com "uname" ["-s","-r"] "" 36000 25 | , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10 26 | ] 27 | , sepChar = "%" 28 | , alignSep = "}{" 29 | , template = "%cpu% | %memory% * %swap% | %eth0% - %eth1% }{ %date%| %EGPF% | %uname%" 30 | } 31 | EOF 32 | } 33 | 34 | #print_config 35 | 36 | exec xmobar <(print_config) 37 | -------------------------------------------------------------------------------- /Xdefaults.d/custom.ghul: -------------------------------------------------------------------------------- 1 | ! -------------------------------------------------- 2 | ! vim: nu:ai:si:et:ts=4:sw=4:ft=xdefaults 3 | ! -------------------------------------------------- 4 | 5 | ! a brown setup 6 | !urxvt*background: #423323 7 | !xterm*background: #423323 8 | !urxvt*color0: #282015 9 | ! 10 | ! 11 | ! fixed font: 12 | !URxvt.font: -misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-1 13 | !URxvt.boldFont: -misc-fixed-bold-r-semicondensed-*-13-*-*-*-*-*-iso10646-1 14 | !URxvt.keysym.C-1: command:\033]710;-misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-1\007\033]711;-misc-fixed-bold-r-semicondensed-*-13-*-*-*-*-*-iso10646-1\007 15 | 16 | !urxvt*cursorBlink: false 17 | !URxvt.transparent: true 18 | !URxvt.shading: 20 19 | 20 | !#include "tango.colors" 21 | !#include "pixelfont" 22 | URxvt.background: #1d1d1d 23 | !URxvt.color0: #101010 24 | 25 | !URxvt.color0: #222222 26 | !URxvt.background: #101010 27 | !URxvt.color3: #FFC630 28 | !URxvt.font: -misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-1 29 | !URxvt.boldFont: -misc-fixed-bold-r-semicondensed-*-13-*-*-*-*-*-iso10646-1 30 | ! 31 | !URxvt.font: xft:Terminus:medium:size=10 32 | !URxvt.boldFont: xft:Terminus:bold:medium:size=10 33 | !URxvt.keysym.C-2: command:\033]710;-misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-1\007\033]711;-misc-fixed-bold-r-semicondensed-*-13-*-*-*-*-*-iso10646-1\007 34 | 35 | !URxvt.keysym.C-2: command:\033]710;-misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-1\007\033]711;-misc-fixed-bold-r-semicondensed-*-13-*-*-*-*-*-iso10646-1\007 36 | 37 | !*color2: #7FD1DA 38 | -------------------------------------------------------------------------------- /taskrc.cip: -------------------------------------------------------------------------------- 1 | # [Created by task 1.9.2 3/30/2012 1:48:27] 2 | # vim: nowrap 3 | # Task program configuration file. 4 | # For more documentation, see http://taskwarrior.org or try 'man task', 'man task-faq', 5 | # 'man task-tutorial', 'man task-color' or 'man taskrc' 6 | 7 | # Here is an example of entries that use the default, override and blank values 8 | # variable=foo -- By specifying a value, this overrides the default 9 | # variable= -- By specifying no value, this means no default 10 | # #variable=foo -- By commenting out the line, this uses the default 11 | 12 | # Files 13 | data.location=/home/cip/adm/re06huxa/.task 14 | locking=on # Use file-level locking 15 | 16 | include /usr/share/task/dark-256.theme 17 | #include /proj/ciptmp/re06huxa/git/task/doc/rc/dark-256.theme 18 | #include /proj/ciptmp/re06huxa/git/task/doc/rc/dark-yellow-green.theme 19 | 20 | 21 | color.tagged=color7 22 | color.tag.hlwm=black on color6 23 | color.tag.fsi=bold white on rgb004 24 | color.tag.cip=bold white on rgb030 25 | color.tag.esg=black on yellow 26 | 27 | # Aliases - alternate names for commands 28 | alias.rm=delete # Alias for the delete command 29 | alias.a=add # Alias for the delete command 30 | alias.history=history.monthly # Prefer monthly over annual history reports 31 | alias.ghistory=ghistory.monthly # Prefer monthly graphical over annual history reports 32 | alias.export=export.csv # Prefer CSV over iCal export 33 | alias.export.vcalendar=export.ical # They are the same 34 | 35 | -------------------------------------------------------------------------------- /utils/adf2mp3.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import os 5 | 6 | def usage(targetfile): 7 | print("usage: {} INPUTFILE OUTPUTFILE".format(sys.argv[0]), 8 | file=targetfile) 9 | print("", file=targetfile) 10 | print("Convert the adf specified by INPUTFILE", file=targetfile) 11 | print("to an mp3 file specified by OUTFILE", file=targetfile) 12 | 13 | def print_progress(name, ratio): 14 | print("\r{}: {}% ".format(name, int(ratio * 100)), file=sys.stderr, end='') 15 | 16 | def main(): 17 | # https://gtaforums.com/topic/96504-how-do-i-play-adf-files/# 18 | if len(sys.argv) < 3: 19 | usage(sys.stderr) 20 | sys.exit(1) 21 | input_file = sys.argv[1] 22 | output_file = sys.argv[2] 23 | input_size = os.path.getsize(input_file) 24 | BLOCK_SIZE = 128 * 8192 25 | progress = 0 26 | try: 27 | with open(input_file, 'rb') as inp: 28 | with open(output_file, 'wb') as outp: 29 | print_progress(output_file, progress / input_size) 30 | while True: 31 | block = bytearray(inp.read(BLOCK_SIZE)) 32 | if len(block) == 0: 33 | break 34 | progress += len(block) 35 | for i, item in enumerate(block): 36 | block[i] = item ^ 0x22 37 | outp.write(block) 38 | print_progress(output_file, progress / input_size) 39 | print('', file=sys.stderr) 40 | except IOError as e: 41 | print("I/O error: {}".format(e), file=sys.stderr) 42 | sys.exit(1) 43 | 44 | main() 45 | 46 | -------------------------------------------------------------------------------- /utils/aur-build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # vim: ft=bash 3 | 4 | cmdname=$0 5 | printhelp() { 6 | cat <&2 28 | exit 1 29 | fi 30 | 31 | buildpath="$HOME/.aur-build/$pkgname/" 32 | EDITOR=${EDITOR:-vim} 33 | 34 | fail() { 35 | echo "error: $*" >&2 36 | exit 1 37 | } 38 | 39 | mkdir -p "$buildpath" && cd "$buildpath" || fail "Can not enter $buildpath" 40 | 41 | wget https://aur.archlinux.org/cgit/aur.git/snapshot/$pkgname.tar.gz -O - \ 42 | | tar xzv --strip-components=1 43 | 44 | $EDITOR PKGBUILD 45 | source PKGBUILD 46 | [ -f "$install" ] && $EDITOR "$install" 47 | 48 | missing=$(pacman -T "${depends[@]}" "${makedepends[@]}"|sort|uniq) 49 | echo "Missing dependencies: $missing" 50 | missingrepo="" 51 | missingaur="" 52 | for i in $missing ; do 53 | if pacman -Siq $i > /dev/null ; then 54 | missingrepo+=" $i" 55 | else 56 | missingaur+=" $i" 57 | fi 58 | done 59 | echo "Available in repositories: $missingrepo" 60 | echo "Probably only in aur: $missingaur" 61 | 62 | if [[ -n "$missingrepo" ]] ; then 63 | sudo pacman --asdeps -S $missingrepo 64 | fi 65 | makepkg -cfi $makepkgflags_unquoted 66 | 67 | 68 | -------------------------------------------------------------------------------- /ascii/pipes.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | declare -i f=75 s=13 r=2000 t=0 c=1 n=0 l=0 3 | declare -ir w=$(tput cols) h=$(tput lines) 4 | declare -i x=$((w/2)) y=$((h/2)) 5 | declare -ar v=( [00]="\x83" [01]="\x8f" [03]="\x93" 6 | [10]="\x9b" [11]="\x81" [12]="\x93" 7 | [21]="\x97" [22]="\x83" [23]="\x9b" 8 | [30]="\x97" [32]="\x8f" [33]="\x81" ) 9 | 10 | OPTIND=1 11 | while getopts "f:s:r:h" arg; do 12 | case $arg in 13 | f) ((f=($OPTARG>19 && $OPTARG<101)?$OPTARG:$f));; 14 | s) ((s=($OPTARG>4 && $OPTARG<16 )?$OPTARG:$s));; 15 | r) ((r=($OPTARG>0)?$OPTARG:$r));; 16 | h) echo -e "Usage: pipes [OPTION]..." 17 | echo -e "Animated pipes terminal screensaver.\n" 18 | echo -e " -f [20-100]\tframerate (D=75)." 19 | echo -e " -s [5-15]\tprobability of a straight fitting (D=13)." 20 | echo -e " -r LIMIT\treset after x characters (D=2000)." 21 | echo -e " -h\t\thelp (this screen).\n" 22 | exit 0;; 23 | esac 24 | done 25 | 26 | tput smcup 27 | tput reset 28 | tput civis 29 | while ! read -t0.0$((1000/$f)) -n1; do 30 | # New position: 31 | (($l%2)) && ((x+=($l==1)?1:-1)) 32 | ((!($l%2))) && ((y+=($l==2)?1:-1)) 33 | 34 | # Loop on edges (change color on loop): 35 | ((c=($x>$w || $x<0 || $y>$h || $y<0)?($RANDOM%7-1):$c)) 36 | ((x=($x>$w)?0:(($x<0)?$w:$x))) 37 | ((y=($y>$h)?0:(($y<0)?$h:$y))) 38 | 39 | # New random direction: 40 | ((n=$RANDOM%$s-1)) 41 | ((n=($n>1||$n==0)?$l:$l+$n)) 42 | ((n=($n<0)?3:$n%4)) 43 | 44 | # Print: 45 | tput cup $y $x 46 | echo -ne "\033[1;3${c}m\xe2\x94${v[$l$n]}" 47 | (($t>$r)) && tput reset && tput civis && t=0 || ((t++)) 48 | l=$n 49 | done 50 | tput rmcup 51 | 52 | -------------------------------------------------------------------------------- /latexmkrc: -------------------------------------------------------------------------------- 1 | # vim: ft=perl 2 | # 3 | # 4 | use Cwd qw(getcwd); 5 | use Digest::MD5 qw(md5 md5_hex md5_base64); 6 | 7 | 8 | $pdf_mode = 1; 9 | $pdflatex = 'bash -c "pdflatex < /dev/null -file-line-error -interaction=halt-on-error -synctex=1 \"\$@\"" -- %O %S'; 10 | 11 | 12 | # # always use an out-of-source aux dir 13 | # $git_root = ""; 14 | $git_root = `git rev-parse --show-toplevel 2> /dev/null`; 15 | if ($git_root eq "") { 16 | # if we are not in a git directory, then save 17 | my $dir = getcwd; 18 | $aux_dir = $ENV{"HOME"} . "/.cache/latexmk-auxdir/" . md5_hex($dir); 19 | print "Using aux_dir: " . $aux_dir . "\n"; 20 | $emulate_aux = 1; 21 | } 22 | 23 | # remove the following with 'latexmk -c' 24 | push @generated_exts, "run.xml"; 25 | push @generated_exts, "bbl"; 26 | push @generated_exts, "vtc"; 27 | push @generated_exts, "synctex.gz"; 28 | 29 | 30 | # OVERWRITE move_out_files_from_aux() in order to keep .fls in the aux_dir 31 | sub move_out_files_from_aux { 32 | # Move output and fls files to out_dir 33 | # Omit 'xdv', that goes to aux_dir (as with MiKTeX). It's not final output. 34 | foreach my $ext ( 'dvi', 'pdf', 'ps', 'synctex', 'synctex.gz' ) { 35 | # Include fls file, because MiKTeX puts it in out_dir, rather than 36 | # aux_dir, which would seem more natural. We must maintain 37 | # compatibility. 38 | my $from = "$aux_dir1$root_filename.$ext"; 39 | my $to = "$out_dir1$root_filename.$ext" ; 40 | if ( test_gen_file( $from ) ) { 41 | if (! $silent) { print "$My_name: (patched in latexmkrc) Moving '$from' to '$to'\n"; } 42 | my $ret = move( $from, $to ); 43 | if ( ! $ret ) { die " That failed, with message '$!'\n";} 44 | } 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /config/luakit/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | /* background-color: #141414; */ 3 | /*color: #efefef; */ 4 | //font-family: "Bitstream Vera Sans Mono"; 5 | } 6 | 7 | // * { 8 | // font-family: normal; 9 | // } 10 | 11 | html { 12 | //-webkit-font-smoothing: subpixel-antialiased; 13 | } 14 | a { 15 | color: #6099DD; 16 | } 17 | 18 | // stackoverflow 19 | .adzerk-vote { display: none !important; } 20 | 21 | // last.fm styles 22 | .adform-adbox { display: none !important; } 23 | .adform-adbox-static { display: none !important; } 24 | .LastAd { display: none !important; } 25 | .ad-leaderboard { display: none !important; } 26 | 27 | .hidden-menu, .masthead { 28 | background-image: -webkit-linear-gradient(#434D08, #829709) !important; 29 | border: 1px solid #363F00 !important; 30 | } 31 | 32 | .site-search .search-box, .btn--header { 33 | box-shadow: inset #333 0 -5px 5px, 34 | inset #131313 0 1px 5px, 35 | #9fbc00 0 1px 0 !important; 36 | border: 1px solid #363F00 !important; 37 | } 38 | 39 | .user-dropdown-divider-bottom,.user-dropdown-divider-top { 40 | border-color: #363F00 !important; 41 | } 42 | 43 | .user-dropdown { 44 | box-shadow: none !important; 45 | } 46 | 47 | .btn--header { 48 | background-color: #8FA126 !important; 49 | background-image: none !important; 50 | border: 1px solid #363F00 !important; 51 | } 52 | 53 | .dropdown-btn-menu-item:hover, .dropdown-btn-menu-item:focus { 54 | background-color: #515E08 !important; 55 | } 56 | 57 | .masthead { 58 | background-image: -webkit-linear-gradient(#81902C, #515E08) !important; 59 | border: 1px solid #363F00 !important; 60 | } 61 | 62 | #page h2.heading, 63 | .h2Wrapper a { 64 | color: #9fbc00 !important; 65 | } 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /utils/dec2bin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | prog="$0" 4 | usage() { 5 | cat <&2 39 | usage >&2 40 | exit 1 41 | fi 42 | 43 | input=$(cat) 44 | dec="${input//[^0-9]/}" 45 | 46 | hex=$(bc <<< "ibase=10;obase=16;$dec" | sed 's,..,\\x&,g') 47 | echo -en "$hex" > "$file" 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /mk-mpdconf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | if [[ $MPD_HOST =~ @ ]] ; then 6 | # if MPD_HOST is set and has a password, then re-use that 7 | password=${MPD_HOST%@*} 8 | else 9 | password=$(pwgen 8 1) 10 | fi 11 | 12 | prog=$0 13 | configfile=$HOME/.config/mpd/mpd.conf 14 | 15 | ask() { 16 | local answer=n 17 | read -s -n 1 -p "==> $* [y/N]" answer 18 | echo 19 | [[ $answer =~ [Yy] ]] 20 | } 21 | 22 | msg() { 23 | echo ":: $*" 24 | } 25 | 26 | ::() { 27 | echo ":: $*" 28 | "$@" || exit 1 29 | } 30 | 31 | print_config(){ 32 | cat <8 ----" 65 | cat <<< "$config_content" 66 | echo "---- >8 ----" 67 | 68 | if ! ask "Write above config to $configfile?" ; then 69 | exit 0 70 | fi 71 | :: mkdir -p "${configfile%/*}" 72 | msg "Writing $configfile" 73 | cat <<< "$config_content" > "$configfile" 74 | if [[ -n "$DISPLAY" ]] && ask "Set MPD_HOST via herbstclient?" ; then 75 | :: herbstclient setenv MPD_HOST "$password@localhost" 76 | fi 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /Xdefaults.d/custom.hoth: -------------------------------------------------------------------------------- 1 | ! vim: nu:ai:si:et:ts=4:sw=4:ft=xdefaults 2 | !xterm*faceName: 'xft:Bitstream Vera Sans Mono:style=pixelsize=12' 3 | !xterm*faceName: 'xft:GohuFont:pixelsize=12' 4 | !xterm*faceName: 'xft:Bitstream Vera Sans Mono:pixelsize=12' 5 | 6 | !#include "pixelfont" 7 | !URxvt.color0: #222222 8 | !URxvt.background: #101010 9 | !URxvt.background: #1d1d1d 10 | !URxvt.color3: #FFC630 11 | !URxvt.color11: #99FF5F 12 | 13 | 14 | ! for fake transparency 15 | !URxvt.transparent: true 16 | !URxvt.shading: 20 17 | 18 | !URxvt.font: xft:terminus:12 19 | !URxvt.boldFont: xft:terminus:12 20 | 21 | ! pixelfont: 22 | !URxvt.font: -misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-1 23 | !URxvt.boldFont: -misc-fixed-bold-r-semicondensed-*-13-*-*-*-*-*-iso10646-1 24 | !URxvt.keysym.C-2: command:\033]710;-misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-1\007\033]711;-misc-fixed-bold-r-semicondensed-*-13-*-*-*-*-*-iso10646-1\007 25 | 26 | !#include "neon.colors" 27 | !#include "tangobright.colors" 28 | !urxvt*background: red 29 | !urxvt*background: #1E0F05 30 | !urxvt*foreground: white 31 | !*color2: #7FD1DA 32 | 33 | 34 | ! a brown 35 | !#define itembg argb:EEE2CD96 36 | !#define selbg #E26910 37 | ! STATE BG FG BGALT HLBG HLFG 38 | !rofi.color-normal: itembg, #4B2D22, itembg, selbg, #1A0900 39 | !rofi.color-urgent: #D6156C, white, #D6156C, #dc322f, selbg 40 | !rofi.color-active: #101010, #FFE352, #101010, selbg, black 41 | !rofi.color-window: argb:EE242424,black,argb:EE242424 42 | !rofi.hide-scrollbar: false 43 | !rofi.color-window: #C4B07A,#4B2D22 44 | 45 | !rofi.width: 80 46 | 47 | urxvt*background:rgba:1818/1818/1818/eeee 48 | urxvt*depth: 32 49 | 50 | 51 | !urxvt*background:rgba:0F0F/0707/0000/EEEE 52 | !urxvt*depth: 32 53 | -------------------------------------------------------------------------------- /abcde.conf: -------------------------------------------------------------------------------- 1 | CDDBUSELOCAL="y" 2 | # Track padding: force abcde to pad tracks using 0, so every song uses a two 3 | # digit entry. If set to "y", even a single song encoding outputs a file like 4 | # 01.my_song.ext 5 | PADTRACKS=y 6 | 7 | # Define if you want abcde to be non-interactive. 8 | INTERACTIVE=y 9 | OUTPUTDIR=`pwd` 10 | ACTIONS=cddb,read,encode,tag,move,clean 11 | FLACOPTS='--silent --best' # enforce highest possible compression level 12 | 13 | OUTPUTTYPE=flac # OUTPUTTYPE can be any of a number of formats (e.g. "flac,mp3") 14 | 15 | # Tags: OUTPUT, GENRE, ALBUMFILE, ARTISTFILE, TRACKFILE, TRACKNUM and YEAR. 16 | OUTPUTFORMAT='${ARTISTFILE}/${ALBUMFILE}/${TRACKNUM}. ${TRACKFILE}' 17 | 18 | # Like OUTPUTFORMAT but for Various Artists discs. 19 | VAOUTPUTFORMAT='Various Artists/${ALBUMFILE}/${TRACKNUM}. ${ARTISTFILE} - ${TRACKFILE}' 20 | 21 | # Like OUTPUTFORMAT and VAOUTPUTFORMAT but for the ONEFILE rips. 22 | #ONETRACKOUTPUTFORMAT=$OUTPUTFORMAT 23 | #VAONETRACKOUTPUTFORMAT=$VAOUTPUTFORMAT 24 | 25 | processors=$(grep -c ^processor$'\t' /proc/cpuinfo) 26 | MAXPROCS=$((processors - 1)) 27 | 28 | NOGAP=y 29 | 30 | # album art download options (see glyrc's help for details with more detailed 31 | # examples here: https://github.com/sahib/glyr/wiki/Commandline-arguments). 32 | # For example use '--formats jpg;jpeg' to only search for JPEG images 33 | # These options: '--from ' and '--lang ' might also be useful 34 | #GLYRCOPTS= 35 | ALBUMARTFILE="cover.jpg" 36 | ALBUMARTTYPE="JPEG" 37 | 38 | mungefilename() { 39 | echo "$@" | sed -e 's/^\.*//' | tr -d ":><|*/\"'?[:cntrl:]" 40 | } 41 | 42 | # TODO: finde the right time to edit tags in non-interactivemode: 43 | # $EDITOR "$ABCDETEMPDIR/cddbread".* 44 | #pre_read() { } 45 | #post_read () { } 46 | #post_encode () { } 47 | 48 | EJECTCD=n 49 | #REMOTEHOSTS=foo,bar,baz,quux,qiix 50 | #EXTRAVERBOSE=0 51 | -------------------------------------------------------------------------------- /utils/mpd-cp-state.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | cmd_name=$0 4 | print_help() { 5 | cat <&2 36 | exit 1 37 | fi 38 | from=$(fill_default_values "$from") 39 | to=$(fill_default_values "$to") 40 | 41 | from_host=${from%:*} 42 | from_port=${from##*:} 43 | to_host=${to%:*} 44 | to_port=${to##*:} 45 | 46 | do_at_from() { 47 | MPD_HOST="$from_host" MPD_PORT="$from_port" "$@" 48 | } 49 | do_at_to() { 50 | MPD_HOST="$to_host" MPD_PORT="$to_port" "$@" 51 | } 52 | ::() { 53 | echo ":: $*" >&2 54 | } 55 | 56 | :: "Transferring the state from $from_host (port $from_port) to $to_host (port $to_port)" 57 | :: "Clearing target playlist" 58 | do_at_to mpc stop 59 | do_at_to mpc clear 60 | :: "Copying playlist" 61 | do_at_from mpc playlist --format "%file%" | do_at_to mpc add 62 | :: "Playing at same position" 63 | do_at_to mpc play $(do_at_from mpc current --format '%position%') 64 | do_at_to mpc seek $(do_at_from mpc -f '' status \ 65 | | awk '{ print $3 }' | sed -n '2s,/.*,,p') 66 | 67 | 68 | -------------------------------------------------------------------------------- /menu/rofi-netctl: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | IFS=$'\n' 4 | stop_all='[ STOP ALL PROFILES ]' 5 | mapfile -d '' -t profiles \ 6 | < <(find /etc/netctl/ \ 7 | -maxdepth 1 -type f -printf '%f\n' \ 8 | | grep -xvE '\..*|.*~' \ 9 | | sort ) 10 | # I'm unsure whether I really should filter out all hidden files 11 | 12 | profiles=( 13 | "$stop_all" 14 | "${profiles[@]}" 15 | ) 16 | 17 | i=0 18 | active_name=$(systemctl list-units --state=active --no-pager --no-legend 'netctl*.service') 19 | active_name=${active_name%%.service*} 20 | active="" 21 | for p in "${profiles[@]}" ; do 22 | if [ "${p}" == "$active_name" ] ; then 23 | active="$i" 24 | fi 25 | i=$((i+1)) 26 | done 27 | 28 | message=$(sudo journalctl -n 10 -o short --unit=system-netctl.slice) 29 | 30 | selection=$(printf "%s\n" "${profiles[@]}" \ 31 | | rofi \ 32 | -dmenu \ 33 | -i \ 34 | -a "0,$active" \ 35 | -no-custom \ 36 | -p "netctl enable" \ 37 | -mesg "$message" 38 | ) 39 | 40 | if [ "$selection" = "$stop_all" ] ; then 41 | sudo netctl stop-all 42 | else 43 | connect() { 44 | ::() { echo -e "\e[1;32m::\e[1;37m $*\e[0m" >&2 ; } 45 | :: sudo netctl stop-all 46 | sudo netctl stop-all 47 | :: sudo netctl start "$selection" 48 | sudo netctl start "$selection" 49 | :: sudo journalctl -f --unit='system-netctl.slice' '&' 50 | sudo journalctl -f --unit='system-netctl.slice' & 51 | journalctl_pid=$! 52 | sudo netctl wait-online "$selection" 53 | :: Press any key to close… | tr -d '\n' 54 | read -n 1 55 | kill "$journalctl_pid" 56 | } 57 | export selection 58 | export -f connect 59 | #urxvt -title "netctl start $selection" -e bash -c connect 60 | # alacritty --command bash -c connect 61 | alacritty --title 'netctl start eduroam' --command bash -c connect 62 | fi 63 | 64 | 65 | -------------------------------------------------------------------------------- /pandoc/defaults/notes.yaml: -------------------------------------------------------------------------------- 1 | # use via: pandoc -d notes -o output.pdf input.md 2 | metadata: 3 | geometry: margin=2.5cm 4 | 5 | variables: 6 | documentclass: article 7 | classoption: 8 | - twoside 9 | header-includes: 10 | # it is very important that this is in 'variables' 11 | # and not in metadata! 12 | - | 13 | \usepackage{fancyhdr} 14 | \usepackage{lastpage} 15 | \fancypagestyle{plain}{% 16 | \renewcommand{\headrulewidth}{0pt}% 17 | \fancyhf{}% clear all 18 | %\fancyhead[LO,LE]{} 19 | %\fancyfoot[C]{} 20 | % outer: 21 | \fancyfoot[LE,RO]{\thepage\ / \pageref{LastPage}} 22 | % inner: 23 | \fancyfoot[LO,RE]{\textcolor{black!50}{\today}} 24 | } 25 | \pagestyle{plain}% 26 | \usepackage{newunicodechar} 27 | \newunicodechar{→}{\ensuremath{\rightarrow}} 28 | \newunicodechar{⇒}{\ensuremath{\Rightarrow}} 29 | \newunicodechar{⊗}{\ensuremath{\otimes}} 30 | \newunicodechar{〈}{\ensuremath{\langle}} 31 | \newunicodechar{〉}{\ensuremath{\rangle}} 32 | \DeclareUnicodeCharacter{8989}{\ensuremath{\urcorner}} 33 | \DeclareUnicodeCharacter{211D}{\ensuremath{\mathbb R}} 34 | \DeclareUnicodeCharacter{2124}{\ensuremath{\mathbb Z}} 35 | \DeclareUnicodeCharacter{2203}{\ensuremath{\exists}} 36 | \DeclareUnicodeCharacter{2200}{\ensuremath{\forall}} 37 | \DeclareUnicodeCharacter{2192}{\ensuremath{\to}} 38 | \DeclareUnicodeCharacter{2208}{\ensuremath{\in}} 39 | \DeclareUnicodeCharacter{D7}{\ensuremath{\times}} 40 | \DeclareUnicodeCharacter{2205}{\ensuremath{\emptyset}} 41 | \DeclareUnicodeCharacter{2286}{\ensuremath{\subseteq}} 42 | \DeclareUnicodeCharacter{2218}{\ensuremath{\circ}} 43 | \DeclareUnicodeCharacter{27E6}{\ensuremath{\llbracket}} % ⟦ 44 | \DeclareUnicodeCharacter{27E7}{\ensuremath{\rrbracket}} % ⟧ 45 | \DeclareUnicodeCharacter{2264}{\ensuremath{\le}} % ≤ 46 | % 47 | % WARNING: combining strike-out text and href breaks! 48 | -------------------------------------------------------------------------------- /xdg/mutt-mailto.py: -------------------------------------------------------------------------------- 1 | #!/bin/python3 2 | 3 | import sys 4 | import subprocess 5 | import urllib.parse 6 | import tempfile 7 | import os 8 | 9 | # we get as a input something like: 10 | # mailto: user@domain?subject=XYZ&cc=...&body=... 11 | # or 12 | # mailto://user@domain?subject=XYZ&cc=...&body=... 13 | 14 | #print(sys.argv) 15 | url = sys.argv[1] 16 | o = urllib.parse.urlparse(url) 17 | query = urllib.parse.parse_qs(o.query) 18 | 19 | address = urllib.parse.unquote(o.netloc + o.path) # one of them is empty 20 | 21 | # >>> from urllib.parse import urlparse 22 | # >>> urlparse('mailto:bla@blub.com') 23 | # ParseResult(scheme='mailto', netloc='', path='bla@blub.com', params='', query='', fragment='') 24 | # >>> urlparse('mailto://bla@blub.com') 25 | # ParseResult(scheme='mailto', netloc='bla@blub.com', path='', params='', query='', fragment='') 26 | 27 | draft = None 28 | if 'body' in query: 29 | draft = tempfile.NamedTemporaryFile(mode='w',delete=False) 30 | body_str = query['body'][0].replace("\r","") 31 | if not body_str.endswith("\n"): 32 | body_str += "\n" 33 | draft.write(body_str) 34 | draft.close() 35 | 36 | 37 | proc = [ ] 38 | #proc += [ "urxvt", "-e" ] 39 | proc += [ "mutt"] 40 | if 'subject' in query: 41 | proc += [ '-s', query['subject'][0] ] 42 | if 'cc' in query: 43 | for cc in query['cc']: 44 | proc += [ '-c', cc ] 45 | if draft is not None: 46 | proc += [ '-H', draft.name ] 47 | proc += [ '--', address ] 48 | 49 | print(' '.join(proc), file=sys.stderr) 50 | mutt = subprocess.Popen(proc) #, stdin=subprocess.PIPE) 51 | mutt.wait() 52 | #print(draft.name) 53 | if draft is not None: 54 | os.unlink(draft.name) 55 | #print (proc) 56 | 57 | #if 'body' in query: 58 | #mutt.stdin.write(b'test'); 59 | #mutt.stdin.close() 60 | #(address,parameters) = sys.argv[1].split('?', 1) 61 | # 62 | #param_dict = {} 63 | # 64 | #for x in parameters.split('&'): 65 | # (name,value) = x.split('=', 66 | # param_dict[ 67 | -------------------------------------------------------------------------------- /utils/latex-include-tree.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # visualize the include order and dependencies between latex 4 | # packages given its log file 5 | import sys 6 | import re 7 | 8 | 9 | class Tree: 10 | def __init__(self): 11 | self.children = [] 12 | self.nodename = '' 13 | 14 | def print(self, depth=0): 15 | print(' |' * depth, end='') 16 | print('-+-' + self.nodename) 17 | for c in self.children: 18 | c.print(depth + 1) 19 | 20 | 21 | def insertnewline(line): 22 | line = line.replace('\n', '') 23 | if len(line) == 79: 24 | return line 25 | else: 26 | return line + '\n' 27 | 28 | 29 | def main(): 30 | with open(sys.argv[1], "r") as fh: 31 | buf = ''.join([insertnewline(l.replace('\r', '')) for l in fh.readlines()]) 32 | tokenized = [] 33 | for l in buf.split('\n'): 34 | tokenized += [i for i in re.split('([() ])', l)] 35 | tokenized = [i for i in tokenized if i != '' and i != ' '] 36 | first_token = False 37 | tree_root = Tree() # create a dummy node 38 | cur_tree = tree_root 39 | stack = [] 40 | for t in tokenized: 41 | if t == '(': 42 | stack.append(cur_tree) 43 | cur_tree = Tree() 44 | first_token = True 45 | elif t == ')': 46 | # pop stack 47 | if cur_tree.nodename[0] == '.' or cur_tree.nodename[0] == '/': 48 | stack[-1].children.append(cur_tree) 49 | cur_tree = stack[-1] 50 | stack = stack[0:-1] 51 | elif first_token: 52 | cur_tree.nodename = t 53 | first_token = False 54 | else: 55 | pass 56 | # close all open trees in the stack 57 | while stack != []: 58 | stack[-1].children.append(cur_tree) 59 | cur_tree = stack[-1] 60 | stack = stack[0:-1] 61 | for c in cur_tree.children: 62 | c.print() 63 | 64 | 65 | main() 66 | -------------------------------------------------------------------------------- /bash.d/render256.awk: -------------------------------------------------------------------------------- 1 | #!/bin/awk -f 2 | 3 | # Setup 4 | BEGIN { 5 | #chunksize=int(1000/(2*barlength)+0.5); 6 | n=0; 7 | linenr=0 8 | rmax=1; gmax=1; bmax=1; 9 | rmaxsize=1; gmaxsize=1; bmaxsize=1; 10 | } 11 | 12 | # Sum the samples in each chunk and find the max value for each color 13 | { 14 | n=int((linenr/1000)*2*barlength) 15 | chsize[n]++; 16 | r[n]+=$1; 17 | g[n]+=$2; 18 | b[n]+=$3; 19 | if (r[n] > rmax) { rmax = r[n]; } 20 | if (g[n] > gmax) { gmax = g[n]; } 21 | if (b[n] > bmax) { bmax = b[n]; } 22 | linenr++; 23 | } 24 | 25 | # Draw the moodbar 26 | END { 27 | ORS=""; 28 | #print "linenr=" linenr " \n" 29 | #print "chsize=" chunksize " \n" 30 | #print "barlength=" barlength " \n" 31 | #print "*=" (2*chunksize*barlength) " \n" 32 | #s=0 33 | #for (i=1;i<=n;i++) { 34 | # print "chsize[" i "]=" chsize[i] "\n"; 35 | # s+=chsize[n]; 36 | #} 37 | #print "sum is " s "\n"; 38 | for (i=1;i<=barlength*2-1;i+=2) { 39 | r[i]/=rmax; g[i]/=gmax; b[i]/=bmax; 40 | # convert rgb in range from 0 to 1 to 256color 41 | r[i] = int(r[i] * 6); 42 | g[i] = int(g[i] * 6); 43 | b[i] = int(b[i] * 6); 44 | rgbcolor = r[i]*36 + g[i]*6+b[i]+16; 45 | r[i+1]/=rmax; g[i+1]/=gmax; b[i+1]/=bmax; 46 | # convert rgb i+1n range from 0 to 1 to 256color 47 | r[i+1] = int(r[i+1] * 6); 48 | g[i+1] = int(g[i+1] * 6); 49 | b[i+1] = int(b[i+1] * 6); 50 | rgbcolor1 = r[i+1]*36 + g[i+1]*6+b[i+1]+16; 51 | print "\033[38;5;" rgbcolor "m\033[48;5;" rgbcolor1 "m▍"; 52 | #print "(" r[i] "," g[i] "," b[i] ")"; 53 | #if (r[i] + g[i] + b[i] < 0.10) print "\033[30m" shade[0]; 54 | #else if ((r[i] > g[i]) && (r[i] > b[i])) print "\033[31m" shade[int(r[i]*2.99)]; 55 | #else if ((g[i] > r[i]) && (g[i] > b[i])) print "\033[32m" shade[int(g[i]*2.99)]; 56 | #else print "\033[34m" shade[int(b[i]*2.99)]; 57 | } 58 | print "\033[0m\n" 59 | } 60 | 61 | -------------------------------------------------------------------------------- /config/herbstluftwm/themes/black-bar.css: -------------------------------------------------------------------------------- 1 | 2 | .client-decoration { 3 | background-color: #343434; 4 | outline-width: 1px; 5 | outline-style: solid; 6 | outline-color: #2B2B2B; 7 | margin: 1px; /* make outline visible */ 8 | border: 1px solid #494949; 9 | } 10 | 11 | .client-decoration.focus { 12 | outline-color: #0b0b0b; 13 | border-color: #5b5b5b; 14 | } 15 | 16 | .client-decoration .tab { 17 | margin: 3px; 18 | margin-bottom: 0px; 19 | padding: 0px 2px; 20 | color: white; 21 | text-align: center; 22 | } 23 | 24 | .client-decoration .tabs .tab { 25 | border-width: 2px 0px; 26 | outline-width: 2px 0px; 27 | margin: 2px 0px; 28 | padding-top: -4px; 29 | padding-bottom: -2px; 30 | outline-style: solid; 31 | /* gradient for the poor: */ 32 | outline-top-color: #2d2d2d; 33 | border-top-color: #303030; 34 | border-bottom-color: #363636; 35 | outline-bottom-color: #383838; 36 | } 37 | 38 | .client-decoration .tab + .tab { 39 | border-left: 1px solid #494949; 40 | } 41 | 42 | 43 | /* make a tab a bit darker if it needs to be highlighted: 44 | * either because it's the focused tab in a multi-tab 45 | * title, or because it is the focused decoration */ 46 | .client-decoration.multiple-tabs .tab.focus , 47 | .client-decoration.focus .tab.focus { 48 | /* color: white; */ 49 | background-color: #2e2b2e; 50 | /* gradient for the poor: */ 51 | outline-top-color: #242124; 52 | border-top-color: #292629; 53 | border-bottom-color: #302D30; 54 | outline-bottom-color: #333033; 55 | } 56 | 57 | .client-decoration .tab.focus { 58 | } 59 | 60 | .client-decoration.focus .tab.focus { 61 | color: #B1CD94; 62 | /* font: Dejavu Sans:pixelsize=12:bold; */ 63 | } 64 | 65 | .client-decoration .tab.urgent { 66 | color: #FF6F6F; 67 | font: Dejavu Sans:pixelsize=12:bold; 68 | } 69 | 70 | 71 | * { 72 | /* font: -*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*; */ 73 | font: Dejavu Sans:pixelsize=12; 74 | } 75 | 76 | -------------------------------------------------------------------------------- /utils/scan.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # scanning utility for my home printer... 4 | 5 | outfile="$1" 6 | cmdname="$0" 7 | shift 8 | 9 | ::() { 10 | echo ":: $*" >&2 11 | "$@" 12 | } 13 | 14 | usage() { 15 | cat < $outfile" 44 | done 45 | 46 | # exit 1 47 | # 48 | # if [ -e "$outfile" ] ; then 49 | # echo "Warning: $outfile exists already. Override?" 50 | # read -n 1 -p " yn?" answer 51 | # if [ ! "$answer" = y ] ; then 52 | # exit 1 53 | # fi 54 | # fi 55 | 56 | vendor_product_id=04b8:0881 57 | 58 | usb_addr=$(:: lsusb -d "$vendor_product_id" \ 59 | |sed 's,^Bus \([^ ]*\) Device \([^ ]*\):.*$,\1:\2,') 60 | sane_device="epkowa:usb:$usb_addr" 61 | #sane_device="epson2:libusb:$usb_addr" 62 | QUALITY=${QUALITY:-81} 63 | MODE=${MODE:-Color} # or Gray 64 | 65 | # TODO: do some filtering to avoid noise? 66 | # e.g. add the convert options like: -range-threshold '10%,90%,100%,100%' 67 | # or even -threshold '50%' 68 | 69 | :: scanimage -v --mode $MODE -d "$sane_device" --format=tiff \ 70 | | :: convert - -page a4 -quality "${QUALITY}" "$outfile" 71 | -------------------------------------------------------------------------------- /utils/flac2mp3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | set -o pipefail 4 | set -e 5 | 6 | copytags() { 7 | set -o pipefail 8 | set -e 9 | # copies all the tags from the flac file $1 to the mp3 file $2 10 | eval "$( 11 | metaflac "$1" --no-utf8-convert \ 12 | --show-tag=ARTIST \ 13 | --show-tag=TITLE \ 14 | --show-tag=ALBUM \ 15 | --show-tag=GENRE \ 16 | --show-tag=TRACKNUMBER \ 17 | --show-tag=DISC \ 18 | --show-tag=DISCNUMBER \ 19 | --show-tag=DATE | 20 | sed "s,[\"\'],\\\\&,g" | 21 | sed "s,=\(.*\),=$\'\\1\'," | 22 | sed "s,—,-,g" | 23 | iconv -c -f UTF-8 -t ISO-8859-1 | 24 | sed 's,^[^=]*,\U&,' # ensure upper case vars 25 | )" || return 1 26 | #flac -c -d "$f" | lame -m j -q 0 --vbr-new -V 0 -s 44.1 - "$outf" 27 | id3v2 -t "$TITLE" -T "${TRACKNUMBER:-0}" -a "$ARTIST" -A "$ALBUM" \ 28 | -y "$DATE" -g "${GENRE:-12}" --TPOS "${DISC:-$DISCNUMBER}" "$2" 29 | } 30 | 31 | rm_and_fail() { 32 | #echo "Removing $1 again" >&2 33 | rm "$1" 34 | exit 1 35 | } 36 | 37 | convlocal() { 38 | ffmpeg -y -loglevel warning -i "$1" -ab 192k -ac 2 -ar 48000 "$2" \ 39 | && copytags "$1" "$2" \ 40 | || rm_and_fail "$2" 41 | } 42 | 43 | HOST=faui00u.cs.fau.de 44 | 45 | convremote() { 46 | local curhost=$HOST 47 | #echo ":: $1 -> $2 on $host" >&2 48 | ssh "$curhost" \ 49 | avconv -y -loglevel warning -i - -ab 196k -f mp3 -ac 2 -ar 48000 - \ 50 | < "$1" > "$2" \ 51 | && copytags "$1" "$2" \ 52 | || rm "$2" 53 | } 54 | 55 | if [ "${1%%.flac}" = "$1" ] ; then 56 | echo "ERROR: $1 is not a flac file!" >&2 57 | exit 1 58 | fi 59 | 60 | output="$2" 61 | 62 | if [ "${output%%.mp3}" = "$output" ] ; then 63 | echo "ERROR: $output is not a mp3 file!" >&2 64 | exit 1 65 | fi 66 | 67 | convlocal "$1" "$2" 68 | #convremote "$1" "$2" 69 | 70 | -------------------------------------------------------------------------------- /menu/hlwm-workspace.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | del_key=Alt-BackSpace 4 | add_key=Alt-Return 5 | rename_key=Alt-r 6 | shift_key=Alt-m 7 | pkey() { 8 | printf "%-14s" "$*" 9 | } 10 | 11 | 12 | default_action_str='go to the tag' 13 | default_action() { 14 | herbstclient use "$1" 15 | } 16 | 17 | move_action_str='go to the tag and bring the window with' 18 | move_action() { 19 | herbstclient chain , add "$1" , use "$1" , bring "$focus_window_id" 20 | } 21 | 22 | case "$1" in 23 | --move) 24 | default_action_str="$move_action_str" 25 | default_action() { 26 | move_action "$@" 27 | } 28 | ;; 29 | *) 30 | ;; 31 | esac 32 | 33 | mesg="\ 34 | $(pkey Return )| $default_action_str 35 | $(pkey $shift_key )| $move_action_str 36 | $(pkey $del_key )| delete selected tag 37 | $(pkey $add_key )| create new tag with name as entered 38 | $(pkey $rename_key)| rename the current tag" 39 | 40 | rofi_args=( 41 | -dmenu 42 | -p "tag:" 43 | -i 44 | -select "$(herbstclient get_attr tags.focus.name)" 45 | -kb-custom-1 "$add_key" 46 | -kb-custom-2 "$del_key" 47 | -kb-custom-3 "$shift_key" 48 | -kb-custom-4 "$rename_key" 49 | -mesg "$mesg" 50 | ) 51 | #echo rofi "${rofi_args[@]}" 52 | focus_window_id="$(herbstclient get_attr clients.focus.winid)" 53 | res=$(herbstclient complete 1 use | rofi "${rofi_args[@]}") 54 | exit_code=$? 55 | case "$exit_code" in 56 | 10) 57 | herbstclient chain , add "$res" , use "$res" 58 | ;; 59 | 11) 60 | # if the tag to be deleted is focused, then switch to the previously 61 | # used tag 62 | herbstclient chain \ 63 | , and / compare tags.focus.name = "$res" \ 64 | / use_previous \ 65 | , merge_tag "$res" 66 | ;; 67 | 12) 68 | move_action_str "$res" 69 | ;; 70 | 13) 71 | herbstclient chain \ 72 | , merge_tag "$res" \ 73 | , attr tags.focus.name "$res" 74 | ;; 75 | 0) 76 | default_action "$res" 77 | ;; 78 | *) 79 | ;; 80 | esac 81 | 82 | 83 | -------------------------------------------------------------------------------- /menu/rofi-pass.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | #set -e 4 | # from passmenu 5 | prefix=${PASSWORD_STORE_DIR-~/.password-store} 6 | mapfile -t password_files < <(find "${prefix}" -name '*.gpg' -printf "%P\n"|sort) 7 | password_files=( "${password_files[@]#"$prefix"/}" ) 8 | password_files=( "${password_files[@]%.gpg}" ) 9 | filter="$1" 10 | 11 | clipwiz_key=Control-t 12 | edit_key=Control-i 13 | gen_key=Control-Shift-g 14 | pkey() { 15 | printf "%-15s" "$*" 16 | } 17 | 18 | call_pass() { 19 | EDITOR="emacsclient -c --alternate-editor= " pass "$@" 20 | } 21 | 22 | terminal_pass() { 23 | rect=( $(herbstclient monitor_rect) ) 24 | x=${rect[0]}+${rect[1]} 25 | y=${rect[1]} 26 | urxvt -override-redirect -geometry 60x8+$((x+10))+$((y+10)) -e pass "$@" 27 | } 28 | 29 | # detect whether we are run within qutebrowser 30 | if [ -n "$QUTE_FIFO" ] ; then 31 | echo 'enter-mode insert' >> "$QUTE_FIFO" 32 | fi 33 | if [ -n "$QUTE_URL" ] ; then 34 | filter=${QUTE_URL#*://} 35 | filter=${filter%%/*} 36 | filter=${filter#www.} 37 | fi 38 | 39 | mesg="\ 40 | $(pkey Return )| Auto-type 41 | $(pkey $clipwiz_key )| Copy credentials to clipboard 42 | $(pkey $gen_key )| Generate a new entry 43 | $(pkey $edit_key )| Open in an editor" 44 | 45 | rofi_args=( 46 | -p 'pass> ' 47 | -format i 48 | -filter "$filter" 49 | -kb-custom-1 "$clipwiz_key" 50 | -kb-custom-2 "$gen_key" 51 | -kb-custom-3 "$edit_key" 52 | -mesg "$mesg" 53 | 54 | ) 55 | 56 | idx=$(printf '%s\n' "${password_files[@]}" \ 57 | | sed 's,/, → ,g' \ 58 | | rofi "${rofi_args[@]}" -dmenu ) 59 | exit_code="$?" 60 | 61 | if [[ "$exit_code" -eq 1 ]] ; then 62 | exit 63 | else 64 | entry="${password_files[$idx]}" 65 | fi 66 | 67 | case "$exit_code" in 68 | 0) 69 | ~/dotfiles/utils/pass-autotype.py "$entry" 70 | ;; 71 | 10) # kb-custom-1 72 | terminal_pass clipwiz "$entry" 73 | ;; 74 | 11) # kb-custom-2 75 | call_pass gen "$entry" 76 | ;; 77 | 12) # kb-custom-3 78 | call_pass edit "$entry" 79 | ;; 80 | *) 81 | ;; 82 | esac 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /config/herbstluftwm/x1-docking-station.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | ::() { 5 | echo -e "\e[1;33m:: \e[0;32m$*\e[0m" >&2 6 | "$@" 7 | } 8 | 9 | # docking_station='043e:9a39 LG Electronics USA, Inc. USB Controls' 10 | docking_station='17ef:30ad Lenovo USB3.1 Hub' 11 | 12 | if :: lsusb |grep "$docking_station" > /dev/null ; then 13 | # get last word of last line 14 | output=$(xrandr | grep -v primary | grep -E ' connected|disconnected 3840x2160'| cut -d' ' -f1) 15 | if [ -z "$output" ] ; then 16 | echo "Error: no output found!" >&2 17 | xrandr 18 | exit 1 19 | else 20 | echo "Output detected: $output" 21 | fi 22 | :: xrandr --output eDP1 --auto --pos 0x0 --primary \ 23 | --output "$output" --off 24 | sleep 1 25 | # variable will be used without quotes: 26 | laptop_resolution='--auto' 27 | laptop_resolution='--mode 2160x1350' 28 | external_resolution='--mode 3840x2160' 29 | :: xrandr --output eDP1 $laptop_resolution --pos 0x0 --primary \ 30 | --output "$output" --pos 0x0 $external_resolution 31 | resolution=$(xrandr --listmonitors | grep "$output" | sed 's,/[0-9]\+,,g' | grep -oE '[0-9]+x[0-9]+\+0\+0' | tail -n 1) 32 | :: herbstclient set_monitors "$resolution" 33 | :: herbstclient unlock_tag 34 | :: herbstclient reload 35 | #:: ~/.config/alacritty/set-font.sh monospace 36 | if ls /sys/class/net/ | grep "^enp" > /dev/null ; then 37 | # activate wired network 38 | :: sudo -S netctl stop-all < /dev/null 39 | :: sudo -S netctl start ethernet-dhcp < /dev/null 40 | fi 41 | else 42 | for output in $(xrandr --listmonitors|grep -oE ': \+[^ *]+'|sed 's,^: +,,') ; do 43 | if [[ "$output" != "eDP1" ]] ; then 44 | :: xrandr --output "$output" --off 45 | fi 46 | done 47 | :: xrandr --output eDP1 --auto 48 | herbstclient detect_monitors 49 | herbstclient reload 50 | if [[ "$(netctl is-active ethernet-dhcp)" = active ]] ; then 51 | # disable wired network 52 | :: sudo -S netctl stop-all < /dev/null 53 | fi 54 | #:: ~/.config/alacritty/set-font.sh default 55 | fi 56 | 57 | 58 | -------------------------------------------------------------------------------- /config/herbstluftwm/themes/separate-tabs.css: -------------------------------------------------------------------------------- 1 | 2 | .client-decoration { 3 | border-width: 1px; 4 | background-color: #282828; 5 | border-style: solid; 6 | border-color: #969696; 7 | 8 | margin: 1px; /* make space for outline */ 9 | outline-style: solid; 10 | outline-width: 1px; 11 | outline-color: black; 12 | } 13 | 14 | .client-decoration.focus { 15 | background-color: #174F6A; 16 | } 17 | 18 | .client-content { 19 | border-color: #868686; 20 | border-width: 1px; 21 | border-color: #616161; 22 | background-color: #12121234; 23 | } 24 | 25 | .client-decoration.focus , 26 | .client-decoration.focus .client-content { 27 | border-color: #50A9D4; 28 | } 29 | 30 | .client-decoration > * { 31 | margin: 4px; 32 | } 33 | 34 | .client-decoration > * + * { 35 | margin-top: 0px; 36 | } 37 | 38 | .tabs > .tab { 39 | background-color: #343434; 40 | border-width: 1px; 41 | text-align: center; 42 | margin: 0px 0px; 43 | padding: 0px 8px; 44 | color: #dedede; 45 | } 46 | 47 | .tabs > .tab + .tab { 48 | margin-left: 4px; 49 | } 50 | 51 | .tabs > .tab.normal { 52 | background-color: #343434; 53 | border-color: #434343; 54 | color: #898989; 55 | } 56 | 57 | .client-decoration.focus .tabs > .tab { 58 | background-color: #287092; 59 | border-color: #4A98BC; 60 | color: #ababab; 61 | } 62 | 63 | .client-decoration.normal .tabs > .tab.focus { 64 | background-color: #565656; 65 | border-color: #656565; 66 | color: #efefef; 67 | } 68 | 69 | .client-decoration.focus .tabs > .tab.focus { 70 | background-color: #64BCE6; 71 | border-color: #C3D9E4; 72 | color: #121212; 73 | } 74 | 75 | 76 | .tabs > .tab.focus:first-child:last-child { 77 | background-color: transparent; 78 | border-width: 0px; 79 | padding: 1px; /* compensate lack of border */ 80 | color: #dedede; 81 | } 82 | 83 | 84 | .tabs > .tab.urgent { 85 | background-color: #D787D7; 86 | border-color: #FFC0FF; 87 | color: #4C284C; 88 | } 89 | 90 | 91 | * { 92 | color: white; 93 | font: -*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*; 94 | /* font: Dejavu Sans:pixelsize=12; */ 95 | } 96 | 97 | -------------------------------------------------------------------------------- /gvimrc: -------------------------------------------------------------------------------- 1 | 2 | set runtimepath^=~/.vim/bundle/gruvbox/ 3 | colorscheme gruvbox 4 | source ~/.vimrc 5 | "let g:solarized_visibility="high" "default value is normal 6 | "set bg=dark 7 | "colorscheme solarized 8 | "colorscheme molokai 9 | 10 | " remove all guielements 11 | set guioptions+=m 12 | set guioptions-=T 13 | set guioptions-=r 14 | set guioptions-=R 15 | 16 | function! EnterTexFile() 17 | "set keywordprg=dict 18 | set cul 19 | endfunction 20 | 21 | " set anti guifont=xos4\ Terminus\ 11,Envy\ Code\ R\ 10,Mono\ 12,Inconsolata\ 12 22 | " set anti guifont=xos4\ Terminus\ 11,Envy\ Code\ R\ 10,Mono\ 12,Inconsolata\ 12 23 | " set anti guifont=Inconsolata\ 12 24 | " set anti guifont= 25 | set guifont=Bitstream\ Vera\ Sans\ Mono\ 10 26 | 27 | 28 | if has("unix") 29 | function! FontSizePlus () 30 | let l:gf_size_whole = matchstr(&guifont, '\( \)\@<=\d\+$') 31 | let l:gf_size_whole = l:gf_size_whole + 1 32 | let l:new_font_size = ' '.l:gf_size_whole 33 | let &guifont = substitute(&guifont, ' \d\+$', l:new_font_size, '') 34 | endfunction 35 | 36 | function! FontSizeMinus () 37 | let l:gf_size_whole = matchstr(&guifont, '\( \)\@<=\d\+$') 38 | let l:gf_size_whole = l:gf_size_whole - 1 39 | let l:new_font_size = ' '.l:gf_size_whole 40 | let &guifont = substitute(&guifont, ' \d\+$', l:new_font_size, '') 41 | endfunction 42 | else 43 | function! FontSizePlus () 44 | let l:gf_size_whole = matchstr(&guifont, '\(:h\)\@<=\d\+$') 45 | let l:gf_size_whole = l:gf_size_whole + 1 46 | let l:new_font_size = ':h'.l:gf_size_whole 47 | let &guifont = substitute(&guifont, ':h\d\+$', l:new_font_size, '') 48 | endfunction 49 | 50 | function! FontSizeMinus () 51 | let l:gf_size_whole = matchstr(&guifont, '\(:h\)\@<=\d\+$') 52 | let l:gf_size_whole = l:gf_size_whole - 1 53 | let l:new_font_size = ':h'.l:gf_size_whole 54 | let &guifont = substitute(&guifont, ':h\d\+$', l:new_font_size, '') 55 | endfunction 56 | endif 57 | 58 | 59 | if has("gui_running") 60 | " Ctrl-minus 61 | nnoremap zo :call FontSizeMinus() 62 | nnoremap zi :call FontSizePlus() 63 | 64 | endif 65 | -------------------------------------------------------------------------------- /config/herbstluftwm/themes/rezlooks-gil-ouch-green.css: -------------------------------------------------------------------------------- 1 | 2 | /* normal decoration */ 3 | .client-decoration { 4 | background-color: #FBF8F1; 5 | border: 1px solid #27391B; 6 | } 7 | 8 | .client-decoration .tabs { 9 | border-top: 1px solid white; 10 | border-left: 1px solid white; 11 | 12 | outline-bottom-width: 1px; 13 | outline-style: solid; 14 | outline-bottom-color: #9D8959; 15 | margin-bottom: 1px; 16 | } 17 | 18 | .tab { 19 | padding: 2px; 20 | } 21 | 22 | .client-decoration .tab + .tab { 23 | border-left: 1px solid white; 24 | } 25 | 26 | .client-decoration .tab.focus + .tab { 27 | border-left-color: #9D8959; 28 | } 29 | 30 | .client-decoration .tab.focus { 31 | border-left-width: 1px; 32 | border-top-width: 1px; 33 | border-style: solid; 34 | border-left-color: #9D8959; 35 | border-top-color: #9D8959; 36 | margin-top: -1px; 37 | } 38 | 39 | .client-decoration .tab.focus:first-child { 40 | margin-left: -1px; 41 | } 42 | 43 | 44 | .client-decoration .tab.normal { 45 | background-color: #F0E7D3; 46 | color: #85785B; 47 | } 48 | 49 | 50 | .client-decoration .tab.focus { 51 | /* overwrite border-bottom of the tab panel */ 52 | outline-bottom-width: 1px; 53 | outline-style: solid; 54 | outline-bottom-color: #FBF8F1; 55 | } 56 | 57 | /* focused container */ 58 | .client-decoration.focus.multiple-tabs .tab.focus { 59 | background-color: #6CB03E; 60 | } 61 | 62 | .client-decoration.focus.multiple-tabs .tab , 63 | .client-decoration.focus { 64 | background-color: #436A29; 65 | } 66 | 67 | .client-decoration.focus .tabs { 68 | outline-bottom-color: #2D3E22; 69 | border-color: #B5C7A9; 70 | } 71 | .client-decoration.focus .tab.focus { 72 | /* overwrite border-bottom of the tab panel */ 73 | outline-bottom-color: #2D3E22; 74 | } 75 | 76 | .client-decoration.focus .tab.focus + .tab { 77 | border-left-color: #98BE7E; 78 | } 79 | .client-decoration.focus .tab.focus { 80 | border-color: #98BE7E; 81 | } 82 | 83 | .client-decoration.focus .tab { 84 | color: white; 85 | } 86 | 87 | * { 88 | /* font: -*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*; */ 89 | font: Dejavu Sans:pixelsize=12; 90 | } 91 | 92 | -------------------------------------------------------------------------------- /config/alacritty/font.toml: -------------------------------------------------------------------------------- 1 | # Font configuration (changes require restart) 2 | # 3 | # Important font attributes like antialiasing, subpixel aa, and hinting can be 4 | # controlled through fontconfig. Specifically, the following attributes should 5 | # have an effect: 6 | # 7 | # * hintstyle 8 | # * antialias 9 | # * lcdfilter 10 | # * rgba 11 | # 12 | # For instance, if you wish to disable subpixel antialiasing, you might set the 13 | # rgba property to "none". If you wish to completely disable antialiasing, you 14 | # can set antialias to false. 15 | # 16 | # Please see these resources for more information on how to use fontconfig 17 | # 18 | # * https://wiki.archlinux.org/index.php/font_configuration#Fontconfig_configuration 19 | # * file:///usr/share/doc/fontconfig/fontconfig-user.html 20 | [font] 21 | # The normal (roman) font face to use. 22 | # family: Bitstream Vera Sans Mono # should be "Menlo" or something on macOS. 23 | # family: terminus # should be "Menlo" or something on macOS. 24 | # family: terminus 25 | normal = { family = "Bitstream Vera Sans Mono", style = "Regular" } 26 | # The bold font face 27 | bold = { style = "Bold" } 28 | italic = { style = "Bold" } 29 | 30 | # Point size of the font 31 | size = 8.0 32 | 33 | # Offset is the extra space around each character. offset.y can be thought of 34 | # as modifying the linespacing, and offset.x as modifying the letter spacing. 35 | offset = { x = 0, y = 0 } 36 | 37 | # Glyph offset determines the locations of the glyphs within their cells with 38 | # the default being at the bottom. Increase the x offset to move the glyph to 39 | # the right, increase the y offset to move the glyph upward. 40 | glyph_offset = { x = 0, y = 0 } 41 | 42 | # Scale the font size based on the monitor's DPI. This will lead to bigger text on HiDPI 43 | # screens and make reading text a little easier. 44 | # On X11 it is possible to change the DPI for each instance of alacritty by using 45 | # `WINIT_HIDPI_FACTOR=1.0 alacritty` to scale the font. 46 | # scale_with_dpi = true 47 | 48 | 49 | # OS X only: use thin stroke font rendering. Thin strokes are suitable 50 | # for retina displays, but for non-retina you probably want this set to 51 | # false. 52 | # use_thin_strokes: true 53 | 54 | -------------------------------------------------------------------------------- /utils/print-ls8: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cups_host="russell.informatik.uni-erlangen.de" 4 | host_ip="$(getent hosts "$cups_host" | awk '{ print $1 }' | grep -vx '' | head -n 1 )" 5 | ippurl="ipp://${host_ip}:631/" 6 | 7 | commands=( 8 | cmd-ls 9 | cmd-lsl 10 | cmd-help 11 | cmd-send 12 | ) 13 | 14 | ::() { 15 | echo -e "\e[1;33m:: \e[0;32m$*\e[0m" >&2 16 | "$@" 17 | } 18 | 19 | 20 | cmd-ls() { 21 | :: ipptool -v -t "$ippurl" /usr/share/cups/ipptool/get-printers.test \ 22 | | grep ' printer-name' | cut -d '=' -f2- | sed 's,^ [ ]*,,' 23 | } 24 | 25 | cmd-lsl() { 26 | :: ipptool -v -t "$ippurl" /usr/share/cups/ipptool/get-printers.test 27 | } 28 | 29 | cmd-send() { 30 | printer="$1" 31 | filename="$2" 32 | :: ipptool -v -t \ 33 | -d 'media-size-name=iso_a4_210x297mm' \ 34 | -f "$filename" "${ippurl%%/}/printers/$1" \ 35 | <(cat < %{= G}%-w%{+ dd}%{= y} (%{= r}%n %{= d}%t%{-}%{-}) %{-}%{-}%+w %= %{= kd} (%{= Y}%Y-%m-%d%{-}) (%{= b}%c%{= d}) " 27 | caption string "%{= .kg} %H %{= m}>%{= c}>%{= d} %-w%{+ y}%n%{+ r}*%{-}%t%{-}%+w%=%{= M}>%{= Y}> %{= G}%c%{= d} Uhr %{= M}>%{= C}> %{= B}%Y%{+ d}-%{-}%m%{+ d}-%{-}%d " 28 | 29 | 30 | # version 2.0 with round blue () brackets 31 | # hardstatus string "%{= B}-(%{= g}%-w%{= G}%n %t%{= g}%+w%{= B})--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%-35=%{= B}(%{= R}%H%{= B})-(%{= y}%Y-%m-%d%{= B})-(%{= M}%c:%s%{= B})---------" 32 | 33 | # version 3.0 with many ____/corners\___ 34 | #hardstatus string "%{=b B}_/%{= g}%-w%{=b G}%n %t%{= g}%+w%{=b B}\________________________________________________________________________________________________________________________________________________________________________________________________________%-35=%{=b B}/%{=b R}%H%{=b B}\_/%{=b Y}%Y-%m-%d%{=b B}\_/%{=b M}%c:%s%{=b B}\________-" 35 | 36 | 37 | -------------------------------------------------------------------------------- /config/doom/packages.el: -------------------------------------------------------------------------------- 1 | ;; -*- no-byte-compile: t; -*- 2 | ;;; $DOOMDIR/packages.el 3 | 4 | ;; To install a package with Doom you must declare them here and run 'doom sync' 5 | ;; on the command line, then restart Emacs for the changes to take effect -- or 6 | ;; use 'M-x doom/reload'. 7 | 8 | 9 | ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: 10 | ;(package! some-package) 11 | 12 | ;; To install a package directly from a remote git repo, you must specify a 13 | ;; `:recipe'. You'll find documentation on what `:recipe' accepts here: 14 | ;; https://github.com/radian-software/straight.el#the-recipe-format 15 | ;(package! another-package 16 | ; :recipe (:host github :repo "username/repo")) 17 | 18 | ;; If the package you are trying to install does not contain a PACKAGENAME.el 19 | ;; file, or is located in a subdirectory of the repo, you'll need to specify 20 | ;; `:files' in the `:recipe': 21 | ;(package! this-package 22 | ; :recipe (:host github :repo "username/repo" 23 | ; :files ("some-file.el" "src/lisp/*.el"))) 24 | 25 | ;; If you'd like to disable a package included with Doom, you can do so here 26 | ;; with the `:disable' property: 27 | ;(package! builtin-package :disable t) 28 | 29 | ;; You can override the recipe of a built in package without having to specify 30 | ;; all the properties for `:recipe'. These will inherit the rest of its recipe 31 | ;; from Doom or MELPA/ELPA/Emacsmirror: 32 | ;(package! builtin-package :recipe (:nonrecursive t)) 33 | ;(package! builtin-package-2 :recipe (:repo "myfork/package")) 34 | 35 | ;; Specify a `:branch' to install a package from a particular branch or tag. 36 | ;; This is required for some packages whose default branch isn't 'master' (which 37 | ;; our package manager can't deal with; see radian-software/straight.el#279) 38 | ;(package! builtin-package :recipe (:branch "develop")) 39 | 40 | ;; Use `:pin' to specify a particular commit to install. 41 | ;(package! builtin-package :pin "1a2b3c4d5e") 42 | 43 | 44 | ;; Doom's packages are pinned to a specific commit and updated from release to 45 | ;; release. The `unpin!' macro allows you to unpin single packages... 46 | ;(unpin! pinned-package) 47 | ;; ...or multiple packages 48 | ;(unpin! pinned-package another-pinned-package) 49 | ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) 50 | ;(unpin! t) 51 | -------------------------------------------------------------------------------- /config/conky/conky.conf: -------------------------------------------------------------------------------- 1 | -- vim: ts=4 sw=4 noet ai cindent syntax=lua 2 | --[[ 3 | Conky, a system monitor, based on torsmo 4 | ]] 5 | 6 | has_compton = os.execute("pidof compton") 7 | 8 | conky.config = { 9 | alignment = 'bottom_right', 10 | background = false, 11 | border_width = 1, 12 | cpu_avg_samples = 2, 13 | draw_borders = false, 14 | draw_graph_borders = true, 15 | use_xft = true, 16 | font = 'DejaVu Sans Mono:size=10:bold', 17 | gap_x = 30, 18 | gap_y = 60, 19 | minimum_height = 5, 20 | minimum_width = 5, 21 | net_avg_samples = 2, 22 | double_buffer = true, 23 | no_buffers = true, 24 | out_to_console = false, 25 | out_to_stderr = false, 26 | extra_newline = false, 27 | -- if no compton is present, then draw on 28 | -- root window, otherwise on own window 29 | own_window = has_compton, 30 | own_window_class = 'Conky', 31 | own_window_type = 'desktop', 32 | own_window_colour = '000000', 33 | own_window_transparent = false, 34 | own_window_argb_visual = true, 35 | own_window_argb_value = 0, 36 | stippled_borders = 0, 37 | border_inner_margin = 1, 38 | update_interval = 10, 39 | uppercase = false, 40 | use_spacer = 'none', 41 | show_graph_scale = false, 42 | show_graph_range = false, 43 | default_outline_color = 'black', 44 | default_shade_color = '705056', 45 | draw_outline = true, 46 | draw_shades = false, 47 | default_color = 'white', 48 | color0 = 'white', 49 | color1 = 'BBDC9F', 50 | color2 = '54A647', 51 | color3 = 'E2AD74', 52 | color4 = '000000', 53 | --xftalpha = 1, 54 | } 55 | 56 | 57 | --conky.text = [[ 58 | --lsakdjlkl;dsfal;jdf 59 | --]] 60 | 61 | conky.text = [[ 62 | ${nodename} 63 | ${color3}$hr 64 | ${color1}Uptime:$color $uptime 65 | ${color1}RAM Usage:$color $mem/$memmax - $memperc% ${color2}${membar 4} 66 | ${color1}Swap Usage:$color $swap/$swapmax - $swapperc% ${color2}${swapbar 4} 67 | ${color1}CPU Usage:$color $cpu% ${color2}${cpubar 4} 68 | ${color1}Network:$color ${upspeed enp0s25}/s Up, ${downspeed enp0s25}/s Down 69 | ${color3}$hr 70 | ${color1}File systems: 71 | ${color1}/ $color${fs_used /}/${fs_size /} ${color2}${fs_bar 6 /} 72 | ${color1}/home $color${fs_used /home}/${fs_size /home} ${color2}${fs_bar 6 /home} 73 | ${color3} $hr 74 | ${color4}${execp ~/.config/conky/calendar.sh} 75 | ]] 76 | 77 | --------------------------------------------------------------------------------