├── .Xdefaults ├── .bash_bind ├── .bash_completion ├── .bash_profile ├── .bashrc ├── .clusterssh └── config ├── .colordiffrc ├── .config ├── awesome │ ├── battery.lua │ ├── cpufreq.lua │ ├── rc-4.3.orig.lua │ ├── rc.lua │ └── theme.lua ├── git │ ├── config │ └── ignore ├── gtk-3.0 │ └── settings.ini ├── lintian │ └── lintianrc ├── systemd │ └── user │ │ ├── cwangel.service │ │ ├── midiangel.service │ │ ├── notify-send@.service │ │ ├── rigctld-sdrangel.service │ │ ├── ssh-agent@.service │ │ ├── wsjtx-log.path │ │ ├── wsjtx-log.service │ │ ├── xroot.service │ │ ├── xroot.timer │ │ └── xscreensaver.service └── terminator │ ├── config │ └── plugins │ ├── searchplugin.py │ └── url.py ├── .devscripts ├── .dput.cf ├── .editorconfig ├── .env ├── .fvwm ├── functions ├── keys_mouse ├── menus ├── menus-rlogin ├── menus-xlock ├── modules ├── styles └── xterm.m4 ├── .fvwm2rc ├── .gbp.conf ├── .gdbinit ├── .gitignore ├── .gnupg ├── gpg-agent.conf ├── gpg.conf └── sshcontrol ├── .inputrc ├── .irssi ├── Makefile ├── default.theme └── scripts │ ├── bugcomplete.pl │ ├── challenge.pl │ ├── chanact.pl │ ├── friends.pl │ ├── joininfo.pl │ ├── len.pl │ ├── muttwiki.pl │ ├── nickcolor.pl │ ├── nickident.pl │ ├── pisgcommits.pl │ ├── queryresume.pl │ ├── quiet.pl │ ├── scrmable.pl │ ├── timer.pl │ ├── topic-diff.pl │ └── topics.pl ├── .lessfilter ├── .lesskey ├── .mailcap ├── .mime.types ├── .mutt ├── bind ├── color ├── fortunes-de ├── fortunes-en ├── headers ├── hooks ├── muttrc └── options ├── .pinforc ├── .plan ├── .profile ├── .psqlrc ├── .quiltrc ├── .reportbugrc ├── .screenrc ├── .ssh ├── authorized_keys.skel ├── config └── ssh-add-l ├── .tigrc ├── .urxvt └── ext │ ├── 3digits │ ├── font-size │ ├── font-size.patch │ ├── tabbed │ ├── tabbed.patch │ └── vtwheel ├── .vim ├── after │ └── ftplugin │ │ ├── c.vim │ │ ├── dns.vim │ │ ├── perl.vim │ │ ├── po.vim │ │ ├── python.vim │ │ └── tex.vim ├── doc │ ├── latex-symbols.txt │ ├── latexhelp.txt │ ├── localvimrc.txt │ └── po.txt ├── indent │ ├── html.vim │ └── yaml.vim ├── keymap │ └── tex_utf-8.vim ├── pack │ └── editorconfig │ │ └── start │ │ └── editorconfig-vim │ │ ├── .editorconfig │ │ ├── LICENSE │ │ ├── LICENSE.PSF │ │ ├── README.md │ │ ├── autoload │ │ ├── editorconfig.vim │ │ ├── editorconfig_core.vim │ │ └── editorconfig_core │ │ │ ├── fnmatch.vim │ │ │ ├── handler.vim │ │ │ ├── ini.vim │ │ │ └── util.vim │ │ ├── doc │ │ └── editorconfig.txt │ │ ├── ftdetect │ │ └── editorconfig.vim │ │ └── plugin │ │ └── editorconfig.vim └── plugin │ ├── cmdalias.vim │ ├── cmdalias_myon.vim │ ├── gnupg.vim │ └── localvimrc.vim ├── .vimrc ├── .w3m └── keymap ├── .xmodmap-pc ├── .xscreensaver ├── .xsession ├── Makefile ├── bin ├── add ├── adt ├── blhc ├── bug ├── cap ├── completer ├── dbp ├── dclean ├── debcheckout.sh ├── debdiff-debian ├── dnsgrind ├── fig2eps ├── genisoimage ├── git-context-diff ├── git-edit ├── git-gedit ├── git-jump ├── git-qedit ├── gitlab-ci-yml ├── gpg-refresh ├── gpg-reset.sh ├── grep-irssi ├── homegit ├── lintian ├── lnconvert ├── make-indexjpg ├── make-thumbnails ├── mounttree ├── muttquery ├── mvfix ├── mvi ├── nv.pl ├── pg16 ├── psbooklet ├── qwrapper ├── r ├── schroot-screen ├── schroot.sh ├── smart-less ├── spotify_control ├── ssh ├── terminal-title ├── tlsaget ├── tm ├── ttar ├── up ├── upload ├── upstream ├── v ├── wdiff ├── wdiff.sh ├── wodim ├── xroot ├── xset.sh └── xtar.pl └── lib ├── Makefile ├── cron └── Makefile ├── debian.pref ├── default.keyboard ├── pgdg.pref └── src ├── getopt ├── getopt.c ├── getopt.pl └── getopt.sh └── pod └── example.pod /.Xdefaults: -------------------------------------------------------------------------------- 1 | *background: white 2 | *foreground: black 3 | !*Scrollbar*background: Navy 4 | *Scrollbar*foreground: LimeGreen 5 | *Scrollbar*thickness: 7 6 | *Scrollbar*thumb: None 7 | XApm*background: LightSkyBlue 8 | XApm*delay: 5 9 | XApm*font: -misc-fixed-medium-*-*-*-12-*-*-*-*-*-*-* 10 | XApm*height: 12 11 | !XApm*highColor: MediumSpringGreen 12 | XApm.Form.Scrollbar.width: 30 13 | Xawtv*basename: snap 14 | Xawtv.geometry: 320x240 15 | XClock*analog: false 16 | XClock*background: RoyalBlue 17 | XClock*foreground: Yellow 18 | XClock*padding: 0 19 | XClock*update: 1 20 | ! XFree 4.3: face 21 | XClock*face: fixed-8 22 | XClock*font: -misc-fixed-medium-*-*-*-12-*-*-*-*-*-*-* 23 | XDvi.expert: true 24 | XDvi.highlight: blue 25 | XDvi.keepPosition: true 26 | XEmacs.font: -*-Fixed-medium-r-*-*-*-160-*-*-*-*-ISO8859-1 27 | Fig*inches: false 28 | Fig*library_dir: ~/lib/xfig 29 | Fig*PaperSize: A4 30 | Fig*specialtext: true 31 | Fig*splash: false 32 | Netscape*blinkingEnabled: false 33 | 34 | URxvt.borderColor: #b4b4b4 35 | URxvt.color3: orange 36 | URxvt.color11: orange 37 | URxvt.color5: maroon 38 | URxvt.color13: maroon 39 | URxvt.color15: lightgrey 40 | URxvt.colorBD: navy 41 | URxvt.cursorBlink: true 42 | URxvt.cursorColor: RoyalBlue 43 | URxvt.fadeColor: white 44 | URxvt.font: xft:DejaVu Sans Mono-8 45 | ! https://unix.stackexchange.com/questions/118641/font-rendering-issue-in-urxvt-too-much-space-between-characters 46 | URxvt.letterSpace: -1 47 | URxvt.internalBorder: 0 48 | URxvt.iso14755: false 49 | URxvt.keysym.M-C-1: command:\033]710;5x8\007 50 | URxvt.keysym.M-C-2: command:\033]710;6x10\007 51 | URxvt.keysym.M-C-3: command:\033]710;xft:DejaVu Sans Mono-8\007 52 | URxvt.keysym.M-C-4: command:\033]710;xft:DejaVu Sans Mono-12\007 53 | URxvt.keysym.M-C-5: command:\033]710;xft:DejaVu Sans Mono-15\007 54 | URxvt.keysym.M-C-6: command:\033]710;xft:DejaVu Sans Mono-19\007 55 | URxvt.keysym.M-C-7: command:\033]710;xft:DejaVu Sans Mono-23\007 56 | URxvt.keysym.M-C-8: command:\033]710;xft:DejaVu Sans Mono-28\007 57 | URxvt.keysym.M-C-9: command:\033]710;xft:DejaVu Sans Mono-35\007 58 | ! for whatever reason, there is no XK_spade in keysymdef.h, pick something else and remap that here 59 | URxvt.keysym.maltesecross: \342\231\240 60 | URxvt.keysym.C-equal: font-size:increase 61 | URxvt.keysym.C-slash: font-size:show 62 | URxvt.matcher.button: 3 63 | URxvt.matcher.pattern.1: (?:Closes:.|\\#)([2-9]\\d{5}\\b|1\\d{6}\\b) 64 | URxvt.matcher.launcher.1: x-www-browser https:\/\/bugs.debian.org/cgi-bin/bugreport.cgi?bug=$1 65 | URxvt.matcher.pattern.2: (\\d{6,7})@bugs.debian.org 66 | URxvt.matcher.launcher.2: x-www-browser https:\/\/bugs.debian.org/cgi-bin/bugreport.cgi?bug=$1 67 | URxvt.matcher.pattern.3: <([^<>]+[0-9][^<>]+@[^<>]+)> 68 | URxvt.matcher.launcher.3: x-www-browser https:\/\/lists.debian.org/$1 69 | URxvt.matcher.pattern.4: (\\b[\\w-]+)\\([1-9]\\) 70 | URxvt.matcher.launcher.4: x-www-browser https:\/\/manpages.debian.org/$1 71 | URxvt.matcher.pattern.5: rt.debian.org.\\#(\\d{4,}) 72 | URxvt.matcher.launcher.5: x-www-browser https:\/\/rt.debian.org/Ticket/Display.html?id=$1 73 | URxvt.matcher.pattern.6: \\#(1\\d{5}\\b) 74 | URxvt.matcher.launcher.6: x-www-browser https:\/\/rt.credativ.com/Ticket/Display.html?id=$1 75 | URxvt.matcher.pattern.7: \\b([A-Ra-r][A-Ra-r][0-9][0-9]([A-Xa-x][A-Xa-x]([0-9][0-9]([A-Xa-x][A-Xa-x])?)?)?)\\b 76 | URxvt.matcher.launcher.7: x-www-browser https:\/\/k7fry.com/grid/?qth=$1 77 | URxvt.mouseWheelScrollPage: true 78 | URxvt.perl-ext: default,font-size,tabbed,matcher,vtwheel,3digits,-confirm-paste 79 | URxvt.print-pipe: cat > $(TMPDIR=$HOME mktemp urxvt.XXXXXX) 80 | URxvt.saveLines: 5000 81 | URxvt.scrollBar_floating: true 82 | URxvt.scrollColor: #858585 83 | URxvt.scrollstyle: plain 84 | URxvt.scrollTtyKeypress: true 85 | URxvt.scrollTtyOutput: false 86 | URxvt.scrollWithBuffer: true 87 | URxvt.selection.pattern-0: ([^:„“”«»]+) 88 | URxvt.underlineColor: #888888 89 | 90 | XLock.logoutButton: -1 91 | XLock.background: black 92 | XLock.foreground: red 93 | XLock.echokeys: true 94 | Xpdf.initialZoom: page 95 | XTerm*boldMode: false 96 | XTerm*color3: orange 97 | XTerm*color11: orange 98 | ! XFree > 4.3 redefines blue: 99 | XTerm*color4: blue 100 | XTerm*color12: blue 101 | XTerm*color5: maroon 102 | XTerm*color13: maroon 103 | XTerm*cursorColor: RoyalBlue 104 | XTerm*faceName: mono-9 105 | XTerm*font: -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-*-* 106 | XTerm*highlightColor: Orange 107 | !XTerm*highlightSelection: true 108 | XTerm*internalBorder: 1 109 | XTerm*metaSendsEscape: true 110 | XTerm*saveLines: 1000 111 | ! work around xterm select() bug 112 | XTerm*sessionMgt: false 113 | XTerm*scrollBar: true 114 | XTerm*scrollKey: true 115 | XTerm*scrollTtyOutput: false 116 | XTerm*showBlinkAsBold: true 117 | XTerm*utmpInhibit: true 118 | XTerm*visualBell: true 119 | !xterm*VT100.Translations: #override BackSpace: string(0x08) \n 120 | xterm*VT100.Translations: #override \n\ 121 | Ctrl ~Shift -: smaller-vt-font() \n\ 122 | Ctrl ~Shift =: larger-vt-font() \n\ 123 | Shift Prior:scroll-back(2,halfpage) \n\ 124 | Shift Next:scroll-forw(2,halfpage) \n\ 125 | :scroll-back(2,halfpage,m) \n\ 126 | :scroll-forw(2,halfpage,m) \n\ 127 | Ctrl Shift p: string(0xe2) string(0x99) string(0xa0) 128 | xv*ctrlGeometry: -15-30 129 | xv.preset1.igraf: S 3 : 0,0 : 127,137 : 255,255 130 | xv.preset2.igraf: S 3 : 0,0 : 127,147 : 255,255 131 | xv.preset3.igraf: S 3 : 0,0 : 127,157 : 255,255 132 | xv.preset4.igraf: S 3 : 0,0 : 127,167 : 255,255 133 | xv.*.rgraf: S 4 : 0,0 : 64,64 : 192,192 : 255,255 134 | xv.*.ggraf: S 4 : 0,0 : 64,64 : 192,192 : 255,255 135 | xv.*.bgraf: S 4 : 0,0 : 64,64 : 192,192 : 255,255 136 | xv.saveNormal: true 137 | wmWeather*geometry: +898+416 138 | -------------------------------------------------------------------------------- /.bash_bind: -------------------------------------------------------------------------------- 1 | bind -m vi-command 'Control-a: vi-insert-beg' 2 | bind -m vi-command 'Control-e: vi-append-eol' 3 | bind -m vi-command 'Control-l: clear-screen' 4 | bind -m vi-command '"ZZ": emacs-editing-mode' 5 | bind -m vi-command 'ESC: ""' 6 | 7 | bind -m vi-insert 'Control-a: beginning-of-line' 8 | bind -m vi-insert 'Control-d: delete-char' 9 | bind -m vi-insert 'Control-e: end-of-line' 10 | bind -m vi-insert 'Control-k: kill-line' 11 | bind -m vi-insert 'Control-l: clear-screen' 12 | bind -m vi-insert 'Control-n: next-history' 13 | bind -m vi-insert 'Control-p: previous-history' 14 | -------------------------------------------------------------------------------- /.bash_completion: -------------------------------------------------------------------------------- 1 | # bash completions 2 | 3 | # 1) find command name from comspec list (first full path, then basename) 4 | # 2) generate list if found, otherwise do default 5 | # 2a) perform actions, filter prefixes (-f, -d: use $FIGNORE) 6 | # 2b) generate -G filename expansion pattern matches (do not use $GLOBIGNORE, use $FIGNORE) 7 | # 2c) prefix match on -W (use $IFS, expand words) 8 | # 2d) shell function -F, command -C ($COMP_LINE, $COMP_POINT, -F: $COMP_WORDS, $COMP_CWORD) 9 | # 1st arg: name of the command, 2nd arg: word preceding the word being completed 10 | # NO FILTERING! 11 | # 2d1) -F: completions in $COMPREPLY array 12 | # 2d2) -C: completions stdout, one per line 13 | # 2e) filter with -X (& = word being completed, ! negates the pattern) 14 | # 2f) -P, -S: add prefix/suffix to each completion 15 | # 2g) use -o 16 | 17 | # -o comp-option 18 | # The comp-option controls several aspects of the compspec's behavior 19 | # beyond the simple generation of completions. comp-option may be one 20 | # of: 21 | # default Use readline's default filename completion if the compspec 22 | # generates no matches. 23 | # dirnames 24 | # Perform directory name completion if the compspec generates no 25 | # matches. 26 | # filenames 27 | # Tell readline that the compspec generates filenames, so it can 28 | # perform any filename-specific processing (like adding a slash 29 | # to directory names or suppressing trailing spaces). Intended 30 | # to be used with shell functions. 31 | # nospace Tell readline not to append a space (the default) to words 32 | # completed at the end of the line. 33 | 34 | # -A action 35 | # The action may be one of the following to generate a list of possible 36 | # completions: 37 | # alias Alias names. May also be specified as -a. 38 | # arrayvar 39 | # Array variable names. 40 | # binding Readline key binding names. 41 | # builtin Names of shell builtin commands. May also be specified as -b. 42 | # command Command names. May also be specified as -c. 43 | # directory 44 | # Directory names. May also be specified as -d. 45 | # disabled 46 | # Names of disabled shell builtins. 47 | # enabled Names of enabled shell builtins. 48 | # export Names of exported shell variables. May also be specified as 49 | # -e. 50 | # file File names. May also be specified as -f. 51 | # function 52 | # Names of shell functions. 53 | # group Group names. May also be specified as -g. 54 | # helptopic 55 | # Help topics as accepted by the help builtin. 56 | # hostname 57 | # Hostnames, as taken from the file specified by the HOSTFILE 58 | # shell variable. 59 | # job Job names, if job control is active. May also be specified as 60 | # -j. 61 | # keyword Shell reserved words. May also be specified as -k. 62 | # running Names of running jobs, if job control is active. 63 | # service Service names. May also be specified as -s. 64 | # setopt Valid arguments for the -o option to the set builtin. 65 | # shopt Shell option names as accepted by the shopt builtin. 66 | # signal Signal names. 67 | # stopped Names of stopped jobs, if job control is active. 68 | # user User names. May also be specified as -u. 69 | # variable 70 | # Names of all shell variables. May also be specified as -v. 71 | 72 | complete -r 73 | 74 | # general stuff 75 | complete -u adduser deluser 76 | [ "$BASH_VERSION" \> "2.05a" ] && complete -g -u adduser deluser 77 | complete -u id 78 | complete -o default -d -X '@(*/CVS|CVS)' cd rd 79 | complete -o default -A running disown 80 | complete -o default -c fakeroot help ltrace strace sudo tsocks type xargs 81 | complete -v unset vared 82 | 83 | # generic filetype rules 84 | complete -o default -f -X '*.@(a|bc|o|pdf|so)' vi vim 85 | complete -o default -f -X '!*.pdf' evince xpdf 86 | complete -o default -f -X '!*.deb' dpkg-deb 87 | complete -o default -f -X '!*.dsc' dpkg-source 88 | complete -o default -f -X '!*.@(deb|dsc)' debdiff 89 | complete -o default -f -X '!*.@(changes|dsc)' dscverify 90 | complete -o default -f -X '!*.changes' debsign dput debrsign lintian 91 | complete -o default -f -X '!*.?(e)ps*(.gz)' gv 92 | complete -o default -f -X '!*.tex' latex 93 | complete -o default -f -X '!*.diff*(.gz)' lsdiff interdiff 94 | complete -o default -f -X '!*.?(e)ps' lpr 95 | complete -o default -f -X '!*.dvi' kdvi xdvi 96 | complete -o default -f -X '!*.fig' xfig 97 | complete -o default -f -X '!*.@(tar|tar.gz|tgz|tar.bz2|ace|ar|deb|arj|lzh|rar|xar|zip|7z)' ttar xtar 98 | 99 | # stuff that uses my completer 100 | complete -o default -C completer man sc scu start stop status reload restart enable disable 101 | complete -o default -C completer cp mv 102 | complete -o default -X '!&*' -C completer bibtex make mosh ncftp ssh super 103 | complete -X '!&*' -C completer complete mailsync 104 | 105 | # special rules 106 | complete -C completer agi agr 107 | complete -W "install remove" -C completer apt-get 108 | complete -o default -d -X '!&*' -C completer cvs 109 | complete -o default -f -d -X '!&*' -C completer scp rsync 110 | #complete -o default -f -W Makefile vim 111 | -------------------------------------------------------------------------------- /.bash_profile: -------------------------------------------------------------------------------- 1 | #echo .bash_profile 2 | 3 | # update git checkout 4 | if [ -t 0 ] && [ -x /usr/bin/make ] && [ "$(find ~/.git/FETCH_HEAD -mtime +2 2>/dev/null)" ]; then 5 | . ~/.bashrc # get GIT_SSL_CAINFO 6 | make -C $HOME up 7 | fi 8 | 9 | . ~/.bashrc 10 | 11 | [ "$TERM" = linux ] && case `tty` in */tty?) unicode_start 2> /dev/null ;; esac 12 | 13 | if [ -x /usr/bin/finger ] ; then 14 | uptime 15 | finger 16 | else 17 | w 18 | fi 19 | 20 | [ -f ~/.bash_profile-local ] && . ~/.bash_profile-local || true 21 | -------------------------------------------------------------------------------- /.bashrc: -------------------------------------------------------------------------------- 1 | # login shells: /etc/profile, then ~/.[bash_]profile; interactive: ~/.bashrc 2 | #echo .bashrc 3 | 4 | # Environment 5 | for L in de_DE.utf8 en_US.utf8 C.UTF-8 C.utf8 $LANG; do 6 | if LC_ALL=C locale -a | grep -Fq $L; then 7 | LANG=$L 8 | break 9 | fi 10 | done 11 | unset L 12 | : ${LANGUAGE:=de:en_US:en} 13 | export LANG LANGUAGE 14 | # unset extra variables set by Gnome 15 | unset LC_ADDRESS LC_MEASUREMENT LC_MONETARY LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME 16 | 17 | # import TZ from value sent over ssh 18 | if [ -z "${TZ:-}" ] && [ "${LC_TZ:-}" ]; then 19 | export TZ="$LC_TZ" 20 | fi 21 | 22 | . ~/.profile 23 | . ~/.env 24 | 25 | # check whether we run interactively 26 | [ "$PS1" ] || return 27 | #echo ".bashrc: interactive" 28 | 29 | . ~/.bash_bind 30 | . ~/.bash_completion 31 | 32 | # prompt 33 | [ $SHLVL -gt 1 ] && lvl=" ${SHLVL}s" 34 | job='$([ \j -gt 0 ] && echo -n " \jj")' 35 | [ -f /etc/debian_chroot ] && chroot="$(cat /etc/debian_chroot)." && export GPG_TTY="$(tty)" 36 | cyan='\[\033[0;46m\]' red='\[\033[1;31m\]' bold='\[\033[1m\]' blue='\[\033[34m\]' purple='\[\033[35m\]' reset='\[\033[0m\]' 37 | screentitle='\033k\u@'$chroot'\h\033\\' 38 | xtitle='\033]0;'$chroot'\h:\w\007' 39 | ps1_vte='\[$PS1_VTE\]' 40 | prompt="$ps1_vte$cyan[$red\$?$cyan] \\A $bold\\u@$chroot\\h:$blue\w$purple\$PS1_VCS\$PS1_QUILT$cyan$lvl$job" 41 | case $TERM in 42 | linux*|*vt100*|cons25) 43 | PS1="$prompt \\l \\\$$reset " ;; 44 | screen*) 45 | PS1="\\[$screentitle$xtitle\\]$prompt \\\$$reset " ;; 46 | xterm*|rxvt*|cygwin) 47 | PS1="\\[$xtitle\\]$prompt \\\$$reset " ;; 48 | *) 49 | PS1="$bold[\$?] \\A \\u@$chroot\\h:\w$lvl$job \\\$$reset " ;; 50 | esac 51 | unset cyan red bold blue purple reset 52 | unset lvl job screentitle xtitle ps1_vte prompt 53 | 54 | PROMPT_COMMAND="ps1_vcs" 55 | PROMPT_DIRTRIM=4 56 | 57 | # internal shell settings 58 | auto_resume= 59 | HISTFILESIZE=10000 60 | HISTSIZE=10000 61 | HISTTIMEFORMAT="%F %T " 62 | 63 | [ -f ~/.bashrc-local ] && . ~/.bashrc-local 64 | true 65 | -------------------------------------------------------------------------------- /.clusterssh/config: -------------------------------------------------------------------------------- 1 | auto_close=2 2 | extra_cluster_file=~/.priv/ssh/clusters 3 | ssh=ssh 4 | terminal=/usr/bin/rxvt-unicode 5 | terminal_colorize=0 6 | terminal_args=-pe default,matcher,vtwheel,3digits 7 | -------------------------------------------------------------------------------- /.colordiffrc: -------------------------------------------------------------------------------- 1 | # Example colordiffrc file for light backgrounds 2 | # 3 | # Set banner=no to suppress authorship info at top of 4 | # colordiff output 5 | banner=no 6 | # By default, when colordiff output is being redirected 7 | # to a file, it detects this and does not colour-highlight 8 | # To make the patch file *include* colours, change the option 9 | # below to 'yes' 10 | color_patches=no 11 | # 12 | # available colours are: white, yellow, green, blue, 13 | # cyan, red, magenta, black, 14 | # darkwhite, darkyellow, darkgreen, 15 | # darkblue, darkcyan, darkred, 16 | # darkmagenta, darkblack 17 | # 18 | # Can also specify 'none', 'normal' or 'off' which are all 19 | # aliases for the same thing, namely "don't colour highlight 20 | # this, use the default output colour" 21 | # 22 | plain=off 23 | newtext=darkgreen 24 | oldtext=darkred 25 | diffstuff=darkblue 26 | cvsstuff=blue 27 | -------------------------------------------------------------------------------- /.config/awesome/battery.lua: -------------------------------------------------------------------------------- 1 | local io = io 2 | local math = math 3 | local naughty = naughty 4 | local beautiful = beautiful 5 | local tonumber = tonumber 6 | local tostring = tostring 7 | local print = print 8 | local pairs = pairs 9 | 10 | module("battery") 11 | 12 | local limits = {{25, 5}, 13 | {12, 3}, 14 | { 7, 1}, 15 | {0}} 16 | 17 | function get_bat_state (adapter) 18 | local fcur = io.open("/sys/class/power_supply/"..adapter.."/energy_now") 19 | local fcap = io.open("/sys/class/power_supply/"..adapter.."/energy_full") 20 | local fsta = io.open("/sys/class/power_supply/"..adapter.."/status") 21 | local cur = fcur:read() 22 | local cap = fcap:read() 23 | local sta = fsta:read() 24 | fcur:close() 25 | fcap:close() 26 | fsta:close() 27 | local battery = math.floor(cur * 100 / cap) 28 | if sta:match("Charging") then 29 | dir = 1 30 | elseif sta:match("Discharging") then 31 | dir = -1 32 | else 33 | dir = 0 34 | battery = "" 35 | end 36 | return battery, dir 37 | end 38 | 39 | function getnextlim (num) 40 | for ind, pair in pairs(limits) do 41 | lim = pair[1]; step = pair[2]; nextlim = limits[ind+1][1] or 0 42 | if num > nextlim then 43 | repeat 44 | lim = lim - step 45 | until num > lim 46 | if lim < nextlim then 47 | lim = nextlim 48 | end 49 | return lim 50 | end 51 | end 52 | end 53 | 54 | 55 | function batclosure (adapter) 56 | local nextlim = limits[1][1] 57 | return function () 58 | local prefix = "⚡" 59 | local battery, dir = get_bat_state(adapter) 60 | if dir == -1 then 61 | dirsign = "↓" 62 | prefix = "Bat:" 63 | if battery <= nextlim then 64 | naughty.notify({title = "⚡ Beware! ⚡", 65 | text = "Battery charge is low ( ⚡ "..battery.."%)!", 66 | timeout = 7, 67 | position = "bottom_right", 68 | fg = beautiful.fg_focus, 69 | bg = beautiful.bg_focus 70 | }) 71 | nextlim = getnextlim(battery) 72 | end 73 | elseif dir == 1 then 74 | dirsign = "↑" 75 | nextlim = limits[1][1] 76 | else 77 | dirsign = "" 78 | end 79 | if dir ~= 0 then battery = battery.."%" end 80 | return " "..prefix.." "..dirsign..battery..dirsign.." " 81 | end 82 | end 83 | -------------------------------------------------------------------------------- /.config/awesome/cpufreq.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------- 2 | -- Adapted from textclock.lua: 3 | -- @author Julien Danjou <julien@danjou.info> 4 | -- @copyright 2009 Julien Danjou 5 | -- @release v3.4.15 6 | --------------------------------------------------------------------------- 7 | 8 | local setmetatable = setmetatable 9 | local io = io 10 | local string = string 11 | local capi = { widget = widget, 12 | timer = timer } 13 | 14 | module("awful.widget.cpufreq") 15 | 16 | function cpufreq() 17 | local f = io.open("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "rb") 18 | local content = f:read("*all") 19 | f:close() 20 | return string.format("%.1f ", content / 1000000) 21 | end 22 | 23 | -- @param args Standard arguments for textbox widget. 24 | -- @param timeout How often update the time. Default is 60. 25 | -- @return A textbox widget. 26 | function new(args, timeout) 27 | local args = args or {} 28 | local timeout = timeout or 60 29 | args.type = "textbox" 30 | local w = capi.widget(args) 31 | local timer = capi.timer { timeout = timeout } 32 | w.text = cpufreq() 33 | timer:add_signal("timeout", function() w.text = cpufreq() end) 34 | timer:start() 35 | return w 36 | end 37 | 38 | setmetatable(_M, { __call = function(_, ...) return new(...) end }) 39 | 40 | -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 41 | -------------------------------------------------------------------------------- /.config/awesome/theme.lua: -------------------------------------------------------------------------------- 1 | --------------------------- 2 | -- Default awesome theme -- 3 | --------------------------- 4 | 5 | theme = {} 6 | 7 | theme.font = "sans 8" 8 | 9 | theme.bg_normal = "#222222" 10 | theme.bg_focus = "#9cd234" 11 | theme.bg_urgent = "#ff0000" 12 | theme.bg_minimize = "#444444" 13 | 14 | theme.fg_normal = "#aaaaaa" 15 | theme.fg_focus = "#ffffff" 16 | theme.fg_urgent = "#ffffff" 17 | theme.fg_minimize = "#ffffff" 18 | 19 | theme.border_width = "1" 20 | theme.border_normal = "#000000" 21 | theme.border_focus = "#535d6c" 22 | theme.border_marked = "#91231c" 23 | 24 | -- There are other variable sets 25 | -- overriding the default one when 26 | -- defined, the sets are: 27 | -- [taglist|tasklist]_[bg|fg]_[focus|urgent] 28 | -- titlebar_[bg|fg]_[normal|focus] 29 | -- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color] 30 | -- mouse_finder_[color|timeout|animate_timeout|radius|factor] 31 | -- Example: 32 | --theme.taglist_bg_focus = "#ff0000" 33 | 34 | -- Display the taglist squares 35 | theme.taglist_squares_sel = "/usr/share/awesome/themes/default/taglist/squarefw.png" 36 | theme.taglist_squares_unsel = "/usr/share/awesome/themes/default/taglist/squarew.png" 37 | 38 | theme.tasklist_floating_icon = "/usr/share/awesome/themes/default/tasklist/floatingw.png" 39 | 40 | -- Variables set for theming the menu: 41 | -- menu_[bg|fg]_[normal|focus] 42 | -- menu_[border_color|border_width] 43 | theme.menu_submenu_icon = "/usr/share/awesome/themes/default/submenu.png" 44 | theme.menu_height = "15" 45 | theme.menu_width = "100" 46 | 47 | -- You can add as many variables as 48 | -- you wish and access them by using 49 | -- beautiful.variable in your rc.lua 50 | --theme.bg_widget = "#cc0000" 51 | 52 | -- Define the image to load 53 | theme.titlebar_close_button_normal = "/usr/share/awesome/themes/default/titlebar/close_normal.png" 54 | theme.titlebar_close_button_focus = "/usr/share/awesome/themes/default/titlebar/close_focus.png" 55 | 56 | theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_normal_inactive.png" 57 | theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_focus_inactive.png" 58 | theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/default/titlebar/ontop_normal_active.png" 59 | theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/default/titlebar/ontop_focus_active.png" 60 | 61 | theme.titlebar_sticky_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_normal_inactive.png" 62 | theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_focus_inactive.png" 63 | theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/default/titlebar/sticky_normal_active.png" 64 | theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/default/titlebar/sticky_focus_active.png" 65 | 66 | theme.titlebar_floating_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/floating_normal_inactive.png" 67 | theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/floating_focus_inactive.png" 68 | theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/default/titlebar/floating_normal_active.png" 69 | theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/default/titlebar/floating_focus_active.png" 70 | 71 | theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_normal_inactive.png" 72 | theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_focus_inactive.png" 73 | theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/default/titlebar/maximized_normal_active.png" 74 | theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/default/titlebar/maximized_focus_active.png" 75 | 76 | -- You can use your own command to set your wallpaper 77 | --theme.wallpaper_cmd = { "awsetbg /usr/share/awesome/themes/default/background.png" } 78 | 79 | -- You can use your own layout icons like this: 80 | theme.layout_fairh = "/usr/share/awesome/themes/default/layouts/fairhw.png" 81 | theme.layout_fairv = "/usr/share/awesome/themes/default/layouts/fairvw.png" 82 | theme.layout_floating = "/usr/share/awesome/themes/default/layouts/floatingw.png" 83 | theme.layout_magnifier = "/usr/share/awesome/themes/default/layouts/magnifierw.png" 84 | theme.layout_max = "/usr/share/awesome/themes/default/layouts/maxw.png" 85 | theme.layout_fullscreen = "/usr/share/awesome/themes/default/layouts/fullscreenw.png" 86 | theme.layout_tilebottom = "/usr/share/awesome/themes/default/layouts/tilebottomw.png" 87 | theme.layout_tileleft = "/usr/share/awesome/themes/default/layouts/tileleftw.png" 88 | theme.layout_tile = "/usr/share/awesome/themes/default/layouts/tilew.png" 89 | theme.layout_tiletop = "/usr/share/awesome/themes/default/layouts/tiletopw.png" 90 | theme.layout_spiral = "/usr/share/awesome/themes/default/layouts/spiralw.png" 91 | theme.layout_dwindle = "/usr/share/awesome/themes/default/layouts/dwindlew.png" 92 | 93 | theme.awesome_icon = "/usr/share/awesome/icons/awesome16.png" 94 | 95 | return theme 96 | -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 97 | -------------------------------------------------------------------------------- /.config/git/config: -------------------------------------------------------------------------------- 1 | [alias] 2 | au = add -u 3 | aud = add -u debian/ 4 | br = branch 5 | branches = branch 6 | ci = commit -v 7 | cia = commit -v -a 8 | cid = commit -v debian/ 9 | ciam = commit -v --amend 10 | co = checkout 11 | commit = commit -v 12 | cp = cherry-pick 13 | cpc = cherry-pick --continue 14 | cdi = !GIT_EXTERNAL_DIFF=git-context-diff git diff 15 | ctags = !git ls-files | ctags --totals --tag-relative -L - -f .git/tags 16 | di = diff 17 | did = diff debian/ 18 | dih = diff HEAD 19 | dis = diff --staged 20 | fpush = push --force-with-lease 21 | import-orig = !gbp import-orig --pristine-tar 22 | ls = ls-files 23 | npush = -c push.followTags=false push 24 | origtargz = !git archive -o ../$(dpkg-parsechangelog -SSource)_$(dpkg-parsechangelog -SVersion).orig.tar.gz --prefix=$(dpkg-parsechangelog -SSource)/ HEAD 25 | pull = pull --ff-only --stat 26 | rb = rebase 27 | rbc = rebase --continue 28 | snapshot = !git archive --prefix=$(basename $PWD)/ -o $(git describe --tags).tar.gz HEAD 29 | #st = !git --no-pager status 30 | st = status 31 | std = status debian/ 32 | sti = status --ignored 33 | tags = tag 34 | tig = !tig 35 | uscan = import-orig --uscan 36 | wd = diff --color-words 37 | wdiff = diff --color-words 38 | 39 | [clean] 40 | requireForce = false 41 | 42 | [color] 43 | ui = auto 44 | 45 | [core] 46 | autocrlf = false 47 | pager = smart-less 48 | 49 | [init] 50 | defaultBranch = master 51 | templatedir = 52 | 53 | [log] 54 | mailmap = true 55 | 56 | [merge] 57 | defaultToUpstream = true 58 | 59 | [merge "dpkg-mergechangelogs"] 60 | name = debian/changelog merge driver 61 | driver = dpkg-mergechangelogs -m %O %A %B %A 62 | 63 | [pull] 64 | ff = only 65 | 66 | [transfer] 67 | fsckObjects = true 68 | 69 | [url "ssh://github.com/"] 70 | pushInsteadOf = https://github.com/ 71 | [url "ssh://gitlab.com/"] 72 | pushInsteadOf = https://gitlab.com/ 73 | [url "ssh://git@git.postgresql.org/"] 74 | pushInsteadOf = https://git.postgresql.org/git/ 75 | [url "ssh://salsa.debian.org/"] 76 | pushInsteadOf = https://salsa.debian.org/ 77 | 78 | [user] 79 | name = Christoph Berg 80 | email = myon@debian.org 81 | signingKey = 5C48FE6157F49179597087C64C5A6BAB12D2A7AE 82 | 83 | [push] 84 | default = current 85 | followTags = true 86 | 87 | [gitreview] 88 | username = myon 89 | -------------------------------------------------------------------------------- /.config/git/ignore: -------------------------------------------------------------------------------- 1 | /debian/.debhelper/ 2 | /debian/debhelper-build-stamp 3 | /debian/*.debhelper.log 4 | /debian/files 5 | /debian/*.substvars 6 | /debian/tmp/ 7 | /.pc 8 | __pycache__/ 9 | .*.swp 10 | .*.swo 11 | -------------------------------------------------------------------------------- /.config/gtk-3.0/settings.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | gtk-primary-button-warps-slider = false 3 | -------------------------------------------------------------------------------- /.config/lintian/lintianrc: -------------------------------------------------------------------------------- 1 | tag-display-limit=50 2 | -------------------------------------------------------------------------------- /.config/systemd/user/cwangel.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=K3NG Keyer interface 3 | 4 | [Service] 5 | ExecStart=/home/myon/shack/sdrangel/cwangel /dev/ttyUSBK3NG 6 | -------------------------------------------------------------------------------- /.config/systemd/user/midiangel.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=sdrangel midi interface 3 | 4 | [Service] 5 | ExecStart=/home/myon/shack/sdrangel/midiangel 6 | -------------------------------------------------------------------------------- /.config/systemd/user/notify-send@.service: -------------------------------------------------------------------------------- 1 | [Service] 2 | Type=oneshot 3 | ExecStart=/usr/bin/notify-send "systemd user service" %i 4 | -------------------------------------------------------------------------------- /.config/systemd/user/rigctld-sdrangel.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=TCP radio control daemon 3 | 4 | [Service] 5 | ExecStart=/usr/bin/rigctld --port 4534 -m 1 6 | ExecStartPost=/bin/sleep 1 7 | ExecStartPost=/usr/bin/rigctl -m 2 -r localhost:4534 F 2400040000 8 | ExecStartPost=/usr/bin/rigctl -m 2 -r localhost:4534 M USB 3000 9 | 10 | [Install] 11 | WantedBy=default.target 12 | -------------------------------------------------------------------------------- /.config/systemd/user/ssh-agent@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OpenSSH Agent 3 | Documentation=man:ssh-agent(1) 4 | AssertPathExists=%h/.priv/ssh/%i 5 | 6 | [Service] 7 | ExecStartPre=/bin/rm -f %h/.ssh/agent-%i 8 | ExecStart=/usr/bin/ssh-agent -D -a %h/.ssh/agent-%i 9 | 10 | [Install] 11 | WantedBy=default.target 12 | -------------------------------------------------------------------------------- /.config/systemd/user/wsjtx-log.path: -------------------------------------------------------------------------------- 1 | [Path] 2 | PathChanged=/home/myon/log/wsjtx/wsjtx_log.adi 3 | 4 | [Install] 5 | WantedBy=default.target 6 | -------------------------------------------------------------------------------- /.config/systemd/user/wsjtx-log.service: -------------------------------------------------------------------------------- 1 | [Service] 2 | Type=oneshot 3 | WorkingDirectory=/home/myon/log/wsjtx 4 | ExecStart=/home/myon/log/wsjtx/import 5 | 6 | [Unit] 7 | OnFailure=notify-send@wsjtx-log.service 8 | -------------------------------------------------------------------------------- /.config/systemd/user/xroot.service: -------------------------------------------------------------------------------- 1 | [Service] 2 | Type=oneshot 3 | ExecStart=/bin/sh -c ~/bin/xroot 4 | 5 | [Install] 6 | WantedBy=default.target 7 | -------------------------------------------------------------------------------- /.config/systemd/user/xroot.timer: -------------------------------------------------------------------------------- 1 | [Timer] 2 | OnCalendar=hourly 3 | 4 | [Install] 5 | WantedBy=default.target 6 | -------------------------------------------------------------------------------- /.config/systemd/user/xscreensaver.service: -------------------------------------------------------------------------------- 1 | [Service] 2 | Type=exec 3 | ExecStart=/usr/bin/xscreensaver -nosplash 4 | 5 | [Install] 6 | WantedBy=default.target 7 | -------------------------------------------------------------------------------- /.config/terminator/config: -------------------------------------------------------------------------------- 1 | [global_config] 2 | focus = mouse 3 | scroll_tabbar = True 4 | homogeneous_tabbar = False 5 | inactive_color_offset = 1.0 6 | enabled_plugins = CurrDirOpen, APTURLHandler, DebianBugURLHandler, MaidenheadURLHandler, CallsignURLHandler, ManpageURLHandler, SearchPlugin 7 | [keybindings] 8 | zoom_in = equal 9 | zoom_normal = 0 10 | new_tab = Down 11 | move_tab_right = Right 12 | move_tab_left = Left 13 | next_tab = Right 14 | prev_tab = Left 15 | full_screen = "" 16 | new_window = "" 17 | new_terminator = Up 18 | help = "" 19 | [profiles] 20 | [[default]] 21 | background_color = "#ffffff" 22 | foreground_color = "#000000" 23 | show_titlebar = False 24 | scrollback_lines = 10000 25 | palette = "#000000:#cd0000:#00cd00:#e5a50a:#0000cd:#c061cb:#00cdcd:#deddda:#404040:#ff8585:#00ff00:#f8e45c:#0000ff:#9141ac:#00ffff:#f6f5f4" 26 | word_chars = "-./?%&#_+" 27 | title_hide_sizetext = True 28 | title_use_system_font = False 29 | [layouts] 30 | [[default]] 31 | [[[window0]]] 32 | type = Window 33 | parent = "" 34 | [[[child1]]] 35 | type = Terminal 36 | parent = window0 37 | [plugins] 38 | [[CustomCommandsMenu]] 39 | [[[firefox]]] 40 | enabled = True 41 | name = firefox 42 | command = firefox 43 | position = 0 44 | -------------------------------------------------------------------------------- /.config/terminator/plugins/searchplugin.py: -------------------------------------------------------------------------------- 1 | # https://github.com/choffee/terminator-plugins/blob/master/searchplugin.py 2 | 3 | import gi 4 | gi.require_version('Gtk', '3.0') 5 | from gi.repository import Gtk 6 | from gi.repository import Gdk 7 | import urllib.parse 8 | import terminatorlib.plugin as plugin 9 | import re 10 | 11 | # Written by John Cooper http://choffee.co.uk 12 | # Copyright 2010 John Cooper 13 | # See copyright file that comes with this file for full licence 14 | 15 | # Modified by cgw 2011/11/06 16 | 17 | # AVAILABLE must contain a list of all the classes that you want exposed 18 | AVAILABLE = ['SearchPlugin'] 19 | 20 | gtk = Gtk 21 | 22 | _spaces = re.compile(" +") 23 | 24 | # TODO: move some of the constants into a config object 25 | 26 | class SearchPlugin(plugin.Plugin): 27 | capabilities = ['terminal_menu'] 28 | 29 | def do_search(self, searchMenu): 30 | """Launch Google search for string""" 31 | if not self.searchstring: 32 | return 33 | base_uri = "https://www.google.com/search?q=%s" 34 | uri = base_uri % urllib.parse.quote(self.searchstring.encode("utf-8")) 35 | gtk.show_uri(None, uri, Gdk.CURRENT_TIME) 36 | 37 | def callback(self, menuitems, menu, terminal): 38 | """Add our menu item to the menu""" 39 | self.terminal = terminal 40 | item = gtk.ImageMenuItem(gtk.STOCK_FIND) 41 | item.connect('activate', self.do_search) 42 | if terminal.vte.get_has_selection(): 43 | clip = gtk.Clipboard.get(Gdk.SELECTION_PRIMARY) 44 | self.searchstring = clip.wait_for_text().strip() 45 | self.searchstring = self.searchstring.replace("\n", " ") 46 | self.searchstring = self.searchstring.replace("\t", " ") 47 | self.searchstring = _spaces.sub(" ", self.searchstring) 48 | else: 49 | self.searchstring = None 50 | if self.searchstring: 51 | if len(self.searchstring) > 40: 52 | displaystring = self.searchstring[:37] + "..." 53 | else: 54 | displaystring = self.searchstring 55 | item.set_label("Search Google for \"%s\"" % displaystring) 56 | item.set_sensitive(True) 57 | else: 58 | item.set_label("Search Google") 59 | item.set_sensitive(False) 60 | # Avoid turning any underscores in selection into menu accelerators 61 | item.set_use_underline(False) 62 | menuitems.append(item) 63 | -------------------------------------------------------------------------------- /.config/terminator/plugins/url.py: -------------------------------------------------------------------------------- 1 | import re 2 | import terminatorlib.plugin as plugin 3 | 4 | AVAILABLE = ['DebianBugURLHandler', 'MaidenheadURLHandler', 'CallsignURLHandler', 'ManpageURLHandler'] 5 | 6 | class DebianBugURLHandler(plugin.URLHandler): 7 | """Debian Bug URL handler""" 8 | capabilities = ['url_handler'] 9 | handler_name = 'debian_bug' 10 | match = '#(\\d{6,7})\\b' 11 | nameopen = "Open Debian bug" 12 | namecopy = "Copy bug URL" 13 | 14 | def callback(self, url): 15 | """Look for the number in the supplied string and return it as a URL""" 16 | match = '#(\\d{6,7})\\b' 17 | for item in re.findall(match, url): 18 | return 'https://bugs.debian.org/' + item 19 | 20 | class MaidenheadURLHandler(plugin.URLHandler): 21 | """Maidenhead URL handler""" 22 | capabilities = ['url_handler'] 23 | handler_name = 'maidenhead_locator' 24 | match = '\\b[A-R][A-R][0-9][0-9](?:[A-Xa-x][A-Xa-x](?:[0-9][0-9])?)?\\b' 25 | nameopen = "View locator on map" 26 | namecopy = "Copy locator URL" 27 | 28 | def callback(self, url): 29 | return 'https://k7fry.com/grid/?qth=' + url 30 | 31 | class CallsignURLHandler(plugin.URLHandler): 32 | """Callsign URL handler""" 33 | capabilities = ['url_handler'] 34 | handler_name = 'callsign' 35 | match = '\\b[0-9]?[A-Z]{1,2}[0-9]{1,2}[A-Z]{1,5}\\b' 36 | nameopen = "View call on qrz.com" 37 | namecopy = "Copy callsign URL" 38 | 39 | def callback(self, url): 40 | return 'https://www.qrz.com/db/' + url 41 | 42 | class ManpageURLHandler(plugin.URLHandler): 43 | """Manpage URL handler""" 44 | capabilities = ['url_handler'] 45 | handler_name = 'manpage_url' 46 | match = '\\b(\w+)\(\d\)' 47 | nameopen = "View manpage" 48 | namecopy = "Copy manpage URL" 49 | 50 | def callback(self, url): 51 | match = '\\b(\w+)\(\d\)' 52 | for item in re.findall(match, url): 53 | return 'https://manpages.debian.org/' + item 54 | -------------------------------------------------------------------------------- /.devscripts: -------------------------------------------------------------------------------- 1 | DEBCHANGE_AUTO_NMU="no" 2 | DEBCHANGE_RELEASE_HEURISTIC="changelog" 3 | DEBCHECKOUT_AUTH_URLS=' 4 | ^\w+://(svn\.df7cb\.de)/ svn+ssh://$1/svn/ 5 | ' 6 | DEBCOMMIT_SIGN_TAGS="yes" 7 | DEBDIFF_UNPACK_TARBALLS="no" 8 | DEBDIFF_WDIFF_SOURCE_CONTROL="yes" 9 | DEBEMAIL=myon@debian.org 10 | #DEBEMAIL=christoph.berg@credativ.de 11 | DEBFULLNAME="Christoph Berg" 12 | DEBSIGN_KEYID="5C48FE6157F49179597087C64C5A6BAB12D2A7AE" 13 | DGET_VERIFY="no" 14 | DSCVERIFY_KEYRINGS="$HOME/.gnupg/pubring.gpg" 15 | RMADISON_URL_MAP_d="https://api.ftp-master.debian.org/madison" 16 | RMADISON_URL_MAP_pgapt="https://pgdgbuild.dus.dg-i.net/repos/apt/madison/" 17 | RMADISON_URL_MAP_u="http://people.canonical.com/~ubuntu-archive/madison.cgi" 18 | #USCAN_DOWNLOAD=no 19 | USCAN_SYMLINK=rename 20 | USCAN_VERBOSE=yes 21 | 22 | SALSA_GROUP=postgresql 23 | SALSA_TOKEN_FILE=~/.priv/pw/salsa-token 24 | SALSA_IRKER=no 25 | SALSA_KGB=yes 26 | #SALSA_KGB_SERVER_URL='http://kgb.debian.net:9418/webhook/?channel=' 27 | SALSA_IRC_CHANNEL='postgresql-apt;network=freenode;use_irc_notices=1;squash_threshold=3' 28 | SALSA_CI_CONFIG_PATH=debian/gitlab-ci.yml 29 | SALSA_EMAIL=yes 30 | SALSA_EMAIL_RECIPIENTS=dispatch+%p_vcs@tracker.debian.org 31 | SALSA_ENABLE_MR=yes 32 | SALSA_ENABLE_ISSUES=yes 33 | SALSA_TAGPENDING=yes 34 | -------------------------------------------------------------------------------- /.dput.cf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | login = myon 3 | progress_indicator = 2 4 | default_host_main = ssh-upload 5 | 6 | [feynman] 7 | fqdn = feynman.df7cb.de 8 | method = rsync 9 | incoming = . 10 | allow_unsigned_uploads = 1 11 | allowed_distributions = .* 12 | 13 | [pgdg] 14 | fqdn = atalia.postgresql.org 15 | method = rsync 16 | incoming = /srv/apt/incoming 17 | post_upload_command = ssh atalia.postgresql.org sudo -u aptuser processincoming.sh 18 | allow_unsigned_uploads = 1 19 | 20 | [ports-master] 21 | fqdn = ports-master.debian.org 22 | method = ftp 23 | login = ftp 24 | incoming = /incoming 25 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | tab_width = 8 7 | insert_final_newline = true 8 | 9 | [{Makefile,rules}] 10 | indent_style = tab 11 | indent_size = tab 12 | tab_width = 8 13 | -------------------------------------------------------------------------------- /.fvwm/functions: -------------------------------------------------------------------------------- 1 | # cb 990804 2 | 3 | # fvwm-startup functions ################################################## 4 | 5 | #AddToFunc InitFunction 6 | #+ "I" Module FvwmPager 0 0 7 | #+ "I" Wait FvwmPager 8 | #+ "I" Function XTerms 9 | 10 | # fvwm-restart 11 | #AddToFunc RestartFunction 12 | # cleanup previous programs 13 | #+ "I" Module FvwmPager 0 0 14 | #+ "I" Module FvwmButtons 15 | #+ "I" Exec xosview -geometry 175x135-10-10 16 | 17 | # fvwm-close 18 | #AddToFunc ExitFunction 19 | # cleanup previous programs 20 | #+ "I" Exec xsetroot 21 | #+ "I" Exec killall -9 xosview.bin 22 | 23 | # WindowList function executed when window is selected 24 | DestroyMenu WindowListFunc 25 | AddToFunc WindowListFunc "I" WindowId $0 Iconify -1 26 | + "I" WindowId $0 WarpToWindow 14p 14p 27 | 28 | # cursor movements ######################################################### 29 | 30 | # absolute pointer positioning relative to xclock 31 | AddToFunc JumpWindow "I" Next [xclock] WarpToWindow 14p 14p 32 | + "I" CursorMove $0 $1 33 | 34 | AddToFunc PrevPrevWarp "I" Prev [*] Focus NoWarp 35 | + "I" Prev [*] FlipFocus NoWarp 36 | + "I" Next [*] Focus NoWarp 37 | + "I" Next [*] Focus NoWarp 38 | + "I" Prev [*] WarpToWindow 14p 14p 39 | 40 | # window functions ######################################################### 41 | 42 | AddToFunc ShadeRaise "I" WindowShade 43 | + "I" Raise 44 | 45 | AddToFunc MoveOrRaise "Click" RaiseLower 46 | + "Motion" Raise 47 | + "Motion" Move 48 | + "DoubleClick" Function ShadeRaise 49 | 50 | AddToFunc ResizeOrRaise "Click" Raise 51 | #+ "Motion" Raise 52 | + "Motion" Resize 53 | + "DoubleClick" Lower 54 | 55 | AddToFunc MaximizeFunc "Click" Maximize 0 100 56 | + "DoubleClick" Maximize 100 100 57 | 58 | AddToFunc Maximize0100 "I" Raise 59 | + "I" Maximize 0 100 60 | 61 | AddToFunc Maximize100100 "I" Raise 62 | + "I" Maximize 100 100 63 | 64 | AddToFunc Maximize1000 "I" Raise 65 | + "I" Maximize 100 0 66 | 67 | AddToFunc Maximize50left "I" Raise 68 | + "I" Maximize 50 100 69 | + "I" Move 0 0% 70 | 71 | AddToFunc Maximize50right "I" Raise 72 | + "I" Maximize 50 100 73 | + "I" Move -0 0% 74 | 75 | AddToFunc MoveOrIconify "Immediate" Raise 76 | #+ "Motion" Raise 77 | + "Motion" Move 78 | + "DoubleClick" Iconify 79 | 80 | AddToFunc MenuOrClose "Click" Menu WindowOps 81 | + "Motion" Popup WindowOps 82 | + "DoubleClick" Close 83 | 84 | AddToFunc DeleteOrClose "Click" Delete 85 | + "DoubleClick" Close 86 | -------------------------------------------------------------------------------- /.fvwm/menus: -------------------------------------------------------------------------------- 1 | # This file is read by .fvwm2rc-xterm.m4 2 | # otherwise, the menu entry order is screwed up 3 | 4 | DestroyMenu Main 5 | AddToMenu Main "fvwm2" Title 6 | + "&xterm" Exec xterm 7 | #+ "xterm" Popup xterm 8 | + "&Apps" Popup Apps 9 | + "&Debian" Popup "/Debian" 10 | #+ "&Init" Popup Init 11 | + "&Fvwm" Popup FvwmMenu 12 | + "&Keymaps" Popup KeymapMenu 13 | #+ "&Screen" Popup Screen 14 | #+ "&VNC" Popup VNC 15 | + "&Window" Popup WindowOps 16 | + "" Nop 17 | #+ "Quit FVWM" Quit 18 | + "&Quit X" Exec killall xterm xterm.real fvwm 19 | + "&Poweroff" Exec sudo poweroff 20 | #+ " +&Commit" Exec xterm -e "make commit ; sudo poweroff" 21 | #+ " +&Backup" Exec xterm -e "make commit ; rdiff-volta-planck ; sudo poweroff" 22 | 23 | 24 | DestroyMenu Apps 25 | AddToMenu Apps "Apps" Title 26 | + "&firefox" Exec firefox 27 | #+ "address&book" Exec addressbook 28 | + "bbo" Exec bbo 29 | + "bm2000" Exec bm2000 30 | + "&endeavour2" Exec endeavour2 31 | + "gimp" Exec gimp 32 | + "&grip" Exec grip 33 | + "gv" Exec gv 34 | + "&netscape" Exec netscape 35 | + "oo&ffice" Exec ooffice 36 | + "&plan" Exec LANG=de_DE.ISO-8859-1 plan 37 | + "p&ycocuma" Exec pycocuma 38 | + "&teatimer" Exec teatimer 02:30 39 | + "&unison-gtk" Exec unison-gtk 40 | + "xawt&v" Exec xawtv -geometry 780x585 41 | + "x&mms" Exec xmms 42 | + "&xvncviewer" Exec xvncviewer 43 | 44 | 45 | DestroyMenu Init 46 | AddToMenu Init "Init" Title 47 | + "&poweroff" Exec sudo poweroff 48 | + "&halt" Exec sudo halt 49 | + "&reboot" Exec sudo reboot 50 | + "&pump" Exec sudo pump 51 | 52 | 53 | DestroyMenu Screen 54 | AddToMenu Screen "Screen" Title 55 | + "&dpmsoff" Exec dpmsoff 56 | + "x&lock" Exec dpmsoff blank 57 | + "x&root" Exec xroot 58 | + " &offline" Exec xv -root -quit +noresetroot bilder/back 59 | + "" Nop 60 | + "xscr prefs" Exec xscreensaver-command -prefs 61 | 62 | 63 | DestroyMenu FvwmMenu 64 | AddToMenu FvwmMenu "fvwm2" Title 65 | + "Fvwm&Talk" Module FvwmTalk 66 | + "&3x3 Desktop" DeskTopSize 3 3 67 | + "&Modules" Popup ModulePopup 68 | + "" Nop 69 | + "Re&fresh" Refresh 70 | + "Re&capture" Recapture 71 | + "Re&start" Restart 72 | + "&Quit" Quit 73 | 74 | 75 | DestroyMenu VNC 76 | AddToMenu VNC "VNC" Title 77 | + "intertalk:0" Exec vncviewer -passwd /home/cb/.vnc/passwd_intertalk:0 intertalk.vpn.df7cb.de:0 78 | + "meitner:1" Exec vncviewer -passwd /home/cb/.vnc/passwd_meitner:1 meitner.vpn.df7cb.de:1 79 | + "volta:0" Exec vncviewer -passwd /home/cb/.vnc/passwd_volta:0 volta.vpn.df7cb.de:0 80 | 81 | 82 | DestroyMenu WindowOps 83 | AddToMenu WindowOps "Window Ops" Title 84 | + "Identify S1" Module FvwmIdent 85 | + "&Iconify F4" Iconify 86 | + "Re&fresh S4" RefreshWindow 87 | + "&Close A4" Close 88 | + "&Destroy CA4" Destroy 89 | + "&Raise F5" Raise 90 | + "&Lower S5" Lower 91 | + "S&hade F6" WindowShade 92 | + "S&tick S6" Stick 93 | + "&Move F8" Move 94 | + "Re&size F9" Resize 95 | #+ "Resize..." Popup ResizeMenu 96 | + "Max &vert F10" Function Maximize0100 97 | + "Ma&ximize F11" Function Maximize100100 98 | + "Max &horiz F12" Function Maximize1000 99 | 100 | 101 | DestroyMenu ResizeMenu 102 | AddToMenu ResizeMenu "Resize/Move" Title 103 | + "80x25" Resize 49 43 104 | + "Max hor" Maximize 100 0 105 | + "Max vert" Maximize 0 100 106 | + "Maximize" Maximize 100 100 107 | + "" Nop 108 | + "LO" Move 0 0 109 | + "RO" Move 50 0 110 | + "LU" Move 0 44 111 | + "RU" Move 50 44 112 | 113 | 114 | DestroyMenu KeymapMenu 115 | AddToMenu KeymapMenu "Keymaps" Title 116 | + "&PC" Exec xmodmap $HOME/.xmodmap-pc 117 | + "PC (&D)" Exec xmodmap $HOME/.xmodmap-pc-d 118 | + "&Sun" Exec xmodmap $HOME/.xmodmap-sun 119 | + "&NCD" Exec xmodmap $HOME/.xmodmap-ncd 120 | + "" Nop 121 | + "&xkeycaps" Exec xkeycaps 122 | 123 | 124 | # fvwm modules ############################################################ 125 | 126 | DestroyMenu ModulePopup 127 | AddToMenu ModulePopup "Fvwm2-Module" Title 128 | + "Audio" Module FvwmAudio 129 | + "AutoRaise ein" Module FvwmAuto 500 130 | + "AutoRaise aus" KillModule FvwmAuto 131 | + "Banner" Module FvwmBanner 132 | + "Buttons" Module FvwmButtons 133 | + "Cascade" Module FvwmCascade 134 | + "Command" Module FvwmCommand 135 | + "Config" Module FvwmConfig 136 | + "Console" Module FvwmConsole 137 | + "Debug" Module FvwmDebug 138 | + "Form" Module FvwmForm 139 | + "GoodStuff" Module FvwmGoodStuff 140 | + "IconBox" Module FvwmIconBox 141 | + "IconMan" Module FvwmIconMan 142 | + "Ident" Module FvwmIdent 143 | + "M4" Module FvwmM4 144 | + "Pager" Module FvwmPager 0 0 145 | + "Pipe" Module FvwmPipe 146 | + "Save" Module FvwmSave 147 | + "SaveDesk" Module FvwmSaveDesk 148 | + "Script" Module FvwmScript 149 | + "Scroll" Module FvwmScroll 150 | + "Talk" Module FvwmTalk 151 | + "TaskBar" Module FvwmTaskBar 152 | + "Tile" Module FvwmTile 153 | + "Wharf" Module FvwmWharf 154 | + "WinList" Module FvwmWinList 155 | -------------------------------------------------------------------------------- /.fvwm/menus-rlogin: -------------------------------------------------------------------------------- 1 | # .fvwm2rc-menus-rlogin cb 990804 2 | 3 | AddToMenu Rlogins "rlogins" Title 4 | + "Wohnheim" Popup RloginWohnheim 5 | + "Fachschaft" Popup RloginFachschaft 6 | + "Lehrstuhl" Popup RloginLehrstuhl 7 | + "Labor" Popup RloginLabor 8 | 9 | AddToMenu RloginWohnheim "Wohnheim" Title 10 | + "df7cb" Exec xterm -e ssh df7cb.heim-d.uni-sb.de 11 | + "hal" Exec xterm -e ssh hal.heim-d.uni-sb.de 12 | + "earth" Exec xterm -e ssh earth.heim-d.uni-sb.de 13 | + "deep-thought" Exec xterm -e ssh deep-thougth.heim-d.uni-sb.de 14 | + "" Nop 15 | + "Switch 18.1" Exec xterm -e telnet 134.96.114.12 16 | + "Switch 18.2" Exec xterm -e telnet 134.96.114.13 17 | 18 | AddToMenu RloginFachschaft "Fachschaft" Title 19 | + "fsinfo" Exec xterm -e ssh fsinfo.cs.uni-sb.de 20 | + "oberon" Exec xterm -e ssh oberon.cs.uni-sb.de 21 | + "titan" Exec xterm -e ssh titan.cs.uni-sb.de 22 | + "puck" Exec xterm -e ssh puck.cs.uni-sb.de 23 | + "sycorax" Exec xterm -e telnet sycorax.cs.uni-sb.de 24 | 25 | AddToMenu RloginLehrstuhl "Lehrstuhl" Title 26 | + "wjpserver" Exec xterm -e ssh wjpserver.cs.uni-sb.de 27 | + "wurzelausix" Exec xterm -e ssh wurzelausix.cs.uni-sd.de 28 | 29 | AddToMenu RloginLabor "Labor" Title 30 | + "busserver" Exec xterm -e ssh busserver.cs.uni-sb.de 31 | + "calvin" Exec xterm -e ssh calvin.cs.uni-sb.de 32 | + "hobbes" Exec xterm -e ssh hobbes.cs.uni-sb.de 33 | + "lunix" Exec xterm -e ssh lunix.cs.uni-sb.de 34 | + "spiff" Exec xterm -e ssh spiff.cs.uni-sb.de 35 | + "rosalyn" Exec xterm -e ssh rosalyn.cs.uni-sb.de 36 | + "vodix" Exec xterm -e ssh vodix.cs.uni-sb.de 37 | -------------------------------------------------------------------------------- /.fvwm/modules: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # # 3 | # pager # 4 | # # 5 | ############################################################################### 6 | 7 | *FvwmPagerRows 1 8 | *FvwmPagerColumns 1 9 | *FvwmPagerGeometry 108x85+0-0 10 | *FvwmPagerFont none 11 | *FvwmPagerSmallFont -misc-fixed-medium-r-normal--7-70-75-75-c-50-*-* 12 | 13 | #*FvwmPagerFore Black 14 | #*FvwmPagerBack grey67 15 | #*FvwmPagerHilight grey50 16 | *FvwmPagerFore RoyalBlue 17 | *FvwmPagerBack Yellow 18 | *FvwmPagerHilight Red 19 | -------------------------------------------------------------------------------- /.fvwm/styles: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # window buttons # 3 | # 1 3 5 7 9 0 8 6 4 2 # 4 | ############################################################################### 5 | 6 | # Box for Raise 7 | #ButtonStyle 0 5 20x20@1 80x20@1 80x80@0 20x80@0 20x20@1 8 | 9 | # Cross for Stick 10 | ButtonStyle 0 13 20x60@1 20x40@1 40x40@1 40x20@1 60x20@1 60x40@0 80x40@1 80x60@0 60x60@0 60x80@0 40x80@0 40x60@1 20x60@0 11 | 12 | # Bar for Shade 13 | ButtonStyle 8 5 20x40@1 20x20@1 80x20@1 80x40@0 20x40@0 14 | 15 | # Dot for Zapp 16 | ButtonStyle 6 5 50x50@0 40x50@0 40x40@1 50x40@1 50x50@0 17 | 18 | # Large down Triangle for Iconify 19 | ButtonStyle 4 4 50x74@1 25x24@1 75x24@1 50x74@0 20 | 21 | # Large up Triangle for Maximize 22 | ButtonStyle 2 4 50x24@1 75x74@0 25x74@0 50x24@1 23 | 24 | ############################################################################### 25 | # colors and fonts # 26 | ############################################################################### 27 | 28 | # Text and background color for the title bar of the selected window 29 | # 'Lola rennt' style back from 1998 30 | #Style "*" HilightFore red2, HilightBack LightGreen 31 | #Style "*" ForeColor Black, BackColor LightSkyBlue 32 | # Blue style like df7cb.dyndns.info (030430) 33 | #Style "*" HilightFore yellow, HilightBack #5176e8 34 | #Style "*" ForeColor #5176e8, BackColor #90abf4 35 | # colorful style (030930) 36 | #Style "*" HilightFore Yellow, HilightBack Orange 37 | #Style "*" ForeColor Orange, BackColor RoyalBlue 38 | # wmii-like 39 | Style "*" HilightFore White, HilightBack #0a55e0 40 | Style "*" ForeColor Black, BackColor #888888 41 | 42 | # Style for fonts is 43 | #-fndry-fmly-wght-slant-sWdth-adstyl-pxlsz-ptSz-resx-resy-spc-avgWdth-rgstry-encdng 44 | # 45 | 46 | # Menu colors and font 47 | # bg fg disabled font sub-menu-style 48 | MenuStyle Black Grey LightGrey \ 49 | -misc-fixed-medium-r-normal-*-15-*-75-75-c-90-iso8859-1 fvwm 50 | 51 | # Now the common fonts - one for window titles, another for icons 52 | WindowFont -*-helvetica-bold-r-normal-*-10-*-*-*-*-*-*-* 53 | IconFont -misc-fixed-medium-r-normal-*-10-*-*-*-c-60-*-* 54 | 55 | 56 | ############################################################################### 57 | # style options for modules and programs # 58 | ############################################################################### 59 | 60 | Style "*" BorderWidth 2, HandleWidth 2, DepressableBorder 61 | Style "*" Icon small.Template.xpm 62 | Style "*" SlipperyIcon, IconBox +515 -90 -0 -0 63 | Style "*" NoPPosition 64 | Style "*" SloppyFocus, SmartPlacement, RandomPlacement 65 | Style "*" ResizeOpaque 66 | 67 | # decorations for transient windows 68 | Style "*" DecorateTransient 69 | #Style "*" NakedTransient 70 | 71 | # flat window borders when inactive 72 | BorderStyle Inactive -- HiddenHandles NoInset 73 | 74 | # fvwm stuff 75 | Style "FvwmPager" NoTitle, Sticky, WindowListSkip, StaysOnBottom 76 | #Style "FvwmButtons" NoTitle, Sticky, WindowListSkip 77 | #Style "FvwmBanner" NoTitle, Sticky, StaysOnTop, WindowListSkip 78 | Style "FvwmWinList" NoTitle, WindowListSkip, NakedTransient 79 | Style "IconManModule" NoTitle, Sticky, NoHandles, Icon toolbox.xpm 80 | 81 | # .xinitrc stuff 82 | Style "*apm" NoTitle,Sticky,WindowListSkip,ClickToFocus,StaysOnTop 83 | Style "*biff" NoTitle,Sticky,WindowListSkip,ClickToFocus,NoUSPosition,GrabFocusOff,StaysOnBottom 84 | Style "xlassie" NoTitle,Sticky,WindowListSkip,ClickToFocus,NoUSPosition,GrabFocusOff 85 | Style "wmWeather" NoTitle,Sticky,WindowListSkip,ClickToFocus,NoUSPosition,GrabFocusOff,StaysOnBottom 86 | Style "console*" Sticky, StaysOnBottom 87 | Style "coolmail" NoTitle, Sticky, WindowListSkip 88 | Style "*clock*" NoTitle,Sticky,WindowListSkip,ClickToFocus,StaysOnTop 89 | Style "xeyes" NoTitle, Sticky, WindowListSkip 90 | Style "xmeter" NoTitle, Sticky, WindowListSkip 91 | Style "Mixer*" NoTitle, Sticky, WindowListSkip, HandleWidth 0, StaysOnBottom 92 | Style "SshAskpass*" StaysOnTop 93 | Style "xosview*" Icon meter_3d.xpm, ClickToFocus, NoTitle, Sticky, UsePPosition, WindowListSkip 94 | Style "ProcMeter*" NoTitle, Sticky, WindowListSkip, ClickToFocus 95 | 96 | # general 97 | #Style "xv 3*" NoTitle 98 | Style "VNC*" HandleWidth 0, NoTitle 99 | #Style Netscape* StartsOnPage 0 1, SkipMapping 100 | Style "xine*" HilightFore DarkGrey, HilightBack black 101 | #Style "xmms" StartsOnPage 2 0, SkipMapping 102 | # firefox 103 | #Style "navigator:browser" StartsOnPage 0 1, SkipMapping 104 | 105 | # icons 106 | Style "xterm" Icon Terminal.xpm 107 | Style "emacs*" Icon DTP.xpm 108 | Style "xconsole" Icon clipboard_3d.xpm 109 | Style "dsk_*" Icon FileManager.xpm 110 | Style "TkMan" Icon library_3d.xpm 111 | Style "Xman" Icon xman3d.xpm 112 | Style "Root" Icon Diavolo.xpm 113 | Style "xv*" Icon xv.color.xpm 114 | 115 | ############################################################################### 116 | # MWM emulation # 117 | ############################################################################### 118 | # (view the original comment from .fvwm2rc) 119 | # mwm-style border reliefs (less deep than default fvwm) ? 120 | # Maximize button does mwm-inversion thingy 121 | 122 | Style "*" MWMBorder, MWMDecor, HintOverride, MWMFunctions, MWMButtons 123 | -------------------------------------------------------------------------------- /.fvwm/xterm.m4: -------------------------------------------------------------------------------- 1 | dnl This file will open 4 xterms that occupy the screen neatly. 2 | dnl For a resolution of 1024x480 (on the Sony PCG-C1VE) 2 xterms pop up. 3 | 4 | changecom(`')dnl 5 | # width = WIDTH, height = HEIGHT 6 | define(_T, 0+0)dnl place window at top 7 | define(_B, 0-94)dnl place window at bottom 8 | 9 | dnl jump window positions 10 | define(JLO, `124p 0')dnl jump to left window 11 | define(JRO, `50 0')dnl jump to right window 12 | define(JLU, `0 45')dnl jump to left window 13 | define(JRU, `50 45')dnl jump to right window 14 | 15 | DestroyFunc XTermLO 16 | DestroyFunc XTermRO 17 | DestroyFunc XTermLU 18 | DestroyFunc XTermRU 19 | DestroyFunc JumpWindowLO 20 | DestroyFunc JumpWindowRO 21 | DestroyFunc JumpWindowLU 22 | DestroyFunc JumpWindowRU 23 | 24 | ifelse( 25 | WIDTH.HEIGHT, 1024.480, `define(_LO,81x27+_T)define(_RO,82x27-_T) 26 | define(_LU,81x27+_T)define(_RU,82x27-_T)', 27 | WIDTH.HEIGHT, 1024.768, `define(_LO,81x24+_T)define(_RO,82x24-_T) 28 | define(_LU,81x23+_B)define(_RU,82x23-_B)', 29 | WIDTH.HEIGHT, 1152.864, `define(_LO,92x27+_T)define(_RO,92x27-_T) 30 | define(_LU,92x27+_B)define(_RU,92x27-_B)', 31 | WIDTH.HEIGHT, 1152.900, `define(_LO,92x28+_T)define(_RO,92x28-_T) 32 | define(_LU,92x29+_B)define(_RU,92x29-_B)', 33 | WIDTH, 1280, `define(_LO,103x33+_T)define(_RO,103x33-_T) 34 | define(_LU,103x33+0+467)define(_RU,103x33-0+467)', 35 | WIDTH.HEIGHT, 2304.1024,`define(_LO,103x33+1024+0)define(_RO,103x33-0+0) 36 | define(_LU,103x33+1024+467)define(_RU,103x33-0+467) 37 | define(`JLO',`45 0')define(`JRO',`72 0')define(`JLU',`45 45')define(`JRU',`72 45')', 38 | WIDTH, 1600, `define(_LO,129x40+_T)define(_RO,130x40-_T) 39 | define(_LU,129x40+_B)define(_RU,130x40-_B)', 40 | `define(_LO,80x25+_T)define(_RO,80x25-_T) 41 | WARNING: screen size? define(_LU,80x25+_B)define(_RU,80x25-_B)' 42 | )dnl 43 | 44 | # select an xterm 45 | AddToFunc JumpWindowLO "I" JumpWindow JLO 46 | AddToFunc JumpWindowRO "I" JumpWindow JRO 47 | AddToFunc JumpWindowLU "I" JumpWindow JLU 48 | AddToFunc JumpWindowRU "I" JumpWindow JRU 49 | 50 | AddToFunc XTermLO "I" Exec xterm -geometry _LO 51 | + "I" JumpWindowLO 52 | 53 | AddToFunc XTermRO "I" Exec xterm -geometry _RO 54 | + "I" JumpWindowRO 55 | 56 | AddToFunc XTermLU "I" Exec xterm -geometry _LU 57 | + "I" JumpWindowLU 58 | 59 | AddToFunc XTermRU "I" Exec xterm -geometry _RU 60 | + "I" JumpWindowRU 61 | 62 | AddToFunc XTerms "I" Exec xterm -geometry _LO 63 | + "I" Exec xterm -geometry _RO 64 | ifelse(HEIGHT, 480, `', 65 | + "I" Exec xterm -geometry _LU 66 | + "I" Exec xterm -geometry _RU 67 | )dnl 68 | 69 | DestroyMenu xterm 70 | AddToMenu xterm "xterm" Title 71 | ifelse(HEIGHT, 480, 72 | `+ "2 &xterms" Function XTerms 73 | + "xterm &L" Function XTermLO 74 | + "xterm &R" Function XTermRO', 75 | `+ "4 &xterms" Function XTerms 76 | + "xterm LO" Function XTermLO 77 | + "xterm RO" Function XTermRO 78 | + "xterm &LU" Function XTermLU 79 | + "xterm &RU" Function XTermRU' 80 | ) 81 | 82 | ifelse( 83 | WIDTH.HEIGHT, 2304.1024, ` 84 | define(_LLO,103x33+0+0)define(_LRO,103x33+384+0) 85 | define(_LLU,103x33+0+467)define(_LRU,103x33+384+467) 86 | define(`JLLO',`0 0')define(`JLRO',`20 0')define(`JLLU',`0 45')define(`JLRU',`20 45') 87 | 88 | # select an xterm 89 | AddToFunc JumpWindowLLO "I" JumpWindow JLLO 90 | AddToFunc JumpWindowLRO "I" JumpWindow JLRO 91 | AddToFunc JumpWindowLLU "I" JumpWindow JLLU 92 | AddToFunc JumpWindowLRU "I" JumpWindow JLRU 93 | ' 94 | )dnl 95 | 96 | -------------------------------------------------------------------------------- /.fvwm2rc: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # paths specific to fvwm2 # 3 | ############################################################################### 4 | # n.b. These paths must NOT be longer than 255 chars 5 | 6 | ModulePath +:/usr/X11R6/lib/X11/fvwm2: \ 7 | :/usr/X11R6/lib/X11/fvwm2/2.2: \ 8 | :/usr/X11R6/libexec/fvwm/2.2.2: \ 9 | :/usr/X11R6/lib/X11/fvwm/2.2.4:\ 10 | :/usr/X11R6/libexec/fvwm/2.2.4 11 | 12 | #PixmapPath /usr/include/X11/3dpixmaps/small:\ 13 | # /usr/include/X11/3dpixmaps/normal:\ 14 | # /usr/include/X11/pixmaps:\ 15 | # /home/cb/lib/pixmaps 16 | 17 | #IconPath /usr/X11R6/include/X11/bitmaps 18 | 19 | 20 | ############################################################################### 21 | # general configuration # 22 | ############################################################################### 23 | 24 | # this describes how many rows and columns are displayed in the pager 25 | #DeskTopSize 3x2 26 | DeskTopSize 1x1 27 | 28 | EdgeResistance 100 20 29 | #EdgeResistance 0 20 30 | EdgeScroll 100 100 31 | 32 | ClickTime 200 33 | 34 | ColormapFocus FollowsMouse 35 | 36 | OpaqueMoveSize 150 37 | 38 | CursorStyle TITLE 52 39 | CursorStyle SYS 90 40 | CursorStyle MOVE 50 41 | CursorStyle MENU 122 42 | #CursorStyle SELECT 0 # X_cursor 43 | 44 | # value to make frames visible when dragging or resizing a window 45 | # for more info see "man fvwm95" 46 | #XORvalue 255 47 | XORvalue 0 48 | 49 | 50 | ############################################################################### 51 | # import other files # 52 | ############################################################################### 53 | 54 | # this file includes .fvwm2rc-menus 55 | FvwmM4 xterm.m4 56 | Read menus 57 | Read functions 58 | Read modules 59 | Read keys_mouse 60 | Read styles 61 | #FvwmM4 local 62 | -------------------------------------------------------------------------------- /.gbp.conf: -------------------------------------------------------------------------------- 1 | [import-orig] 2 | pristine-tar = True 3 | postimport = dch --force-bad-version -v $GBP_DEBIAN_VERSION "New upstream version $GBP_UPSTREAM_VERSION." || : 4 | -------------------------------------------------------------------------------- /.gdbinit: -------------------------------------------------------------------------------- 1 | set history save on 2 | set history filename ~/.gdb_history 3 | add-auto-load-safe-path /lib 4 | # mostly disable paging 5 | set height 1000 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /.gnupg/gpg-agent.conf: -------------------------------------------------------------------------------- 1 | enable-ssh-support 2 | -------------------------------------------------------------------------------- /.gnupg/gpg.conf: -------------------------------------------------------------------------------- 1 | no-greeting 2 | lock-once 3 | #no-auto-check-trustdb 4 | use-agent 5 | photo-viewer see %i 6 | #with-fingerprint 7 | #keyring ~/debian/keyring.debian.org/keyrings/debian-keyring.gpg 8 | #keyring ~/debian/keyring.debian.org/keyrings/debian-maintainers.gpg 9 | 10 | #keyserver hkps://keys.openpgp.org 11 | keyserver keyserver.ubuntu.com 12 | keyserver-options auto-key-retrieve 13 | #verify-options show-keyserver-urls,pka-lookups 14 | #sig-notation pka-address@gnupg.org=cb@df7cb.de 15 | 16 | #default-key 0x58510B5A 17 | #encrypt-to 0x58510B5A 18 | default-key 4C5A6BAB12D2A7AE 19 | encrypt-to 4C5A6BAB12D2A7AE 20 | 21 | default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed 22 | personal-digest-preferences SHA256 23 | cert-digest-algo SHA256 24 | -------------------------------------------------------------------------------- /.gnupg/sshcontrol: -------------------------------------------------------------------------------- 1 | # List of allowed ssh keys. Only keys present in this file are used 2 | # in the SSH protocol. The ssh-add tool may add new entries to this 3 | # file to enable them; you may also add them manually. Comment 4 | # lines, like this one, as well as empty lines are ignored. Lines do 5 | # have a certain length limit but this is not serious limitation as 6 | # the format of the entries is fixed and checked by gpg-agent. A 7 | # non-comment line starts with optional white spaces, followed by the 8 | # keygrip of the key given as 40 hex digits, optionally followed by a 9 | # caching TTL in seconds, and another optional field for arbitrary 10 | # flags. Prepend the keygrip with an '!' mark to disable it. 11 | AE824795C0081423AB212195547E5396E452DE0E 12 | 5C48FE6157F49179597087C64C5A6BAB12D2A7AE 13 | # Ed25519 key added on: 2023-08-01 10:42:24 14 | # Fingerprints: MD5:11:f8:2c:7e:04:04:95:76:be:d8:6c:2e:77:2b:57:e3 15 | # SHA256:Ay0eCn6g0NCaFds06e4BsnfUREFQkp/FeT4aVA1vVlc 16 | 53D1841AF4F600E84797509F2B3E5083B93E8E53 0 17 | # RSA key added on: 2023-12-18 12:28:24 18 | # Fingerprints: MD5:0e:b1:2c:3e:4d:12:e9:79:e8:b0:b5:5f:6a:58:85:a6 19 | # SHA256:8z4jCdNQ1/oJ+Du/qKQFclZXkzDDto0COfkoIVgkDeY 20 | 3C3B7D528FE1E8D85D1A6F9D740F9BE2780740B8 0 21 | -------------------------------------------------------------------------------- /.inputrc: -------------------------------------------------------------------------------- 1 | # Eight bit compatible: Umlaute 2 | set input-meta on 3 | set output-meta on 4 | set convert-meta off 5 | # Mode 6 | set editing-mode vi 7 | set keymap vi-insert 8 | set bell-style visible 9 | set enable-bracketed-paste off 10 | # Completion 11 | set completion-ignore-case off 12 | set completion-query-items 200 13 | set expand-tilde off 14 | #set history-preserve-point on 15 | set match-hidden-files off 16 | set mark-directories on 17 | set mark-symlinked-directories on 18 | set page-completions off 19 | set show-all-if-ambiguous off 20 | set visible-stats on 21 | 22 | $if Bash 23 | "\eOP": "%1\n" 24 | "\eOQ": "%2\n" 25 | "\eOR": "%3\n" 26 | "\eOS": "%4\n" 27 | "\e[15~": "%5\n" 28 | "\e[17~": "%6\n" 29 | "\e[18~": "%7\n" 30 | "\e[19~": "%8\n" 31 | "\e[20~": "%9\n" 32 | "\e[21~": "%10\n" 33 | "\e[23~": "%11\n" 34 | "\e[24~": "%12\n" 35 | $endif 36 | 37 | $if psql 38 | "\e[11~": "SELECT * FROM " 39 | "\e[12~": "EXPLAIN (ANALYZE, BUFFERS, VERBOSE) " 40 | $endif 41 | -------------------------------------------------------------------------------- /.irssi/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile to create links in ~/.irssi/scripts/autorun/ 2 | 3 | .PHONY: scripts scripts.main 4 | scripts: 5 | $(MAKE) -C $@ -f ../Makefile scripts_all 6 | scripts.main: 7 | $(MAKE) -C scripts -f ../Makefile scripts_all.main 8 | 9 | clean: 10 | rm -f scripts/autorun/*.pl 11 | 12 | ### 13 | 14 | scripts_all: autorun links 15 | scripts_all.main: autorun links.main 16 | 17 | autorun: 18 | mkdir $@ 19 | 20 | # load these scripts only on the irssi proxy server 21 | links.main: links \ 22 | autorun/buf.pl \ 23 | autorun/keepnick.pl \ 24 | autorun/nickident.pl \ 25 | autorun/screen_away.pl \ 26 | autorun/trigger.pl 27 | 28 | # load these scripts always 29 | links: \ 30 | autorun/akilluser.pl \ 31 | autorun/challenge.pl \ 32 | autorun/chanact.pl \ 33 | autorun/hideshow.pl \ 34 | autorun/joininfo.pl \ 35 | autorun/len.pl \ 36 | autorun/loadavg.pl \ 37 | autorun/nickcolor.pl \ 38 | autorun/oftc-server-notices.pl \ 39 | autorun/queryresume.pl \ 40 | autorun/quiet.pl \ 41 | autorun/recentdepart.pl \ 42 | autorun/splitlong.pl \ 43 | autorun/timer.pl \ 44 | autorun/title.pl \ 45 | autorun/topic-diff.pl \ 46 | autorun/topics.pl \ 47 | autorun/trackbar.pl \ 48 | autorun/usercount.pl 49 | 50 | autorun/%.pl: %.pl 51 | ln -s ../$< $@ 52 | 53 | autorun/%.pl: /usr/share/irssi/scripts/%.pl 54 | ln -s $< $@ 55 | -------------------------------------------------------------------------------- /.irssi/scripts/bugcomplete.pl: -------------------------------------------------------------------------------- 1 | use Irssi 20020101.0250 (); 2 | $VERSION = "2"; 3 | %IRSSI = ( 4 | authors => 'Christoph Berg', 5 | contact => 'myon@debian.org', 6 | name => 'bugcomplete', 7 | description => 'Tab complete bug numbers', 8 | license => '', 9 | url => '', 10 | ); 11 | 12 | use strict; 13 | 14 | sub sig_bugcomplete { 15 | my ($complist, $window, $word, $linestart, $want_space) = @_; 16 | 17 | if ($word =~ /^#(\d+)/) { 18 | push @$complist, "http://bugs.debian.org/$1"; 19 | } 20 | } 21 | 22 | Irssi::signal_add_last('complete word', 'sig_bugcomplete'); 23 | -------------------------------------------------------------------------------- /.irssi/scripts/challenge.pl: -------------------------------------------------------------------------------- 1 | oper/challenge.pl -------------------------------------------------------------------------------- /.irssi/scripts/muttwiki.pl: -------------------------------------------------------------------------------- 1 | # muttwiki.pl 2 | # vim:ts=4 3 | 4 | use strict; 5 | use POSIX; 6 | # version info 7 | use vars qw($VERSION %IRSSI); 8 | use Irssi 20020325 qw (command_bind command_runsub command timeout_add timeout_remove signal_add_first); 9 | 10 | $VERSION = "1.0"; 11 | %IRSSI = ( 12 | authors => 'cb@df7cb.de', 13 | name => 'MuttWiki tracker', 14 | description => 'MuttWiki tracker', 15 | license => 'GPL', 16 | changed => '2004-12-07' 17 | ); 18 | 19 | # privmsg handler 20 | sub muttwiki_poll { 21 | my($data, $server, $item)=@_; 22 | #my($target,$text)=split(/ :/,$data,2); 23 | #my $dest=($data=~/^#/?$target:$nick); 24 | 25 | # fork to avoid delay 26 | my($rh,$wh); 27 | pipe($rh,$wh); 28 | my $pid=fork(); 29 | if(defined($pid)) { 30 | # parent 31 | if($pid>0) { 32 | close($wh); 33 | Irssi::pidwait_add($pid); 34 | my $tag; 35 | my @args=($rh, \$tag, $data, $server, $item); 36 | $tag=Irssi::input_add(fileno($rh),INPUT_READ,\&pipe_input,\@args); 37 | return; 38 | } 39 | # child, do the stuff (write output to $wh) 40 | close($rh); 41 | # ------------------------------------------------------------------------ 42 | #MuttFaq/Appearance 6:17 pm (2 changes) [undo spam] . . . . . DSL01.212.114.235.62.NEFkom.net 43 | #Glanzmann 8:25 am . . . . . Glanzmann 44 | #RecentChanges 1:58 pm (edit) [reformatting] . . . . . Myon 45 | 46 | my $f = "wget -O - -q 'http://wiki.mutt.org/index.cgi?action=rc&days=1&showedit=1' |"; 47 | my $s = "/home/cb/.irssi/muttwiki.dat"; 48 | 49 | my %S; 50 | my %N; 51 | 52 | if(-e $s) { 53 | open S, "$s" or die "$s: $!"; 54 | while() { 55 | chomp; 56 | $S{$_} = 1; 57 | } 58 | close S; 59 | } 60 | 61 | open F, "$f" or die "$f: $!"; 62 | my $opened = 0; 63 | while() { 64 | if(/^
  • ]*>//g; 67 | s/^\(diff\) //; 68 | s/\(\d+ changes\) //; 69 | s/\(edit\) //; 70 | s/ \d{1,2}:\d\d [ap]m //; 71 | s/(.*) \. \. \. \. \. (.*)/$2 changed $1/; 72 | unless($opened) { 73 | open S, ">$s" or die ">$s: $!"; 74 | $opened = 1; 75 | } 76 | print S "$_\n"; 77 | push @{$N{$2}}, $1 unless $S{$_}; 78 | } 79 | } 80 | close S if $opened; 81 | close F; 82 | 83 | if(%N) { 84 | print $wh "MuttWiki: ", (join "; ", map { "$_ changed ". join ", ", @{$N{$_}}; } sort keys %N), "\n"; 85 | } 86 | 87 | # announce mutt PRs 88 | my $prfile = "/home/cb/.irssi/mutt-newpr"; 89 | if(-f $prfile) { 90 | open M, $prfile; 91 | while() { 92 | print $wh "New PR:$_"; 93 | } 94 | close M; 95 | unlink $prfile; 96 | } 97 | 98 | # ------------------------------------------------------------------------ 99 | close($wh); 100 | POSIX::_exit(1); 101 | } 102 | } # sub muttwiki_poll 103 | 104 | sub pipe_input { 105 | my($rh, $tag, $data, $server, $item)=@{$_[0]}; 106 | my $text; 107 | $text.=$_ foreach <$rh>; 108 | close($rh); 109 | Irssi::input_remove($$tag); 110 | foreach my $line (split("\n",$text)) { 111 | #$server->command("msg $dest $line"); 112 | $server->command("msg -freenode2 #mutt $line"); 113 | } 114 | } 115 | 116 | sub on_event_privmsg { 117 | my ($server, $data, $user, $address) = @_; 118 | my ($target, $line) = split(/ :/, $data, 2); 119 | my $dest = ($data =~ /^#/ ? $target : $user); 120 | 121 | if ($dest eq '#mutt' and $line =~ /^Tauon[:,] ping/) { 122 | #$server->command("msg -freenode2 #mutt $user: pong"); 123 | muttwiki_poll($data, $server, ""); 124 | } 125 | } 126 | 127 | 128 | Irssi::signal_add_last('event privmsg','on_event_privmsg'); 129 | command_bind 'muttwiki' => sub { muttwiki_poll(@_) }; 130 | 131 | # vim:sw=4: 132 | -------------------------------------------------------------------------------- /.irssi/scripts/nickcolor.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use Irssi 20020101.0250 (); 3 | use vars qw($VERSION %IRSSI); 4 | $VERSION = "1"; 5 | %IRSSI = ( 6 | authors => "Timo Sirainen, Ian Peters", 7 | contact => "tss\@iki.fi", 8 | name => "Nick Color", 9 | description => "assign a different color for each nick", 10 | license => "Public Domain", 11 | url => "http://irssi.org/", 12 | changed => "2002-03-04T22:47+0100" 13 | ); 14 | 15 | # hm.. i should make it possible to use the existing one.. 16 | Irssi::theme_register([ 17 | 'pubmsg_hilight', '{pubmsghinick $0 $3 $1}$2' 18 | ]); 19 | 20 | my %saved_colors; 21 | my %session_colors = {}; 22 | my @colors = qw/2 3 4 5 6 7 9 10 11 12 13/; 23 | 24 | sub load_colors { 25 | open COLORS, "$ENV{HOME}/.irssi/saved_colors"; 26 | 27 | while () { 28 | # I don't know why this is necessary only inside of irssi 29 | my @lines = split "\n"; 30 | foreach my $line (@lines) { 31 | my($nick, $color) = split ":", $line; 32 | $saved_colors{$nick} = $color; 33 | } 34 | } 35 | 36 | close COLORS; 37 | } 38 | 39 | sub save_colors { 40 | open COLORS, ">$ENV{HOME}/.irssi/saved_colors"; 41 | 42 | foreach my $nick (sort keys %saved_colors) { 43 | print COLORS "$nick:$saved_colors{$nick}\n"; 44 | } 45 | 46 | close COLORS; 47 | } 48 | 49 | # If someone we've colored (either through the saved colors, or the hash 50 | # function) changes their nick, we'd like to keep the same color associated 51 | # with them (but only in the session_colors, ie a temporary mapping). 52 | 53 | #sub sig_nick { 54 | # my ($server, $newnick, $nick, $address) = @_; 55 | # my $color; 56 | # 57 | # $newnick = substr ($newnick, 1) if ($newnick =~ /^:/); 58 | # 59 | # if ($color = $saved_colors{$nick}) { 60 | # $session_colors{$newnick} = $color; 61 | # } elsif ($color = $session_colors{$nick}) { 62 | # $session_colors{$newnick} = $color; 63 | # } 64 | #} 65 | 66 | # This gave reasonable distribution values when run across 67 | # /usr/share/dict/words 68 | 69 | sub simple_hash { 70 | my ($string) = @_; 71 | chomp $string; 72 | my @chars = split //, $string; 73 | my $counter; 74 | 75 | foreach my $char (@chars) { 76 | $counter += ord $char; 77 | } 78 | 79 | $counter = $colors[$counter % 11]; 80 | 81 | return $counter; 82 | } 83 | 84 | # FIXME: breaks /HILIGHT etc. 85 | sub sig_public { 86 | my ($server, $msg, $nick, $address, $target) = @_; 87 | my $chanrec = $server->channel_find($target); 88 | return if not $chanrec; 89 | my $nickrec = $chanrec->nick_find($nick); 90 | return if not $nickrec; 91 | my $nickmode = $nickrec->{op} ? "@" : $nickrec->{voice} ? "+" : ""; 92 | 93 | # Has the user assigned this nick a color? 94 | my $color = $saved_colors{$nick}; 95 | 96 | # Have -we- already assigned this nick a color? 97 | if (!$color) { 98 | $color = $session_colors{$nick}; 99 | } 100 | 101 | # Let's assign this nick a color 102 | if (!$color) { 103 | $color = simple_hash $nick; 104 | $session_colors{$nick} = $color; 105 | } 106 | 107 | $color = "0".$color if ($color < 10); 108 | $server->command('/^format pubmsg {pubmsgnick $2 {pubnick '.chr(3).$color.'$0}}' . 109 | ($color == 15 ? chr(3).$color : "") . '$1'); 110 | } 111 | 112 | sub cmd_color { 113 | my ($data, $server, $witem) = @_; 114 | my ($op, $nick, $color) = split " ", $data; 115 | 116 | $op = lc $op; 117 | 118 | if (!$op) { 119 | Irssi::print ("No operation given"); 120 | } elsif ($op eq "save") { 121 | save_colors; 122 | } elsif ($op eq "set") { 123 | if (!$nick) { 124 | Irssi::print ("Nick not given"); 125 | } elsif (!$color) { 126 | Irssi::print ("Color not given"); 127 | } elsif ($color < 0 || $color > 15) { 128 | Irssi::print ("Color must be between 0 and 15 inclusive"); 129 | } else { 130 | $saved_colors{$nick} = $color; 131 | } 132 | } elsif ($op eq "clear") { 133 | if (!$nick) { 134 | Irssi::print ("Nick not given"); 135 | } else { 136 | delete ($saved_colors{$nick}); 137 | } 138 | } elsif ($op eq "list") { 139 | Irssi::print ("Saved Colors:"); 140 | foreach my $nick (keys %saved_colors) { 141 | Irssi::print (chr (3) . "$saved_colors{$nick}$nick" . 142 | chr (3) . "1 ($saved_colors{$nick})"); 143 | } 144 | } elsif ($op eq "preview") { 145 | Irssi::print ("\nAvailable colors:" . 146 | join('', map { chr (3) . "$_" . " #$_"; } (0..15)) ); 147 | } else { 148 | Irssi::print ("Available commands: save, set , clear , list, preview"); 149 | } 150 | } 151 | 152 | load_colors; 153 | 154 | Irssi::command_bind('color', 'cmd_color'); 155 | 156 | Irssi::signal_add('message public', 'sig_public'); 157 | #Irssi::signal_add('event nick', 'sig_nick'); 158 | -------------------------------------------------------------------------------- /.irssi/scripts/pisgcommits.pl: -------------------------------------------------------------------------------- 1 | # pisgcommits.pl 2 | # vim:ts=4 3 | 4 | # procmail part: 5 | #:0ci 6 | #* ^From: .* <.*@users.sourceforge.net> 7 | #* ^From: .* <\/[^@]* 8 | #* ^To: pisg-commits@lists.sourceforge.net 9 | #| ( perl -ne 'print "$1: " if /^Subject: (.*)/; $l = 0 unless /./; chomp; print "$_ " if $l; $l = 1 if /^Log Message/' ; echo "($MATCH)" ) >> .irssi/pisg-commits 10 | 11 | # irssi part: 12 | #/script load pisgcommits 13 | #/timer add pisg 3600 0 pisgcommits 14 | 15 | use strict; 16 | use POSIX; 17 | # version info 18 | use vars qw($VERSION %IRSSI); 19 | use Irssi 20020325 qw (command_bind command_runsub command timeout_add timeout_remove signal_add_first); 20 | 21 | $VERSION = "1.0"; 22 | %IRSSI = ( 23 | authors => 'cb@df7cb.de', 24 | name => 'pisgcommits', 25 | description => 'Pisg tracker', 26 | license => 'GPL', 27 | changed => '2006-01-13' 28 | ); 29 | 30 | # privmsg handler 31 | sub pisg_poll { 32 | my($data, $server, $item)=@_; 33 | #my($target,$text)=split(/ :/,$data,2); 34 | #my $dest=($data=~/^#/?$target:$nick); 35 | 36 | # fork to avoid delay 37 | my($rh,$wh); 38 | pipe($rh,$wh); 39 | my $pid=fork(); 40 | if(defined($pid)) { 41 | # parent 42 | if($pid>0) { 43 | close($wh); 44 | Irssi::pidwait_add($pid); 45 | my $tag; 46 | my @args=($rh, \$tag, $data, $server, $item); 47 | $tag=Irssi::input_add(fileno($rh),INPUT_READ,\&pipe_input,\@args); 48 | return; 49 | } 50 | # child, do the stuff (write output to $wh) 51 | close($rh); 52 | # ------------------------------------------------------------------------ 53 | 54 | my $prfile = "/home/cb/.irssi/pisg-commits"; 55 | if(-f $prfile) { 56 | open M, $prfile; 57 | while() { 58 | print $wh "$_"; 59 | } 60 | close M; 61 | unlink $prfile; 62 | } 63 | 64 | # ------------------------------------------------------------------------ 65 | close($wh); 66 | POSIX::_exit(1); 67 | } 68 | } 69 | 70 | sub pipe_input { 71 | my($rh, $tag, $data, $server, $item)=@{$_[0]}; 72 | my $text; 73 | $text.=$_ foreach <$rh>; 74 | close($rh); 75 | Irssi::input_remove($$tag); 76 | foreach my $line (split("\n",$text)) { 77 | $server->command("msg -quakenet #pisg $line"); 78 | } 79 | } 80 | 81 | #Irssi::signal_add_last('event privmsg','on_event_privmsg'); 82 | command_bind 'pisgcommits' => sub { pisg_poll(@_) }; 83 | -------------------------------------------------------------------------------- /.irssi/scripts/queryresume.pl: -------------------------------------------------------------------------------- 1 | # QueryResume by Stefan Tomanek 2 | # 3 | # Modified by Joerg Jaspert and Christoph Berg 4 | # : 5 | # - Works in channels or queries now. 6 | # - doesnt print the box, so it restores how the window looked before you 7 | # closed it, including timestamps (code stolen from buf.pl). 8 | # - One exception - it only restores chat text, not crap like whois. 9 | 10 | use strict; 11 | 12 | use vars qw($VERSION %IRSSI); 13 | $VERSION = '2003021201'; 14 | %IRSSI = ( 15 | authors => 'Stefan \'tommie\' Tomanek', 16 | contact => 'stefan@pico.ruhr.de', 17 | name => 'QueryResume', 18 | description => 'restores the last lines of a query on re-creation', 19 | license => 'GPLv2', 20 | modules => 'Date::Format File::Glob', 21 | changed => $VERSION, 22 | ); 23 | 24 | use Irssi 20020324; 25 | use POSIX qw(strftime); 26 | use File::Glob ':glob'; 27 | 28 | my $timestamp_re = '^--- (?:Log opened|Day changed) ([^:]+) '; 29 | 30 | sub sig_window_item_new ($$) { 31 | my ($win, $witem) = @_; 32 | return unless (ref $witem && $witem->{type} eq 'QUERY'); 33 | #return unless (ref $witem); 34 | my @data; 35 | my $filename = Irssi::settings_get_str('autolog_path'); 36 | my $servertag = $witem->{server}->{tag}; 37 | my $name = lc $witem->{name}; 38 | $filename =~ s/\$tag\b|\$\{tag\}|\$1\b|\$\{1\}/$servertag/g; 39 | $filename =~ s/\$0\b|\$\{0\}/$name/g; 40 | my @lt = localtime(time); 41 | $filename = strftime($filename, @lt); 42 | $filename =~ s/(\[|\])/\\$1/g; 43 | local *F; 44 | open(F, "<".bsd_glob($filename)) or return; 45 | my $lines = Irssi::settings_get_int('queryresume_lines'); 46 | my $timestamp_line; 47 | my $timestamp_day = ""; 48 | 49 | #--- Log opened Do Jul 06 00:00:01 2006 50 | #--- Day changed Do Jul 06 2006 51 | #02:03 -!- Irssi: Starting query in oftc with Ganneff 52 | #--- Log closed Fr Jul 07 00:00:36 2006 53 | 54 | foreach () { 55 | next if (/^--- Log closed/ || /^[\d:]+ [(-]![-)] /); 56 | if (/$timestamp_re/o) { 57 | if ($timestamp_day eq $1) { 58 | next; 59 | } else { 60 | pop(@data) if ($timestamp_line); # remove repeated timestamp lines 61 | $timestamp_line = 1; 62 | $timestamp_day = $1; 63 | s/ \d\d:\d\d:\d\d//; 64 | } 65 | } else { 66 | $timestamp_line = 0; 67 | } 68 | push(@data, $_); 69 | if (@data > $lines) { 70 | if ($data[0] =~ /$timestamp_re/o) { 71 | splice @data, 1, 1; # keep the first timestamp line 72 | if ($data[1] =~ /$timestamp_re/o) { # nothing interesting left for this day 73 | shift @data; 74 | } 75 | } else { 76 | shift @data; 77 | } 78 | } 79 | } 80 | pop @data if ($data[-1] =~ /$timestamp_re/o); 81 | my $text = join '', @data; 82 | 83 | my $view = $win->view; 84 | $view->remove_all_lines(); 85 | $view->redraw(); 86 | $win->gui_printtext_after(undef, MSGLEVEL_NEVER, "--- Reading log $filename\n$text"); 87 | $view->redraw(); 88 | } 89 | 90 | Irssi::settings_add_int($IRSSI{name}, 'queryresume_lines', 15); 91 | 92 | Irssi::signal_add('window item new', 'sig_window_item_new'); 93 | 94 | # vim:sw=4: 95 | -------------------------------------------------------------------------------- /.irssi/scripts/quiet.pl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006 Christoph Berg 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 1. Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | # SUCH DAMAGE. 24 | 25 | # This script adds support for +q (quiet user) channel modes to irssi. 26 | 27 | use strict; 28 | use Irssi; 29 | use Irssi::Irc; 30 | use vars qw($VERSION %IRSSI); 31 | 32 | $VERSION = '0.2'; 33 | %IRSSI = ( 34 | authors => 'Christoph Berg', 35 | contact => 'cb@df7cb.de', 36 | name => 'quiet', 37 | description => 'support for +q (quiet user) channel mode', 38 | license => '2-clause BSD', 39 | ); 40 | 41 | # :helium.oftc.net 344 Tauon #test test!*@* cryogen!stu@o.net 1164222156 42 | # :helium.oftc.net 345 Tauon #test :End of Channel Quiet List 43 | 44 | sub event_quiet_list 45 | { 46 | my ($server, $data, $srvname) = @_; 47 | my ($target, $channel, $mask, $by, $time) = split(/\s+/, $data); 48 | $time = time() - $time if $time; 49 | $server->window_find_item($channel)->printformat(MSGLEVEL_CRAP, 50 | $by ? "quietlist_long" : "quietlist", $channel, $mask, $by, $time); 51 | } 52 | 53 | sub event_quiet_list_end 54 | { 55 | my ($server, $data, $srvname) = @_; 56 | my ($target, $channel, $text) = split(/\s+/, $data, 3); 57 | $text =~ s/^://; 58 | $server->window_find_item($channel)->print($text, MSGLEVEL_CRAP); 59 | } 60 | 61 | sub do_quiet 62 | { 63 | my ($data, $server, $witem, $quiet) = @_; 64 | my $support = $server->isupport("CHANMODES"); 65 | if ($support !~ /q/) { 66 | Irssi::print("This server does not support channel mode +q"); 67 | return; 68 | } 69 | if (!$witem or $witem->{type} ne "CHANNEL") { 70 | Irssi::print("Not joined to any channel"); 71 | return; 72 | } 73 | my @data = split /\s+/, $data; 74 | my $mode = @data > 0 ? ($quiet ? "+" : "-") . ("q" x (@data)) . " @data" : "+q"; 75 | $witem->command("mode $witem->{name} $mode"); 76 | } 77 | 78 | sub quiet { do_quiet(@_, 1); } 79 | sub unquiet { do_quiet(@_, 0); } 80 | 81 | Irssi::theme_register([ 82 | "quietlist" => '{channel $0}: ban quiet {ban $1}', 83 | "quietlist_long" => '{channel $0}: ban quiet {ban $1} {comment by {nick $2}, $3 secs ago}', 84 | ]); 85 | 86 | Irssi::signal_add("event 344", "event_quiet_list"); 87 | Irssi::signal_add("event 345", "event_quiet_list_end"); 88 | 89 | Irssi::command_bind('quiet', 'quiet'); 90 | Irssi::command_bind('unquiet', 'unquiet'); 91 | -------------------------------------------------------------------------------- /.irssi/scripts/scrmable.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/df7cb/dotfiles/6ccc810298851fbbc240191d71712aa52963a741/.irssi/scripts/scrmable.pl -------------------------------------------------------------------------------- /.irssi/scripts/timer.pl: -------------------------------------------------------------------------------- 1 | # Fixes for multiple servers and window items by dg 2 | # 3 | # 2003-08-27 coekie: 4 | # - use item names and server tags, fixes irssi crash if window item or server is destroyed 5 | # 6 | # 2003-08-19 7 | # - changed timer stop code a bit. 8 | # should fix the random timer o.O never happened to me before. 9 | # 10 | # 2002-12-21 darix: 11 | # - nearly complete rewrite ;) the old version wasnt "use strict;" capable =) 12 | # - still some warnings with "use warnings;" 13 | # - use of command_runsub now :) 14 | # 15 | 16 | use strict; 17 | use Data::Dumper; 18 | use warnings; 19 | use vars qw ($VERSION %IRSSI); 20 | use Irssi 20020325 qw (command_bind command_runsub command timeout_add timeout_remove signal_add_first); 21 | 22 | $VERSION = '0.5'; 23 | %IRSSI = ( 24 | authors => 'Kimmo Lehto, Marcus Rueckert', 25 | contact => 'kimmo@a-men.org, darix@irssi.org' , 26 | name => 'Timer', 27 | description => 'Provides /timer command for mIRC/BitchX type timer functionality.', 28 | license => 'Public Domain', 29 | changed => '2003-08-27' 30 | ); 31 | 32 | our %timers; 33 | # my %timer = { repeat => \d+, command => '' , windowitem => NULL , server=> NULL, timer = NULL}; 34 | 35 | sub timer_command { 36 | my ( $name ) = @_; 37 | if ( exists ( $timers{$name} ) ) { 38 | if ( $timers{$name}->{'repeat'} != -1 ) { 39 | if ( $timers{$name}->{'repeat'}-- == 0) { 40 | cmd_timerstop( $name ); 41 | return; 42 | } 43 | } 44 | 45 | my ($server, $item); 46 | if ($timers{$name}->{'server'}) { 47 | $server = Irssi::server_find_tag( $timers{$name}->{'server'} ); 48 | } 49 | if ( $server ) { 50 | if ( $timers{$name}->{'windowitem'}) { 51 | $item = $server->window_find_item( $timers{$name}->{'windowitem'} ); 52 | } 53 | ($item ? $item : $server)->command( $timers{$name}->{'command'} ); 54 | } else { 55 | command( $timers{$name}->{'command'} ); 56 | } 57 | } 58 | } 59 | 60 | sub cmd_timerstop { 61 | my ( $name ) = @_; 62 | 63 | if ( exists ( $timers{$name} ) ) { 64 | timeout_remove($timers{$name}->{'timer'}); 65 | $timers{$name} = (); 66 | delete ( $timers{$name} ); 67 | print( CRAP "Timer \"$name\" stopped." ); 68 | } 69 | else { 70 | print( CRAP "\cBTimer:\cB No such timer \"$name\"." ); 71 | } 72 | } 73 | 74 | sub cmd_timer_help { 75 | print ( < [] 79 | TIMER STOP 80 | 81 | repeat value of 0 means unlimited too 82 | 83 | EOF 84 | ); 85 | } 86 | 87 | command_bind 'timer add' => sub { 88 | my ( $data, $server, $item ) = @_; 89 | my ( $name, $interval, $times, $command ); 90 | 91 | if ( $data =~ /^\s*(\w+)\s+(\d+)\s+(-?\d+)\s+(.*)$/ ) { 92 | ( $name, $interval, $times, $command ) = ( $1, $2, $3, $4 ); 93 | $times = -1 if ( $times == 0 ); 94 | } 95 | elsif ( $data =~ /^\s*(\w+)\s+(\d+)\s+(.*)$/ ) 96 | { 97 | ( $name, $interval, $times, $command ) = ( $1, $2, -1, $3 ); 98 | } 99 | else { 100 | print( CRAP "\cBTimer:\cB parameters not understood. commandline was: timer add $data"); 101 | return; 102 | }; 103 | 104 | if ( $times < -1 ) { 105 | print( CRAP "\cBTimer:\cB repeat should be greater or equal to -1" ); 106 | return; 107 | }; 108 | 109 | if ( $command eq "" ) { 110 | print( CRAP "\cBTimer:\cB command is empty commandline was: timer add $data" ); 111 | return; 112 | }; 113 | 114 | if ( exists ( $timers{$name} ) ) { 115 | print( CRAP "\cBTimer:\cB Timer \"$name\" already active." ); 116 | } 117 | else { 118 | #$timers{$name} = {}; 119 | $timers{$name}->{'repeat'} = $times; 120 | $timers{$name}->{'interval'} = $interval; 121 | $timers{$name}->{'command'} = $command; 122 | if ($item) { 123 | $timers{$name}->{'windowitem'} = $item->{'name'}; 124 | } 125 | if ($server) { 126 | $timers{$name}->{'server'} = $server->{'tag'}; 127 | } 128 | 129 | if ( $times == -1 ) { 130 | $times = 'until stopped.'; 131 | } 132 | else { 133 | $times .= " times."; 134 | } 135 | 136 | print( CRAP "Starting timer \"$name\" repeating \"$command\" every $interval seconds $times" ); 137 | 138 | $timers{$name}->{'timer'} = timeout_add( $interval * 1000, \&timer_command, $name ); 139 | } 140 | }; 141 | 142 | command_bind 'timer list' => sub { 143 | print( CRAP "Active timers:" ); 144 | foreach my $name ( keys %timers ) { 145 | my $msg = "$name = $timers{$name}->{'command'} every $timers{$name}->{'interval'}s"; 146 | if ( $timers{$name}->{repeat} == -1 ) { 147 | print( CRAP "$msg (until stopped)"); 148 | } 149 | else { 150 | print( CRAP "$msg ($timers{$name}->{'repeat'} repeats left)" ); 151 | } 152 | } 153 | print( CRAP "End of /timer list" ); 154 | }; 155 | 156 | command_bind 'timer stop' => sub { 157 | my ( $data, $server, $item ) = @_; 158 | cmd_timerstop ($data); 159 | }; 160 | 161 | command_bind 'timer help' => sub { cmd_timer_help() }; 162 | 163 | command_bind 'timer' => sub { 164 | my ( $data, $server, $item ) = @_; 165 | $data =~ s/\s+$//g; 166 | command_runsub ( 'timer', $data, $server, $item ) ; 167 | }; 168 | 169 | 170 | signal_add_first 'default command timer' => sub { 171 | # 172 | # gets triggered if called with unknown subcommand 173 | # 174 | cmd_timer_help() 175 | } 176 | 177 | -------------------------------------------------------------------------------- /.irssi/scripts/topic-diff.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use vars qw($VERSION %IRSSI); 3 | 4 | use Irssi; 5 | 6 | $VERSION = '1.00'; 7 | %IRSSI = ( 8 | authors => 'Pascal Hakim', 9 | contact => 'pasc@redellipse.net', 10 | name => 'topic-diff', 11 | description => 'This script shows you changes in the topic. ', 12 | license => 'GPL' 13 | ); 14 | 15 | my %topics; 16 | 17 | sub new_channel { 18 | my ($channel) = @_; 19 | $topics{$channel->{server}->{tag}."_".$channel->{name}} = $channel->{topic}; 20 | } 21 | 22 | sub new_topic { 23 | my ($server, $channel, $topic, $user, $real) = @_; 24 | my $i; 25 | my $diff; 26 | my $i = 0; 27 | my $j = 0; 28 | my $k = 0; 29 | 30 | # $server->print ($channel, $server->{tag}); 31 | 32 | if ($topics{$server->{tag}."_".$channel}) { 33 | $topics{$server->{tag}."_".$channel} =~ s/^ +| +$//g; 34 | $topic =~ s/^ +| +$//g; 35 | my @original = split /\s*\|\s*|\s+-\s+/, $topics{$server->{tag}."_".$channel}; 36 | my @modified = split /\s*\|\s*|\s+-\s+/, $topic; 37 | 38 | 39 | outer: while( $i <= $#original) { 40 | if ($j <= $#modified && $original[$i] eq $modified[$j]) { 41 | $modified[$j] = ''; 42 | $i += 1; 43 | $j += 1; 44 | next; 45 | 46 | } else { 47 | # First two don't match, check the rest of the list 48 | for ($k = $j ; $k <= $#modified; $k++) { 49 | if ($modified[$k] eq $original[$i]) 50 | { 51 | $modified[$k] = ''; 52 | $i += 1; 53 | next outer; 54 | } 55 | } 56 | $diff = ($diff ? $diff." | " : "").$original[$i]; 57 | $i += 1; 58 | } 59 | } 60 | 61 | 62 | if ($diff ne '') { $server->print ($channel, "Topic: -: ".$diff);} 63 | 64 | $diff = join " | ", (grep {$_ ne ''} @modified); 65 | 66 | if ($diff ne '') { $server->print ($channel, "Topic: +: ".$diff);} 67 | 68 | } 69 | $topics{$server->{tag}."_".$channel} = $topic; 70 | 71 | } 72 | 73 | 74 | # Start by reading all the channels currently opened, and recording their topic 75 | 76 | my @channels = Irssi::channels () ; 77 | 78 | foreach my $channel (@channels) { 79 | $topics{$channel->{server}->{tag}."_".$channel->{name}} = $channel->{topic}; 80 | } 81 | 82 | # Topic has changed 83 | Irssi::signal_add 'message topic' => \& new_topic; 84 | 85 | # We've joined a new channel 86 | Irssi::signal_add 'channel joined' => \& new_channel; 87 | -------------------------------------------------------------------------------- /.irssi/scripts/topics.pl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/df7cb/dotfiles/6ccc810298851fbbc240191d71712aa52963a741/.irssi/scripts/topics.pl -------------------------------------------------------------------------------- /.lessfilter: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -d "$1" ] ; then 4 | echo "$1:" 5 | ls -alF "$1" 6 | exit 0 7 | fi 8 | 9 | case $1 in 10 | *.rpm) 11 | if [ -x "`which rpm`" ]; then 12 | echo "$1:" 13 | rpm -q -i -p "$1" 14 | echo 15 | echo '*** Requires:' 16 | rpm -q -R -p "$1" 17 | echo 18 | echo '*** Provides:' 19 | rpm -q --provides -p "$1" 20 | echo 21 | echo '*** Contents:' 22 | rpm -q -l -p "$1" 23 | echo 24 | echo '*** Scripts:' 25 | rpm -q --scripts -p "$1" 26 | else echo "rpm isn't available, no query on rpm package possible"; fi ;; 27 | 28 | *.zst) 29 | zstdcat "$1" ;; 30 | 31 | *) 32 | exit 1 ;; 33 | esac 34 | -------------------------------------------------------------------------------- /.lesskey: -------------------------------------------------------------------------------- 1 | #command 2 | - back-screen 3 | = toggle-option 4 | S toggle-option S 5 | \t next-file 6 | p prev-file 7 | ^H prev-file 8 |  prev-file 9 | 10 | #env 11 | # ?X and %[ work with less >= 382 12 | LESS=-aiMRq -PM?f%f:stdin. ?n?m(file %i of %m) ..?ltlines %lt-%lb?L/%L. :byte %bB?s/%s. .?e(END) ?x- Next\\: %x.:?pB%pB\\%..%t?X%[\033]0;less ?f%f:stdin.?m [%i/%m].\007. 13 | #LESSCHARSET=latin1 14 | -------------------------------------------------------------------------------- /.mailcap: -------------------------------------------------------------------------------- 1 | application/bbolin; /usr/games/tenace '%s'; test=test -n "$DISPLAY" 2 | application/ics; /usr/bin/icalendar '%s'; copiousoutput 3 | text/calendar; /usr/bin/icalendar '%s'; copiousoutput 4 | text/html; /usr/bin/w3m '%s'; needsterminal; description=HTML Text; nametemplate=%s.html; test=test -x /usr/bin/w3m 5 | text/html; /usr/bin/w3m -dump '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html; test=test -x /usr/bin/w3m 6 | image/*; geeqie '%s'; test=test -x /usr/bin/geeqie 7 | application/pdf; evince %s; test=test -n "$DISPLAY" 8 | application/pgp-encrypted; gpg --with-fingerprint '%s'; copiousoutput 9 | application/x-zip-compressed; unzip -l '%s'; copiousoutput 10 | application/xz; xzcat %s; copiousoutput 11 | -------------------------------------------------------------------------------- /.mime.types: -------------------------------------------------------------------------------- 1 | text/plain cbr 2 | application/bbolin lin 3 | message/rfc822 mbox 4 | application/xz xz 5 | -------------------------------------------------------------------------------- /.mutt/bind: -------------------------------------------------------------------------------- 1 | # vim:ft=muttrc: 2 | 3 | # key bindings 4 | bind editor \cN history-down 5 | bind editor \cP history-up 6 | 7 | bind alias - previous-page 8 | bind index - previous-page 9 | bind alias next-page 10 | bind browser next-page 11 | bind index next-page 12 | bind generic next-page 13 | #bind pager next-page 14 | bind pager previous-line 15 | bind pager next-line 16 | bind index previous-unread 17 | bind pager previous-unread 18 | bind index previous-unread 19 | bind pager previous-unread 20 | bind index next-unread 21 | bind pager next-unread 22 | bind index ^ link-threads 23 | bind pager ^ link-threads 24 | bind index & imap-fetch-mail 25 | bind pager & imap-fetch-mail 26 | bind index * toggle-new # this should be mark-as-new :-/ 27 | bind pager * mark-as-new # this should be toggle-new :-/ 28 | macro generic A :source~/.mutt/muttrc 'Re-read aliases/muttrc' 29 | #macro generic d s=deleted 'Move message to trash folder' 30 | #macro index d s=deleted 'Move message to trash folder' 31 | #macro pager d s=deleted 'Move message to trash folder' 32 | #macro index \cd 't;d' 'Move all messages in thread to trash folder' 33 | bind index D purge-message 34 | bind pager D purge-message 35 | macro index D ^ 36 | macro pager D ^ 37 | bind index F flag-message 38 | bind pager F flag-message 39 | bind index G last-entry 40 | bind pager G bottom 41 | macro index \ch "unset resolveNset resolve" 42 | macro index l 'macro index q ".bind index q quit"' 'limit with quit enabled' 43 | bind generic N search-opposite 44 | bind index N search-opposite 45 | bind pager N search-opposite 46 | #macro index q '?' 47 | #macro browser q '' 48 | bind browser v view-file 49 | bind index V collapse-thread 50 | bind index x sync-mailbox 51 | bind pager x sync-mailbox 52 | macro index = 's=' 'Save to ~/mail/' 53 | macro pager = 's=' 'Save to ~/mail/' 54 | 55 | bind compose send-message # = numeric keypad 56 | macro compose = 'f=' 'Fcc to ~/mail/' 57 | bind compose v view-attach 58 | 59 | macro index ,= "~=" "Purge duplicate messages" 60 | # index format with mailing list name 61 | macro index ,r "l~(!~R|~F)V" "Limit to threads with unread meassages" 62 | macro index ,p "l~(~p|~P)" "Limit to threads with my mail" 63 | 64 | macro pager S "S" "Save spam for processing with SA" 65 | macro index S "=Spam" "Save spam for processing with SA" 66 | 67 | #macro index ,d "|listmanage_mailman -d" 68 | -------------------------------------------------------------------------------- /.mutt/color: -------------------------------------------------------------------------------- 1 | # vim:ft=muttrc: 2 | uncolor index * 3 | uncolor header * 4 | uncolor body * 5 | 6 | # colors 7 | color normal default default 8 | color attachment brightyellow default 9 | color bold brightdefault default 10 | color error cyan default 11 | color hdrdefault cyan default 12 | color indicator default cyan 13 | color markers green default 14 | color message cyan default 15 | color signature cyan default 16 | color status brightgreen blue 17 | color tilde blue default 18 | color tree red default 19 | color underline brightdefault default 20 | 21 | color index blue default ~p 22 | color index green default ~P 23 | color index cyan default ~v 24 | color index magenta default "~C debian-news" 25 | color index yellow default "~C -announce" 26 | color index red default "~t debian-security-announce" 27 | color index yellow default '~y (aspell-de\|endeavour\|image-size\|ircmarkers\|usemod-wiki\|vcr\|xmms-coverviewer)' 28 | color index magenta default "~f henrik@hswn.dk" 29 | color index brightdefault default ~T 30 | color index brightdefault default ~F 31 | color index white default ~D 32 | 33 | #color index_author red default . 34 | #color index_number blue default 35 | 36 | color header brightdefault default "^From:" 37 | color header blue default "^(Date|To|Reply-To|Cc|Message-Id):" 38 | color header brightred default "^Subject:" 39 | color header red default "^User-Agent:" 40 | color quoted green default 41 | color quoted1 cyan default 42 | color quoted2 blue default 43 | color quoted3 red default 44 | color body blue default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" 45 | color body blue default "(https?|ftp)://[\-\.\,/%&~_:?\#=a-zA-Z0-9]+" 46 | 47 | # hilight diffs 48 | color body blue default "^@@ .* @@$" 49 | color body red default '^-.*' 50 | color body green default '^\+.*' 51 | color body default red '^--- .*' 52 | color body default green '^\+\+\+ .*' 53 | color body magenta default '^[ +-](===|---|\+\+\+|@@|Index:) .*' # diff-in-diff 54 | color body default blue '^\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*' # context diff 55 | color body blue default '^! .*' # context diff 56 | -------------------------------------------------------------------------------- /.mutt/fortunes-de: -------------------------------------------------------------------------------- 1 | % 2 | ... seufz... man kann dreissig werden und muss immernoch man mount 3 | lesen ... ich werde tellerwaescher :) 4 | % 5 | kann ein huhn debian installieren, wenn man genügend körner auf die 6 | entertaste streut? 7 | DAS sind die fragen die die welt bewegen. 8 | % 9 | der Antichrist ist unser Drucker hier unten 10 | das Ding hat ne schwarze Seele 11 | Das spart Toner 12 | % 13 | ich hab gerade einen rechner im keller gefunden der beim letzten 14 | installationsschrit vom D-I war 15 | seit 76 tagen 16 | % 17 | ab wieviel Hash Joins ueberschreitet man eigentlich die Menge fuer 18 | den privaten Gebrauch? 19 | % 20 | verdammt, ich muss entweder schneller tippen oder meine 21 | tastenwiederholrate fiixen 22 | % 23 | Dieses Projekt ... *grummel* 24 | befreie dich von sachen die wehtuhen :x 25 | % 26 | -------------------------------------------------------------------------------- /.mutt/headers: -------------------------------------------------------------------------------- 1 | # vim:ft=muttrc: 2 | 3 | # headers 4 | ignore * 5 | unignore From\ Date: From: Reply-To: To: Cc: Bcc: Subject: X-Debian X-MIA-Summary 6 | 7 | unhdr_order * 8 | hdr_order From\ Date: From: Reply-To: To: Cc: Bcc: Subject: 9 | 10 | # MIME config 11 | auto_view application/ics text/calendar text/html application/pgp-encrypted 12 | alternative_order text/plain text/html 13 | mime_lookup application/octet-stream 14 | -------------------------------------------------------------------------------- /.mutt/hooks: -------------------------------------------------------------------------------- 1 | # vim:ft=muttrc: 2 | unhook folder-hook 3 | unhook message-hook 4 | unhook send-hook 5 | 6 | folder-hook . "set narrow_tree=no" 7 | folder-hook oss.postgresql "set narrow_tree" 8 | 9 | folder-hook . 'set xterm_title="$my_profile %f %r [%?M?%M/?%m%?n? N:%n?%?o? O:%o?]%?b? Inc:%b? Mutt"' 10 | 11 | folder-hook debian|lists|mutt 'push ,r' 12 | folder-hook . 'push ' 13 | 14 | send-hook . "set pgp_autoinline=no mime_forward=ask-yes" 15 | send-hook '~t (majordomo\|-request\|fleas)@' "unset mime_forward" 16 | send-hook '~t debian\.org$' "set from=myon@debian.org" 17 | send-hook '~t rt\.debian\.org$' "set pgp_autoinline" 18 | send2-hook 'debian.org' "set from=myon@debian.org" 19 | 20 | # don't bug me with bugs 21 | send-hook . 'unmy_hdr X-Debbugs-No-Ack:' 22 | send-hook '~C bugs\.debian\.org$' 'my_hdr X-Debbugs-No-Ack: please' 23 | -------------------------------------------------------------------------------- /.mutt/muttrc: -------------------------------------------------------------------------------- 1 | set folder="~/mail" 2 | #set folder="imaps://localhost/" 3 | 4 | # external files 5 | source ~/.mutt/options 6 | source ~/.mutt/bind 7 | source ~/.mutt/color 8 | source ~/.mutt/headers 9 | source ~/.mutt/hooks 10 | 11 | set from="cb@df7cb.de" 12 | set postponed="=cb/postponed" 13 | set signature="~/.priv/mutt/signature.cb@df7cb.de" 14 | set spoolfile="=cb/INBOX" 15 | set record="!" 16 | 17 | # aliases 18 | source `if [ -f ~/.priv/mutt/aliases ] ; then echo ~/.priv/mutt/aliases ; else echo /dev/null ; fi` 19 | 20 | source `if [ -f ~/.priv/mutt/account ] ; then echo ~/.priv/mutt/account ; else echo /dev/null ; fi` 21 | -------------------------------------------------------------------------------- /.mutt/options: -------------------------------------------------------------------------------- 1 | # vim:ft=muttrc: 2 | 3 | # options 4 | #set abort_nosubject 5 | set abort_unmodified 6 | set alias_file="~/.priv/mutt/aliases" 7 | set attribution="Re: %F" 8 | set auto_tag #smart_auto_tag 9 | unset beep 10 | #set beep_new 11 | set bounce 12 | unset bounce_delivered 13 | set certificate_file="~/.priv/mutt/certificates" 14 | unset collapse_unread 15 | unset confirmappend 16 | set confirmcreate 17 | set edit_headers 18 | set editor="vim -u ~/.priv/mutt/vimrc -c'/^$' -c'noh'" 19 | set envelope_from_address="cb@df7cb.de" use_envelope_from 20 | set delete=yes 21 | set fast_reply 22 | set fcc_attach 23 | set forward_format="%s (fwd)" 24 | set header_cache="~/.mutt/cache" message_cachedir="~/.mutt/message_cache" 25 | unset maildir_header_cache_verify 26 | #set message_cache_clean 27 | unset help 28 | #unset hidden_host 29 | set index_format="%Z %?M?%3Mm&%4c? %[%e.%m.%y %k:%M] %-15.15F %-10.10Y %s" 30 | set ispell="aspell --lang=de check" 31 | #set locale="de_DE.ISO-8859-1" 32 | unset markers 33 | set mbox_type=mbox 34 | set menu_context=5 35 | unset menu_move_off 36 | #set menu_scroll 37 | set mime_forward=ask-yes 38 | unset move 39 | set pager_index_lines=5 40 | set pager_stop 41 | unset pipe_decode 42 | set pipe_split 43 | set pgp_auto_decode 44 | set pgp_replyencrypt 45 | unset crypt_replysign 46 | set pgp_sign_as="0x12D2A7AE" 47 | set pgp_timeout=14400 smime_timeout=14400 48 | set pgp_use_gpg_agent 49 | set postponed="=postponed-msgs" 50 | set query_command="muttquery '%s'" 51 | set quit=ask-yes 52 | set quote_regexp="^([ \t]*[|>])+|^ ?[a-zA-Z]{,9}>" 53 | set read_inc=10 write_inc=10 54 | set record="!" 55 | set reply_regexp="^(re([\\[0-9\\]+])*|aw|antwort|betreff):[ \t]*" 56 | set reverse_name 57 | unset reverse_realname 58 | #set rfc2047_parameters 59 | #unset save_empty 60 | set send_charset="us-ascii:iso-8859-1:iso-8859-15:utf-8" 61 | unset sig_dashes 62 | set sleep_time="0" 63 | set sidebar_visible=no 64 | set simple_search="~f %s | ~s %s | ~C %s" 65 | set sleep_time="0" 66 | set status_format=" %f %r%?V? [%V]? [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?l? %l?]%?p? Post:%p?%?b? Inc:%b? (%s/%S) -%>- $my_profile - %P --" 67 | set status_on_top 68 | set sort=threads sort_aux=last-date 69 | set tilde 70 | set timeout=30 71 | set trash="=Trash" 72 | #set use_domain 73 | #set use_from 74 | unset wait_key 75 | #unset write_bcc 76 | set xterm_set_titles xterm_title="$my_profile %f %r [%?M?%M/?%m%?n? N:%n?%?o? O:%o?]%?b? Inc:%b? Mutt" 77 | 78 | #set crypt_use_gpgme 79 | #set crypt_use_pka 80 | 81 | #ifdef sidebar_visible set sidebar_visible sidebar_width=20 82 | 83 | unset smime_decrypt_use_default_key 84 | set smime_ca_location="~/.priv/smime/ca-certificates.crt" 85 | set smime_certificates="~/.priv/smime/certificates" smime_keys="~/.priv/smime/keys" 86 | set smime_default_key="e45f1751.0" smime_sign_as="e45f1751.0" 87 | 88 | # kill ^M in q-p input 89 | set smime_decrypt_command="echo Decrypting using key %k, recipient %c >&2 ; \ 90 | openssl smime -decrypt -passin stdin -inform DER -in %f -inkey %k -recip %c -signer /tmp/crt | sed -e 's/^=0D//'" 91 | set smime_verify_command="echo Verifying detached signature %s %f >&2 ; \ 92 | openssl smime -verify -inform DER -in %s %C -content %f -signer %f.crt ; \ 93 | test -f %f.crt && openssl x509 -noout -email -subject -issuer -fingerprint -dates -in %f.crt -noout >&2 ; \ 94 | rm -f %f.crt" 95 | set smime_verify_opaque_command="echo Verifying opaque signature %s >&2 ; \ 96 | openssl smime -verify -inform DER -in %s %C -signer %s.crt | sed -e 's/^=0D//' ; \ 97 | test -f %s.crt && openssl x509 -noout -email -subject -issuer -fingerprint -dates -in %s.crt -noout >&2 ; \ 98 | rm -f %s.crt" 99 | -------------------------------------------------------------------------------- /.pinforc: -------------------------------------------------------------------------------- 1 | # Here are some colour setting. 2 | # Whitespace between the entries is optional. 3 | # Format: 4 | # Color_ID = Foreground , Background ,forelight, backblink(light) 5 | # 6 | COL_NORMAL = COLOR_DEFAULT, COLOR_DEFAULT, NO_BOLD, NO_BLINK 7 | COL_MENUSELECTED = COLOR_RED , COLOR_DEFAULT, BOLD , NO_BLINK 8 | COL_MENU = COLOR_BLUE , COLOR_DEFAULT, BOLD , NO_BLINK 9 | COL_NOTESELECTED = COLOR_RED , COLOR_DEFAULT, BOLD , NO_BLINK 10 | COL_NOTE = COLOR_GREEN , COLOR_DEFAULT, BOLD , NO_BLINK 11 | COL_TOPLINE = COLOR_YELLOW , COLOR_BLUE , BOLD , NO_BLINK 12 | COL_BOTTOMLINE = COLOR_YELLOW , COLOR_BLUE , BOLD , NO_BLINK 13 | COL_MANUALBOLD = COLOR_DEFAULT, COLOR_DEFAULT, BOLD , NO_BLINK 14 | COL_MANUALITALIC = COLOR_DEFAULT, COLOR_DEFAULT, BOLD , NO_BLINK 15 | COL_URL = COLOR_MAGENTA, COLOR_DEFAULT, BOLD , NO_BLINK 16 | COL_URLSELECTED = COLOR_RED , COLOR_DEFAULT, BOLD , NO_BLINK 17 | COL_INFOHIGHLIGHT = COLOR_DEFAULT, COLOR_DEFAULT, BOLD , NO_BLINK 18 | COL_SEARCHHIGHLIGHT= COLOR_DEFAULT, COLOR_DEFAULT, BOLD , NO_BLINK 19 | 20 | # I find the defaults utterly confusing 21 | KEY_BACK_2='h' 22 | KEY_FOLLOWLINK_2='l' 23 | KEY_GOLINE_1='1' 24 | KEY_NEXTNODE_1='f' 25 | KEY_NEXTNODE_2=0 26 | KEY_SEARCH_AGAIN_1='n' 27 | -------------------------------------------------------------------------------- /.profile: -------------------------------------------------------------------------------- 1 | # Myon's profile settings (the non-obnoxious parts, hopefully) 2 | 3 | # If not running interactively, don't do anything 4 | [ -z "$PS1" ] && return 5 | 6 | # Prompt 7 | [ -f /etc/debian_chroot ] && chroot="$(cat /etc/debian_chroot)." 8 | screentitle='\[\ek\u@'"$chroot"'\h\e\\\]' 9 | xtitle='\[\e]0;\u@'"$chroot"'\h:\w\a\]' 10 | prompt='\[\e[1m\][$?] \A \u@'"$chroot"'\h:\w \$\[\e[0m\] ' 11 | case $TERM in 12 | screen*) PS1="$screentitle$xtitle$prompt" ;; 13 | xterm*|rxvt*|cygwin) PS1="$xtitle$prompt" ;; 14 | *) PS1="$prompt" ;; 15 | esac 16 | unset chroot screentitle xtitle prompt 17 | 18 | # Shell 19 | HISTCONTROL='erasedups' 20 | HISTIGNORE="..:[bf]g:cd:l:ls" 21 | unset ignoreeof 22 | shopt -s extglob no_empty_cmd_completion 23 | 24 | # Environment 25 | export EDITOR=vi 26 | export PAGER=less 27 | 28 | # Aliases 29 | alias ..='cd ..' 30 | alias ...='cd ../..' 31 | alias ....='cd ../../..' 32 | alias .....='cd ../../../..' 33 | alias j='jobs -l' 34 | alias l='ls -al' 35 | alias ls='ls -F --color=auto' 36 | alias md=mkdir 37 | alias o='$PAGER' 38 | alias pat='sudo puppet agent -t' 39 | alias tree='tree -F' 40 | alias rd=rmdir 41 | 42 | # Debian 43 | if [ -f /etc/debian_version ]; then 44 | if [ "${SCHROOT_SESSION_ID:-}" ] && command -v dd-schroot-cmd >/dev/null; then 45 | sudo_apt="dd-schroot-cmd -c $SCHROOT_SESSION_ID apt-get -y" 46 | else 47 | sudo_apt="sudo apt" 48 | fi 49 | alias agi="$sudo_apt install" 50 | alias agr="$sudo_apt remove" 51 | for verb in autoremove build-dep dist-upgrade update upgrade; do 52 | alias $verb="$sudo_apt $verb" 53 | done 54 | for verb in policy search show showpkg showsrc; do 55 | alias $verb="apt-cache $verb" 56 | done 57 | unset sudo_apt verb 58 | fi 59 | 60 | # Red Hat 61 | if [ -f /etc/redhat-release ]; then 62 | alias agi="sudo yum install" 63 | alias search="yum search" 64 | alias update="sudo yum check-update" 65 | alias upgrade="sudo yum upgrade" 66 | fi 67 | 68 | # Services 69 | if [ -d /run/systemd/system ]; then 70 | alias sc='sudo systemctl' 71 | alias scu='systemctl --user' 72 | status () { sudo systemctl status --full --no-pager "$@"; } 73 | do_systemctl () { 74 | local r 75 | sudo env -i /bin/systemctl "$@" 76 | r=$? 77 | sleep 0.2 78 | shift # remove start/stop/... 79 | status "$@" 80 | return $r 81 | } 82 | start () { do_systemctl start "$@"; } 83 | stop () { do_systemctl stop "$@"; } 84 | reload () { do_systemctl reload "$@"; } 85 | restart () { do_systemctl restart "$@"; } 86 | enable () { do_systemctl enable "$@"; } 87 | disable () { do_systemctl disable "$@"; } 88 | else 89 | start () { sudo env -i /usr/sbin/service $1 start; } 90 | stop () { sudo env -i /usr/sbin/service $1 stop; } 91 | status () { sudo /usr/sbin/service $1 status; } 92 | reload () { sudo env -i /usr/sbin/service $1 reload; } 93 | restart () { sudo env -i /usr/sbin/service $1 restart; } 94 | enable () { sudo /usr/sbin/update-rc.d $1 enable; } 95 | disable () { sudo /usr/sbin/update-rc.d $1 disable; } 96 | fi 97 | -------------------------------------------------------------------------------- /.quiltrc: -------------------------------------------------------------------------------- 1 | QUILT_DIFF_OPTS="-p" 2 | QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index" 3 | QUILT_PATCHES=debian/patches 4 | -------------------------------------------------------------------------------- /.reportbugrc: -------------------------------------------------------------------------------- 1 | mode expert 2 | mutt 3 | no-cc 4 | no-check-available 5 | no-check-installed 6 | no-query-bts 7 | no-query-source 8 | -------------------------------------------------------------------------------- /.screenrc: -------------------------------------------------------------------------------- 1 | # escape character is ^T, ^Tt for literal ^T 2 | escape ^tt 3 | 4 | # This is how one can set a reattach password: 5 | # password ODSJQf.4IJN7E # "1234" 6 | 7 | # no annoying visible bell, please 8 | bell_msg "" 9 | vbell off 10 | 11 | # detach on hangup 12 | autodetach on 13 | 14 | # don't display the copyright page 15 | startup_message off 16 | 17 | # emulate .logout message 18 | pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." 19 | 20 | defbce on 21 | term screen-bce 22 | 23 | msgwait 2 24 | 25 | # advertise hardstatus support to $TERMCAP 26 | # termcapinfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\' 27 | 28 | # make the shell in every window a login shell 29 | #shell -$SHELL 30 | 31 | deflogin off 32 | defmonitor on 33 | activity "" 34 | 35 | # autoaka testing 36 | # shellaka '> |tcsh' 37 | # shellaka '$ |sh' 38 | 39 | # set every new windows hardstatus line to somenthing descriptive 40 | # defhstatus "screen: ^En (^Et)" 41 | 42 | defscrollback 1000 43 | 44 | # don't kill window after the process died 45 | # zombie "^[" 46 | 47 | ################ 48 | # 49 | # xterm tweaks 50 | # 51 | 52 | #xterm understands both im/ic and doesn't have a status line. 53 | #Note: Do not specify im and ic in the real termcap/info file as 54 | #some programs (e.g. vi) will not work anymore. 55 | #termcap xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l 56 | #terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l 57 | 58 | #80/132 column switching must be enabled for ^AW to work 59 | #change init sequence to not switch width 60 | #termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l 61 | 62 | # Make the output buffer large for (fast) xterms. 63 | #termcapinfo xterm* OL=10000 64 | 65 | # tell screen that xterm can switch to dark background and has function 66 | # keys. 67 | #termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l' 68 | #termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' 69 | #termcapinfo xterm 'kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:kP=\E[H:kN=\E[6~' 70 | 71 | # special xterm hardstatus: use the window title. 72 | termcapinfo xterm*|rxvt* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' 73 | 74 | # use the xterm scrollback (disable alternate screen) 75 | termcapinfo xterm*|rxvt* ti@:te@ 76 | 77 | # our xterm has colors! (rxvt, too) 78 | #termcap xterm 'AF=\E[3%dm:AB=\E[4%dm' 79 | #terminfo xterm 'AF=\E[3%p1%dm:AB=\E[4%p1%dm' 80 | 81 | #terminfo xterm 'vb=\E[?5h$<200/>\E[?5l' 82 | #termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' 83 | 84 | # emulate part of the 'K' charset 85 | #termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337' 86 | 87 | # xterm-52 tweaks: 88 | # - uses background color for delete operations 89 | #termcapinfo xterm ut 90 | 91 | ################ 92 | # 93 | # other terminals 94 | # 95 | 96 | # Extend the vt100 desciption by some sequences. 97 | #termcap vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC 98 | #terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC 99 | 100 | 101 | ################ 102 | # 103 | # keybindings 104 | # 105 | 106 | #remove some stupid / dangerous key bindings 107 | bind k 108 | bind ^k 109 | bind . 110 | bind ^\ 111 | bind \\ 112 | bind ^h 113 | bind h 114 | #make them better 115 | bind 'K' kill 116 | bind 'I' login on 117 | bind 'O' login off 118 | bind '}' history 119 | 120 | # Yet another hack: 121 | # Prepend/append register [/] to the paste if ^a^] is pressed. 122 | # This lets me have autoindent mode in vi. 123 | register [ "\033:se noai\015a" 124 | register ] "\033:se ai\015a" 125 | bind ^] paste [.] 126 | 127 | ################ 128 | # 129 | # default windows 130 | # 131 | 132 | # screen -t local 0 133 | # screen -t mail 1 elm 134 | # screen -t 40 2 rlogin faui40 135 | 136 | # caption always "%3n %t%? @%u%?%? [%h]%?" 137 | # hardstatus alwaysignore 138 | # hardstatus alwayslastline "%w" 139 | 140 | caption always "%{wK}%Lw%=%u %H" 141 | -------------------------------------------------------------------------------- /.ssh/authorized_keys.skel: -------------------------------------------------------------------------------- 1 | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJDohj5bfj3+uRF/0sfN49+24BH8H08fiown0drCEUAK cb@df7cb.de 2 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC81q2tweMIusbPk+V49U2Hhg52mY2FagTRBRf+Py5ktmYhIr8GF5/q+vfIVjZzy+iEQBdV41uTO6OQgw64lGFvavU88lOq/g6n/ooxlbOnt7tkMDMk9irG6CfUyyBOri3QJw+zFHwydvqytnLz/nMsOzdInLG6plYL5eeV12Lbao+6WCTQuk7UcFv8Mfn1++Od+6a2A0k0Tzw7Jcz0HgpRHN8RRME5mBAIV7Cb2KVenjPEuo7VARYBhI9U47fuVHWg6zbr8iacXPcwN3ac+x91avMymhYHfx11nAoMQvu8Pu5BTqHm5lWkI29VkFKmYpRExGuUc3R8xXbk8zgnlBkmQJGebVUwFPLK9wQx1ZLRmbYHub3GImKC7NYvA0u2dck2vxMx20cO6KXxNhRZfx7S00o5/I9O6I1wr0tvWsOYRYDAM8iHyPry85muJeI/JIWSf1j1JHSSTZO/2H2T4ZObZge9D6vtmfWjsLFCPxXcIXq4Zji82JI9gw0fmtnz7se+zYU1cGTm3wmMj2d5AhHl3TXAUOPvA7awRc97oRESumB9CgoJJ5mw1rXOP+U+82Qh/T5uoon708WSB2N4wzyAtkY1ePDWW5pGMKyO1aZ+2DGk1n+eDFCIeRj3r3+PCtsn6hEd9637KYDYDiixb7RqJh1Ev8ck7o20pBicyNdmbQ== cardno:000604626832 Christoph Berg Yubikey 1 3 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC5dMSoQkXdeaZmjVxGKqeBWfeCTmLlJ4gaDdz3u6a0GYwj40kUSWdwH1TkHAGcQCL550mEQMTmTS2ABb1oOg8r4UpUQ+pplypZF6D38ZHcEQhm/wd82NmtrbcHsRB2o1B4dQ67AJ+4gmlCuSM2wJJiqF/Z8Vj5WLphsXn7ORlLHoN63YaUrQfhpNfK5KtCKIyDGgQVxrjwemeUy9nBTUi9nOiXh55PoQJQA7HiEPrXXh1iuxzHDbM5LCA8Vdhm1d1jbTr1z718/tQrUMhz/LoBpKn85t0xvJYuQnP53u7TZHUWrLBHieqiABJqhOm9+dbVwOtyj0s4i1I7Dnt7ox1k7hYNWBjLZD14RjG4soQA2tBXExvIO3cs+IXQMGAkGITD1fTVYhfnsO88/jf9jYoLHvDi4nCVi2XK/Yccq28VBSsH5EspIHoiw1Ku2bJ/jnaM1JKfzzcOrPr5+hizO9sjPrJYbW3AkL6rTu8KMAQnmfX2Fo16xg7qxh1iE0cvLgfIYNPwAcDXrsKYv0thwTApPsf09H8w2v6gBC6Piy5DQnQ8/ZtHTfcxrA2t/D2vth4T11C2TRPt+T4SYZjw7jsi2bRB27kmfEv4q89L5irdu/m51M6qWbmdkvL0LY8fH2Vs6jSUpk8O5AM7JFgdZsezbCOMxhPQcLLsNhX/WZk89w== cardno:9 622 330 Christoph Berg Yubikey 2 4 | -------------------------------------------------------------------------------- /.ssh/config: -------------------------------------------------------------------------------- 1 | # vim:ft=sshconfig: 2 | 3 | AddKeysToAgent yes 4 | #ForwardX11 yes 5 | HashKnownHosts no 6 | #IdentitiesOnly yes 7 | PermitLocalCommand yes 8 | LocalCommand terminal-title '%r@%h' 2>/dev/null 9 | NoHostAuthenticationForLocalhost yes 10 | NumberOfPasswordPrompts 2 11 | #ServerAliveInterval 120 12 | StrictHostKeyChecking accept-new 13 | VerifyHostkeyDNS yes 14 | GSSAPIAuthentication no 15 | ControlMaster auto 16 | ControlPath ~/.ssh/master-%r@%h:%p 17 | ControlPersist 1 18 | SendEnv LC_TZ 19 | 20 | Include ~/.priv/ssh/*.config 21 | 22 | Host github.com git.* salsa.debian.org 23 | User git 24 | -------------------------------------------------------------------------------- /.ssh/ssh-add-l: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for agent in $SSH_AUTH_SOCK agent-*; do 4 | case $agent in *.pid) continue ;; esac 5 | [ -t 1 ] && echo -ne "\e[32m" 6 | echo "$agent:" 7 | [ -t 1 ] && echo -ne "\e[0m" 8 | SSH_AUTH_SOCK=$agent ssh-add -l 9 | done 10 | -------------------------------------------------------------------------------- /.tigrc: -------------------------------------------------------------------------------- 1 | set commit-order = default 2 | set ignore-case = smart-case 3 | -------------------------------------------------------------------------------- /.urxvt/ext/3digits: -------------------------------------------------------------------------------- 1 | #! perl 2 | 3 | sub my_resource { 4 | my $self = shift; 5 | $self->x_resource ("$self->{name}.$_[0]"); 6 | } 7 | 8 | # turn a rendition spec in the resource into a sub that implements it on $_ 9 | sub parse_rend { 10 | my ($self, $str) = @_; 11 | my ($mask, $fg, $bg, $failed) = $str ? urxvt::rend2mask($str) 12 | : (urxvt::RS_Uline, undef, undef, []); 13 | warn "Failed to parse rendition string: " . join(',', @$failed) if @$failed; 14 | my @rend; 15 | push @rend, sub { $_ |= $mask } if $mask; 16 | push @rend, sub { $_ = urxvt::SET_FGCOLOR($_, $fg) } if defined $fg; 17 | push @rend, sub { $_ = urxvt::SET_BGCOLOR($_, $bg) } if defined $bg; 18 | sub { 19 | for my $s ( @rend ) { &$s }; 20 | } 21 | } 22 | 23 | sub on_start { 24 | my ($self) = @_; 25 | 26 | ($self->{name} = __PACKAGE__) =~ s/.*:://; 27 | $self->{name} =~ tr/_/-/; 28 | 29 | my @matchers; 30 | $self->{rend} = $self->parse_rend($self->my_resource("rend")); 31 | 32 | () 33 | } 34 | 35 | sub on_line_update { 36 | my ($self, $row) = @_; 37 | 38 | # fetch the line that has changed 39 | my $line = $self->line ($row); 40 | my $text = $line->t; 41 | 42 | return if (length($text) > 10000); 43 | 44 | while ($text =~ /\d{5,}/g) { 45 | my $rend = $line->r; 46 | 47 | # mark all characters as underlined. we _must_ not toggle underline, 48 | # as we might get called on an already-marked url. 49 | my $off = 0; 50 | for (my $i = $+[0] - 1; $i >= $-[0]; $i--) { 51 | next unless ($off++ % 6 >= 3); 52 | $_ = $rend->[$i]; 53 | &{$self->{rend}}; 54 | $rend->[$i] = $_; 55 | } 56 | 57 | $line->r ($rend); 58 | } 59 | } 60 | 61 | # vim:set sw=3 sts=3 et: 62 | -------------------------------------------------------------------------------- /.urxvt/ext/font-size.patch: -------------------------------------------------------------------------------- 1 | diff --git a/font-size b/font-size 2 | old mode 100755 3 | new mode 100644 4 | index e1fabe5..c55c057 5 | --- a/font-size 6 | +++ b/font-size 7 | @@ -175,8 +175,10 @@ sub on_action 8 | 9 | if ($action eq "increase") { 10 | fonts_change_size($self, $step, 0); 11 | + fonts_show($self); 12 | } elsif ($action eq "decrease") { 13 | fonts_change_size($self, -$step, 0); 14 | + fonts_show($self); 15 | } elsif ($action eq "incglobal") { 16 | fonts_change_size($self, $step, 1); 17 | } elsif ($action eq "decglobal") { 18 | @@ -187,6 +189,7 @@ sub on_action 19 | fonts_change_size($self, -$step, 2); 20 | } elsif ($action eq "reset") { 21 | fonts_reset($self); 22 | + fonts_show($self); 23 | } elsif ($action eq "show") { 24 | fonts_show($self); 25 | } 26 | @@ -349,7 +352,7 @@ sub font_change_size_xft 27 | my $resized_str = join(":", @resized); 28 | 29 | # don't make fonts too small 30 | - if ($new_size >= 6) { 31 | + if ($new_size >= 3) { 32 | return ($resized_str, $new_size - $size, $new_size); 33 | } else { 34 | if ($basesize == 0) { 35 | -------------------------------------------------------------------------------- /.urxvt/ext/tabbed.patch: -------------------------------------------------------------------------------- 1 | --- /usr/lib/urxvt/perl/tabbed 2015-02-08 17:55:10.000000000 +0100 2 | +++ ./tabbed 2015-11-09 09:53:48.793475781 +0100 3 | @@ -97,6 +97,16 @@ 4 | $term->resource (perl_ext_2 => $term->resource ("perl_ext_2") . ",-tabbed"); 5 | }; 6 | 7 | + if (@{ $self->{tabs} }) { 8 | + # Get the working directory of the current tab and append a -cd to the command line 9 | + my $pid = $self->{cur}{pid}; 10 | + my $pwd = readlink "/proc/$pid/cwd"; 11 | + #print "pid $pid pwd $pwd\n"; 12 | + if ($pwd) { 13 | + push @argv, "-cd", $pwd; 14 | + } 15 | + } 16 | + 17 | push @urxvt::TERM_EXT, urxvt::ext::tabbed::tab::; 18 | 19 | my $term = new urxvt::term 20 | @@ -104,6 +114,8 @@ 21 | -embed => $self->parent, 22 | @argv, 23 | ; 24 | + 25 | + chdir; # go back to $HOME so the terminal doesn't keep the directory busy 26 | } 27 | 28 | sub configure { 29 | @@ -312,6 +324,12 @@ 30 | 1 31 | } 32 | 33 | +sub tab_child_start { 34 | + my ($self, $term, $pid) = @_; 35 | + $term->{pid} = $pid; 36 | + 1; 37 | +} 38 | + 39 | sub tab_start { 40 | my ($self, $tab) = @_; 41 | 42 | @@ -402,7 +420,7 @@ 43 | # simply proxies all interesting calls back to the tabbed class. 44 | 45 | { 46 | - for my $hook (qw(start destroy key_press property_notify)) { 47 | + for my $hook (qw(start destroy key_press property_notify child_start)) { 48 | eval qq{ 49 | sub on_$hook { 50 | my \$parent = \$_[0]{term}{parent} 51 | -------------------------------------------------------------------------------- /.urxvt/ext/vtwheel: -------------------------------------------------------------------------------- 1 | #! perl 2 | 3 | # Implements a scrollwheel just like in good old vt100's mices 4 | # https://aur.archlinux.org/packages/urxvt-vtwheel/ 5 | 6 | sub simulate_keypress { 7 | my ($self, $type) = @_; #type: 0:up, 1:down 8 | 9 | my $keycode_up = 111; 10 | my $keycode_down = 116; 11 | 12 | my $numlines = 3; 13 | 14 | my $keycode = 0; 15 | if ($type eq 0) { 16 | $keycode = $keycode_up; 17 | } elsif ($type eq 1) { 18 | $keycode = $keycode_down; 19 | } else { 20 | return; 21 | } 22 | 23 | for (my $i = 0 ; $i ne $numlines ; $i++) { 24 | $self->key_press(0,$keycode); 25 | $self->key_release(0,$keycode); 26 | } 27 | } 28 | 29 | sub on_button_release { 30 | my ($self, $event) = @_; 31 | 32 | #my $res_ss = $self->resource("secondaryScroll"); 33 | #warn("ressource ss is <$res_ss>"); 34 | 35 | !$self->current_screen and return (); 36 | 37 | #warn("foo, event: <$event->{button}>\n"); 38 | if ($event->{button} eq "4") { # scroll up 39 | $self->simulate_keypress(0); 40 | return 1; 41 | } elsif ($event->{button} eq "5") { # scroll down 42 | $self->simulate_keypress(1); 43 | return 1; 44 | } 45 | 46 | return (); 47 | } 48 | -------------------------------------------------------------------------------- /.vim/after/ftplugin/c.vim: -------------------------------------------------------------------------------- 1 | " vim settings for C and C++ 2 | 3 | nmap M :make 4 | "set ts=4 5 | "set sw=4 6 | -------------------------------------------------------------------------------- /.vim/after/ftplugin/dns.vim: -------------------------------------------------------------------------------- 1 | " increment dns zone serials 2 | nmap _a !!perl -pe '($y,$m,$d) = (localtime)[5,4,3]; $d = sprintf("\%04d\%02d\%02d", $y+1900, $m+1, $d); s/\b(?\!$d)(\d{8})(\d{2})/${d}00/' 3 | -------------------------------------------------------------------------------- /.vim/after/ftplugin/perl.vim: -------------------------------------------------------------------------------- 1 | set iskeyword=48-57,_,A-Z,a-z " remove : from iskeyword 2 | "set ts=8 3 | "set sw=4 4 | -------------------------------------------------------------------------------- /.vim/after/ftplugin/po.vim: -------------------------------------------------------------------------------- 1 | " copy msgid to msgstr (cursor assumed to be on msgstr line) 2 | nmap __ ?^msgidy/^msgstrnpcwmsgstrkddll 3 | -------------------------------------------------------------------------------- /.vim/after/ftplugin/python.vim: -------------------------------------------------------------------------------- 1 | set et sta sw=4 2 | -------------------------------------------------------------------------------- /.vim/after/ftplugin/tex.vim: -------------------------------------------------------------------------------- 1 | "" xdvi source specials integration by mah@wjpserver.cs.uni-sb.de 2 | ""map _g :exe 'silent !xdvi -editor "vim --servername ' . v:servername . ' --remote +\%l \%f" -sourceposition ' . line (".") . expand("%") . " " . expand("%:r") . ".dvi &" \| redraw! 3 | ""map :exe 'silent !xdvi -editor "vim --servername ' . v:servername . ' --remote +\%l \%f" -sourceposition ' . line (".") . expand("%") . " " . expand("%:r") . ".dvi &" \| redraw! 4 | "fu! GetDVIName() 5 | " let a = system("grep -l '\\@input{" . expand("%:r") . ".aux}' *.aux") 6 | " let a = substitute(a,"\n",'','g') 7 | " if a == '' 8 | " return expand("%:r") . '.dvi' 9 | " else 10 | " return fnamemodify(a,":r") . '.dvi' 11 | " endif 12 | "endfu 13 | "" xdvi config (TODO: killall -USR1 xdvi?) 14 | "map W :exe 'silent !xdvi -editor "vim --servername ' . v:servername . ' --remote +\%l \%f" -sourceposition ' . line (".") . expand("%") . " " . GetDVIName() . " &" \| redraw! 15 | "" kdvi config 16 | ""map W :exe 'silent !kdvi --unique file:' . GetDVIName() . "\\#src:" . line (".") . expand("%") . " &" \| redraw! 17 | "nmap L MW 18 | 19 | iab \\i \begin{itemize}\item 20 | iab \i \item 21 | iab \\I \end{itemize} 22 | iab \\f \begin{frame}[containsverbatim]\frametitle{ 23 | iab \\F \end{frame} 24 | iab \\v \begin{verbatim} 25 | iab \\V \end{verbatim} 26 | 27 | "set keymap=tex 28 | -------------------------------------------------------------------------------- /.vim/doc/po.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/df7cb/dotfiles/6ccc810298851fbbc240191d71712aa52963a741/.vim/doc/po.txt -------------------------------------------------------------------------------- /.vim/indent/html.vim: -------------------------------------------------------------------------------- 1 | " the default html indentexpr is insane 2 | let b:did_indent = 1 3 | -------------------------------------------------------------------------------- /.vim/indent/yaml.vim: -------------------------------------------------------------------------------- 1 | " the default yaml indentexpr is insane 2 | let b:did_indent = 1 3 | " but set smarttab 4 | setlocal smarttab 5 | -------------------------------------------------------------------------------- /.vim/keymap/tex_utf-8.vim: -------------------------------------------------------------------------------- 1 | " vim:tabstop=23: 2 | let b:keymap_name = "tex" 3 | 4 | loadkeymap 5 | 6 | " su[bp]erscripts 7 | ^0 ⁰ 8 | ^1 ¹ 9 | ^2 ² 10 | ^3 ³ 11 | ^4 ⁴ 12 | ^5 ⁵ 13 | ^6 ⁶ 14 | ^7 ⁷ 15 | ^8 ⁸ 16 | ^9 ⁹ 17 | ^n ⁿ 18 | _0 ₀ 19 | _1 ₁ 20 | _2 ₂ 21 | _3 ₃ 22 | _4 ₄ 23 | _5 ₅ 24 | _6 ₆ 25 | _7 ₇ 26 | _8 ₈ 27 | _9 ₉ 28 | 29 | " logical symbols 30 | \\forall ∀ 31 | \\exists ∃ 32 | \\nexists ∄ 33 | \\lnot ¬ 34 | \\neg ¬ 35 | \\therefore ∴ 36 | \\because ∵ 37 | 38 | " binary logical relations/operators 39 | \\and ∧ 40 | \\or ∨ 41 | \\And ⋀ 42 | \\Or ⋁ 43 | \\wedge ∧ 44 | \\vee ∨ 45 | \\bigwedge ⋀ 46 | \\bigvee ⋁ 47 | \\iff ⇔ 48 | \\Leftrightarrow ⇔ 49 | \\implies ⇒ 50 | \\Rightarrow ⇒ 51 | \\sim ∼ 52 | \\nsim ≁ 53 | \\approx ≈ 54 | \\cong ≅ 55 | \\not\\approx ≉ 56 | \\equiv ≡ 57 | \\neq ≠ 58 | \\not\\equiv ≢ 59 | \\leadsto ↝ 60 | 61 | " arrows and dots 62 | \\uparrow ↑ 63 | \\rightarrow → 64 | \\downarrow ↓ 65 | \\rightleftharpoons ⇌ 66 | "... … 67 | \\dots … 68 | \\cdot ⋅ 69 | \\vdots ⋮ 70 | \\cdots ⋯ 71 | \\ddots ⋱ 72 | 73 | " sets 74 | \\emptyset ∅ 75 | \\in ∈ 76 | \\notin ∉ 77 | \\not\\in ∉ 78 | \\ni ∋ 79 | \\notni ∌ 80 | \\not\\ni ∌ 81 | \\setminus ∖ 82 | \\cap ∩ 83 | \\cup ∪ 84 | \\subset ⊂ 85 | \\supset ⊃ 86 | \\not\\subset ⊄ 87 | \\not\\supset ⊅ 88 | \\subseteq ⊆ 89 | \\supseteq ⊇ 90 | \\bigcap ⋂ 91 | \\bigcup ⋃ 92 | 93 | " math 94 | \\prod ∏ 95 | \\sum ∑ 96 | \\ast ∗ 97 | \\circ ∘ 98 | \\bullet ∙ 99 | \\mid ∣ 100 | \\oplus ⊕ 101 | 102 | " functions 103 | \\times × 104 | \\to → 105 | \\mapsto ↦ 106 | 107 | " binary relations on numbers 108 | "\\leq ≤ 109 | \\le ≤ 110 | \\lt < 111 | "\\geq ≥ 112 | \\ge ≥ 113 | \\gt > 114 | \\ll ≪ 115 | \\gg ≫ 116 | 117 | " symbols 118 | \\diamond ⋄ 119 | \\star ⋆ 120 | \\nabla ∇ 121 | \\bot ⊥ 122 | \\top ⊤ 123 | \\infty ∞ 124 | 125 | " brackets 126 | \\lceil ⌈ 127 | \\rceil ⌉ 128 | \\lfloor ⌊ 129 | \\rfloor ⌋ 130 | \\langle ⟨ 131 | \\rangle ⟩ 132 | 133 | " greek letters 134 | \\Alpha Α 135 | \\Beta Β 136 | \\Gamma Γ 137 | \\Delta Δ 138 | \\Epsilon Ε 139 | \\Zeta Ζ 140 | \\Eta Η 141 | \\Theta Θ 142 | \\Iota Ι 143 | \\Kappa Κ 144 | \\Lambda Λ 145 | \\Mu Μ 146 | \\Nu Ν 147 | \\Xi Ξ 148 | \\Omicron Ο 149 | \\Pi Π 150 | \\Rho Ρ 151 | \\Sigma Σ 152 | \\Tau Τ 153 | \\Upsilon Υ 154 | \\Phi Φ 155 | \\Chi Χ 156 | \\Psi Ψ 157 | \\Omega Ω 158 | 159 | \\alpha α 160 | \\beta β 161 | \\gamma γ 162 | \\delta δ 163 | \\epsilon ε 164 | \\zeta ζ 165 | \\eta η 166 | \\theta θ 167 | \\iota ι 168 | \\kappa κ 169 | \\lambda λ 170 | \\mu μ 171 | \\nu ν 172 | \\xi ξ 173 | \\omicron ο 174 | \\pi π 175 | \\rho ρ 176 | \\varsigma ς 177 | \\sigma σ 178 | \\tau τ 179 | \\upsilon υ 180 | \\phi φ 181 | \\chi χ 182 | \\psi ψ 183 | \\omega ω 184 | 185 | " common sets 186 | \\complex ℂ 187 | \\nat ℕ 188 | \\padic ℙ 189 | \\rat ℚ 190 | \\real ℝ 191 | \\int ℤ 192 | \\powset ℘ 193 | \\mathcalP ℘ 194 | 195 | " abbreviations 196 | \\item • 197 | -------------------------------------------------------------------------------- /.vim/pack/editorconfig/start/editorconfig-vim/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | charset = utf-8 6 | max_line_length = 80 7 | 8 | [*.{vim,sh}] 9 | indent_style = space 10 | indent_size = 4 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | max_line_length = 80 14 | 15 | [*.rb] 16 | indent_style = space 17 | indent_size = 2 18 | insert_final_newline = true 19 | trim_trailing_whitespace = true 20 | max_line_length = 120 21 | 22 | [*.yml] 23 | indent_style = space 24 | indent_size = 2 25 | 26 | [*.{bat,vbs,ps1}] 27 | end_of_line = CRLF 28 | -------------------------------------------------------------------------------- /.vim/pack/editorconfig/start/editorconfig-vim/LICENSE: -------------------------------------------------------------------------------- 1 | Unless otherwise stated, all files are distributed under the Simplified BSD 2 | license included below. 3 | 4 | Copyright (c) 2011-2019 EditorConfig Team 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /.vim/pack/editorconfig/start/editorconfig-vim/LICENSE.PSF: -------------------------------------------------------------------------------- 1 | Some code in editorconfig-vim is derived from code licensed under the 2 | PSF license. The following is the text of that license, retrieved 2019-05-05 3 | from https://docs.python.org/2.6/license.html#terms-and-conditions-for-accessing-or-otherwise-using-python 4 | 5 | PSF LICENSE AGREEMENT FOR PYTHON 2.6.9 6 | 7 | 1. This LICENSE AGREEMENT is between the Python Software Foundation 8 | (``PSF''), and the Individual or Organization (``Licensee'') accessing and 9 | otherwise using Python 2.6.9 software in source or binary form and its 10 | associated documentation. 11 | 12 | 2. Subject to the terms and conditions of this License Agreement, PSF 13 | hereby grants Licensee a nonexclusive, royalty-free, world-wide 14 | license to reproduce, analyze, test, perform and/or display publicly, 15 | prepare derivative works, distribute, and otherwise use Python 2.6.9 16 | alone or in any derivative version, provided, however, that PSF's 17 | License Agreement and PSF's notice of copyright, i.e., ``Copyright (c) 18 | 2001-2010 Python Software Foundation; All Rights Reserved'' are 19 | retained in Python 2.6.9 alone or in any derivative version prepared 20 | by Licensee. 21 | 22 | 3. In the event Licensee prepares a derivative work that is based on 23 | or incorporates Python 2.6.9 or any part thereof, and wants to make 24 | the derivative work available to others as provided herein, then 25 | Licensee hereby agrees to include in any such work a brief summary of 26 | the changes made to Python 2.6.9. 27 | 28 | 4. PSF is making Python 2.6.9 available to Licensee on an ``AS IS'' 29 | basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. 30 | BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY 31 | REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY 32 | PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.6.9 WILL NOT INFRINGE 33 | ANY THIRD PARTY RIGHTS. 34 | 35 | 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 36 | 2.6.9 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS 37 | A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.6.9, 38 | OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 39 | 40 | 6. This License Agreement will automatically terminate upon a material 41 | breach of its terms and conditions. 42 | 43 | 7. Nothing in this License Agreement shall be deemed to create any 44 | relationship of agency, partnership, or joint venture between PSF and 45 | Licensee. This License Agreement does not grant permission to use PSF 46 | trademarks or trade name in a trademark sense to endorse or promote 47 | products or services of Licensee, or any third party. 48 | 49 | 8. By copying, installing or otherwise using Python 2.6.9, Licensee 50 | agrees to be bound by the terms and conditions of this License 51 | Agreement. 52 | 53 | # vi: set ft=: 54 | -------------------------------------------------------------------------------- /.vim/pack/editorconfig/start/editorconfig-vim/README.md: -------------------------------------------------------------------------------- 1 | # EditorConfig Vim Plugin 2 | 3 | [![Travis Build Status](https://img.shields.io/travis/cxw42/editorconfig-vim.svg?logo=travis)](https://travis-ci.org/editorconfig/editorconfig-vim) 4 | [![Appveyor Build Status](https://img.shields.io/appveyor/ci/cxw42/editorconfig-vim.svg?logo=appveyor)](https://ci.appveyor.com/project/cxw42/editorconfig-vim) 5 | 6 | This is an [EditorConfig][] plugin for Vim. This plugin can be found on both 7 | [GitHub][] and [Vim online][]. 8 | 9 | ## Installation 10 | 11 | To install this plugin, you can use one of the following ways: 12 | 13 | ### Install with the archive 14 | 15 | Download the [archive][] and extract it into your Vim runtime directory 16 | (`~/.vim` on UNIX/Linux and `$VIM_INSTALLATION_FOLDER\vimfiles` on windows). 17 | You should have 4 sub-directories in this runtime directory now: "autoload", 18 | "doc", "ftdetect" and "plugin". 19 | 20 | ### Install as Vim8 plugin 21 | 22 | Install as a Vim 8 plugin. Note `local` can be any name, but some path 23 | element must be present. On Windows, instead of `~/.vim` use 24 | `$VIM_INSTALLATION_FOLDER\vimfiles`. 25 | ```shell 26 | mkdir -p ~/.vim/pack/local/start 27 | cd ~/.vim/pack/local/start 28 | git clone https://github.com/editorconfig/editorconfig-vim.git 29 | ``` 30 | 31 | ### Install with [pathogen][] 32 | 33 | Use pathogen (the git repository of this plugin is 34 | https://github.com/editorconfig/editorconfig-vim.git) 35 | 36 | ### Install with [Vundle][] 37 | 38 | Use Vundle by adding to your `.vimrc` Vundle plugins section: 39 | 40 | ```viml 41 | Plugin 'editorconfig/editorconfig-vim' 42 | ``` 43 | 44 | Then call `:PluginInstall`. 45 | 46 | ### Install with [vim-plug][] 47 | 48 | Use vim-plug by adding to your `.vimrc` in your plugin section: 49 | 50 | ```viml 51 | Plug 'editorconfig/editorconfig-vim' 52 | ``` 53 | 54 | Source your `.vimrc` by calling `:source $MYVIMRC`. 55 | 56 | Then call `:PlugInstall`. 57 | 58 | ### No external editorconfig core library is required 59 | 60 | Previous versions of this plugin also required a Python "core". 61 | The core included the code to parse `.editorconfig` files. 62 | This plugin **includes** the core, so you don't need to download the 63 | core separately. 64 | 65 | ## Supported properties 66 | 67 | The EditorConfig Vim plugin supports the following EditorConfig [properties][]: 68 | 69 | * `indent_style` 70 | * `indent_size` 71 | * `tab_width` 72 | * `end_of_line` 73 | * `charset` 74 | * `insert_final_newline` (Feature `+fixendofline`, available on Vim 7.4.785+, 75 | or [PreserveNoEOL][] is required for this property) 76 | * `trim_trailing_whitespace` 77 | * `max_line_length` 78 | * `root` (only used by EditorConfig core) 79 | 80 | ## Selected Options 81 | 82 | The supported options are documented in [editorconfig.txt][] 83 | and can be viewed by executing the following: `:help editorconfig`. You may 84 | need to execute `:helptags ALL` so that Vim is aware of editorconfig.txt. 85 | 86 | ### Excluded patterns 87 | 88 | To ensure that this plugin works well with [Tim Pope's fugitive][], use the 89 | following patterns array: 90 | 91 | ```viml 92 | let g:EditorConfig_exclude_patterns = ['fugitive://.*'] 93 | ``` 94 | 95 | If you wanted to avoid loading EditorConfig for any remote files over ssh: 96 | 97 | ```viml 98 | let g:EditorConfig_exclude_patterns = ['scp://.*'] 99 | ``` 100 | 101 | Of course these two items could be combined into the following: 102 | 103 | ```viml 104 | let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*'] 105 | ``` 106 | 107 | ### Disable for a specific filetype 108 | 109 | You can disable this plugin for a specific buffer by setting 110 | `b:EditorConfig_disable`. Therefore, you can disable the 111 | plugin for all buffers of a specific filetype. For example, to disable 112 | EditorConfig for all git commit messages (filetype `gitcommit`): 113 | 114 | ```viml 115 | au FileType gitcommit let b:EditorConfig_disable = 1 116 | ``` 117 | 118 | ### Disable rules 119 | 120 | In very rare cases, 121 | you might need to override some project-specific EditorConfig rules in global 122 | or local vimrc in some cases, e.g., to resolve conflicts of trailing whitespace 123 | trimming and buffer autosaving. This is not recommended, but you can: 124 | 125 | ```viml 126 | let g:EditorConfig_disable_rules = ['trim_trailing_whitespace'] 127 | ``` 128 | 129 | You are able to disable any supported EditorConfig properties. 130 | 131 | ## Bugs and Feature Requests 132 | 133 | Feel free to submit bugs, feature requests, and other issues to the 134 | [issue tracker][]. Be sure you have read the [contribution guidelines][]! 135 | 136 | [EditorConfig]: http://editorconfig.org 137 | [GitHub]: https://github.com/editorconfig/editorconfig-vim 138 | [PreserveNoEOL]: http://www.vim.org/scripts/script.php?script_id=4550 139 | [Tim Pope's fugitive]: https://github.com/tpope/vim-fugitive 140 | [Vim online]: http://www.vim.org/scripts/script.php?script_id=3934 141 | [Vundle]: https://github.com/gmarik/Vundle.vim 142 | [archive]: https://github.com/editorconfig/editorconfig-vim/archive/master.zip 143 | [contribution guidelines]: https://github.com/editorconfig/editorconfig/blob/master/CONTRIBUTING.md#submitting-an-issue 144 | [issue tracker]: https://github.com/editorconfig/editorconfig-vim/issues 145 | [pathogen]: https://github.com/tpope/vim-pathogen 146 | [properties]: http://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties 147 | [editorconfig.txt]: https://github.com/editorconfig/editorconfig-vim/blob/master/doc/editorconfig.txt 148 | [vim-plug]: https://github.com/junegunn/vim-plug 149 | -------------------------------------------------------------------------------- /.vim/pack/editorconfig/start/editorconfig-vim/autoload/editorconfig.vim: -------------------------------------------------------------------------------- 1 | " autoload/editorconfig.vim: EditorConfig native Vimscript plugin 2 | " Copyright (c) 2011-2019 EditorConfig Team 3 | " All rights reserved. 4 | " 5 | " Redistribution and use in source and binary forms, with or without 6 | " modification, are permitted provided that the following conditions are met: 7 | " 8 | " 1. Redistributions of source code must retain the above copyright notice, 9 | " this list of conditions and the following disclaimer. 10 | " 2. Redistributions in binary form must reproduce the above copyright notice, 11 | " this list of conditions and the following disclaimer in the documentation 12 | " and/or other materials provided with the distribution. 13 | " 14 | " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | " AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | " ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | " LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | " CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | " SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | " INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | " CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | " ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | " POSSIBILITY OF SUCH DAMAGE. 25 | " 26 | 27 | if v:version < 700 28 | finish 29 | endif 30 | 31 | let s:saved_cpo = &cpo 32 | set cpo&vim 33 | 34 | " {{{1 variables 35 | let s:hook_list = [] 36 | 37 | function! editorconfig#AddNewHook(func) " {{{1 38 | " Add a new hook 39 | 40 | call add(s:hook_list, a:func) 41 | endfunction 42 | 43 | function! editorconfig#ApplyHooks(config) abort " {{{1 44 | " apply hooks 45 | 46 | for Hook in s:hook_list 47 | let l:hook_ret = Hook(a:config) 48 | 49 | if type(l:hook_ret) != type(0) && l:hook_ret != 0 50 | " TODO print some debug info here 51 | endif 52 | endfor 53 | endfunction 54 | 55 | " }}} 56 | 57 | let &cpo = s:saved_cpo 58 | unlet! s:saved_cpo 59 | 60 | " vim: fdm=marker fdc=3 61 | -------------------------------------------------------------------------------- /.vim/pack/editorconfig/start/editorconfig-vim/autoload/editorconfig_core/util.vim: -------------------------------------------------------------------------------- 1 | " util.vim: part of editorconfig-core-vimscript and editorconfig-vim. 2 | " Copyright (c) 2018-2019 EditorConfig Team, including Chris White {{{1 3 | " All rights reserved. 4 | " 5 | " Redistribution and use in source and binary forms, with or without 6 | " modification, are permitted provided that the following conditions are met: 7 | " 8 | " 1. Redistributions of source code must retain the above copyright notice, 9 | " this list of conditions and the following disclaimer. 10 | " 2. Redistributions in binary form must reproduce the above copyright notice, 11 | " this list of conditions and the following disclaimer in the documentation 12 | " and/or other materials provided with the distribution. 13 | " 14 | " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | " AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | " ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | " LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | " CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | " SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | " INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | " CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | " ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | " POSSIBILITY OF SUCH DAMAGE. }}}1 25 | 26 | let s:saved_cpo = &cpo 27 | set cpo&vim 28 | 29 | " A verbatim copy of ingo#fs#path#Separator() {{{1 30 | " from https://github.com/vim-scripts/ingo-library/blob/558132e2221db3af26dc2f2c6756d092d48a459f/autoload/ingo/fs/path.vim 31 | " distributed under the Vim license. 32 | function! editorconfig_core#util#Separator() 33 | return (exists('+shellslash') && ! &shellslash ? '\' : '/') 34 | endfunction " }}}1 35 | 36 | " path_join(): ('a','b')->'a/b'; ('a/','b')->'a/b'. {{{1 37 | function! editorconfig_core#util#path_join(a, b) 38 | " TODO shellescape/shellslash? 39 | "echom 'Joining <' . a:a . '> and <' . a:b . '>' 40 | "echom 'Length is ' . strlen(a:a) 41 | "echom 'Last char is ' . char2nr(a:a[-1]) 42 | if a:a !~# '\v%(\/|\\)$' 43 | return a:a . editorconfig_core#util#Separator() . a:b 44 | else 45 | return a:a . a:b 46 | endif 47 | endfunction " }}}1 48 | 49 | " is_win() by xolox {{{1 50 | " The following function is modified from 51 | " https://github.com/xolox/vim-misc/blob/master/autoload/xolox/misc/os.vim 52 | " Copyright (c) 2015 Peter Odding 53 | " 54 | " Permission is hereby granted, free of charge, to any person obtaining a copy 55 | " of this software and associated documentation files (the "Software"), to deal 56 | " in the Software without restriction, including without limitation the rights 57 | " to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 58 | " copies of the Software, and to permit persons to whom the Software is 59 | " furnished to do so, subject to the following conditions: 60 | " 61 | " The above copyright notice and this permission notice shall be included in all 62 | " copies or substantial portions of the Software. 63 | " 64 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 65 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 66 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 67 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 68 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 69 | " OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 70 | " SOFTWARE. 71 | function! editorconfig_core#util#is_win() 72 | " Returns 1 (true) when on Microsoft Windows, 0 (false) otherwise. 73 | return has('win16') || has('win32') || has('win64') 74 | endfunction " }}}1 75 | 76 | " strip() {{{1 77 | function! editorconfig_core#util#strip(s) 78 | return substitute(a:s, '\v^\s+|\s+$','','g') 79 | endfunction " }}}1 80 | 81 | let &cpo = s:saved_cpo 82 | unlet! s:saved_cpo 83 | 84 | " vi: set fdm=marker: 85 | -------------------------------------------------------------------------------- /.vim/pack/editorconfig/start/editorconfig-vim/ftdetect/editorconfig.vim: -------------------------------------------------------------------------------- 1 | autocmd BufNewFile,BufRead .editorconfig setfiletype dosini 2 | -------------------------------------------------------------------------------- /.vim/plugin/cmdalias_myon.vim: -------------------------------------------------------------------------------- 1 | " https://github.com/vim-scripts/cmdalias.vim 2 | " needs to be loaded after cmdalias.vim (and hence doesn't work in .vimrc) 3 | Alias q qall 4 | Alias wq wq! 5 | -------------------------------------------------------------------------------- /.w3m/keymap: -------------------------------------------------------------------------------- 1 | keymap q EXIT 2 | -------------------------------------------------------------------------------- /.xmodmap-pc: -------------------------------------------------------------------------------- 1 | ! This is an xmodmap input file for PC 102 key #1 (Linux/XFree86; US) keyboards. 2 | 3 | keycode 0x31 = grave asciitilde dead_grave dead_tilde 4 | keycode 0x0A = 1 exclam onesuperior exclamdown 5 | keycode 0x0B = 2 at twosuperior onehalf 6 | keycode 0x0C = 3 numbersign threesuperior threequarters 7 | keycode 0x0D = 4 dollar sterling onequarter 8 | keycode 0x0E = 5 percent plusminus 9 | keycode 0x0F = 6 asciicircum notsign dead_circumflex 10 | keycode 0x10 = 7 ampersand braceleft 11 | keycode 0x11 = 8 asterisk bracketleft 12 | keycode 0x12 = 9 parenleft bracketright 13 | keycode 0x13 = 0 parenright braceright 14 | keycode 0x14 = minus underscore hyphen 15 | keycode 0x15 = equal plus backslash plusminus 16 | keycode 0x17 = Tab ISO_Left_Tab Multi_key 17 | keycode 0x18 = q Q at 18 | keycode 0x1A = e E EuroSign currency 19 | keycode 0x1B = r R r registered 20 | keycode 0x1C = t T club 21 | keycode 0x1D = y Y 22 | keycode 0x1E = u U udiaeresis Udiaeresis 23 | keycode 0x20 = o O odiaeresis Odiaeresis 24 | ! for whatever reason, there is no XK_spade in keysymdef.h, pick something else and remap that in urxvt 25 | keycode 0x21 = p P maltesecross Greek_pi 26 | keycode 0x22 = bracketleft braceleft lessthanequal 27 | keycode 0x23 = bracketright braceright greaterthanequal 28 | keycode 0x26 = a A adiaeresis Adiaeresis 29 | keycode 0x27 = s S ssharp section 30 | keycode 0x28 = d D degree dead_abovering 31 | keycode 0x2B = h H heart 32 | keycode 0x2D = k K diamond 33 | keycode 0x2F = semicolon colon dead_diaeresis dead_diaeresis 34 | keycode 0x30 = apostrophe quotedbl dead_acute dead_diaeresis 35 | keycode 0x33 = backslash bar NoSymbol brokenbar 36 | keycode 0x34 = z Z 37 | keycode 0x36 = c C cent dead_cedilla 38 | keycode 0x37 = v V singlelowquotemark doublelowquotemark 39 | keycode 0x38 = b B leftsinglequotemark leftdoublequotemark 40 | keycode 0x39 = n N rightsinglequotemark rightdoublequotemark 41 | keycode 0x3A = m M mu Greek_OMEGA 42 | keycode 0x3B = comma less NoSymbol guillemotleft 43 | keycode 0x3C = period greater periodcentered guillemotright 44 | keycode 0x3D = slash question questiondown questiondown 45 | ! XF86Back on X200 46 | keycode 0xA6 = Prior 47 | ! XF86Forward on X200 48 | keycode 0xA7 = Next 49 | 50 | ! X.org 1.6: 51 | ! capslock 52 | keycode 0x42 = Control_L 53 | ! right alt 54 | keycode 0x6C = Mode_switch 55 | ! right win 56 | keycode 0x86 = Mode_switch 57 | ! menu 58 | keycode 0x87 = Multi_key 59 | 60 | clear Shift 61 | clear Lock 62 | clear Control 63 | clear Mod1 64 | clear Mod2 65 | clear Mod3 66 | clear Mod4 67 | clear Mod5 68 | 69 | add Shift = Shift_L Shift_R 70 | add Control = Control_L Control_R 71 | add Mod1 = Meta_L 72 | add Mod2 = Num_Lock 73 | add Mod3 = Mode_switch 74 | !add Mod4 = Hyper_L Hyper_R 75 | add Mod5 = Scroll_Lock 76 | -------------------------------------------------------------------------------- /.xsession: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #set -x 3 | 4 | echo 5 | echo "`date` $0: start" 6 | 7 | cd $HOME 8 | . ./.bashrc 9 | 10 | XVENDOR=$(xdpyinfo | grep '^vendor string' | sed -e 's/.*: *//') 11 | 12 | # set up X server 13 | $HOME/bin/xset.sh 14 | [ -f ~/.xsession-local ] && . ~/.xsession-local 15 | 16 | if [[ "$XVENDOR" != *VNC* ]] ; then 17 | xsetroot -solid navy & 18 | xscreensaver -nosplash & 19 | diodon & 20 | nm-applet & 21 | udiskie --smart-tray & 22 | pasystray & 23 | command -v gpg-agent >/dev/null && [ -z "$GPG_AGENT_INFO" ] && \ 24 | eval `gpg-agent --daemon` 25 | command -v gnome-keyring-daemon >/dev/null && [ -z "$GNOME_KEYRING_CONTROL" ] && \ 26 | eval `gnome-keyring-daemon` 27 | workrave & 28 | #type -p xplanet > /dev/null && xplanet -lat 51.191253 -lon 6.422786 & 29 | 30 | SHLVL=0 x-terminal-emulator & 31 | SHLVL=0 x-terminal-emulator & 32 | x-www-browser & 33 | 34 | else 35 | xsetroot -solid limegreen 36 | fi 37 | 38 | if command -v awesome >/dev/null ; then 39 | exec awesome 40 | else 41 | exec xterm 42 | fi 43 | -------------------------------------------------------------------------------- /bin/add: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $sum = 0; 7 | 8 | while (<>) { 9 | next if /^\s*$/; 10 | $sum += $_; 11 | } 12 | 13 | print "$sum\n"; 14 | -------------------------------------------------------------------------------- /bin/adt: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if ! test -f debian/files; then 6 | echo "debian/files is missing" >&2 7 | exit 1 8 | fi 9 | 10 | if command -v quilt >/dev/null; then 11 | quilt push -a || [ $? = 2 ] 12 | fi 13 | 14 | trap "test -s ../log && gzip -9 ../log" EXIT 15 | rm -f ../log ../log.gz 16 | 17 | binaries=$(awk '/\.deb / { print "../" $1 }' debian/files | xargs) 18 | set -x 19 | exec script -e -c "sudo autopkgtest ./ $binaries -- null" ../log 20 | -------------------------------------------------------------------------------- /bin/blhc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | LOG="${1:-../log.gz}" 6 | case $LOG in 7 | *.gz) CAT=zcat ;; 8 | esac 9 | 10 | TMPLOG=$(mktemp --tmpdir blhc.XXXXXX.log) 11 | trap "rm -f $TMPLOG" EXIT 12 | 13 | ${CAT:=cat} $LOG | sed -e 's/\o033\[[0-9;]*m//g' -e 's/\r$//' > $TMPLOG 14 | 15 | /usr/bin/blhc --debian --line-numbers --color $TMPLOG 16 | -------------------------------------------------------------------------------- /bin/bug: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | bts --mbox show "$@" 4 | -------------------------------------------------------------------------------- /bin/cap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Thanks to Mika Prokop for the idea! 4 | # apt-get install scrot xclip 5 | 6 | set -eu 7 | 8 | upload="yes" 9 | 10 | while getopts "s:" opt ; do 11 | case $opt in 12 | n) upload="" ;; 13 | s) sleep $OPTARG ;; 14 | *) exit 5 ;; 15 | esac 16 | done 17 | # shift away args 18 | shift $(($OPTIND - 1)) 19 | 20 | if [ "${1:-}" ]; then 21 | output="$1" 22 | else 23 | date=$(date '+%F.%H%M%S') 24 | output=$(mktemp --tmpdir $date.XXXXXX.png) 25 | rm -f "$output" 26 | trap "rm -f $output" EXIT 27 | fi 28 | name=${output##*/} 29 | 30 | scrot -s "$output" 31 | chmod +r "$output" 32 | 33 | if [ "$upload" ]; then 34 | scp "$output" feynman.df7cb.de:html/s/$name 35 | url="https://www.df7cb.de/s/$name" 36 | echo "$url" 37 | echo -n "$url" | xclip -i 38 | fi 39 | -------------------------------------------------------------------------------- /bin/completer: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | PROG=$(basename "$1") 4 | PREFIX="$2" 5 | 6 | case $PROG in 7 | apt|apt-get|agi|agr) 8 | apt-cache pkgnames "$PREFIX" 9 | ;; 10 | 11 | bibtex) 12 | ls -d "$PREFIX"*.tex 2> /dev/null | sed -e 's/\.tex$//' 13 | ;; 14 | 15 | complete) 16 | . ~/.bash_completion 17 | complete | sed -e 's/.* //' 18 | ;; 19 | 20 | cp|mv) 21 | # "mv foo " should expand to "mv foo foo" so we can edit the target name 22 | [ -z "$2" ] && echo "$3" 23 | ;; 24 | 25 | make) 26 | [ -f Makefile ] || exit 0 27 | perl -ne 'print "$1\n" if /^([^ :]+):/' Makefile 28 | ;; 29 | 30 | man) 31 | if [ -f $TMP/whatis.cache ] ; then 32 | grep -E "^$PREFIX" $TMP/whatis.cache 33 | else 34 | whatis -w "$PREFIX*" 2>/dev/null | cut -d ' ' -f 1 | grep -v ':$' 35 | fi 36 | ;; 37 | 38 | mutt) 39 | MUTT=$HOME/.mutt 40 | cut -d ' ' -f 2 $MUTT/aliases $MUTT/aliases.addressbook| grep -E "^$PREFIX" 41 | ;; 42 | 43 | ssh|mosh) 44 | [ -f /etc/ssh/ssh_known_hosts ] && ETC_KNOWN_HOSTS=/etc/ssh/ssh_known_hosts 45 | [ -f $HOME/lib/db.debian.org/debian_known_hosts ] && DEBIAN_KNOWN_HOSTS=$HOME/lib/db.debian.org/debian_known_hosts 46 | perl -lne 's/^#| .*|^\[|\].*//g; foreach (split /,/) { print if /[.:]/ }' ~/.ssh/known_hosts $ETC_KNOWN_HOSTS $DEBIAN_KNOWN_HOSTS 47 | ;; 48 | 49 | scp|rsync) 50 | [ -f /etc/ssh/ssh_known_hosts ] && ETC_KNOWN_HOSTS=/etc/ssh/ssh_known_hosts 51 | [ -f $HOME/lib/db.debian.org/debian_known_hosts ] && DEBIAN_KNOWN_HOSTS=$HOME/lib/db.debian.org/debian_known_hosts 52 | perl -lne 's/^#| .*|^\[|\].*//g; foreach (split /,/) { print "$_:" if /[.:]/ }' ~/.ssh/known_hosts $ETC_KNOWN_HOSTS $DEBIAN_KNOWN_HOSTS 53 | ;; 54 | 55 | sc|start|stop|status|reload|restart|enable|disable) 56 | if [ -d /run/systemd/system ]; then 57 | for unit in $(systemctl --all --no-legend | awk '{ print $1 }' | grep "^$PREFIX"); do 58 | echo "${unit%.service}" 59 | done 60 | else 61 | for f in /etc/init.d/$PREFIX*; do 62 | case $f in 63 | *.dpkg*) ;; 64 | *) test -f "$f" && echo $(basename -- "$f" .service) ;; 65 | esac 66 | done 67 | fi 68 | ;; 69 | 70 | scu) 71 | for unit in $(systemctl --user --all --no-legend | awk '{ print $1 }' | grep "^$PREFIX"); do 72 | echo "${unit%.service}" 73 | done 74 | ;; 75 | 76 | *) 77 | echo "$0: cannot complete program $PROG, prefix $PREFIX" 1>&2 78 | exit 1 79 | esac 80 | 81 | # vim:sw=4: 82 | -------------------------------------------------------------------------------- /bin/dbp: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if [ ! -e debian/changelog ]; then 6 | echo "debian/changelog not found" >&2 7 | exit 1 8 | fi 9 | 10 | ARG="-rfakeroot -us -uc -i -I" 11 | DIST=$(dpkg-parsechangelog | awk '/^Distribution:/ { print $2 }') 12 | 13 | #if [ -x /usr/bin/nproc ]; then 14 | # NPROC=$(nproc) 15 | # #[ $NPROC -gt 1 ] && ARG="$ARG -j$NPROC" 16 | #fi 17 | 18 | revert_debian_changelog () { 19 | head -n1 debian/changelog | grep -q '~unrel' && sed -i -e '1,6d' debian/changelog 20 | } 21 | 22 | case $DIST in 23 | *backports*) 24 | #PKG=$(dpkg-parsechangelog | awk '/^Source:/ { print $2 }') 25 | #echo "Asking rmadison for last $DIST version ..." 26 | #MADISON="$(rmadison -u bpo -s $DIST $PKG)" 27 | ##echo "$MADISON" 28 | #OLDVERSION=$(echo $MADISON | cut -d '|' -f 2 | sed -e 's/ //g') 29 | OLDVERSION=$(sed -ne "1d;s/^.* (\\(.*\\)) $DIST; .*/\\1/p" debian/changelog | head -n1) 30 | if [ -z "$OLDVERSION" ] ; then 31 | # TODO: extract last stable version 32 | ARG="$ARG -sa" 33 | fi 34 | ARG="$ARG -v${OLDVERSION:-0}" # full changelog for the first upload 35 | VERSION=$(dpkg-parsechangelog | awk '/^Version:/ { print $2 }') 36 | case $VERSION in 37 | *-1~bpo*+1) ARG="$ARG -sa" ;; 38 | esac 39 | ;; 40 | # UNREL*) 41 | # VERSION=$(dpkg-parsechangelog | awk '/^Version:/ { print $2 }') 42 | # trap revert_debian_changelog 0 2 3 15 43 | # dch -v "$VERSION~unrel" -b --release-heuristic log \ 44 | # "Building unreleased version $VERSION" 45 | # ;; 46 | esac 47 | 48 | export DEB_CHECK_COMMAND="lintian" PG_UPDATECONTROL="yes" 49 | SHIFT=1 50 | 51 | while getopts "aAbBSij:nosp:P:" opt 2>/dev/null; do 52 | case $opt in 53 | a) 54 | AUTOPKGTEST=yes 55 | ;; 56 | A|b|B) 57 | ARG="$ARG -$opt" 58 | BINARY_ONLY=yes 59 | ;; 60 | i) 61 | DEBI=yes 62 | ;; 63 | j) 64 | PARALLEL="-$opt$OPTARG" 65 | ;; 66 | n) 67 | export DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS:+$DEB_BUILD_OPTIONS }nocheck" 68 | DEB_BUILD_PROFILES="${DEB_BUILD_PROFILES:+$DEB_BUILD_PROFILES,}nocheck" 69 | unset DEB_CHECK_COMMAND 70 | ;; 71 | o) 72 | export DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS:+$DEB_BUILD_OPTIONS }noopt" 73 | ;; 74 | s) 75 | export DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS:+$DEB_BUILD_OPTIONS }nostrip" 76 | ;; 77 | S) 78 | ARG="$ARG -S --buildinfo-option=--version" 79 | ;; 80 | p) 81 | export PG_SUPPORTED_VERSIONS="$OPTARG" 82 | ;; 83 | P) 84 | DEB_BUILD_PROFILES="${DEB_BUILD_PROFILES:+$DEB_BUILD_PROFILES,}$OPTARG" 85 | ;; 86 | *) 87 | SHIFT=2 # don't eat the option we just couldn't parse 88 | break 89 | ;; 90 | esac 91 | done 92 | # shift away options 93 | shift $((OPTIND - SHIFT)) 94 | [ "$*" ] && ARG="$ARG $*" 95 | [ "${DEB_BUILD_PROFILES:-}" ] && ARG="-P$DEB_BUILD_PROFILES $ARG" 96 | 97 | # get orig tarball 98 | if [ -z "${BINARY_ONLY:-}" ] && [ -x /usr/bin/origtargz ]; then 99 | origtargz || : 100 | fi 101 | 102 | trap "test -s ../log && gzip -9 ../log" EXIT 103 | 104 | rm -f ../log ../log.gz 105 | if command -v script >/dev/null; then 106 | script -e -c "echo ${DEB_BUILD_OPTIONS:+DEB_BUILD_OPTIONS=$DEB_BUILD_OPTIONS} \ 107 | ${DEB_CHECK_COMMAND:+DEB_CHECK_COMMAND=$DEB_CHECK_COMMAND} \ 108 | dpkg-buildpackage $ARG ${PARALLEL:=-j$(nproc)}; \ 109 | dpkg-buildpackage $ARG $PARALLEL" ../log 110 | else 111 | echo ${DEB_BUILD_OPTIONS:+DEB_BUILD_OPTIONS=$DEB_BUILD_OPTIONS} \ 112 | ${DEB_CHECK_COMMAND:+DEB_CHECK_COMMAND=$DEB_CHECK_COMMAND} \ 113 | dpkg-buildpackage $ARG 114 | dpkg-buildpackage $ARG 2>&1 | tee ../log 115 | fi 116 | head -n1 debian/changelog 117 | 118 | if [ "${DEBI:-}" ]; then 119 | sudo debi 120 | fi 121 | 122 | if [ "${AUTOPKGTEST:-}" ]; then 123 | adt 124 | fi 125 | -------------------------------------------------------------------------------- /bin/dclean: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | export PG_UPDATECONTROL="yes" 4 | 5 | dh_testdir 6 | case $0 in 7 | *dclean) fakeroot ./debian/rules clean ;; 8 | *dbuild) ./debian/rules build ;; 9 | *dbinary) fakeroot ./debian/rules binary ;; 10 | *dconfigure) ./debian/rules configure ;; 11 | *dinstall) fakeroot ./debian/rules install ;; 12 | *dpatch|*dpatch_) ./debian/rules patch ;; 13 | *dunpatch) ./debian/rules unpatch ;; 14 | *) echo "huh?" ;; 15 | esac 16 | -------------------------------------------------------------------------------- /bin/debcheckout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | SRC=$1 6 | 7 | # create 1st directory level 8 | mkdir -p $SRC 9 | cd $SRC 10 | 11 | # checkout Debian repository into 2nd directory level 12 | ( set -x 13 | debcheckout $SRC 14 | cd $SRC 15 | v up 16 | git ctags 17 | ) 18 | 19 | case $(cd $SRC && git remote -v) in 20 | *github.com/*) # Debian repo is on github, don't try to checkout upstream 21 | exit 22 | ;; 23 | esac 24 | 25 | # checkout upstream repository into 2nd directory level 26 | HOMEPAGE=$(apt-cache showsrc $SRC | awk '/^Homepage:/ { print $2 }' | head -n1) 27 | case $HOMEPAGE in 28 | *github.com/*) 29 | set -x 30 | git clone ${HOMEPAGE%/}.git $SRC.git 31 | cd $SRC.git 32 | git ctags 33 | ;; 34 | esac 35 | -------------------------------------------------------------------------------- /bin/debdiff-debian: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | TMP=$(mktemp --tmpdir debdiff.XXXXXX) 4 | trap "rm -f $TMP" 0 2 3 15 5 | 6 | debdiff "$@" > $TMP 7 | ( diffstat $TMP 8 | filterdiff -i '*debian*' $TMP ) | colordiff | less -R 9 | -------------------------------------------------------------------------------- /bin/dnsgrind: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Copyright (c) 2008-2015 Christoph Berg 4 | # 5 | # Permission is hereby granted, free of charge, to any person 6 | # obtaining a copy of this software and associated documentation 7 | # files (the "Software"), to deal in the Software without 8 | # restriction, including without limitation the rights to use, 9 | # copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the 11 | # Software is furnished to do so, subject to the following 12 | # conditions: 13 | # 14 | # The above copyright notice and this permission notice shall be 15 | # included in all copies or substantial portions of the Software. 16 | # 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | # OTHER DEALINGS IN THE SOFTWARE. 25 | 26 | use strict; 27 | use warnings; 28 | use Net::DNS; 29 | use Getopt::Std; 30 | 31 | # q no RRSIG output 32 | # s full RRSIG output 33 | my %opt; 34 | getopts ('sS', \%opt); 35 | 36 | my %cache; 37 | my $res; 38 | my $rrsigs = 0; 39 | 40 | my ($green, $yellow, $red, $reset) = ("", "", "", ""); 41 | ($green, $yellow, $red, $reset) = map { "\033[${_}m" } qw(32 33 31 0) if (-t 1); 42 | 43 | sub dns ($$); 44 | 45 | sub dns ($$) 46 | { 47 | my ($q, $depth) = @_; 48 | return if $cache{$q}; 49 | $cache{$q} = 1; 50 | 51 | my $query = $res->search($q, 'ANY'); 52 | if (! $query) { 53 | warn " " x $depth, "$green$q$reset query failed: $red", $res->errorstring, "$reset\n"; 54 | return; 55 | } 56 | 57 | foreach my $rr ($query->answer) { 58 | my $t = $rr->type; 59 | my $a = $rr->rdatastr; 60 | my $q2 = $a; 61 | 62 | if ($t =~ /^(AFSDB|MX)$/) { 63 | $q2 =~ s/\d+ //; 64 | } elsif ($t =~ /^(SOA)$/) { 65 | $q2 =~ s/ .*//s; 66 | } elsif ($t =~ /^(RP)$/) { # , resolve latter 67 | $q2 =~ s/.* //s; 68 | } elsif ($t =~ /^(DNSKEY|DS|HINFO|NSEC|NSEC3PARAM|SSHFP|TXT)$/) { 69 | $q2 = ""; # no recursion here 70 | } elsif ($t =~ /^(RRSIG)$/) { 71 | $rrsigs++; 72 | next unless ($opt{s} or $opt{S}); 73 | $q2 = ""; # no recursion here 74 | $a =~ s/ (?:\(.*|[0-9a-f]{32,}$)//s unless ($opt{S}); 75 | } 76 | 77 | my ($cq, $cq0) = ("", ""); 78 | ($cq, $cq0) = ($yellow, $reset) if (not $cache{$q2} and -t 1); 79 | print " " x $depth, "$green$q$reset $t $cq$a$cq0\n"; 80 | 81 | next if ($q2 eq '' or $q2 eq '.'); 82 | dns ($q2, $depth + 1); 83 | } 84 | } 85 | 86 | if (@ARGV and $ARGV[0] =~ /^@(.*)/) { 87 | $res = Net::DNS::Resolver->new (nameservers => [$1]); 88 | shift; 89 | } else { 90 | $res = Net::DNS::Resolver->new; 91 | } 92 | 93 | for my $host (@ARGV) { 94 | dns ($host, 0); 95 | } 96 | 97 | if ($rrsigs and not $opt{s} and not $opt{S}) { 98 | print "$rrsigs RRSIG records omitted\n"; 99 | } 100 | -------------------------------------------------------------------------------- /bin/fig2eps: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | ############################################################################## 3 | # TODO error detection for LaTeX run and other commands 4 | # TODO pass latex texts through text filter 5 | # TODO filter support is rudimentary... 6 | # 7 | # 20000511 mah started work. 8 | # 20000522 mah added filter and macro input support. RUDIMENTARY 9 | ############################################################################## 10 | # Match Edit 11 | # 12 | # invocation: 13 | # fig2eps.pl [-tff LATEXFIGUREFILTER] [-i LATEXINPUT] SOURCE.fig DEST.fig 14 | # 15 | # description: 16 | # just a short-cut to convert .fig with LaTeX strings in 17 | # .eps files. I had this hardcoded in a Makefile once, 18 | # but it's better with command. 19 | # 20 | # procedure: 21 | # 1) convert .fig in .eps with special text hidden 22 | # (language pstex from fig2dev) 23 | # 2) convert .fig to .tex only with special text and 24 | # including .eps from 1) 25 | # 3) latex .tex from 2) to produce .dvi 26 | # 4) invoke .dvi to produce .eps 27 | # This procedure is needed to provide scalability for 28 | # the figures. 29 | # 30 | # important note: 31 | # OLD DVIPS VERSIONS MAY NOT WORK APPRORIATELY TO 32 | # PRODUCE EPS-FILES! 5.76 AT LEAST WORKS. 33 | # 34 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 35 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 36 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 37 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 38 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 39 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 40 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 41 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 42 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 43 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 | # 45 | ############################################################################## 46 | 47 | $USAGE = 48 | "\n\nUsage: fig2eps.pl [-lffLATEXFIGUREFILTER] SOURCE.fig DEST.fig"; 49 | 50 | $tff = "cat"; 51 | $inputs = ""; 52 | if( $ARGV[0] =~ /^-lff(.*)/ ) { 53 | $tff = $1; 54 | shift @ARGV; 55 | } 56 | 57 | if( $ARGV[0] =~ /^-i(.*)/ ) { 58 | $inputs .= $1; 59 | shift @ARGV; 60 | } 61 | 62 | $src = quotemeta( @ARGV[0] ) || die "?source file must be supplied$USAGE"; 63 | $dest = quotemeta( @ARGV[1] ) || die "?destination file must be supplied$USAGE"; 64 | 65 | $tmp = "fig2eps-$$"; # worked on AIX, problems elsewhere (if I remember correctly) 66 | 67 | if( $src eq '\-' ) { # source is stdin, cp to some location and rename it (crappy, isn't it?) 68 | # above backslash because of quotemeta 69 | { local $/ = ''; open TMP, ">$tmp.stdin"; print TMP ; close TMP; $src = "$tmp.stdin"; } 70 | } 71 | 72 | system( "$tff < $src > $tmp.flt.fig" ); 73 | system( "fig2dev -L pstex $tmp.flt.fig $tmp.eps 1> /dev/null 2> /dev/null" ); 74 | system( "fig2dev -L pstex_t -p $tmp.eps $tmp.flt.fig $tmp.tex 1> /dev/null 2> /dev/null" ); 75 | 76 | open( TMP, ">$tmp.frame.tex" ); 77 | print TMP 78 | "\\documentclass{book}\n" 79 | . "\\usepackage{rotating,amsmath,epsfig}\n" 80 | . "\\usepackage{color,times}\n" 81 | . "\\setlength{\\textwidth}{100cm}\n" 82 | . "\\setlength{\\textheight}{100cm}\n" 83 | . "\\pagestyle{empty}\n" 84 | . ($inputs ne "" ? "\\input{$inputs}" : "" ) 85 | . "\\begin{document}\n" 86 | . "\\input{$tmp.tex}\n" 87 | . "\\end{document}\n"; 88 | close TMP; 89 | 90 | system( "latex $tmp.frame.tex" ); 91 | system( "dvips -E $tmp.frame.dvi -o $dest 1> /dev/null 2> /dev/null"); 92 | system( "rm $tmp.* 1> /dev/null 2> /dev/null" ); 93 | -------------------------------------------------------------------------------- /bin/genisoimage: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | /usr/bin/genisoimage -r -J "$@" 4 | -------------------------------------------------------------------------------- /bin/git-context-diff: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script is used to produce git context diffs 4 | # git config [--global] diff.external git-context-diff 5 | 6 | # Supplied parameters: 7 | # $1 $2 $3 $4 $5 $6 $7 8 | # path old-file old-hash old-mode new-file new-hash new-mode 9 | # 'path' is the git-tree-relative path of the file being diff'ed 10 | 11 | old_hash="$3" 12 | new_hash=$(git hash-object "$5") 13 | 14 | # no change? 15 | [ "$old_hash" = "$new_hash" ] && exit 0 16 | 17 | [ "$DIFF_OPTS" = "" ] && DIFF_OPTS='-pcd' 18 | 19 | echo "diff --git a/$1 b/$1" 20 | echo "new file mode $7" 21 | echo "index ${old_hash:0:7}..${new_hash:0:7}" 22 | 23 | diff --label a/"$1" --label b/"$1" $DIFF_OPTS "$2" "$5" 24 | 25 | exit 0 26 | -------------------------------------------------------------------------------- /bin/git-edit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # modified files from working copy 4 | files=$(git status --porcelain | grep -E "^[AM ][M ] " | cut -c 4-) 5 | if [ -z "$files" ]; then 6 | # otherwise: files from last commit 7 | files=$(git show --stat | grep '^ .* | ' | cut -d ' ' -f 2) 8 | fi 9 | 10 | exec ${EDITOR:-vi} $files 11 | -------------------------------------------------------------------------------- /bin/git-gedit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # edit all files matching `git grep pattern` 4 | 5 | set -eu 6 | 7 | PATTERN="${@: -1}" # last argument 8 | FILES=$(git grep -lz "$@" | xargs -0) # git uses -z automatically here, force it for clarity 9 | 10 | case $0 in 11 | *qedit) quilt add $FILES || [ $? = 2 ] ;; 12 | esac 13 | 14 | ${EDITOR:-vi} "+/$PATTERN" $FILES 15 | -------------------------------------------------------------------------------- /bin/git-jump: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec sh /usr/share/doc/git/contrib/git-jump/git-jump "$@" 4 | -------------------------------------------------------------------------------- /bin/git-qedit: -------------------------------------------------------------------------------- 1 | git-gedit -------------------------------------------------------------------------------- /bin/gitlab-ci-yml: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eux 4 | 5 | cat > debian/gitlab-ci.yml <> ~/.plan 20 | -------------------------------------------------------------------------------- /bin/gpg-reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | gpg-connect-agent updatestartuptty /bye 4 | 5 | rm $HOME/.gnupg/private-keys-v1.d/6ED6EBC7FF5EC8DFD42AB6AA50F2D211D7025464.key \ 6 | $HOME/.gnupg/private-keys-v1.d/AE824795C0081423AB212195547E5396E452DE0E.key \ 7 | $HOME/.gnupg/private-keys-v1.d/F0AD36547A1884F7AF88FB6697FDA83E4702DE31.key 8 | 9 | gpg --card-status 10 | -------------------------------------------------------------------------------- /bin/grep-irssi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | # --- Log opened Di Dez 01 00:00:14 2009 7 | # --- Day changed Mi Dez 02 2009 8 | 9 | my $re = shift; 10 | my $day = "??"; 11 | 12 | foreach my $file (@ARGV) { 13 | if ($file =~ /\.gz$/) { 14 | open F, "gunzip -c \"$file\" |" or die "$file: $!"; 15 | } else { 16 | open F, $file or die "$file: $!"; 17 | } 18 | 19 | while () { 20 | # --- Log opened Mi Sep 01 00:00:24 2010 21 | if (/^--- Log opened (.. ... ..) ..:..:.. (....)/) { 22 | $day = "$1 $2"; 23 | } elsif (/^--- Day changed (.*)/) { 24 | $day = $1; 25 | } 26 | if (/(.*?)($re)(.*)/o) { 27 | if (@ARGV > 1) { 28 | print "$file:"; 29 | } 30 | if (-t 1) { 31 | print "$day $1$2$3\n"; 32 | } else { 33 | print "$day $_"; 34 | } 35 | } 36 | } 37 | 38 | close F; 39 | } 40 | -------------------------------------------------------------------------------- /bin/homegit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | git --git-dir=$HOME/.homegit --work-tree=$HOME "$@" 4 | -------------------------------------------------------------------------------- /bin/lintian: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$*" ] || [ ! -d debian ] ; then 4 | /usr/bin/lintian "$@" 5 | else 6 | SOURCE=$(dpkg-parsechangelog | perl -lne 'print $1 if /Source: (.*)/') 7 | VERSION=$(dpkg-parsechangelog | perl -lne 'print $1 if /Version: (?:\d+:)?(.*)/') 8 | ARCH=$(dpkg --print-architecture) 9 | /usr/bin/lintian "../${SOURCE}_${VERSION}_$ARCH.changes" 10 | fi 11 | -------------------------------------------------------------------------------- /bin/lnconvert: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | for f in "$@" ; do 6 | test -L "$f" || continue 7 | target=$(readlink -f "$f") 8 | echo "$f -> $target" 9 | dir=$(dirname "$f") 10 | base=$(basename "$f") 11 | ( cd $dir 12 | test -L "$base" 13 | rm "$base" 14 | cp -a "$target" "$base" 15 | ) 16 | done 17 | -------------------------------------------------------------------------------- /bin/make-indexjpg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use strict; 4 | use Getopt::Std; 5 | use POSIX qw(ceil); 6 | 7 | my %opt = ( 8 | w => 120, 9 | h => 90, 10 | b => 1, 11 | n => 6, 12 | B => "white", 13 | m => 0, 14 | f => ".index", 15 | H => "", 16 | q => 0, 17 | s => 0, 18 | t => "", 19 | T => "", 20 | v => 0, 21 | ); 22 | 23 | getopts('w:h:H:b:n:B:mf:qst:T:v', \%opt); 24 | 25 | exit 0 unless @ARGV; 26 | 27 | @ARGV = sort @ARGV if $opt{s}; 28 | 29 | my @files = @ARGV; 30 | @files = map { 31 | if($opt{t}) { 32 | if(-f "$opt{t}/$_") { # look for thumbs 33 | $_ = "$opt{t}/$_"; 34 | } elsif (/(.*)\.(gif|bmp)$/) { 35 | $_ = "$opt{t}/$1.jpg" if -f "$opt{t}/$1.jpg"; 36 | } 37 | } 38 | s/\.gif$/.gif[0]/; # extract first frame from from animated gifs 39 | s/'/'\\''/g; # quote ' 40 | $_ = "'$_'"; # quote filenames 41 | } @files; 42 | my $files = join " ", @files; 43 | 44 | print "Schreibe" unless $opt{q}; 45 | unless($opt{m}) { 46 | my $rows = ceil (scalar (@files) / $opt{n}); 47 | my $command = "montage -geometry $opt{w}x$opt{h}+$opt{b}+$opt{b} -background '$opt{B}' -tile $opt{n}x$rows -adjoin $files $opt{f}.jpg"; 48 | print "$command\n" if $opt{v}; 49 | print " $opt{f}.jpg..." unless $opt{q}; 50 | system $command; 51 | } 52 | 53 | my $map = "$opt{f}-map.html"; 54 | print " $map...\n" unless $opt{q}; 55 | open MAP, ">$map" or die "$map: $!"; 56 | 57 | my $name = $opt{f}; 58 | $name =~ s!.*/!!; 59 | 60 | print MAP "\n"; 61 | my $n = 0; 62 | foreach (@ARGV) { 63 | my $left = ($n % $opt{n}) * ($opt{w}+2*$opt{b}); 64 | my $right = $left + ($opt{w}+$opt{b}); 65 | my $top = int($n / $opt{n}) * ($opt{h}+2*$opt{b}); 66 | my $bottom = $top + ($opt{h}+$opt{b}); 67 | my $href = $_; 68 | my $title = $_; 69 | if($opt{H}) { 70 | eval "\$href =~ $opt{H}"; 71 | } 72 | if($opt{T}) { 73 | eval "\$title =~ $opt{T}"; 74 | } 75 | print MAP " \"$title\"\n"; 76 | $n++; 77 | } 78 | print MAP "\n"; 79 | print MAP "\n"; 80 | close MAP; 81 | 82 | 83 | =head1 NAME 84 | 85 | make-indexjpg - creates thumbnail image and corresponding HTML map file 86 | 87 | =head1 SYNOPSIS 88 | 89 | B 90 | [I<-w> B] 91 | [I<-h> B] 92 | [I<-b> B] 93 | [I<-n> B] 94 | [I<-B> B] 95 | [I<-m>] 96 | [I<-f> B] 97 | [I<-H> B] 98 | [I<-T> B] 99 | [I<-q>] 100 | [I<-s>] 101 | [I<-t> B] 102 | [I<-v>] 103 | B ... 104 | 105 | =head1 DESCRIPTION 106 | 107 | B takes a list of image file names and uses B to create 108 | an image with thumbnails. A correspoding HTML map file can be used to make the 109 | index image clickable. 110 | 111 | =head1 OPTIONS 112 | 113 | =head2 I<-w> B I<-h> B 114 | 115 | The thumbnails inside the index image will have size B * B pixels. 116 | [120 * 90] 117 | 118 | =head2 I<-b> B 119 | 120 | Put a border of B pixels around each image. [1] 121 | 122 | =head2 I<-n> B 123 | 124 | Arrange the thumbnails in a grid with B columns. [6] 125 | 126 | =head2 I<-B> B 127 | 128 | Background color to use. [white] 129 | 130 | =head2 I<-m> 131 | 132 | Only generate the B-map.html file, omit B.jpg. [generate both] 133 | 134 | =head2 I<-f> B 135 | 136 | Name the index image B.jpg and the HTML map file B-map.html. 137 | [.index.jpg, .index-map.html] 138 | 139 | =head2 I<-H> B 140 | 141 | Apply perl regexp to filenames before writing href attributes. 142 | Example: -H 's/(.*)/images\/$1/'. 143 | [do not] 144 | 145 | =head2 I<-T> B 146 | 147 | Apply perl regexp to filenames before writing alt and title attributes. 148 | Example: -T 's/(.*)\.jpg/Picture of $1/'. 149 | [do not] 150 | 151 | =head2 I<-q> 152 | 153 | Be quiet. [print names of files written] 154 | 155 | =head2 I<-s> 156 | 157 | Sort the list of images given. [do not] 158 | 159 | =head2 I<-t> B 160 | 161 | Look for precomputed thumbnails in B. Use this to speed up the 162 | B call. [no thumbnails] 163 | 164 | =head2 I<-v> 165 | 166 | Be verbose, print commands as they are executed. [do not] 167 | 168 | =head1 AUTHOR 169 | 170 | Christoph Berg 171 | -------------------------------------------------------------------------------- /bin/make-thumbnails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use warnings; 4 | use strict; 5 | use POSIX qw(ceil); 6 | 7 | my $columns = 10; 8 | my $width = 80; 9 | my $height = 80; 10 | my $border = 1; 11 | 12 | unless (@ARGV) { 13 | @ARGV = (glob ("*.jpg"), glob ("*.JPG")); 14 | @ARGV = sort { 15 | (stat $a)[9] <=> (stat $b)[9] or 16 | $a cmp $b 17 | } @ARGV; 18 | } 19 | 20 | exit 1 unless (@ARGV); 21 | 22 | foreach my $file (@ARGV) { 23 | # ^ needs imagemagick 6.3.8-2 24 | my @cmd = qw(convert -verbose -strip -resize 80x80^ -gravity Center -crop 80x80+0+0); 25 | #s/\.gif$/.gif[0]/; # extract first frame from from animated gifs 26 | system (@cmd, $file, ".$file"); 27 | } 28 | 29 | my @cmd = qw(montage -verbose -geometry 80x80+1+1 -background white -adjoin -tile); 30 | system @cmd, 31 | (scalar (@ARGV) > $columns ? "${columns}x" : scalar (@ARGV)), 32 | (map { ".$_" } @ARGV), 33 | ".index.jpg"; 34 | 35 | open MAP, "> .index-map.html" or die ".index-map.html: $!"; 36 | 37 | print MAP "\n"; 38 | my $n = 0; 39 | foreach (@ARGV) { 40 | my $left = ($n % $columns) * ($width + 2*$border); 41 | my $right = $left + ($width + $border); 42 | my $top = int($n / $columns) * ($height + 2*$border); 43 | my $bottom = $top + ($height + $border); 44 | my $href = "$_.html"; 45 | my $title = $_; 46 | $title =~ s/^\d+-//; 47 | $title =~ s/_/ /g; 48 | $title =~ s/\.(jpe?g|png|gif)$//i; 49 | print MAP " \"$title\"\n"; 50 | $n++; 51 | } 52 | print MAP "\n"; 53 | print MAP "\n"; 54 | close MAP; 55 | -------------------------------------------------------------------------------- /bin/mounttree: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Copyright (c) 2014 Christoph Berg 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | use strict; 24 | use warnings; 25 | 26 | my %mounts; 27 | 28 | open F, "/proc/mounts" or die "/proc/mounts: $!"; 29 | while () { 30 | /(\S+) (\S+) (\S+) (\S+)/; # dev mntpt fstype options [dump pass] 31 | push @{$mounts{$2}->{mnts}}, { # there might be several mounts in the same place 32 | dev => $1, 33 | fstype => $3, 34 | options => $4, 35 | }; 36 | $mounts{$2}->{children} = []; 37 | } 38 | close F; 39 | 40 | foreach my $mntpt (keys %mounts) { 41 | next if ($mntpt eq '/'); 42 | my $parent = $mntpt; 43 | while ($parent) { 44 | $parent =~ s!/[^/]*$!!; # strip last component 45 | $parent ||= '/'; # '' -> '/' 46 | if ($mounts{$parent}) { # parent mountpoint found 47 | push @{$mounts{$parent}->{children}}, $mntpt; 48 | $mounts{$mntpt}->{display} = $mntpt; 49 | $mounts{$mntpt}->{display} =~ s!^$parent/?!!; 50 | last; 51 | } 52 | } 53 | } 54 | 55 | sub printmountpoint ($$); 56 | sub printmountpoint ($$) 57 | { 58 | my ($mntpt, $prefix) = @_; 59 | my $m = $mounts{$mntpt}; 60 | $m->{display} ||= '/'; 61 | 62 | foreach my $mnt (@{$m->{mnts}}) { 63 | $mnt->{dev} .= " ($mnt->{fstype})" if ($mnt->{fstype} ne $mnt->{dev}); 64 | printf "%-30s %-30s %s\n", "$prefix$m->{display}", $mnt->{dev}, $mnt->{options}; 65 | } 66 | foreach my $chld (sort @{$m->{children}}) { 67 | printmountpoint ($chld, "$prefix "); 68 | } 69 | } 70 | 71 | printmountpoint ('/', ''); 72 | -------------------------------------------------------------------------------- /bin/muttquery: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # format: email name comments 4 | 5 | unless ($query = $ARGV[0]) { 6 | print "no query given?!\n"; 7 | exit 1; 8 | } 9 | 10 | print "Looking for $query..\n"; 11 | 12 | # personal mutt aliases 13 | if (open A, "$ENV{HOME}/.priv/mutt/aliases") { 14 | while () { 15 | next if /^#/; 16 | next unless /$query/i; 17 | next unless /^alias (.*?)\s+(.*)\s+<(.*)>/; 18 | print "$3\t$2\t$1\n"; 19 | } 20 | close A; 21 | } 22 | 23 | # system passwd 24 | while (($name, $comment, $gecos) = (getpwent)[0,5,6]) { 25 | $gecos =~ s/,| (\()/\t$1/; 26 | $comment ||= "(passwd)"; 27 | print "$name\t$gecos\t$comment\n" if $name =~ /$query/i 28 | or $comment =~ /$query/i or $gecos =~ /$query/i; 29 | } 30 | 31 | # sendmail aliases 32 | if (open A, "/etc/aliases" or open "/etc/mail/aliases") { 33 | while () { 34 | next if /^#/; 35 | next unless /$query/i; 36 | next unless /^(.*?):\s+(.*)/; 37 | $alias = substr($2, 0, 50); 38 | print "$1\t \t$alias\n"; 39 | } 40 | close A; 41 | } 42 | -------------------------------------------------------------------------------- /bin/mvfix: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z "$1" ] ; then 4 | set * 5 | fi 6 | 7 | for f in "$@" ; do 8 | f=`echo "$f" | sed -e 's!/$!!'` 9 | f2=`echo "$f" | sed -e 's/ /_/g' -e 's/%20/_/g'` 10 | [ "$f" = "$f2" ] && continue 11 | mv -iv "$f" "$f2" 12 | done 13 | -------------------------------------------------------------------------------- /bin/mvi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # mvi - rename files interactively (mv-vi) 3 | # (c) 2001..2004, 2006 Christoph Berg 4 | # This program is free software covered by the GNU GPL. 5 | # 6 | # 010711 cb v0.1 7 | # 030312 cb v0.2: better quoting 8 | # 040408 cb v0.3: support for editing symlinks, use strict 9 | # 040507 cb v0.4: does not use a sh script any more 10 | # 060719 cb v0.5: warn instead of overwriting files 11 | 12 | use strict; 13 | use File::Temp qw/tempfile/; 14 | use Getopt::Std; 15 | 16 | my %opts; 17 | getopts("0c:f:gv", \%opts); 18 | 19 | my $argc = @ARGV; 20 | $opts{f} ||= "-" if $opts{0}; 21 | die "$0: no arguments given" if $argc == 0 and not $opts{f}; 22 | die "$0: arguments given with -f" if $argc > 0 and $opts{f}; 23 | if($opts{f}) { 24 | open F, $opts{f} or die "$0: $opts{f}: $!"; 25 | while() { 26 | chomp; 27 | push @ARGV, $_; 28 | } 29 | close F; 30 | $argc = @ARGV; 31 | } 32 | 33 | my ($fh, $file) = tempfile(); 34 | 35 | #print $fh "apply mv -iv %O %N\n"; 36 | #print $fh "skip-unchanged 1\n"; 37 | #print $fh "verbose 0\n"; 38 | for my $i (0 .. $argc - 1) { 39 | if ($opts{c}) { 40 | print $fh "$opts{c} $ARGV[$i] $ARGV[$i]\n"; 41 | } else { 42 | printf $fh "%6d\t%s\n", $i, $ARGV[$i]; 43 | } 44 | } 45 | close $fh; 46 | 47 | my $editor = $ENV{EDITOR} || "vi"; 48 | system "$editor $file"; 49 | 50 | if ($opts{c}) { 51 | system "sh $file"; 52 | unlink $file, "$file~"; 53 | exit 0; 54 | } 55 | 56 | open FH, $file or die "$file: $!"; 57 | 58 | my $apply = "echo apply undefined"; 59 | my $skip = 1; 60 | my $exit = 0; 61 | while() { 62 | next if /^\s*#/; 63 | next if /^\s*$/; 64 | if(/^apply (.*)/) { 65 | $apply = $1; 66 | next; 67 | } 68 | if(/^skip-unchanged (1|0)$/) { 69 | $skip = $1; 70 | next; 71 | } 72 | if(/^verbose (1|0)$/) { 73 | $opts{v} = $1; 74 | next; 75 | } 76 | if(/^([ \d]{6})\t(.+)/) { 77 | my $i = $1 + 0; 78 | my $n = $2; 79 | die "$file.$.: unknown number '$i'" if $i < 0 or $i >= $argc; 80 | next if $skip and $n eq $ARGV[$i]; 81 | #my $cmd = $apply; 82 | #$cmd =~ s/\%O/$ARGV[$i]/; 83 | #$cmd =~ s/\%N/$n/; 84 | #print "$i: $cmd\n" if $verbose; 85 | #system $cmd; 86 | print "mv $ARGV[$i] $n\n" if $opts{v}; 87 | if (-e $n) { 88 | print STDERR "Warning: not renaming $ARGV[$i], $n exists\n"; 89 | $exit = 1; 90 | next; 91 | } 92 | if ($opts{g}) { 93 | system "git mv '$ARGV[$i]' '$n'"; 94 | } else { 95 | rename $ARGV[$i], $n or warn "rename $ARGV[$i], $n: $!"; 96 | } 97 | next; 98 | } 99 | die "$file.$.: parse error: $_"; # $_ ends with \n 100 | } 101 | close FH; 102 | 103 | unlink $file, "$file~"; 104 | exit $exit; 105 | -------------------------------------------------------------------------------- /bin/nv.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use strict; 4 | 5 | if (@ARGV < 2) { 6 | die "usage: $0 file... directory\n"; 7 | } 8 | 9 | my $dir = pop @ARGV; 10 | my $dir2; 11 | 12 | if (! -d $dir) { 13 | if (-e $dir) { 14 | if (not grep { $dir = $_ } @ARGV) { 15 | print STDERR "$dir exists, but is not a file that would be moved\n"; 16 | exit 2; 17 | } 18 | $dir2 = $dir.$$; 19 | } 20 | 21 | mkdir $dir2 || $dir, 0777 or die "mkdir: $!"; 22 | } 23 | 24 | exit 1 if system "mv -iv '" . 25 | join("' '", map { s/'/'\\''/g; $_; } @ARGV) . 26 | "' '". ($dir2 || $dir) ."' 1>&2"; 27 | 28 | if ($dir2) { 29 | rename $dir2, $dir or die "$dir: $!"; 30 | } 31 | 32 | print "$dir\n"; 33 | -------------------------------------------------------------------------------- /bin/pg16: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eux 4 | 5 | qpop -a || [ $? = 2 ] 6 | up 7 | 8 | if ! grep 'Upload for PostgreSQL 16' debian/changelog; then 9 | dch "Upload for PostgreSQL 16." 10 | fi 11 | 12 | if egrep "^[D ].*postgresql-PGVERSION" debian/control.in; then 13 | sed -i -e '/^[D ]/ s/postgresql-PGVERSION/${postgresql:Depends}/' debian/control.in 14 | dch "Use \${postgresql:Depends}." 15 | fi 16 | 17 | #if ! grep 'postgresql-.*all (>= 21.' debian/control.in; then 18 | # sed -i -e 's/postgresql[^,]*-all[^,]*/postgresql-all (>= 217~)/' debian/control* 19 | # if grep loop debian/rules; then 20 | # sed -i -e 's/ dh $@/ dh $@ --with pgxs_loop/' debian/rules 21 | # dch "Use dh --with pgxs_loop." 22 | # else 23 | # sed -i -e 's/ dh $@/ dh $@ --with pgxs/' debian/rules 24 | # dch "Use dh --with pgxs." 25 | # fi 26 | #fi 27 | 28 | if ! grep '^Standards-Version: 4.6.2' debian/control*; then 29 | sed -i -e 's/^Standards-Version:.*/Standards-Version: 4.6.2/' debian/control* 30 | fi 31 | 32 | if ! grep '^Rules-Requires-Root:' debian/control*; then 33 | sed -i -e '/^Standards-Version/a Rules-Requires-Root: no' debian/control* 34 | dch "R³: no." 35 | fi 36 | 37 | if ! grep 'debhelper-compat (= 13)' debian/control*; then 38 | sed -i -e 's/debhelper[^,]*/debhelper-compat (= 13)/' debian/control* 39 | v rm debian/compat || : 40 | dch "DH 13." 41 | fi 42 | 43 | if grep postgresql-server-dev-all debian/tests/control; then 44 | sed -i -e 's/postgresql-server-dev-all[^,]*/make/' debian/tests/control* 45 | dch "debian/tests: Use 'make' instead of postgresql-server-dev-all." 46 | fi 47 | 48 | if grep supported-versions debian/tests/*; then 49 | sed -i -e 's/supported-versions/FIXME installed-versions/g' debian/tests/* 50 | dch "debian/tests: Use installed-versions instead of supported-versions." 51 | fi 52 | 53 | if grep 'github.*/releases' debian/watch; then 54 | sed -i 's!/releases!/tags!' debian/watch 55 | dch "debian/watch: Look at GitHub tags instead of releases." 56 | fi 57 | 58 | pg_buildext checkcontrol 59 | 60 | if grep UNRELEASED debian/changelog; then 61 | EDITOR=touch dch -r 62 | rm -f '+1' 63 | fi 64 | 65 | vi debian/changelog debian/rules debian/control.in debian/tests/* 66 | 67 | #dbp -a 68 | #upload 69 | -------------------------------------------------------------------------------- /bin/psbooklet: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | if [ "$1" = "-a6" ]; then 4 | psbook -s8 | psbook -s8 | psbook -s8 | psbook -s8 | psbook -s8 | psbook -s8 | psbook | psbook | pstops -pa4 "8:1@.5(0cm,14.85cm)+2@.5(10.5cm,14.85cm)+0U@.5(10.5cm,14.85cm)+3U@.5(21cm,14.85cm),5@.5(0cm,14.85cm)+6@.5(10.5cm,14.85cm)+4U@.5(10.5cm,14.85cm)+7U@.5(21cm,14.85cm)" 5 | else 6 | psbook | pstops "4:0R@.7(0,29.7cm)+1R@.7(0,14.85cm),2L@.7(21cm,0)+3L@.7(21cm,14.85cm)" 7 | fi 8 | -------------------------------------------------------------------------------- /bin/qwrapper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | NAME=${0##*/q} 4 | 5 | # if `qedit` is called without parameters, edit all files in the current patch 6 | if [ "$NAME" = "edit" ] && [ -z "$*" ]; then 7 | set -- $(quilt files) 8 | fi 9 | 10 | quilt $NAME "$@" 11 | -------------------------------------------------------------------------------- /bin/r: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -S "${SSH_AUTH_SOCK:-}" ] && [ "$SSH_AUTH_SOCK" != "$HOME/.ssh/auth_sock" ]; then 4 | rm -f "$HOME/.ssh/auth_sock" 5 | ln -s "$SSH_AUTH_SOCK" "$HOME/.ssh/auth_sock" 6 | SSH_AUTH_SOCK="$HOME/.ssh/auth_sock" 7 | fi 8 | 9 | exec screen -R "$@" 10 | -------------------------------------------------------------------------------- /bin/schroot-screen: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # option parsing 4 | 5 | : ${CHROOT:=sid} 6 | export CHROOT 7 | 8 | while getopts "c:g" opt ; do 9 | case $opt in 10 | c) CHROOT="$OPTARG" ;; 11 | g) GIT="no" ;; 12 | *) exit 5 ;; 13 | esac 14 | done 15 | # shift away args 16 | shift $(($OPTIND - 1)) 17 | 18 | [ "$1" ] && export PACKAGE="$1" 19 | 20 | # schroot session name for use in screen 21 | export SCHROOT_SESSION_ID="$USER-$CHROOT${PACKAGE:+-$PACKAGE}" 22 | 23 | # reexec ourselves through screen 24 | case $TERM in 25 | screen*) ;; 26 | *) exec screen $0 ; exit 1 ;; 27 | esac 28 | 29 | # main program 30 | 31 | run () { 32 | echo 33 | echo "### $@" 34 | "$@" 35 | } 36 | 37 | # begin session 38 | run schroot -b -c $CHROOT -n $SCHROOT_SESSION_ID 39 | run dd-schroot-cmd -c $SCHROOT_SESSION_ID apt-get update 40 | run dd-schroot-cmd -c $SCHROOT_SESSION_ID apt-get -y upgrade 41 | run dd-schroot-cmd -c $SCHROOT_SESSION_ID apt-get -y install exuberant-ctags git quilt vim 42 | 43 | if [ "$PACKAGE" ]; then 44 | run dd-schroot-cmd -c $SCHROOT_SESSION_ID apt-get -y build-dep $PACKAGE 45 | mkdir -p ~/$PACKAGE 46 | cd ~/$PACKAGE 47 | if [ -z "${GIT:-}" ]; then 48 | run schroot -r -c $SCHROOT_SESSION_ID debcheckout $PACKAGE 49 | else 50 | run schroot -r -c $SCHROOT_SESSION_ID apt-get source $PACKAGE 51 | fi 52 | cd $PACKAGE*/ 53 | run schroot -r -c $SCHROOT_SESSION_ID origtargz 54 | fi 55 | 56 | # enter session 57 | run schroot -r -c $SCHROOT_SESSION_ID 58 | 59 | # end session 60 | run schroot -e -c $SCHROOT_SESSION_ID 61 | -------------------------------------------------------------------------------- /bin/schroot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | while getopts "bc:n:p:u" opt ; do 4 | case $opt in 5 | b) BACKPORTS="true" ;; 6 | c) CHROOT="$OPTARG" ;; 7 | n) SESSION="$OPTARG" ;; 8 | p) PG_SUPPORTED_VERSIONS="$OPTARG" ;; 9 | u) NOUPDATE=1 ;; 10 | *) exit 5 ;; 11 | esac 12 | done 13 | # shift away args 14 | shift $(($OPTIND-1)) 15 | 16 | : ${CHROOT:=sid-$(dpkg --print-architecture)} 17 | 18 | case $CHROOT in exp*) 19 | CHROOT="sid" 20 | EXPERIMENTAL="-t experimental" 21 | ;; 22 | esac 23 | 24 | if [ -z "$NOUPDATE" ]; then 25 | schroot -c source:$CHROOT -u root <<-EOF 26 | export DEBIAN_FRONTEND=noninteractive 27 | export UCF_FORCE_CONFFNEW=y UCF_FORCE_CONFFMISS=y 28 | set -ex 29 | if grep -q '^deb ' /etc/apt/sources.list && ! grep -q '^deb-src ' /etc/apt/sources.list; then \ 30 | sed -i -e '/^deb / { p; s/^deb /deb-src / }' /etc/apt/sources.list; \ 31 | fi 32 | test -e /etc/dpkg/dpkg.cfg.d/01unsafeio || echo force-unsafe-io > /etc/dpkg/dpkg.cfg.d/01unsafeio 33 | test -e /etc/apt/apt.conf.d/20norecommends || echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/20norecommends 34 | test -e /etc/apt/apt.conf.d/50i18n || echo 'Acquire::Languages { "en"; };' > /etc/apt/apt.conf.d/50i18n 35 | apt -y update 36 | apt -y install \ 37 | autopkgtest \ 38 | build-essential \ 39 | curl \ 40 | debhelper \ 41 | devscripts \ 42 | dput \ 43 | exuberant-ctags \ 44 | fakeroot \ 45 | git \ 46 | git-buildpackage \ 47 | less \ 48 | lintian \ 49 | locales \ 50 | nano- \ 51 | openssh-client \ 52 | quilt \ 53 | sudo \ 54 | tig \ 55 | vim \ 56 | wget 57 | if ! grep '^%sudo.*NOPASSWD' /etc/sudoers; then 58 | sed -i -e 's/^%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers 59 | fi 60 | apt -y -o DPkg::Options::=--force-confnew dist-upgrade 61 | apt-get -y autoremove # doesn't work with apt on jessie 62 | EOF 63 | fi 64 | 65 | # session name 66 | if [ -f debian/changelog ]; then 67 | PKG=$(dpkg-parsechangelog -SSource | tr + x) 68 | : ${SESSION:="$USER-$CHROOT-$PKG"} 69 | else 70 | : ${SESSION:="$USER-$CHROOT"} 71 | fi 72 | 73 | # begin session 74 | if schroot -c $CHROOT -n $SESSION -b; then 75 | trap "schroot -c session:$SESSION -e" EXIT 76 | fi 77 | 78 | if [ "${EXPERIMENTAL:-}" ]; then 79 | schroot -c session:$SESSION -u root -r <<-EOF 80 | set -ex 81 | sed -i -e '/sid/ { p; s/sid/experimental/ }' /etc/apt/sources.list 82 | apt -y update 83 | EOF 84 | fi 85 | 86 | # activate backports 87 | if [ "${BACKPORTS:-}" ]; then 88 | schroot -c session:$SESSION -u root -r <<-EOF 89 | set -ex 90 | mv /etc/apt/sources.list.d/backports.list.disabled /etc/apt/sources.list.d/backports.list 91 | apt -y update 92 | EOF 93 | fi 94 | 95 | # install extra PG version 96 | if [ "${PG_SUPPORTED_VERSIONS:-}" ]; then 97 | schroot -c session:$SESSION -u root -r <<-EOF 98 | export DEBIAN_FRONTEND=noninteractive 99 | export UCF_FORCE_CONFFNEW=y UCF_FORCE_CONFFMISS=y 100 | set -ex 101 | dpkg-query -s postgresql-common >/dev/null 2>&1 || apt -y install postgresql-common 102 | echo "$PG_SUPPORTED_VERSIONS" > /etc/postgresql-common/supported_versions 103 | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -t -v$PG_SUPPORTED_VERSIONS -i 104 | EOF 105 | fi 106 | 107 | # use older debhelper version 108 | debhelper_compat () 109 | { 110 | local level="$1" 111 | if [ -f debian/compat ]; then 112 | pkglevel="$(cat debian/compat)" 113 | else 114 | pkglevel="$(grep -o 'debhelper-compat (= [0-9]*' debian/control | sed -e 's/.* //')" 115 | fi 116 | if [ -z "$pkglevel" ]; then 117 | echo "Could not determine debhelper compat level" 118 | exit 1 119 | fi 120 | #echo "Package is using debhelper compat level $pkglevel" 121 | [ "$level" -ge "$pkglevel" ] && return 122 | if [ "$level" -ge 11 ]; then 123 | sed -i -e "s/debhelper[^,]*/debhelper-compat (= $level)/" debian/control* 124 | else 125 | sed -i -e "s/debhelper[^,]*/debhelper (>= $level)/" debian/control* 126 | echo "$level" > debian/compat 127 | fi 128 | echo "Using debhelper $level" 129 | } 130 | 131 | # install build deps 132 | if [ "$PKG" ]; then 133 | case $CHROOT in 134 | jessie*|stretch*) debhelper_compat 10 ;; 135 | buster*) debhelper_compat 12 ;; 136 | bullseye*) debhelper_compat 13 ;; 137 | bookworm*) debhelper_compat 13 ;; 138 | xenial*) debhelper_compat 9 ;; 139 | bionic*) debhelper_compat 11 ;; 140 | eoan*|focal*) debhelper_compat 12 ;; 141 | groovy*|hirsute*|impish*) debhelper_compat 13 ;; 142 | esac 143 | 144 | schroot -c session:$SESSION -u root -r <<-EOF 145 | export DEBIAN_FRONTEND=noninteractive 146 | export UCF_FORCE_CONFFNEW=y UCF_FORCE_CONFFMISS=y 147 | set -ex 148 | apt -y -o DPkg::Options::=--force-confnew ${EXPERIMENTAL:-} build-dep . # doesn't work on jessie 149 | EOF 150 | fi 151 | 152 | # run session 153 | set -x 154 | schroot -c session:$SESSION -r -- bash 155 | -------------------------------------------------------------------------------- /bin/smart-less: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ ! -t 1 ] && exec cat "$@" 4 | 5 | if [ "$LINES" ] && [ -e "$1" ] ; then 6 | lines=$(wc -l < "$1") 7 | [ "$lines" -le "$LINES" ] && exec cat "$@" 8 | fi 9 | 10 | exec less -R "$@" 11 | -------------------------------------------------------------------------------- /bin/spotify_control: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # https://community.spotify.com/t5/Desktop-Linux/Linux-keyboard-shortcuts/td-p/1626394 3 | 4 | # Simple Spotify Control 5 | # Just call ./spotify_control --help 6 | 7 | CMD="dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player" 8 | 9 | case "$1" in 10 | "playpause" ) 11 | ${CMD}.PlayPause 12 | exit $? 13 | ;; 14 | "next" ) 15 | ${CMD}.Next 16 | exit $? 17 | ;; 18 | "previous" ) 19 | ${CMD}.Previous 20 | exit $? 21 | ;; 22 | "stop" ) 23 | ${CMD}.Stop 24 | exit $? 25 | ;; 26 | "play" ) 27 | ${CMD}.Play 28 | exit $? 29 | ;; 30 | *) 31 | echo "Usage: $0 [command]" 32 | echo " commands are: playpause, next, previous, stop, play" 33 | exit 1 34 | ;; 35 | esac 36 | 37 | -------------------------------------------------------------------------------- /bin/ssh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | # forward $TZ as $LC_TZ 6 | if [ "${TZ:-}" ]; then 7 | LC_TZ="$TZ" 8 | elif [ -f /etc/timezone ]; then 9 | LC_TZ="$(cat /etc/timezone)" 10 | elif [ -L /etc/timezone ]; then 11 | LC_TZ="$(readlink /etc/timezone)" 12 | LC_TZ="${LC_TZ#/usr/share/zoneinfo/}" 13 | elif [ -L /etc/localtime ]; then 14 | LC_TZ="$(readlink /etc/localtime)" 15 | LC_TZ="${LC_TZ#/usr/share/zoneinfo/}" 16 | fi 17 | export LC_TZ 18 | 19 | exec /usr/bin/ssh "$@" 20 | -------------------------------------------------------------------------------- /bin/terminal-title: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | test -t 1 || exit 0 4 | 5 | case $TERM in 6 | screen*) 7 | echo -en "\\033k$1\\033\\" ;& # fallthrough 8 | xterm*|rxvt*) 9 | echo -en "\\033]0;$1\\007" ;; 10 | esac 11 | -------------------------------------------------------------------------------- /bin/tlsaget: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # tlsaget [connect to host] 4 | 5 | set -eu 6 | set -o pipefail 7 | 8 | if [ $# -eq 3 ]; then 9 | HOST="$1" NAME="$2" PORT="$3" 10 | else 11 | HOST="$1" NAME="$1" PORT="$2" 12 | fi 13 | 14 | CERT=$(openssl s_client -connect "$HOST:$PORT" -servername "$NAME" < /dev/null) 15 | echo "$CERT" | openssl x509 -text 16 | HASH=$(echo "$CERT" | openssl x509 -noout -pubkey | \ 17 | openssl pkey -pubin -outform DER | \ 18 | sha256sum) 19 | 20 | echo "_$PORT._tcp.$NAME. TLSA 3 1 1 ${HASH% *}" 21 | -------------------------------------------------------------------------------- /bin/tm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if which stat >/dev/null 2>&1 ; then 4 | stat -c'%A %h %U %G %s c%.19z m%.19y a%.19x %n' "$@" 5 | exit 0 6 | fi 7 | 8 | while [ $1 ] ; do 9 | echo -n "ctime " 10 | ls -Fcld "$1" 11 | echo -n "mtime " 12 | ls -Ftld "$1" 13 | echo -n "atime " 14 | ls -Fuld "$1" 15 | shift 16 | done 17 | -------------------------------------------------------------------------------- /bin/ttar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z "$1" ] ; then 4 | echo "usage: {ttar|ctar} archive.{tar|tgz|bz2|zip|rar} [filenames...]" 1>&2 5 | exit 1 6 | fi 7 | 8 | case "$1" in 9 | *.tar) T="tar tvf" C="tar cvf" ;; 10 | *.tgz|*.tar.gz|*.tar.Z) T="tar tvfz" C="tar cvfz" ;; 11 | *.tbz|*.tar.bz2) T="tar tvfj" C="tar cvfj" ;; 12 | *.txz|*.tar.xz) T="tar tvfJ" C="tar cvfJ" ;; 13 | *.ace) T="unace v" C="echo ace not supported:" ;; 14 | *.ar) T="ar tv" C="echo ar not supported:" ;; 15 | *.deb) T="dpkg-deb --contents" C="echo ar not supported:" ;; 16 | *.arj) T="unarj v" C="echo arj not supported:" ;; 17 | *.lzh) T="lha v" C="lha a" ;; 18 | *.rar) T="unrar v" C="echo rar not supported:" ;; 19 | *.xar) T="xar -tvf" C="xar -cf" ;; 20 | *.zip|*.ZIP|*.exe) T="unzip -l" C="zip -r" ;; 21 | *.7z*) T="7z l" C="7z a" ;; 22 | *) echo "$0 error: suffix not recognized: $1" 1>&2 23 | exit 1 ;; 24 | esac 25 | 26 | case "$0" in 27 | *ttar) $T "$@" ;; 28 | *ctar) $C "$@" ;; 29 | *) echo "$0 error: called with unknown name" 1>&2 30 | exit 1 ;; 31 | esac 32 | -------------------------------------------------------------------------------- /bin/up: -------------------------------------------------------------------------------- 1 | v -------------------------------------------------------------------------------- /bin/upload: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | CLEAN=yes 6 | GIT=git 7 | PACKAGE=$(dpkg-parsechangelog -SSource) 8 | 9 | while getopts "ce:gh:" opt ; do 10 | case $opt in 11 | c) CLEAN="" ;; 12 | e) DELAYED="$OPTARG" ;; 13 | g) GIT="" ;; 14 | h) UPLOAD_HOST="$OPTARG" ;; 15 | *) exit 5 ;; 16 | esac 17 | done 18 | # shift away args 19 | shift $(($OPTIND - 1)) 20 | 21 | distribution=$(dpkg-parsechangelog -Sdistribution) 22 | if [ "$distribution" = "UNRELEASED" ]; then 23 | echo "Distribution is UNRELEASED. Fix that before uploading." 24 | exit 1 25 | fi 26 | 27 | [ "$CLEAN" ] && dclean 28 | if [ -d debian/patches ]; then 29 | qpop -a || [ $? = 2 ] 30 | fi 31 | echo 32 | 33 | read -p "Build with binaries? " reply 34 | case $reply in 35 | n) ;; 36 | *) dbp "$@" ;; 37 | esac 38 | echo 39 | 40 | read -p "Build source? " reply 41 | case $reply in 42 | n) ;; 43 | *) dbp -S "$@" ;; 44 | esac 45 | echo 46 | 47 | changes=$(ls -t ../*.changes | head -1) 48 | printf '\e[1;34m' 49 | ls -l $changes 50 | printf '\e[0;34m' 51 | cat $changes 52 | printf '\e[0m' 53 | 54 | echo 55 | [ -d .git ] && git --no-pager status 56 | 57 | # sanity checks 58 | if [ -f debian/source/lintian-overrides ] && grep changelog-should-mention-nmu debian/source/lintian-overrides; then 59 | printf '\e[1;31mObsolete lintian overrides found\e[0m\n' 60 | fi 61 | if grep -q postgres debian/control* && ! grep -q Rules-Requires-Root debian/control; then 62 | printf '\e[1;31mRules-Requires-Root: no missing\e[0m\n' 63 | fi 64 | if grep FIXME debian/control*; then 65 | printf '\e[1;31mFIXME in debian/control\e[0m\n' 66 | fi 67 | if [ ! -f debian/gitlab-ci.yml ] && [ ! -f debian/salsa-ci.yml ]; then 68 | printf '\e[1;31mNo debian/gitlab-ci.yml found\e[0m\n' 69 | fi 70 | if [ -f debian/watch ] && grep -q /releases debian/watch; then 71 | printf '\e[1;31mdebian/watch references /releases instead of /tags\e[0m\n' 72 | fi 73 | case $changes in 74 | *_source*) ;; 75 | *) printf '\e[1;31mArchitecture-dependant changes file\e[0m\n' 76 | ;; 77 | esac 78 | 79 | export GPG_TTY="$(tty)" 80 | gpg-connect-agent updatestartuptty /bye > /dev/null 81 | 82 | if [ "$GIT" ]; then 83 | echo 84 | echo -n "$PACKAGE: Push? " 85 | read push 86 | 87 | grep -E '^Vcs|^Homepage' debian/control || : 88 | if grep -q postgres debian/control*; then 89 | URL="https://pgdgbuild.dus.dg-i.net/job/$PACKAGE/build" 90 | printf "\e[1m$URL\e[0m\n" 91 | x-www-browser "$URL" & 92 | fi 93 | 94 | echo -n "git pull ... " 95 | git pull --ff-only 96 | 97 | if git status -s | grep -q '^[^?]'; then 98 | git add -u debian 99 | debcommit 100 | fi 101 | 102 | # check which branches exist locally 103 | BRANCHES=$(git branch | grep '^\*' | cut -d ' ' -f 2) 104 | for branch in upstream upstream/latest debian/upstream pristine-lfs pristine-tar; do 105 | if git branch | grep -Eqx "^\*? ? ?$branch"; then 106 | BRANCHES="$BRANCHES $branch" 107 | fi 108 | done 109 | # check which branches need pushing 110 | for branch in $BRANCHES; do 111 | mine=$(git rev-parse $branch) 112 | origin=$(git rev-parse origin/$branch 2> /dev/null || :) # branch might not exist yet 113 | if [ "$mine" != "$origin" ]; then 114 | PUSH_BRANCHES="${PUSH_BRANCHES:+$PUSH_BRANCHES }$branch" 115 | fi 116 | done 117 | if [ "${PUSH_BRANCHES:-}" ]; then 118 | echo -n "git npush origin $PUSH_BRANCHES ... " 119 | git npush origin $PUSH_BRANCHES 120 | fi 121 | fi 122 | 123 | echo 124 | echo -n "$PACKAGE: Upload? " 125 | read upload 126 | 127 | if [ "$GIT" ]; then 128 | version=$(dpkg-parsechangelog -SVersion) 129 | tag="debian/$(echo $version | tr ':~' '%_')" 130 | if ! git tag | grep -q "^$tag$"; then 131 | ( set -x; git tag -s -m "tagging $PACKAGE $version" "$tag" ) 132 | fi 133 | echo -n "git push ... " 134 | git push 135 | fi 136 | set -x 137 | debsign $changes 138 | dput ${DELAYED:+-e $DELAYED} ${UPLOAD_HOST:-} $changes 139 | -------------------------------------------------------------------------------- /bin/upstream: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | if test -d debian/patches; then 6 | quilt pop -a || [ $? = 2 ] 7 | fi 8 | up 9 | 10 | # gbp repo 11 | if git ls | grep -qv '^debian/'; then 12 | git uscan 13 | 14 | # debian/ repo 15 | else 16 | uscan 17 | tarball=$(ls -v ../*.orig.tar.* | tail -n1) 18 | tarball=${tarball##*_} 19 | version=${tarball%.orig.tar.*} 20 | 21 | oldepoch=$(dpkg-parsechangelog -SVersion | grep -o '[0-9]*:' || :) 22 | 23 | dch -v "$oldepoch$version-1" "New upstream version $version." 24 | fi 25 | 26 | dch -r 27 | 28 | origtargz -u 29 | if test -d debian/patches; then 30 | quilt push -a || [ $? = 2 ] 31 | fi 32 | 33 | upload 34 | -------------------------------------------------------------------------------- /bin/v: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # DWIM cvs/svn/whatever wrapper. 4 | # (public domain) 2008, 2009 Christoph Berg 5 | # One of the scripts I should have written years ago. 6 | 7 | set -eu 8 | 9 | try_vcs_dir () 10 | { 11 | dir="$1" 12 | #echo "Looking in $dir ..." 13 | if [ -e $dir/.git ] ; then 14 | VCS=git 15 | elif [ -d $dir/.svn ] ; then 16 | VCS=svn 17 | elif [ -d $dir/.hg ] ; then 18 | VCS=hg 19 | elif [ -d $dir/.bzr ] ; then 20 | VCS=bzr 21 | elif [ -d $dir/CVS ] ; then 22 | VCS=cvs 23 | else 24 | return 1 25 | fi 26 | return 0 27 | } 28 | 29 | find_vcs () 30 | { 31 | for dir in . .. ../.. ../../.. ../../../.. ../../../../.. ../../../../../..; do 32 | if try_vcs_dir $dir; then 33 | #echo "Found $VCS in $dir" 34 | return 0 35 | fi 36 | done 37 | echo "No VCS found" 1>&2 38 | exit 1 39 | } 40 | 41 | b=$(basename $0) 42 | case $b in 43 | v) 44 | command="$1" 45 | test "$command" && shift 46 | ;; 47 | *) 48 | command="$b" 49 | ;; 50 | esac 51 | 52 | find_vcs 53 | 54 | case $command in 55 | br|branch) $VCS branch "$@" ;; 56 | cdi|cdiff) case $VCS in 57 | git) GIT_EXTERNAL_DIFF=git-context-diff git diff "$@" ;; 58 | *) echo "Not supported yet" >&2 ;; 59 | esac ;; 60 | ci|cia|com|commit) case $VCS in 61 | bzr) $VCS $command "$@" && { 62 | read -p "Push? y:yes [y] " push 63 | case $push in 64 | "") $VCS push ;; 65 | y|p) $VCS push ;; 66 | esac 67 | } ;; 68 | hg) hg $command "$@" && hg push ;; 69 | git) $VCS $command "$@" && { 70 | read -p "Push? y:yes r:pull --rebase and push [y] " push 71 | case $push in 72 | "") $VCS push ;; 73 | y|p) $VCS push ;; 74 | r) $VCS pull --stat --rebase && $VCS push ;; 75 | esac 76 | } ;; 77 | *) $VCS $command "$@" ;; 78 | esac ;; 79 | di|diff) if [ "$VCS" != git ] && [ -t 1 ] && [ -x /usr/bin/colordiff ] ; then 80 | $VCS $command "$@" | colordiff 81 | else 82 | $VCS $command "$@" 83 | fi ;; 84 | wd|wdi|wdiff) case $VCS in 85 | git) git diff --color-words "$@" ;; 86 | svn) svn diff --diff-cmd wdiff.sh "$@" ;; 87 | *) $VCS diff "$@" | wdiff -d ;; 88 | esac ;; 89 | pull) case $VCS in 90 | hg) hg pull -u "$@" ;; 91 | svn) [ "$1" = "-u" ] && shift 92 | svn update "$@" ;; 93 | *) $VCS $command "$@" ;; 94 | esac ;; 95 | push) case $VCS in 96 | #git) $VCS $command "$@" && git push --tags ;; 97 | *) $VCS $command "$@" ;; 98 | esac ;; 99 | revert) case $VCS in 100 | git) $VCS co -- "$@" ;; 101 | *) $VCS $command "$@" ;; 102 | esac ;; 103 | st|status|sti) case $VCS in 104 | cvs) cvs update "$@" ;; 105 | *) $VCS $command "$@" ;; 106 | esac ;; 107 | # default action 108 | up|update|"") case $VCS in 109 | bzr) bzr pull "$@" ;; 110 | hg) hg pull -u "$@" ;; 111 | git) 112 | git pull --prune "$@" 113 | # fast-forward Debian packaging branches 114 | current_branch=$(git symbolic-ref --short HEAD) 115 | for branch in master experimental upstream upstream/latest debian/upstream pristine-lfs pristine-tar; do 116 | [ "$branch" = "$current_branch" ] && continue # skip currently checked out branch 117 | origin=$(git rev-parse --verify origin/$branch 2> /dev/null) || continue 118 | mine=$(git rev-parse --verify $branch 2> /dev/null || :) # branch might not exist yet 119 | if [ "$mine" != "$origin" ]; then 120 | if [ -z "$mine" ] || git merge-base --is-ancestor $mine $origin; then 121 | echo "+ Updating $branch $mine..$origin" 122 | git update-ref refs/heads/$branch $origin $mine 123 | elif git merge-base --is-ancestor $origin $mine; then 124 | echo "+ $branch is ahead of origin/$branch" 125 | else 126 | echo "+ $branch cannot be fast-forwarded" 127 | exit 1 128 | fi 129 | else 130 | echo "+ $branch is up-to-date" 131 | fi 132 | done 133 | ;; 134 | *) $VCS update "$@" ;; 135 | esac ;; 136 | add|blame|co|cp|info|log|mv|resolved|revert|rm) 137 | $VCS $command "$@" ;; 138 | *) #echo "$0: $VCS command '$command' not recognized. YMMV." 1>&2 139 | $VCS "$command" "$@" ;; 140 | esac 141 | -------------------------------------------------------------------------------- /bin/wdiff: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -t 1 ] ; then 4 | exec /usr/bin/wdiff -w '' -x '' -y '' -z '' "$@" 5 | else 6 | exec /usr/bin/wdiff "$@" 7 | fi 8 | -------------------------------------------------------------------------------- /bin/wdiff.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while getopts "uL:" opt ; do 4 | case $opt in 5 | u) ;; 6 | L) ;; # svn: -L --label 7 | *) exit 5 ;; 8 | esac 9 | done 10 | # shift away args 11 | shift $(($OPTIND - 1)) 12 | 13 | if [ -x /usr/bin/dwdiff ] ; then 14 | /usr/bin/dwdiff -w '' -x '' -y '' -z '' \ 15 | -p -d '#-=(){}[]",:;/|'\' \ 16 | -C 3 "$@" 17 | else 18 | /usr/bin/wdiff -w '' -x '' -y '' -z '' \ 19 | "$@" 20 | fi 21 | -------------------------------------------------------------------------------- /bin/wodim: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | /usr/bin/wodim -v "$@" && eject /dev/sr0 4 | -------------------------------------------------------------------------------- /bin/xroot: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | cd $HOME/.local/share/backgrounds/ 6 | 7 | # skip download if image was last fetched less than 20min ago 8 | if [ "$(find sun.jpg -mmin -20)" ]; then 9 | exit 0 10 | fi 11 | 12 | flavors="0171 0193 0211 0304 0131 0335 0094 HMIIF 1600 1700 HMIB HMIBC" 13 | flavor="$(echo $flavors | xargs -n1 | shuf | head -n1)" 14 | 15 | wget -q -O sun2.jpg "https://sdo.gsfc.nasa.gov/assets/img/latest/latest_2048_$flavor.jpg" 16 | mv sun2.jpg sun.jpg 17 | 18 | gsettings set org.gnome.desktop.background picture-uri file://$PWD/sun.jpg 19 | -------------------------------------------------------------------------------- /bin/xset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | xhost - >/dev/null 4 | xmodmap $HOME/.xmodmap-pc 5 | xset b off 6 | xset r rate 400 30 7 | xset dpms 0 0 1200 8 | if command -v synclient >/dev/null; then 9 | synclient \ 10 | TapButton1=1 \ 11 | TapButton2=2 \ 12 | TapButton3=3 \ 13 | SingleTapTimeout=50 \ 14 | #HorizTwoFingerScroll=1 15 | fi 16 | 17 | xrdb $HOME/.Xdefaults 18 | if [ -f $HOME/.Xdefaults-local ]; then 19 | xrdb -merge $HOME/.Xdefaults-local 20 | fi 21 | -------------------------------------------------------------------------------- /bin/xtar.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $cmd = ""; 7 | $cmd = "tar xfv" if $ARGV[0] =~ /\.tar$/; 8 | $cmd = "tar xfvz" if $ARGV[0] =~ /\.(tgz|tar\.gz|tar\.Z)$/; 9 | $cmd = "tar xfvj" if $ARGV[0] =~ /\.(tbz|tar\.bz2)$/; 10 | $cmd = "tar xfvJ" if $ARGV[0] =~ /\.(txz|tar\.xz)$/; 11 | $cmd = "unace x" if $ARGV[0] =~ /\.ace$/; 12 | $cmd = "ar xv" if $ARGV[0] =~ /\.(ar|deb)$/; 13 | $cmd = "unarj x" if $ARGV[0] =~ /\.arj$/; 14 | $cmd = "unrar x" if $ARGV[0] =~ /\.rar$/; 15 | $cmd = "xar -xvf" if $ARGV[0] =~ /\.xar$/; 16 | $cmd = "unzip" if $ARGV[0] =~ /\.zip$/i; 17 | $cmd = "dpkg-source -x" if $ARGV[0] =~ /\.dsc$/; 18 | $cmd = "7z x" if $ARGV[0] =~ /\.7z/; 19 | 20 | if ($cmd eq "") { 21 | print STDERR "$0 error: suffix not recognized: $ARGV[0]\n"; 22 | exit(1); 23 | } 24 | 25 | my $args = join " ", map { "\"$_\""; } @ARGV; 26 | open T, "$cmd $args |" or die "$cmd: $!"; 27 | $_ = || 0 or exit 1; 28 | my ($prefix) = m|(.+)/|; 29 | $prefix ||= ''; 30 | print STDERR; 31 | 32 | while() { 33 | print STDERR; 34 | "$prefix/###$_" =~ m|^(.*)/.*?###\1|; 35 | $prefix = $1; 36 | } 37 | 38 | if($prefix eq "") { exit 1 } else { print "$prefix\n"; exit 0 } 39 | -------------------------------------------------------------------------------- /lib/Makefile: -------------------------------------------------------------------------------- 1 | mirror: 2 | wget --mirror https://db.debian.org/debian_known_hosts 3 | -------------------------------------------------------------------------------- /lib/cron/Makefile: -------------------------------------------------------------------------------- 1 | CRONTABS=$(sort *.crontab) 2 | TARGET=.cron.$(shell hostname) 3 | 4 | install: $(TARGET) 5 | 6 | $(TARGET): $(CRONTABS) 7 | for c in $^ ; do echo "# $$c" ; cat $$c ; echo ; done | crontab - 8 | crontab -l | tee $@ 9 | 10 | clean: 11 | rm -f $(TARGET) 12 | -------------------------------------------------------------------------------- /lib/debian.pref: -------------------------------------------------------------------------------- 1 | Package: * 2 | Pin: release a=stable 3 | Pin-Priority: 800 4 | 5 | Package: * 6 | Pin: release a=testing 7 | Pin-Priority: 700 8 | 9 | Package: * 10 | Pin: release a=unstable 11 | Pin-Priority: 600 12 | 13 | Package: * 14 | Pin: release a=experimental 15 | Pin-Priority: 150 16 | 17 | -------------------------------------------------------------------------------- /lib/default.keyboard: -------------------------------------------------------------------------------- 1 | # KEYBOARD CONFIGURATION FILE 2 | 3 | # Consult the keyboard(5) manual page. 4 | 5 | XKBMODEL="pc104" 6 | XKBLAYOUT="us" 7 | XKBVARIANT="alt-intl" 8 | XKBOPTIONS="ctrl:nocaps,compose:menu,terminate:ctrl_alt_bksp" 9 | 10 | BACKSPACE="guess" 11 | -------------------------------------------------------------------------------- /lib/pgdg.pref: -------------------------------------------------------------------------------- 1 | Package: * 2 | Pin: release o=apt.postgresql.org 3 | Pin-Priority: 900 4 | -------------------------------------------------------------------------------- /lib/src/getopt/getopt.c: -------------------------------------------------------------------------------- 1 | static void parse_options(int argc, char *argv[]) { 2 | int c; 3 | while((c = getopt(argc, argv, "ho:")) >= 0) { 4 | switch(c) { 5 | case 'h': 6 | print_help(); 7 | exit(0); 8 | break; 9 | case 'o': 10 | out_fname = optarg; 11 | break; 12 | default: 13 | // fprintf(stderr, "unknown option '%c'\n", c); 14 | print_help(); 15 | exit(6); 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /lib/src/getopt/getopt.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use Getopt::Std; 4 | getopts('abc:'); 5 | 6 | print "\$opt_a = $opt_a\n"; 7 | print "\$opt_b = $opt_b\n"; 8 | print "\$opt_c = $opt_c\n"; 9 | 10 | 11 | use Getopt::Long; 12 | Getopt::Long::config('bundling'); 13 | if (!GetOptions ( 14 | '-h' => \$params->{'help'}, 15 | '--help' => \$params->{'help'}, 16 | '--version' => \$params->{'version'}, 17 | '--local-user=s' => \$params->{'local-user'}, 18 | '-m:s' => \$params->{'mail'}, 19 | '--mail:s' => \$params->{'mail'}, 20 | '--key-file=s@' => \$params->{'key-files'}, 21 | )) { 22 | usage(\*STDERR, 1); 23 | }; 24 | -------------------------------------------------------------------------------- /lib/src/getopt/getopt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | while getopts "cdDf:hlmMv" opt ; do 4 | case $opt in 5 | c) CLEAR=yes ;; 6 | d) OPTIONS="$OPTIONS -d" ;; 7 | D) OPTIONS="$OPTIONS -D" ;; 8 | f) MAILBOX=$OPTARG ;; 9 | h) OPTIONS="$OPTIONS -h" ;; 10 | l) LOG=yes ;; 11 | m) OPTIONS="$OPTIONS -m" ;; 12 | M) OPTIONS="$OPTIONS -M" ;; 13 | v) OPTIONS="$OPTIONS -v" ;; 14 | *) exit 5 ;; 15 | esac 16 | done 17 | # shift away args 18 | shift $(($OPTIND - 1)) 19 | 20 | -------------------------------------------------------------------------------- /lib/src/pod/example.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | pod file - template to show how to use pod 4 | 5 | =head1 SYNOPSIS 6 | 7 | B 8 | 9 | =head1 DESCRIPTION 10 | 11 | B includes plain old documentation. 12 | 13 | You can use the following Makefile snippet: 14 | 15 | POD2MAN = pod2man 16 | PODOPTS = -c "Utf8Term Documentation" -r "0.1" 17 | 18 | %.1: %.pod 19 | $(POD2MAN) $(PODOPTS) $< $@ 20 | 21 | =head1 OPTIONS 22 | 23 | There are no options for B. 24 | 25 | =head1 RETURN VALUE 26 | 27 | B returns with an exit code of 0 if piped through B. 28 | 29 | =head1 BUGS 30 | 31 | The template could be even more funny. 32 | 33 | =head1 AUTHOR 34 | 35 | Christoph Berg 36 | --------------------------------------------------------------------------------