diff options
31 files changed, 870 insertions, 49 deletions
@@ -4,20 +4,9 @@ include "/usr/share/X11/locale/en_US.UTF-8/Compose" include "/home/dakkar/src/dotXCompose/dotXCompose" include "/home/dakkar/src/dotXCompose/emoji.compose" -# http://cyberborean.wordpress.com/2008/01/06/compose-key-magic/ -<Multi_key> <less> <minus> : "←" U2190 # <- - <Multi_key> <colon> <D> : "😀" U1F600 # :D GRINNING FACE <Multi_key> <semicolon> <D> : "😁" U1F601 # ;D GRINNING FACE WITH SMILING EYES <Multi_key> <semicolon> <parenright> : "😉" U1F609 # ;) WINKING FACE -<Multi_key> <bar> <parenright> : "😏" U1F60F # |) SMIRKING FACE -<Multi_key> <colon> <bar> : "😐" U1F610 # :| NEUTRAL FACE -<Multi_key> <p> <bar> : "😒" U1F612 # p| UNAMUSED FACE <Multi_key> <colon> <slash> : "😕" U1F615 # :/ CONFUSED FACE -<Multi_key> <colon> <tilde> : "😖" U1F616 # :~ CONFOUNDED FACE -<Multi_key> <colon> <s> : "😖" U1F616 # :s CONFOUNDED FACE <Multi_key> <colon> <p> : "😛" U1F61B # :p FACE WITH STUCK-OUT TONGUE <Multi_key> <semicolon> <p> : "😜" U1F61C # ;p FACE WITH STUCK-OUT TONGUE AND WINKING EYE -<Multi_key> <parenleft> <parenleft> : "😞" U1F61E # (( DISAPPOINTED FACE -<Multi_key> <colon> <o> : "😮" U1F62E # :o FACE WITH OPEN MOUTH -<Multi_key> <8> <o> : "😲" U1F623 # 8o ASTONISHED FACE @@ -12,8 +12,8 @@ emacs*Foreground: Wheat emacs*pointerColor: White emacs*cursorColor: White emacs*bitmapIcon: on -Emacs.FontBackend: x,xft -emacs*font: inconsolata-9 +!Emacs.FontBackend: x,xft +!emacs*font: inconsolata-9 !emacs*font: -misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso10646-1 emacs.geometry: 80x25 @@ -63,8 +63,10 @@ Scrollbar.JumpCursor: True !XTerm*color12: sky blue !XTerm*color4: navy blue -Rxvt.inheritPixmap: true -Rxvt.background: black +!Rxvt.inheritPixmap: true +!Rxvt.background: black +Rxvt.background: rgba:0000/0000/0000/dddd +Rxvt.depth: 32 Rxvt.foreground: white Rxvt.scrollColor: #4287c8 Rxvt.borderColor: #4287c8 @@ -77,9 +79,9 @@ Rxvt.scrollTtyKeypress: true Rxvt.saveLines: 15000 Rxvt.loginShell: true Rxvt.cutchars: \ !@#$%^&*(){}[]''"",.<>/?=+-\\|`~;: -URxvt.shading: 25 -URxvt.tintColor: white -URxvt.fading: 20 +URxvt.fading: 25 +URxvt.fadeColor: rgba:0000/0000/0000/0000 +!URxvt.background.expr: FOCUS ? rootalign keep { shade -0.7, root } : rootalign keep { shade -0.85, root } URxvt.font: xft:Monospace:pixelsize=16 URxvt.scrollstyle: plain URxvt.perl-ext-common: diff --git a/.bash_profile b/.bash_profile index 6451c08..7ba48f2 100644 --- a/.bash_profile +++ b/.bash_profile @@ -8,17 +8,17 @@ EDITOR=vi export EDITOR source ~/perl5/perlbrew/etc/bashrc -export PATH="${HOME}/bin:${PATH}" +export PATH="${HOME}/bin:${HOME}/.raku/bin:${PATH}" export GPG_TTY="$(tty)" -eval "$(keychain --eval --inherit any-once --agents ssh id_rsa id_ed25519)" +eval "$(keychain --eval --inherit any-once --agents ssh id_rsa)" function e() { - emacsclient "$@" + emacsclient -n "$@" } function se() { - emacsclient "${@/#//sudo::}" + emacsclient -n "${@/#//sudo::}" } function pd() { @@ -44,6 +44,12 @@ function pm() { emacsclient -c -n "$fn" } +function killmerged() { + for b in $(git branch --merged HEAD --no-contains HEAD|grep -vE 'stage|master|svn|develop'); do + git branch -d $b && git push origin :$b + done +} + export PERLDOC='-MPod::Text::Color::Delight' fortune @@ -4,6 +4,7 @@ # including some apparently interactive shells such as scp and rcp # that can't tolerate any output. So make sure this doesn't display # anything or bad things will happen ! +if [[ $HISTFILE = /dev/null ]]; then unset HISTFILE; fi # Test for an interactive shell. There is no need to set anything @@ -22,6 +23,9 @@ alias btd="bittorrent-curses --max_upload_rate 6 " export history_control=ignoreboth export command_oriented_history export HISTIGNORE='&:[bf]g:exit:ls' + +export LESSCOLORIZER='pygmentize -O bg=dark,style=github-dark -f terminal16m' + shopt -s extglob shopt -s cmdhist shopt -s histappend @@ -31,7 +35,7 @@ shopt -s no_empty_cmd_completion function xtitle() { case $TERM in - xterm*|rxvt|Eterm|eterm) + xterm*|rxvt*|Eterm|eterm|alacritty) echo -ne "\e]0;$1\007" ;; screen) @@ -48,7 +52,15 @@ function xreset() { esac } -. ~/src/git-prompt/git-prompt.sh +#. ~/src/git-prompt/git-prompt.sh +function starship_set_win_title() { + local cwd="${PWD/$HOME/\~}" + cwd="${cwd##[/~]*/}/" + + xtitle "$USER@$(hostname):$cwd" +} +starship_precmd_user_func=starship_set_win_title +eval "$(starship init bash)" #export PS1="\ #\[\033[1;37m\]\u@\h\ @@ -58,3 +70,7 @@ function xreset() { #\[\033[0;34m\]\$\ #\[\033[0m\] " + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/.config/Yubico/u2f_keys b/.config/Yubico/u2f_keys index 291a090..ef328bc 100644 --- a/.config/Yubico/u2f_keys +++ b/.config/Yubico/u2f_keys @@ -1 +1,2 @@ -dakkar:TSjB7MrP1bnTzw3B2_iutHC-htsWaTk-GdHCjw9nZOE9fDoi6JiP-9Ysig3oYwal8B7ZhXPR-pY5apAJKxaRxw,04ebd3766782950a327c70b35e02d227faea091bee86d07616985797f9122beb87183c2ebd7a5c739133b334772669672f12ec2c978857bdeaf889b25eb3c0f40e
\ No newline at end of file +dakkar:d9_Fyz9d0-GMcvQwWOfd4nhVix7yWzNpwPfk3lWzEgmzC9elswQRBH5btgqyvqNcTn-YiNE5m6NBq4SLCAYBwQ,0463f72b3b50b4de19e2351a9dda1de1038ec1df1393cc13e34744b6bd55d256e1c06a2f88701a3a7884fab090dc0aac004ca6437837935446b361a9e6889e9282 +dakkar:TSjB7MrP1bnTzw3B2_iutHC-htsWaTk-GdHCjw9nZOE9fDoi6JiP-9Ysig3oYwal8B7ZhXPR-pY5apAJKxaRxw,04ebd3766782950a327c70b35e02d227faea091bee86d07616985797f9122beb87183c2ebd7a5c739133b334772669672f12ec2c978857bdeaf889b25eb3c0f40e diff --git a/.config/alacritty.yml b/.config/alacritty.yml new file mode 100644 index 0000000..8e867b2 --- /dev/null +++ b/.config/alacritty.yml @@ -0,0 +1,84 @@ +shell: + program: /bin/bash + args: + - '--login' + +window: + dimensions: + columns: 80 + lines: 37 + opacity: 0.86 + resize_increments: true + option_as_alt: Both + alt_send_esc: true + +font: + normal: + family: 'DejaVuSansM Nerd Font Mono' + style: 'Regular' + bold: + family: 'DejaVuSansM Nerd Font Mono' + style: 'Bold' + italic: + family: 'DejaVuSansM Nerd Font Mono' + style: 'Oblique' + bold_italic: + family: 'DejaVuSansM Nerd Font Mono' + style: 'Bold Oblique' + size: 8.0 + builtin_box_drawing: false + +# theme: high-contrast, plus the blues from github-dark, from +# https://github.com/alacritty/alacritty-theme +colors: + # Default colors + primary: + background: '0x0a0a0a' + foreground: '0xdddddd' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '0xaaaaaa' + cursor: '0xffffff' + + # Normal colors + normal: + black: '0x000000' + red: '0xff0000' + green: '0x00ff00' + yellow: '0xffff00' + blue: '0x2188ff' + magenta: '0xff00ff' + cyan: '0x00ffff' + white: '0xffffff' + + # Bright colors + bright: + black: '0x888888' + red: '0xff0000' + green: '0x00ff00' + yellow: '0xffff00' + blue: '0x79b8ff' + magenta: '0xff00ff' + cyan: '0x00ffff' + white: '0xffffff' + +draw_bold_text_with_bright_colors: true + +selection: + semantic_escape_chars: " !@#$%^&*(){}[]'\",.<>/?=+-\\|`~;:" + +hints: + alphabet: "aoeuidhtns" + enabled: + - regex: "(mailto|http|https):[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" + hyperlinks: true + command: xdg-open + post_processing: true + mouse: + enabled: true + mods: Command + binding: + key: Tab + mods: Control|Command + diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini index c7c47ac..e0c313f 100644 --- a/.config/gtk-3.0/settings.ini +++ b/.config/gtk-3.0/settings.ini @@ -1,7 +1,7 @@ [Settings] gtk-theme-name=Adwaita gtk-icon-theme-name=gnome -gtk-font-name=Sans 6 +gtk-font-name=Sans 12 gtk-cursor-theme-name=justblue gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH diff --git a/.config/picom.conf b/.config/picom.conf new file mode 100644 index 0000000..c53d5a9 --- /dev/null +++ b/.config/picom.conf @@ -0,0 +1,13 @@ +dbus=true; +#backend="glx"; +glx-no-stencil=true; + +inactive-opacity = 0.95; +mark-wmwin-focused = true; +mark-ovredir-focused = true; +detect-transient = true; + +opacity-rule = [ + "70:class_g = 'FvwmPager'", + "70:class_g = 'FvwmButtons'", +]; diff --git a/.config/starship.toml b/.config/starship.toml new file mode 100644 index 0000000..f57e03a --- /dev/null +++ b/.config/starship.toml @@ -0,0 +1,201 @@ +# Get editor completions based on the config schema +"$schema" = 'https://starship.rs/config-schema.json' + +# Inserts a blank line between shell prompts +add_newline = true + +format = """ +[](fg:user)\ +$username[@](bg:user fg:user_fg)$hostname${custom.screen}\ +[](fg:user bg:dir)\ +$directory\ +[](bg:time fg:dir)\ +$time\ +[](fg:time)\n\ +([](fg:vcs)\ +$vcsh\ +$git_branch\ +$git_status\ +$git_state\ +$git_commit\ +[](fg:vcs bg:lang)\ +$c\ +$golang\ +$java\ +$nodejs\ +$perl\ +$raku\ +$ruby\ +$rust\ +$vagrant\ +[](fg:lang)\n)\ +[](fg:jobs)\ +$jobs\ +[](fg:jobs bg:status)\ +$status\ +[](fg:status) \ +""" + +continuation_prompt = '▶▶ ' + +palette = 'pastels' + +[palettes.pastels] +user = '#0A348E' +user_fg = 'white' +user_root = '#FF0000' +screen_fg = '#00FF00' +time = '#33658A' +time_fg = 'white' +dir = '#DA627D' +dir_fg = 'white' +dir_repo_fg='black' +dir_ro_fg='yellow' +vcs = '#FCA17D' +vcs_fg = 'black' +lang = '#86BBD8' +lang_fg = 'black' +jobs = '#DA627D' +jobs_fg = 'black' +status = '#33658A' +status_fg = 'white' + +[c] +symbol = " " +style = "bg:lang fg:lang_fg" +format = '[ $symbol ($version) ]($style)' + +[directory] +read_only = " " +style = 'bg:dir fg:dir_fg' +read_only_style = 'bg:dir fg:dir_ro_fg' +repo_root_style = 'bg:dir fg:dir_repo_fg' +format = "[ $path]($style)[$read_only ]($read_only_style)" +repo_root_format = "[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only ]($read_only_style)" +truncation_length = 3 +truncation_symbol = "…/" +truncate_to_repo = false + +[git_branch] +symbol = " " +style = "bg:vcs fg:vcs_fg" +format = '[ $symbol$branch]($style)' +only_attached = false + +[git_commit] +only_detached = false +tag_disabled = false +style = "bg:vcs fg:vcs_fg" +format = "[ $hash$tag]($style)" + +[git_status] +style = "bg:vcs fg:vcs_fg" +conflicted = "⚔️" +ahead = "⏫${count}" +behind = "⏬${count}" +diverged = "⏫${ahead_count}⏬${behind_count}" +untracked = "🤷${count}" +stashed = "📦${count}" +modified = "📝${count}" +staged = "🗃️ ${count}" +renamed = "📛${count}" +deleted = "🗑️${count}" +format = '[ $all_status$ahead_behind]($style)' + +[golang] +symbol = " " +style = "bg:lang fg:lang_fg" +format = '[ $symbol($version)]($style)' + +[hg_branch] +symbol = " " +style = "bg:vcs fg:vcs_fg" +format = '[ $symbol$branch]($style)' + +[hostname] +ssh_symbol = " " +ssh_only = false +style = "bg:user fg:user_fg" +format = '[$hostname$ssh_symbol]($style)' + +[java] +symbol = " " +style = "bg:lang fg:lang_fg" +format = '[ $symbol($version)]($style)' + +[jobs] +number_threshold = 0 +style = "bg:jobs fg:jobs_fg" +format = '[$symbol$number]($style)' + +[nodejs] +symbol = " " +style = "bg:lang fg:lang_fg" +format = '[ $symbol ($version) ]($style)' + +[package] +symbol = " " +style = "bg:lang fg:lang_fg" + +[perl] +symbol = "🐪" +style = "bg:lang fg:lang_fg" +format = '[ $symbol($version)]($style)' +detect_files = [ 'Makefile.PL', 'Build.PL', 'cpanfile', 'cpanfile.snapshot', 'META.json', 'META.yml', '.perl-version', 'dist.ini' ] + +[python] +symbol = " " +style = "bg:lang fg:lang_fg" +format = '[${symbol}${pyenv_prefix}(${version})(\($virtualenv\))]($style)' + +[raku] +symbol = "🦋" +style = "bg:lang fg:lang_fg" +format = '[ $symbol($version)]($style)' + +[ruby] +symbol = " " +style = "bg:lang fg:lang_fg" +format = '[ $symbol($version)]($style)' + +[rust] +symbol = " " +style = "bg:lang fg:lang_fg" +format = '[ $symbol($version)]($style)' + +[status] +disabled = false +style = 'bg:status fg:status_fg' +format = '[$symbol$maybe_int$signal_name]($style)' +success_symbol = '' + +[sudo] +disabled = true +format = '[as $symbol]($style)' + +[time] +disabled = false +time_format = "%F %T" +style = "bg:time fg:time_fg" +format = '[ 🕙 $time ]($style)' + +[username] +format = '[$user]($style)' +show_always = true +style_user = "bg:user fg:user_fg" +style_root = "bg:user_root fg:user_fg" +disabled = false + +[vagrant] +style = "bg:lang fg:lang_fg" +format = '[ $symbol($version)]($style)' + +[vcsh] +style = "bg:vcs fg:vcs_fg" +format = '[ $repo]($style)' + +[custom.screen] +style = "bg:user fg:screen_fg" +when = '[[ "$TERM" == screen ]]' +command = 'echo "$WINDOW(${STY#*.})"' +format = '[ $output]($style)' diff --git a/.fonts/DejaVuSansMNerdFont-Bold.ttf b/.fonts/DejaVuSansMNerdFont-Bold.ttf Binary files differnew file mode 100644 index 0000000..56d204b --- /dev/null +++ b/.fonts/DejaVuSansMNerdFont-Bold.ttf diff --git a/.fonts/DejaVuSansMNerdFont-BoldOblique.ttf b/.fonts/DejaVuSansMNerdFont-BoldOblique.ttf Binary files differnew file mode 100644 index 0000000..59a0d83 --- /dev/null +++ b/.fonts/DejaVuSansMNerdFont-BoldOblique.ttf diff --git a/.fonts/DejaVuSansMNerdFont-Oblique.ttf b/.fonts/DejaVuSansMNerdFont-Oblique.ttf Binary files differnew file mode 100644 index 0000000..0424f72 --- /dev/null +++ b/.fonts/DejaVuSansMNerdFont-Oblique.ttf diff --git a/.fonts/DejaVuSansMNerdFont-Regular.ttf b/.fonts/DejaVuSansMNerdFont-Regular.ttf Binary files differnew file mode 100644 index 0000000..4f7ffc7 --- /dev/null +++ b/.fonts/DejaVuSansMNerdFont-Regular.ttf diff --git a/.fonts/DejaVuSansMNerdFontMono-Bold.ttf b/.fonts/DejaVuSansMNerdFontMono-Bold.ttf Binary files differnew file mode 100644 index 0000000..84feb83 --- /dev/null +++ b/.fonts/DejaVuSansMNerdFontMono-Bold.ttf diff --git a/.fonts/DejaVuSansMNerdFontMono-BoldOblique.ttf b/.fonts/DejaVuSansMNerdFontMono-BoldOblique.ttf Binary files differnew file mode 100644 index 0000000..d96a982 --- /dev/null +++ b/.fonts/DejaVuSansMNerdFontMono-BoldOblique.ttf diff --git a/.fonts/DejaVuSansMNerdFontMono-Oblique.ttf b/.fonts/DejaVuSansMNerdFontMono-Oblique.ttf Binary files differnew file mode 100644 index 0000000..36a243a --- /dev/null +++ b/.fonts/DejaVuSansMNerdFontMono-Oblique.ttf diff --git a/.fonts/DejaVuSansMNerdFontMono-Regular.ttf b/.fonts/DejaVuSansMNerdFontMono-Regular.ttf Binary files differnew file mode 100644 index 0000000..8a781af --- /dev/null +++ b/.fonts/DejaVuSansMNerdFontMono-Regular.ttf diff --git a/.fonts/DejaVuSansMNerdFontPropo-Bold.ttf b/.fonts/DejaVuSansMNerdFontPropo-Bold.ttf Binary files differnew file mode 100644 index 0000000..ec76c68 --- /dev/null +++ b/.fonts/DejaVuSansMNerdFontPropo-Bold.ttf diff --git a/.fonts/DejaVuSansMNerdFontPropo-BoldOblique.ttf b/.fonts/DejaVuSansMNerdFontPropo-BoldOblique.ttf Binary files differnew file mode 100644 index 0000000..d8685d8 --- /dev/null +++ b/.fonts/DejaVuSansMNerdFontPropo-BoldOblique.ttf diff --git a/.fonts/DejaVuSansMNerdFontPropo-Oblique.ttf b/.fonts/DejaVuSansMNerdFontPropo-Oblique.ttf Binary files differnew file mode 100644 index 0000000..bf1a4dc --- /dev/null +++ b/.fonts/DejaVuSansMNerdFontPropo-Oblique.ttf diff --git a/.fonts/DejaVuSansMNerdFontPropo-Regular.ttf b/.fonts/DejaVuSansMNerdFontPropo-Regular.ttf Binary files differnew file mode 100644 index 0000000..f5589b3 --- /dev/null +++ b/.fonts/DejaVuSansMNerdFontPropo-Regular.ttf @@ -14,23 +14,40 @@ showbranch = true status = true +[color.diff] + oldMoved = normal red + oldMovedDimmed = normal red dim + oldMovedAlternative = normal red italic + oldMovedAlternativeDimmed = normal red italic dim + newMoved = normal green + newMovedDimmed = normal green dim + newMovedAlternative = normal green italic + newMovedAlternativeDimmed = normal green italic dim + [fetch] - prune = true + prune = true +[fetch.fsck] + zeroPaddedFilemode = warn [push] default = tracking [pull] - rebase = preserve + rebase = merges [diff] mnemonicprefix = true renames = copies + colorMoved = zebra +[merge] + conflictstyle = diff3 [log] decorate = short date = iso [rebase] stat = true autosquash = true +[rerere] + enabled = true [transfer] - fsckobjects = true + #fsckobjects = true [grep] patternType = perl [alias] @@ -41,3 +58,9 @@ refl = log -g --oneline 'HEAD@{now}' --date=relative st = status -bs tracked = ls-tree -r --name-only --full-name HEAD + stashed = stash list --pretty=format:'%gd: %Cred%h%Creset %Cgreen[%ar]%Creset %gs' +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true @@ -3,7 +3,7 @@ gtk-theme-name="Adwaita" gtk-icon-theme-name="gnome" -gtk-font-name="Sans 6" +gtk-font-name="Sans 10" gtk-cursor-theme-name="justblue" gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH diff --git a/.gtkrc.mine b/.gtkrc.mine index b7e1df6..05cc3a2 100644 --- a/.gtkrc.mine +++ b/.gtkrc.mine @@ -1,11 +1,2 @@ gtk-key-theme-name = "Emacs" - -style "fedora-default" -{ - engine "nodoka" - { - animation = TRUE - gradients = TRUE - } -} - +gtk-cursor-theme-name = "justblue" diff --git a/.local/share/bash-completion/completions/dmount b/.local/share/bash-completion/completions/dmount new file mode 100644 index 0000000..7299a9b --- /dev/null +++ b/.local/share/bash-completion/completions/dmount @@ -0,0 +1,7 @@ +# -*- mode: sh -*- + +_dmount_list() { + COMPREPLY=( $( compgen -W '$(dmount --list)' -- "$2" ) ) +} + +complete -F _dmount_list dmount diff --git a/.local/share/bash-completion/completions/go2 b/.local/share/bash-completion/completions/go2 new file mode 100644 index 0000000..45406b9 --- /dev/null +++ b/.local/share/bash-completion/completions/go2 @@ -0,0 +1,449 @@ +#!bash + +# Generated with perl module App::Spec v0.013 + +_go2() { + + COMPREPLY=() + local program=go2 + local cur prev words cword + _init_completion -n : || return + declare -a FLAGS + declare -a OPTIONS + declare -a MYWORDS + + local INDEX=`expr $cword - 1` + MYWORDS=("${words[@]:1:$cword}") + + FLAGS=('--help' 'Show command help' '-h' 'Show command help') + OPTIONS=('--config-file' 'load configuration from this file' '-C' 'load configuration from this file') + __go2_handle_options_flags + + case $INDEX in + + 0) + __comp_current_options || return + __go2_dynamic_comp 'commands' 'connect'$'\t''connect to the hosts'$'\n''cp'$'\t''copy files from/to hosts'$'\n''cssh'$'\t''connect to the hosts via ClusterSSH'$'\n''help'$'\t''Show command help'$'\n''list'$'\t''list the hosts'$'\n''wipe-cache'$'\t''removes all cached machine information' + + ;; + *) + # subcmds + case ${MYWORDS[0]} in + _meta) + __go2_handle_options_flags + case $INDEX in + + 1) + __comp_current_options || return + __go2_dynamic_comp 'commands' 'completion'$'\t''Shell completion functions'$'\n''pod'$'\t''Pod documentation' + + ;; + *) + # subcmds + case ${MYWORDS[1]} in + completion) + __go2_handle_options_flags + case $INDEX in + + 2) + __comp_current_options || return + __go2_dynamic_comp 'commands' 'generate'$'\t''Generate self completion' + + ;; + *) + # subcmds + case ${MYWORDS[2]} in + generate) + FLAGS+=('--zsh' 'for zsh' '--bash' 'for bash') + OPTIONS+=('--name' 'name of the program (optional, override name in spec)') + __go2_handle_options_flags + case ${MYWORDS[$INDEX-1]} in + --config-file|-C) + ;; + --name) + ;; + + esac + case $INDEX in + + *) + __comp_current_options || return + ;; + esac + ;; + esac + + ;; + esac + ;; + pod) + __go2_handle_options_flags + case $INDEX in + + 2) + __comp_current_options || return + __go2_dynamic_comp 'commands' 'generate'$'\t''Generate self pod' + + ;; + *) + # subcmds + case ${MYWORDS[2]} in + generate) + __go2_handle_options_flags + __comp_current_options true || return # no subcmds, no params/opts + ;; + esac + + ;; + esac + ;; + esac + + ;; + esac + ;; + connect) + FLAGS+=('--all' 'SSH to every matching machine, one after the other, instead of the best match only' '-a' 'SSH to every matching machine, one after the other, instead of the best match only' '--verbose' 'verbose output' '-v' 'verbose output' '--external' 'access the machines from an external address, if you'"\\'"'re not in the office or on the VPN' '-e' 'access the machines from an external address, if you'"\\'"'re not in the office or on the VPN' '--dry-run' 'don'"\\'"'t run the ssh command, just print it' '-d' 'don'"\\'"'t run the ssh command, just print it') + __go2_handle_options_flags + case ${MYWORDS[$INDEX-1]} in + --config-file|-C) + ;; + + esac + case $INDEX in + 1) + __comp_current_options || return + _go2_connect_param_regex_completion + ;; + + + *) + __comp_current_options || return + ;; + esac + ;; + cp) + FLAGS+=('--all' 'SSH to every matching machine, one after the other, instead of the best match only' '-a' 'SSH to every matching machine, one after the other, instead of the best match only' '--verbose' 'verbose output' '-v' 'verbose output' '--external' 'access the machines from an external address, if you'"\\'"'re not in the office or on the VPN' '-e' 'access the machines from an external address, if you'"\\'"'re not in the office or on the VPN' '--dry-run' 'don'"\\'"'t run the ssh command, just print it' '-d' 'don'"\\'"'t run the ssh command, just print it' '--recursive' 'recursively copy entire directories' '-r' 'recursively copy entire directories') + __go2_handle_options_flags + case ${MYWORDS[$INDEX-1]} in + --config-file|-C) + ;; + + esac + case $INDEX in + 1) + __comp_current_options || return + _go2_cp_param_path_completion + ;; + + + *) + __comp_current_options || return + ;; + esac + ;; + cssh) + FLAGS+=('--all' 'SSH to every matching machine, one after the other, instead of the best match only' '-a' 'SSH to every matching machine, one after the other, instead of the best match only' '--verbose' 'verbose output' '-v' 'verbose output' '--external' 'access the machines from an external address, if you'"\\'"'re not in the office or on the VPN' '-e' 'access the machines from an external address, if you'"\\'"'re not in the office or on the VPN') + __go2_handle_options_flags + case ${MYWORDS[$INDEX-1]} in + --config-file|-C) + ;; + + esac + case $INDEX in + 1) + __comp_current_options || return + _go2_cssh_param_regex_completion + ;; + + + *) + __comp_current_options || return + ;; + esac + ;; + help) + FLAGS+=('--all' '') + __go2_handle_options_flags + case $INDEX in + + 1) + __comp_current_options || return + __go2_dynamic_comp 'commands' 'connect'$'\n''cp'$'\n''cssh'$'\n''list'$'\n''wipe-cache' + + ;; + *) + # subcmds + case ${MYWORDS[1]} in + _meta) + __go2_handle_options_flags + case $INDEX in + + 2) + __comp_current_options || return + __go2_dynamic_comp 'commands' 'completion'$'\n''pod' + + ;; + *) + # subcmds + case ${MYWORDS[2]} in + completion) + __go2_handle_options_flags + case $INDEX in + + 3) + __comp_current_options || return + __go2_dynamic_comp 'commands' 'generate' + + ;; + *) + # subcmds + case ${MYWORDS[3]} in + generate) + __go2_handle_options_flags + __comp_current_options true || return # no subcmds, no params/opts + ;; + esac + + ;; + esac + ;; + pod) + __go2_handle_options_flags + case $INDEX in + + 3) + __comp_current_options || return + __go2_dynamic_comp 'commands' 'generate' + + ;; + *) + # subcmds + case ${MYWORDS[3]} in + generate) + __go2_handle_options_flags + __comp_current_options true || return # no subcmds, no params/opts + ;; + esac + + ;; + esac + ;; + esac + + ;; + esac + ;; + connect) + __go2_handle_options_flags + __comp_current_options true || return # no subcmds, no params/opts + ;; + cp) + __go2_handle_options_flags + __comp_current_options true || return # no subcmds, no params/opts + ;; + cssh) + __go2_handle_options_flags + __comp_current_options true || return # no subcmds, no params/opts + ;; + list) + __go2_handle_options_flags + __comp_current_options true || return # no subcmds, no params/opts + ;; + wipe-cache) + __go2_handle_options_flags + __comp_current_options true || return # no subcmds, no params/opts + ;; + esac + + ;; + esac + ;; + list) + FLAGS+=('--all' 'SSH to every matching machine, one after the other, instead of the best match only' '-a' 'SSH to every matching machine, one after the other, instead of the best match only' '--verbose' 'verbose output' '-v' 'verbose output' '--external' 'access the machines from an external address, if you'"\\'"'re not in the office or on the VPN' '-e' 'access the machines from an external address, if you'"\\'"'re not in the office or on the VPN') + __go2_handle_options_flags + case ${MYWORDS[$INDEX-1]} in + --config-file|-C) + ;; + + esac + case $INDEX in + 1) + __comp_current_options || return + _go2_list_param_regex_completion + ;; + + + *) + __comp_current_options || return + ;; + esac + ;; + wipe-cache) + __go2_handle_options_flags + __comp_current_options true || return # no subcmds, no params/opts + ;; + esac + + ;; + esac + +} + +_go2_compreply() { + local prefix="" + cur="$(printf '%q' "$cur")" + IFS=$'\n' COMPREPLY=($(compgen -P "$prefix" -W "$*" -- "$cur")) + __ltrim_colon_completions "$prefix$cur" + + # http://stackoverflow.com/questions/7267185/bash-autocompletion-add-description-for-possible-completions + if [[ ${#COMPREPLY[*]} -eq 1 ]]; then # Only one completion + COMPREPLY=( "${COMPREPLY[0]%% -- *}" ) # Remove ' -- ' and everything after + COMPREPLY=( "${COMPREPLY[0]%%+( )}" ) # Remove trailing spaces + fi +} + +_go2_connect_param_regex_completion() { + local __dynamic_completion + __dynamic_completion=$(PERL5_APPSPECRUN_SHELL=bash PERL5_APPSPECRUN_COMPLETION_PARAMETER='regex' ${words[@]}) + __go2_dynamic_comp 'regex' "$__dynamic_completion" +} +_go2_cp_param_path_completion() { + local __dynamic_completion + __dynamic_completion=$(PERL5_APPSPECRUN_SHELL=bash PERL5_APPSPECRUN_COMPLETION_PARAMETER='path' ${words[@]}) + __go2_dynamic_comp 'path' "$__dynamic_completion" +} +_go2_cssh_param_regex_completion() { + local __dynamic_completion + __dynamic_completion=$(PERL5_APPSPECRUN_SHELL=bash PERL5_APPSPECRUN_COMPLETION_PARAMETER='regex' ${words[@]}) + __go2_dynamic_comp 'regex' "$__dynamic_completion" +} +_go2_list_param_regex_completion() { + local __dynamic_completion + __dynamic_completion=$(PERL5_APPSPECRUN_SHELL=bash PERL5_APPSPECRUN_COMPLETION_PARAMETER='regex' ${words[@]}) + __go2_dynamic_comp 'regex' "$__dynamic_completion" +} + +__go2_dynamic_comp() { + local argname="$1" + local arg="$2" + local name desc cols desclength formatted + local comp=() + local max=0 + + while read -r line; do + name="$line" + desc="$line" + name="${name%$'\t'*}" + if [[ "${#name}" -gt "$max" ]]; then + max="${#name}" + fi + done <<< "$arg" + + while read -r line; do + name="$line" + desc="$line" + name="${name%$'\t'*}" + desc="${desc/*$'\t'}" + if [[ -n "$desc" && "$desc" != "$name" ]]; then + # TODO portable? + cols=`tput cols` + [[ -z $cols ]] && cols=80 + desclength=`expr $cols - 4 - $max` + formatted=`printf "%-*s -- %-*s" "$max" "$name" "$desclength" "$desc"` + comp+=("$formatted") + else + comp+=("'$name'") + fi + done <<< "$arg" + _go2_compreply ${comp[@]} +} + +function __go2_handle_options() { + local i j + declare -a copy + local last="${MYWORDS[$INDEX]}" + local max=`expr ${#MYWORDS[@]} - 1` + for ((i=0; i<$max; i++)) + do + local word="${MYWORDS[$i]}" + local found= + for ((j=0; j<${#OPTIONS[@]}; j+=2)) + do + local option="${OPTIONS[$j]}" + if [[ "$word" == "$option" ]]; then + found=1 + i=`expr $i + 1` + break + fi + done + if [[ -n $found && $i -lt $max ]]; then + INDEX=`expr $INDEX - 2` + else + copy+=("$word") + fi + done + MYWORDS=("${copy[@]}" "$last") +} + +function __go2_handle_flags() { + local i j + declare -a copy + local last="${MYWORDS[$INDEX]}" + local max=`expr ${#MYWORDS[@]} - 1` + for ((i=0; i<$max; i++)) + do + local word="${MYWORDS[$i]}" + local found= + for ((j=0; j<${#FLAGS[@]}; j+=2)) + do + local flag="${FLAGS[$j]}" + if [[ "$word" == "$flag" ]]; then + found=1 + break + fi + done + if [[ -n $found ]]; then + INDEX=`expr $INDEX - 1` + else + copy+=("$word") + fi + done + MYWORDS=("${copy[@]}" "$last") +} + +__go2_handle_options_flags() { + __go2_handle_options + __go2_handle_flags +} + +__comp_current_options() { + local always="$1" + if [[ -n $always || ${MYWORDS[$INDEX]} =~ ^- ]]; then + + local options_spec='' + local j= + + for ((j=0; j<${#FLAGS[@]}; j+=2)) + do + local name="${FLAGS[$j]}" + local desc="${FLAGS[$j+1]}" + options_spec+="$name"$'\t'"$desc"$'\n' + done + + for ((j=0; j<${#OPTIONS[@]}; j+=2)) + do + local name="${OPTIONS[$j]}" + local desc="${OPTIONS[$j+1]}" + options_spec+="$name"$'\t'"$desc"$'\n' + done + __go2_dynamic_comp 'options' "$options_spec" + + return 1 + else + return 0 + fi +} + + +complete -o default -F _go2 go2 diff --git a/.local/share/bash-completion/completions/mupdf b/.local/share/bash-completion/completions/mupdf new file mode 100644 index 0000000..dd02b65 --- /dev/null +++ b/.local/share/bash-completion/completions/mupdf @@ -0,0 +1,25 @@ +# mupdf(1) completion -*- shell-script -*- + +_mupdf() +{ + local cur prev words cword split + _init_completion -s || return + + case $prev in + --help*|-h|-p|-r|-W|-H|-S|-U|-x) + return + ;; + esac + + $split && return + + if [[ $cur == -* ]]; then + COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' \ + -- "$cur" ) ) + [[ $COMPREPLY == *= ]] && compopt -o nospace + return + fi + + _filedir '@(@(?(e)ps|?(E)PS|[pf]df|[PF]DF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2|.xz|.XZ)|cb[rz]|djv?(u)|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|epub)' +} && +complete -F _mupdf mupdf diff --git a/.bash_completion b/.local/share/bash-completion/completions/pd index 4eb8044..4eb8044 100644 --- a/.bash_completion +++ b/.local/share/bash-completion/completions/pd @@ -6,5 +6,6 @@ \x auto \pset linestyle unicode \pset border 2 +\pset null '(null)' \setenv PAGER less \setenv LESS FRSXL @@ -73,4 +73,4 @@ bind '}' history # caption always "%3n %t%? @%u%?%? [%h]%?" # hardstatus alwaysignore # hardstatus alwayslastline "%w" - +truecolor on @@ -1,20 +1,33 @@ -#!/bin/sh +#!/bin/bash + +xmodmap -e 'remove mod1 = Multi_key' + +if [[ -z "$DBUS_SESSION_BUS_ADDRESS" ]]; then + eval $(dbus-launch --exit-with-x11 --sh-syntax) +fi + cd export LC_ALL=en_US.UTF-8 -sudo ./src/hal-automounter/hal-automounter.pl > automount.log 2>&1 & -gamma 1 +#sudo ./src/hal-automounter/hal-automounter.pl > automount.log 2>&1 & +gamma 0.93 1 1.1 0.95 xsetroot -solid black -#export XMODIFIERS=@im=uim -export GTK_IM_MODULE="xim" +export XMODIFIERS="@im=ibus" +export GTK_IM_MODULE="ibus" +export QT_IM_MODULE="ibus" +export QT_QPA_PLATFORMTHEME="qt5ct" xrdb -load .Xdefaults #xset dpms 1800 3600 3600 -#uim-xim --engine=anthy & +ibus-daemon --xim & +emacs --bg-daemon </dev/null &>emacs.log & gkrellm & -(sleep 3;wpa_gui -t)& ~/bin/mwatch & +xsetwacom set stylus PressCurve 0 0 100 100 +xsetwacom set eraser PressCurve 0 0 100 100 xpad & start-pulseaudio-x11 gtk-redshift & +( sleep 2; picom & ) & +safeeyes & -exec dbus-launch --exit-with-session fvwm-crystal +exec fvwm-crystal |