Compare commits

...

113 Commits

Author SHA1 Message Date
yosh 0e5ce193ce kakoune: a lot of changes 2024-03-07 22:15:04 -05:00
yosh 07e542f66d weechat: aaaaa 2024-03-07 20:45:00 -05:00
yosh 886bc164b1 fzfmenu as default menu 2024-03-07 20:44:41 -05:00
yosh 1e0726cced tmux: resurrect change to be good 2024-03-07 20:44:25 -05:00
yosh 424e207cde pentadactyl: some funnie! 2024-03-07 20:43:04 -05:00
yosh b98d7e97a2 mpv: use hwdec; TODO: vulkan in future? 2024-03-07 20:41:47 -05:00
yosh 4e5f0de204 awesomewm: no master on spawn 2024-03-07 20:38:12 -05:00
yosh 7a092ad20e tried out xterm for a bit, also move to x11 fixed 2024-03-07 20:37:41 -05:00
yosh 811e86c9e6 Merge commit '6fb200cc9278c09d869b600e26357d2568bafef6' as '.config/tmux/tmux-resurrect' 2024-02-03 13:24:16 -05:00
yosh 6fb200cc92 Squashed '.config/tmux/tmux-resurrect/' content from commit cff343c
git-subtree-dir: .config/tmux/tmux-resurrect
git-subtree-split: cff343cf9e81983d3da0c8562b01616f12e8d548
2024-02-03 13:24:16 -05:00
yosh 63d2204f53 god DAMN it 2024-02-03 13:24:05 -05:00
yosh 915db9af69 kakoune: some more user commands 2024-02-03 05:23:41 -05:00
yosh 767e184dca weeeeeechat 2024-02-03 05:11:50 -05:00
yosh ba18b6a87f ok the subtree should work now lol 2024-02-03 05:11:40 -05:00
yosh e89b2be232 Merge commit '3eb2c85435d8512daa98132a200bb12727329985' as '~/.config/tmux/tmux-resurrect' 2024-02-03 05:10:47 -05:00
yosh 3eb2c85435 Squashed '~/.config/tmux/tmux-resurrect/' content from commit cff343c
git-subtree-dir: ~/.config/tmux/tmux-resurrect
git-subtree-split: cff343cf9e81983d3da0c8562b01616f12e8d548
2024-02-03 05:10:47 -05:00
yosh 2c83846509 pentadactyl: some modernizing 2024-02-03 04:48:30 -05:00
yosh 7f5f25f28e bash: kak and fzf 2024-02-03 04:35:16 -05:00
yosh 1b8c9a930b the real option 2024-01-17 22:04:22 -05:00
yosh 9fda67c18b kakoune 2 2024-01-17 19:46:07 -05:00
yosh 952d1515a5 nsxiv exec: use foot instead of hardcoded 2024-01-09 01:45:39 -05:00
yosh d377cbaa0b mimix: add empty inode 2024-01-09 01:35:23 -05:00
yosh bf50d75fa8 add kakoune 2024-01-09 01:27:03 -05:00
yosh 370f48ca1d vimrc: a lot of changes 2024-01-09 01:26:48 -05:00
yosh 232f97de80 tmux thingy: the glaggle (restore) 2024-01-09 01:26:33 -05:00
yosh e5856496b7 mimix: no terminal override 2024-01-09 01:26:10 -05:00
yosh 1188160187 pentadactyl 2024-01-09 01:24:00 -05:00
yosh 67e7f5d616 floating terminal = urxvtc 2024-01-09 01:23:38 -05:00
yosh 996e90e77e update x11 palette 2024-01-09 01:23:19 -05:00
yosh 81ff5482a9 weechat update 2024-01-09 01:23:08 -05:00
yosh 8b552315ff remove wyeb 2024-01-09 01:21:46 -05:00
yosh 815a1b74c3 awesome: aaaa 2023-12-15 19:19:33 -05:00
yosh 14d9d09dda Revert "awesomewm: pale moon rename" cuz it sucks
This reverts commit 7c7ba20a36.
2023-11-01 22:18:56 -04:00
yosh 4bf2388819 vim: sync with laptop. it's now sane. 2023-10-31 23:41:35 -04:00
yosh e2d6957971 tmux: use tmux-256color 2023-10-31 23:20:35 -04:00
yosh 208543f26e bash: fix thingy 2023-10-31 23:20:20 -04:00
yosh 27cc374751 weechat: whatever 2023-10-31 23:20:04 -04:00
yosh 358d365105 tmux: no more yash 2023-10-27 22:38:17 -04:00
yosh 4561c8d2d3 aerc: remove deprecated options 2023-10-27 22:36:33 -04:00
yosh 7c7ba20a36 awesomewm: pale moon rename 2023-10-27 22:34:36 -04:00
yosh d0e2987813 inputrc: finally no more history rewrites 2023-10-27 22:34:10 -04:00
yosh 5c0c5ed54e bash: update with yash 2023-10-27 22:33:48 -04:00
yosh dd35727c5d volatile config updates 2023-10-03 22:59:31 -04:00
yosh 26c0aafbd1 Xresources: the 2023-10-03 22:59:07 -04:00
yosh 0615ba6688 picom changes 2023-09-12 23:38:30 -04:00
yosh a0003409b0 awesomewm: add wyeb 2023-09-12 23:35:50 -04:00
yosh ebe87e9d06 wyeb: add 2023-09-12 23:35:42 -04:00
yosh 055ac9cecd yash initialization 2023-09-12 23:34:02 -04:00
yosh a723f26072 urxvtc and other shit 2023-09-12 23:34:02 -04:00
yosh 0065a88595 new screenshots path 2023-09-12 23:34:02 -04:00
yosh c9d91e3a60 xresources-urxvt: icon & bg update 2023-09-12 23:34:02 -04:00
yosh e8624b6db7 yash: profile updates & keybinds 2023-09-12 23:34:02 -04:00
yosh 2357345284 weechat: update 2023-09-12 23:34:02 -04:00
yosh def9a622e9 ncmpcpp: song library format 2023-09-12 23:34:02 -04:00
yosh a51ce2d67e mimix: fix whitespace and all that 2023-09-12 23:34:02 -04:00
yosh a4c8e53988 gimp: update 2023-07-25 14:49:44 -05:00
yosh 7305adfd45 weechat 2023-07-25 14:28:00 -05:00
yosh 8184b44fe4 testing out yash shell 2023-07-25 14:27:43 -05:00
yosh 0607468b86 mimix: update paths 2023-07-25 14:22:51 -05:00
yosh 9d5fb541d8 weechat: update pws and shit 2023-07-17 13:23:46 -05:00
yosh bc8dc35e41 bash: no more localman + chsh change 2023-07-17 13:23:15 -05:00
yosh a8933f77b9 update to represent renamed folders 2023-07-17 13:22:12 -05:00
yosh 91e6fb5fc1 mimix: update config 2023-07-06 23:37:49 -05:00
yosh 525207943c bash: fzf options 2023-07-06 23:37:37 -05:00
yosh 54204c3429 xinit: minor wording tweak 2023-07-05 23:32:18 -05:00
yosh 9ee48b2233 xresources: urxvt keybinds change 2023-07-05 23:32:06 -05:00
yosh a77fa2205a awesomewm: refactor for fzfmenu 2023-07-05 23:31:03 -05:00
yosh 3d222feef8 bash: fzf bind for ctrl+space 2023-07-05 23:30:31 -05:00
yosh c523791ef2 mimix: fzfmenu & other stuff 2023-07-05 23:30:11 -05:00
yosh eac45c813f weechat: spammer blocks, updates 2023-07-05 23:29:43 -05:00
yosh edce16a0ab awesomewm: add vim markers 2023-07-02 18:27:03 -05:00
yosh fe47eef331 weechat: migrate to 4 2023-07-02 18:26:31 -05:00
yosh a1b9a6ae57 gimp: sync? 2023-06-24 18:41:26 -05:00
yosh c3d9a790ac move mimi to mimix 2023-06-24 18:33:19 -05:00
yosh 68826be903 xresources: change icon path 2023-06-12 12:32:58 -05:00
yosh b432c40ca1 xinitrc: add emwm option for funsies 2023-06-12 12:32:30 -05:00
yosh 7d6b47d9c6 yt-dlp: display_id 2023-06-12 12:31:47 -05:00
yosh d663b7a313 weechat: increase smart filer, add espernet 2023-06-12 12:30:46 -05:00
yosh 8ee3022b79 vim: remove bad practices, add QoL 2023-06-12 12:30:20 -05:00
yosh 85a18aab0a nsxiv: key handlers 2023-06-12 12:29:36 -05:00
yosh 584c6487ce move to misc-scripts 2023-06-12 12:28:56 -05:00
yosh 90c18bb8b5 vim tabs 2023-04-26 01:13:24 -04:00
yosh 63e79c671c diff on desktop and aerc binds final 2023-04-26 01:06:46 -04:00
yosh d862fe6525 sync aerc
note: some things are deprecated right now, but I plan to fix those when
the next full release comes out. doing so now while stuff still gets
modified heavily would be annoying
2023-04-26 00:54:18 -04:00
yosh c94156e28b libresprite addition 2023-04-24 18:03:55 -04:00
yosh 7efb1eb304 mimi update 2023-04-24 13:58:00 -04:00
yosh 1f6b19e497 nnn update 2023-04-24 13:57:42 -04:00
yosh 69b2169cff gimp update 2023-04-24 13:57:16 -04:00
yosh 7324ae9101 mimi firefox -> palemoon forgor 2023-04-14 18:08:51 -04:00
yosh 76f9620356 sync mimi 2023-04-14 17:04:56 -04:00
yosh c7cd1800dc weechat update 2023-04-14 16:56:18 -04:00
yosh 5c9a45fdec inputrc update 2023-04-14 16:55:59 -04:00
yosh dcc5f6d54a awesome update 2023-04-14 16:55:46 -04:00
yosh 2c27475588 vim update 2023-04-14 16:55:31 -04:00
yosh bd4fa2a32e nnn previewer stuff 2023-04-14 16:55:21 -04:00
yosh 687b09fa38 weechat update 2023-04-06 14:21:05 -04:00
yosh b9eec9d68e bash update 2023-04-06 14:18:53 -04:00
yosh 6c22b4bcc7 noooo more feh! 2023-03-24 00:29:01 -04:00
yosh 5a72e8c0fb I hate spaces 2023-03-23 23:26:02 -04:00
yosh ac34bfbac2 zathura update 2023-03-23 23:20:54 -04:00
yosh fa35be5b15 weechat update 2023-03-23 23:18:55 -04:00
yosh cf9dba4482 inputrc update 2023-03-23 23:18:36 -04:00
yosh 319098b384 awesome update 2023-03-23 23:18:10 -04:00
yosh 14b28a8338 ew 2023-03-21 02:31:19 -04:00
yosh 5d0e2fd045 readline shit 2023-03-19 18:21:46 -04:00
yosh 1c28710bcf yt-dlp update 2023-03-19 12:03:41 -04:00
yosh e1df54e04d weechat update 2023-03-19 12:03:30 -04:00
yosh e7ff7be09e bashrc update 2023-03-19 12:02:15 -04:00
yosh 957e0402b7 awesome update 2023-03-19 12:00:18 -04:00
yosh 648a08d3f9 tmux and awesome 2023-03-16 11:02:05 -04:00
yosh 941d566aa5 weechat 2023-03-14 11:06:26 -04:00
yosh d355c3b420 how long has this been broken 2023-03-14 11:06:14 -04:00
yosh fd9b6d89de vi shell 2023-03-13 00:31:16 -04:00
75 changed files with 5112 additions and 6661 deletions

View File

@ -25,13 +25,27 @@
(style solid)
(fgcolor (color-rgba 0.52348993288590606 0.84461628246279541 1 1))
(bgcolor (color-rgba 1 1 1 1))
(xspacing 1)
(yspacing 1)
(xspacing 16)
(yspacing 16)
(spacing-unit inches)
(xoffset 0)
(yoffset 0)
(offset-unit inches))
(undo-preview-size medium)
(color-management
(mode display)
(display-profile-from-gdk no)
(display-rendering-intent relative-colorimetric)
(display-use-black-point-compensation yes)
(display-optimize yes)
(simulation-rendering-intent perceptual)
(simulation-use-black-point-compensation no)
(simulation-optimize yes)
(simulation-gamut-check no)
(out-of-gamut-color (color-rgb 1 0 1))
(show-rgb-u8 no)
(show-hsv yes)
(display-module "CdisplayLcms"))
(import-raw-plug-in "${gimp_plug_in_dir}/plug-ins/file-darktable/file-darktable")
(check-update-timestamp 1653591423)
(monitor-xresolution 102)
@ -80,12 +94,14 @@
(icon-theme "Legacy")
(icon-size small)
(user-manual-online yes)
(color-profile-path "${gimp_installation_dir}/share")
(image-convert-profile-intent absolute-colorimetric)
(image-convert-indexed-remove-duplicates no)
(image-resize-layer-set all)
(layer-new-name "black3")
(layer-add-mask-type alpha)
(selection-feather-radius 2)
(selection-grow-radius 3)
(layer-new-name "main")
(layer-add-mask-type selection)
(selection-feather-radius 4)
(selection-grow-radius 2)
(selection-shrink-radius 2)
(selection-border-radius 1)
(selection-border-style hard)
@ -99,8 +115,8 @@
(antialias yes)
(feather no)
(feather-radius 10)
(method paint-method)
(width 2)
(method line)
(width 3)
(unit pixels)
(cap-style butt)
(join-style miter)

1427
.config/GIMP/2.10/menurc Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,27 @@
*.font: -*-helvetica-bold-r-normal-*-12-*
! Colors {{{
*.foreground: #f9f5e9
*.background: #2d0827
*.cursorColor: #f9f5e9
*.foreground: #f9f5e9
*.background: #130f1e
*.cursorColor: #f9f5e9
! Black, Red, Green, Yellow, Blue, Magenta, Cyan, White
*.color0: #402c4e
*.color8: #67526a
*.color1: #aa005c
*.color9: #ff3e97
*.color2: #0c8039
*.color10: #79dd44
*.color3: #b9a45c
*.color11: #f1d6a1
*.color4: #2a5ea3
*.color12: #7bb4fa
*.color5: #9a2b94
*.color13: #d36ad4
*.color6: #28abc1
*.color14: #85eaf8
*.color7: #c7acc5
*.color15: #f9f5e9
*.color0: #402c4e
*.color8: #67526a
*.color1: #aa005c
*.color9: #ff3e97
*.color2: #0f6755
*.color10: #0ddcaa
*.color3: #d76421
*.color11: #ffd67a
*.color4: #0158bf
*.color12: #71b4f0
*.color5: #7b569d
*.color13: #d2a1fe
*.color6: #0a9dbb
*.color14: #8ce4ed
*.color7: #c7acc5
*.color15: #f9f5e9
! }}}
! URxvt {{{
@ -30,8 +30,7 @@ URxvt.perl-ext-common: url-select-plus,eval,52-osc
! Random Options
URxvt.jumpScroll: true
URxvt.skipScroll: false
URxvt.matcher.button: 9
URxvt.geometry: 112x40
URxvt.geometry: 112x38
URxvt.iso14755: false
URxvt.iso14755_52: false
URxvt.saveLines: 4096
@ -44,15 +43,16 @@ URxvt.url-select-plus.launcher: xdg-open
URxvt.url-select-plus.altlauncher: firefox
URxvt.url-select-plus.mediaplayer: xdg-open
URxvt.url-select-plus.imgviewer: xdg-open
URxvt.url-select-plus.underline: true
! Keybinds
URxvt.keysym.M-c: eval:selection_to_clipboard
URxvt.keysym.M-v: eval:paste_clipboard
URxvt.keysym.Shift-Up: command:\033]720;1\007
URxvt.keysym.Shift-Down: command:\033]721;1\007
URxvt.keysym.Control-Right: \033[1;5C
URxvt.keysym.Control-Left: \033[1;5D
URxvt.keysym.M-f: perl:url-select-plus:select_next
URxvt.keysym.C-C: eval:selection_to_clipboard
URxvt.keysym.C-V: eval:paste_clipboard
URxvt.keysym.C-K: command:\033]720;1\007
URxvt.keysym.C-J: command:\033]721;1\007
URxvt.keysym.C-Right: \033[1;5C
URxvt.keysym.C-Left: \033[1;5D
URxvt.keysym.C-O: perl:url-select-plus:select_next
URxvt.keysym.C-BackSpace: 
! Fonts & Misc. Appearance
@ -60,29 +60,34 @@ URxvt.depth: 32
URxvt.scrollBar: false
URxvt.cursorBlink: true
URxvt.cursorUnderline: false
URxvt.font: -*-terminus-medium-*-12-*-iso10646-*,xft:TerminessTTF Nerd Font Mono,xft:DejaVu Sans Mono
URxvt.boldFont: -*-kakwafont-*-bold-*-12-*,-*-tamzen-bold-*-12-*,xft:TerminessTTF Nerd Font Mono
URxvt.font: xft:X11 Fixed:pixelsize=13:width=SemiCondensed,xft:Cozette,xft:DejaVu Sans Mono
URxvt.boldFont: xft:X11 Fixed:pixelsize=13:width=SemiCondensed:weight=bold,xft:Cozette
URxvt.fading: 20
URxvt.iconFile: /home/yosh/Pictures/Misc. Images/Icons/Terminal.png
URxvt.iconFile: /home/yosh/.local/share/icons/NsCDE/48x48/apps/xterm-color.png
URxvt.internalBorder: 4
!URxvt.background.expr: tint [0.176, 0.031, 0.153, 0.8], align 1, 0, pad keep { load "$HOME/Pictures/Wallpapers & Backdrops/OTHER BACKDROPS/terminal_avali.png" }
URxvt.background.expr: align 1, 0, pad keep { load "$HOME/Pictures/Wallpapers & Backdrops/OTHER BACKDROPS/terminal_avali_full.png" }
URxvt.background.expr: merge keep { shade -0.75, rootalign root }, align 1, 0, keep { pad load "$HOME/pics/wallpapers/backdrops/terminal_avali_corner.png" }
! Colors
URxvt.tabbed.tabbar-fg: 15
URxvt.tabbed.tabbar-bg: 0
URxvt.tabbed.tab-fg: 7
URxvt.tabbed.tab-bg: 9
URxvt.matcher.rend.0: Uline fg6
! }}}
! xterm time {{{
XTerm.vt100.decTerminalID: 220
XTerm.vt100.foreground: rgb:00/00/00
XTerm.vt100.background: rgb:ff/ff/ff
XTerm.vt100.color*: rgb:00/00/00
XTerm*boldFont: -*-cozette-*-13-*
XTerm*font: -*-kakwafont-*-bold-*-12-*,-*-tamzenforpowerline-bold-*-12-*,-*-cozette-*-13-*
XTerm.termName: xterm-256color
XTerm.vt100.decTerminalID: 340
XTerm.vt100.maxGraphicSize: 4096x4096
XTerm.vt100.utf8: true
XTerm.vt100.metaSendsEscape: true
XTerm.vt100.backarrowKey: false
XTerm.ttyModes: erase ^?
XTerm.vt100.saveLines: 4096
!XTerm.vt100.foreground: rgb:00/00/00
!XTerm.vt100.background: rgb:ff/ff/ff
!XTerm.vt100.color*: rgb:00/00/00
!XTerm*boldFont: -*-cozette-*-13-*
!XTerm*font: -*-kakwafont-*-bold-*-12-*,-*-tamzenforpowerline-bold-*-12-*,-*-cozette-*-13-*
! }}}
! xbomb {{{
@ -116,5 +121,3 @@ Oneko.time: 100000
! nsxiv {{{
Nsxiv.bar.font: Fixed:pixelsize=13:style=SemiCondensed
! }}}
! vim:set tabstop=8:

View File

@ -1,17 +1,19 @@
#!/bin/sh
# options
# options and variables
numlockx on
# X11 shit
xrdb ~/.config/X11/Xresources
feh --bg-max --no-fehbg "$HOME/Pictures/VRChat/Hi-Res Scenery/2022-07-25_22-35-10.494_3840x2160.png"
xwallpaper --maximize "$HOME/pics/screenshots/VRChat/Hi-Res Scenery/2022-07-25_22-35-10.494_3840x2160.png"
# oneko -rv -time 100000
xset +fp "$XDG_DATA_HOME"/fonts/bitmap/cmvnd-bdf
xset +fp "$XDG_DATA_HOME"/fonts/bitmap/tamzen-bdf
xset +fp "$XDG_DATA_HOME"/fonts/bitmap
xset fp rehash
export XDG_SESSION_TYPE=x11
# programs
runsvdir "$HOME/.local/service" &
case $WM in
@ -19,5 +21,6 @@ case $WM in
exec dbus-run-session cwm -c ~/.config/cwm/cwmrc
;;
twm) export NO_COLOR=1; exec twm -f "$XDG_CONFIG_HOME/twm/twmrc" ;;
emwm) exec $HOME/Repos/emwm/src/emwm ;;
*) exec awesome # dbus-launch --autolaunch="$(cat /var/lib/dbus/machine-id)" awesome ;;
esac

View File

@ -6,15 +6,15 @@
# Used as a default path for save operations if no other path is specified.
# ~ is expanded to the current user home dir.
#
#default-save-path=
# Default: ""
#default-save-path=~/tmp
# If set to "gpg", aerc will use system gpg binary and keystore for all crypto
# operations. If set to "internal", the internal openpgp keyring will be used.
# If set to "auto", the system gpg will be preferred unless the internal
# keyring already exists, in which case the latter will be used.
#
# Default: auto
#pgp-provider=auto
# If set to "gpg", aerc will use system gpg binary and keystore for all crypto
# operations. Otherwise, the internal openpgp implementation will be used.
#
# Default: internal
pgp-provider=internal
# By default, the file permissions of accounts.conf must be restrictive and
# only allow reading by the file owner (0600). Set this option to true to
@ -22,98 +22,88 @@
# credentials.
#
# Default: false
#unsafe-accounts-conf=false
# Output log messages to specified file. A path starting with ~/ is expanded to
# the user home dir. When redirecting aerc's output to a file using > shell
# redirection, this setting is ignored and log messages are printed to stdout.
#
#log-file=
# Only log messages above the specified level to log-file. Supported levels
# are: trace, debug, info, warn and error. When redirecting aerc's output to
# a file using > shell redirection, this setting is ignored and the log level
# is forced to trace.
#
# Default: info
#log-level=info
unsafe-accounts-conf=false
[ui]
#
# Describes the format for each row in a mailbox view. This field is compatible
# with mutt's printf-like syntax.
#
# Default: %-20.20D %-17.17n %Z %s
#index-format=%-20.20D %-17.17n %Z %s
# index
index-columns = date<20,name<22,flags>4,subject<*
column-date = {{.DateAutoFormat .Date.Local}}
column-name = {{index (.From | names) 0}}
column-flags = {{.Flags | join ""}}
column-subject = {{.Subject}}
#
# See time.Time#Format at https://godoc.org/time#Time.Format
#
# Default: 2006-01-02 03:04 PM (ISO 8601 + 12 hour time)
#timestamp-format=2006-01-02 03:04 PM
timestamp-format=2006-01-02 03:04 PM
#
# Index-only time format for messages that were received/sent today.
# If this is not specified, timestamp-format is used instead.
#
#this-day-time-format=
# Default: ""
#this-day-time-format=03:04 PM
#
# Index-only time format for messages that were received/sent within the last
# 7 days. If this is not specified, timestamp-format is used instead.
#
#this-week-time-format=
# Default: ""
#this-week-time-format=Monday 03:04 PM
#
# Index-only time format for messages that were received/sent this year.
# If this is not specified, timestamp-format is used instead.
#
#this-year-time-format=
# Default: ""
#this-year-time-format=January 02
#
# Width of the sidebar, including the border.
#
# Default: 20
sidebar-width=25
sidebar-width=28
#
# Message to display when viewing an empty folder.
#
# Default: (no messages)
#empty-message=(no messages)
empty-message=(no messages)
# Message to display when no folders exists or are all filtered
#
# Default: (no folders)
#empty-dirlist=(no folders)
empty-dirlist=(no folders)
# Enable mouse events in the ui, e.g. clicking and scrolling with the mousewheel
#
# Default: false
#mouse-enabled=false
mouse-enabled=false
#
# Ring the bell when new messages are received
#
# Default: true
#new-message-bell=true
new-message-bell=true
# Marker to show before a pinned tab's name.
#
# Default: `
#pinned-tab-marker='`'
pinned-tab-marker='`'
# Describes the format string to use for the directory list
#
# Default: %n %>r
#dirlist-format=%n %>r
dirlist-left = {{.Folder}}
dirlist-right = {{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}
# Delay after which the messages are actually listed when entering a directory.
# This avoids loading messages when skipping over folders and makes the UI more
# responsive. If you do not want that, set it to 0s.
#
# Default: 200ms
#dirlist-delay=200ms
dirlist-delay=200ms
# Display the directory list as a foldable tree that allows to collapse and
# expand the folders.
@ -125,7 +115,7 @@ dirlist-tree=true
# default. Set to 0 to disable.
#
# Default: 0
#dirlist-collapse=0
dirlist-collapse=0
# List of space-separated criteria to sort the messages by, see *sort*
# command in *aerc*(1) for reference. Prefixing a criterion with "-r "
@ -133,18 +123,19 @@ dirlist-tree=true
#
# Example: "from -r date"
#
# Default: ""
sort=-r date
# Moves to next message when the current message is deleted
#
# Default: true
#next-message-on-delete=true
next-message-on-delete=true
# Automatically set the "seen" flag when a message is opened in the message
# viewer.
#
# Default: true
#auto-mark-read=true
auto-mark-read=true
# The directories where the stylesets are stored. It takes a colon-separated
# list of directories. If this is unset or if a styleset cannot be found, the
@ -155,13 +146,14 @@ sort=-r date
# /usr/local/share/aerc/stylesets
# /usr/share/aerc/stylesets
#
#stylesets-dirs=
# default: ""
stylesets-dirs=
# Uncomment to use box-drawing characters for vertical and horizontal borders.
#
# Default: " "
border-char-vertical=""
border-char-horizontal=""
# Default: spaces
border-char-vertical=│
border-char-horizontal=─
# Sets the styleset to use for the aerc ui elements.
#
@ -169,28 +161,20 @@ border-char-horizontal="─"
styleset-name=luma
# Activates fuzzy search in commands and their arguments: the typed string is
# searched in the command or option in any position, and need not be
# consecutive characters in the command or option.
#
# Default: false
# searched in the command or option in any position, and need not be
# consecutive characters in the command or option.
#fuzzy-complete=false
# How long to wait after the last input before auto-completion is triggered.
#
# Default: 250ms
#completion-delay=250ms
# The minimum required characters to allow auto-completion to be triggered after
# completion-delay.
#
# Default: 1
#completion-min-chars=1
completion-delay=250ms
#
# Global switch for completion popovers
#
# Default: true
#completion-popovers=true
completion-popovers=true
# Uncomment to use UTF-8 symbols to indicate PGP status of messages
#
@ -202,31 +186,6 @@ styleset-name=luma
#icon-unknown=✘
#icon-invalid=⚠
# Reverses the order of the message list. By default, the message list is
# ordered with the newest (highest UID) message on top. Reversing the order
# will put the oldest (lowest UID) message on top. This can be useful in cases
# where the backend does not support sorting.
#
# Default: false
#reverse-msglist-order = false
# Reverse display of the mesage threads. Default order is the the intial
# message is on the top with all the replies being displayed below. The
# reverse option will put the initial message at the bottom with the
# replies on top.
#
# Default: false
#reverse-thread-order=false
# Sort the thread siblings according to the sort criteria for the messages. If
# sort-thread-siblings is false, the thread siblings will be sorted based on
# the message UID in ascending order. This option is only applicable for
# client-side threading with a backend that enables sorting. Note that there's
# a performance impact when sorting is activated.
#
# Default: false
#sort-thread-siblings=false
#[ui:account=foo]
#
# Enable a threaded view of messages. If this is not supported by the backend
@ -249,18 +208,20 @@ threading-enabled=true
# Describes the format string for the statusline.
#
# Default: [%a] %S %>%T
#render-format=[%a] %S %>%T
status-columns = left<*,right>*
column-left = [{{.Account}}] {{.StatusInfo}}
column-right = {{.TrayInfo}}
# Specifies the separator between grouped statusline elements.
#
# Default: " | "
#separator=" | "
# separator=
# Defines the mode for displaying the status elements.
# Options: text, icon
#
# Default: text
#display-mode=text
# display-mode=
[viewer]
#
@ -269,7 +230,7 @@ threading-enabled=true
# pager which supports ANSI codes.
#
# Default: less -R
#pager=less -R
pager=less -R
#
# If an email offers several versions (multipart), you can configure which
@ -284,7 +245,7 @@ alternatives=text/plain,text/html
# ones in message viewer.
#
# Default: false
#show-headers=false
show-headers=false
#
# Layout of headers when viewing a message. To display multiple headers in the
@ -292,32 +253,32 @@ alternatives=text/plain,text/html
# none of their specified headers are present in the message.
#
# Default: From|To,Cc|Bcc,Date,Subject
#header-layout=From|To,Cc|Bcc,Date,Subject
header-layout=From|To,Cc|Bcc,Date,Subject
# Whether to always show the mimetype of an email, even when it is just a single part
#
# Default: false
#always-show-mime=false
always-show-mime=false
# Parses and extracts http links when viewing a message. Links can then be
# accessed with the open-link command.
#
# Default: true
#parse-http-links=true
parse-http-links=true
[compose]
#
# Specifies the command to run the editor with. It will be shown in an embedded
# terminal, though it may also launch a graphical window if the environment
# supports it. Defaults to $EDITOR, or vi.
#editor=
editor=
#
# Default header fields to display when composing a message. To display
# multiple headers in the same row, separate them with a pipe, e.g. "To|From".
#
# Default: To|From,Subject
#header-layout=To|From,Subject
header-layout=To|From,Subject
#
# Specifies the command to be used to tab-complete email addresses. Any
@ -331,21 +292,13 @@ alternatives=text/plain,text/html
# ignored.
#
# This parameter can also be set per account in accounts.conf.
#address-book-cmd=
# Specifies the command to be used to select attachments. Any occurence of '%s'
# in the file-picker-cmd will be replaced the argument <arg> to :attach -m
# <arg>.
#
# The command must output the selected files to standard output, one file per
# line.
file-picker-cmd=nnn -p -
address-book-cmd=
#
# Allow to address yourself when replying
#
# Default: true
#reply-to-self=true
reply-to-self=true
#
# Warn before sending an email that matches the specified regexp but does not
@ -357,18 +310,9 @@ file-picker-cmd=nnn -p -
# Example:
# no-attachment-warning=^[^>]*attach(ed|ment)
#
#no-attachment-warning=
no-attachment-warning=
[multipart-converters]
#
# Converters allow to generate multipart/alternative messages by converting the
# main text/plain part into any other MIME type. Only exact MIME types are
# accepted. The commands are invoked with sh -c and are expected to output
# valid UTF-8 text.
#
# Example (obviously, this requires that you write your main text/plain body
# using the markdown syntax):
#text/html=pandoc -f markdown -t html --standalone
file-picker-cmd = nnn -p -
[filters]
#
@ -386,10 +330,7 @@ file-picker-cmd=nnn -p -
# The following variables are defined in the filter command environment:
#
# AERC_MIME_TYPE the part MIME type/subtype
# AERC_FORMAT the part content type format= parameter
# AERC_FILENAME the attachment filename (if any)
# AERC_SUBJECT the message Subject header value
# AERC_FROM the message From header value
#
# The first filter which matches the email's mimetype will be used, so order
# them from most to least specific.
@ -402,14 +343,14 @@ text/plain=colorize
text/calendar=calendar
message/delivery-status=colorize
message/rfc822=colorize
text/html=lynx -dump -stdin
text/html=lynx -force_html -dump -stdin
#text/html=pandoc -f html -t plain | colorize
#text/html=html | colorize
#text/*=bat -fP --file-name="$AERC_FILENAME"
#application/x-sh=bat -fP -l sh
#image/*=catimg -w $(tput cols) -
#subject,~Git(hub|lab)=lolcat -f
#from,thatguywhodoesnothardwraphismessages=wrap -w 100 | colorize
#from,thatguywhodoesnothardwraphismessages=fmt -w 72 | colorize
[openers]
#
@ -434,7 +375,7 @@ text/html=lynx -dump -stdin
#
# Executed when a new email arrives in the selected folder
#new-email=
new-email=
[templates]
# Templates are used to populate email bodies automatically.
@ -449,19 +390,20 @@ text/html=lynx -dump -stdin
# /usr/local/share/aerc/templates
# /usr/share/aerc/templates
#
#template-dirs=
# default: ""
template-dirs=
# The default template to be used for new messages.
#
# default: new_message
#new-message=new_message
new-message=new_message
# The default template to be used for quoted replies.
#
# default: quoted_reply
#quoted-reply=quoted_reply
quoted-reply=quoted_reply
# The default template to be used for forward as body.
#
# default: forward_as_body
#forwards=forward_as_body
forwards=forward_as_body

View File

@ -33,9 +33,12 @@ L = :expand-folder<Enter>
v = :mark -t<Enter>
V = :mark -v<Enter>
r = :read -t<Enter>
T = :toggle-threads<Enter>
<Enter> = :view<Enter>
l = :view<Enter>
d = :move Trash<Enter>
D = :prompt 'Really delete this message?' 'delete-message'<Enter>
# D = :delete<Enter>
@ -59,6 +62,8 @@ n = :next-result<Enter>
N = :prev-result<Enter>
<Esc> = :clear<Enter>
m = ":mv "
[messages:folder=Drafts]
<Enter> = :recall<Enter>

View File

@ -3,6 +3,7 @@
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
pcall(require, "luarocks.loader")
-- {{{ includes
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
@ -23,6 +24,7 @@ require("awful.hotkeys_popup.keys")
-- custom library
local cyclefocus = require('cyclefocus')
-- }}}
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
@ -43,7 +45,7 @@ local theme = "luma"
beautiful.init(gears.filesystem.get_configuration_dir() .. "themes/" .. theme .. "/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "urxvt"
terminal = "urxvtc"
editor = os.getenv("EDITOR") or "vim"
editor_cmd = terminal .. " -e " .. editor
tag_names = { "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX" }
@ -363,7 +365,7 @@ awful.key({ modkey, "Shift", "Control" }, "q", awesome.quit,
-- { description = "lua execute prompt", group = "awesome" }),
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
{ description = "open a terminal", group = "launcher" }),
awful.key({ modkey }, "r", function () awful.spawn("dmenu_run") end,
awful.key({ modkey }, "r", function () awful.spawn("fzfmenu-run") end,
{ description = "run prompt", group = "launcher" }),
-- user-defined keybinds ig
@ -371,17 +373,26 @@ awful.key({ modkey }, "s", function () awful.spawn("screenshot -r
{ description = "screenshot region", group = "awesome" }),
awful.key({ }, "Print", function () awful.spawn("screenshot") end,
{ description = "screenshot desktop", group = "awesome" }),
awful.key({ modkey }, "Print", function () awful.spawn("screenshot -w") end,
awful.key({ "Mod1" }, "Print", function () awful.spawn("screenshot -w") end,
{ description = "screenshot window", group = "awesome" }),
awful.key({ modkey, "Shift" }, "s", function () awful.spawn("ffrec") end,
{ description = "screen record", group = "awesome" }),
awful.key({ modkey }, "c", function () awful.spawn("shclip-menu") end,
{ description = "clipboard menu", group = "awesome" }),
awful.key({ modkey }, "p", function() awful.spawn("urxvt -e nnn") end,
awful.key({ modkey }, "p", function() awful.spawn(terminal .. " -e n") end,
{ description = "file manager", group = "launcher" }),
-- dummy for discord
awful.key({ }, "XF86AudioPrev", function() awful.spawn("mpc prev") end,
{ description = "previous song", group = "media" }),
awful.key({ }, "XF86AudioPlay", function() awful.spawn("mpc toggle") end,
{ description = "play/pause", group = "media" }),
awful.key({ }, "XF86AudioMute", function() awful.spawn("mpc toggle") end,
{ description = "play/pause", group = "media" }),
awful.key({ }, "XF86AudioNext", function() awful.spawn("mpc next") end,
{ description = "next song", group = "media" }),
-- dummies!
awful.key({ modkey }, "x", function () end,
{ description = "dummy", group = "awesome" }),
})
@ -606,8 +617,8 @@ end)
-- }}}
-- {{{ Rules
-- Rules to apply to new clients.
ruled.client.connect_signal("request::rules", function()
-- Rules to apply to new clients. {{{
ruled.client.connect_signal("request::rules", function()
-- All clients will match this rule.
ruled.client.append_rule {
id = "global",
@ -616,15 +627,17 @@ ruled.client.connect_signal("request::rules", function()
focus = awful.client.focus.filter,
raise = true,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
placement = awful.placement.no_overlap+awful.placement.no_offscreen,
callback = awful.client.setslave
}
}
-- }}}
-- {{{ floating clients
ruled.client.append_rule {
id = "floating",
rule_any = {
instance = { "Devtools", "xmascot", },
instance = { "Devtools", "xmascot", "FLOATING_TERMINAL", },
class = { "Tor Browser", "chatty-Chatty", "StepMania", },
-- Note that the name property shown in xprop might be set slightly after creation of the client
-- and the name shown there might not match defined rules here.
@ -647,8 +660,8 @@ ruled.client.connect_signal("request::rules", function()
ruled.client.append_rule {
id = "maximized",
rule_any = {
instance = { "chromium" },
class = { "discord", "Steam" },
instance = { "WYEB_TABBED" },
class = { "discord" },
name = { "Pale Moon" },
},
properties = { maximized = true }
@ -656,7 +669,7 @@ ruled.client.connect_signal("request::rules", function()
ruled.client.append_rule {
id = "fullscreen",
rule_any = {
class = { "SCREENSHOT_FEH" },
instance = { "SCREENSHOT_FREEZE" },
},
properties = { fullscreen = true }
}
@ -667,6 +680,7 @@ ruled.client.connect_signal("request::rules", function()
id = "ontop",
rule_any = {
class = { "Dragon-drop" },
instance = { "FLOATING_TERMINAL" },
},
properties = { ontop = true }
}
@ -683,7 +697,7 @@ ruled.client.connect_signal("request::rules", function()
ruled.client.append_rule {
id = "2",
rule_any = {
instance = { "chromium" },
instance = { "WYEB_TABBED" },
name = { "Pale Moon", "Mozilla Firefox" },
},
properties = { tag = tag_names[2] },
@ -692,7 +706,7 @@ ruled.client.connect_signal("request::rules", function()
ruled.client.append_rule {
id = "9",
rule_any = {
class = { "discord", "Steam" },
class = { "discord" },
},
properties = {tag = tag_names[9] },
}
@ -702,7 +716,6 @@ ruled.client.connect_signal("request::rules", function()
ruled.client.append_rule {
id = "noborder",
rule_any = {
class = { "SCREENSHOT_FEH" },
name = { "xkoko" },
},
properties = { border_width = 0 }
@ -714,8 +727,11 @@ ruled.client.connect_signal("request::rules", function()
id = "centered",
rule_any = {
class = { "Dragon-drop" },
instance = { "FLOATING_TERMINAL" },
},
callback = function(c) awful.placement.centered(c, nil) end
properties = {
placement = awful.placement.centered,
}
}
-- }}}

View File

@ -24,9 +24,9 @@ theme.bg_systray = theme.bg_normal
-- {{{ Borders
theme.master_width_factor = 0.5
theme.useless_gap = dpi(2)
theme.border_width = dpi(2)
theme.border_width = dpi(1)
theme.border_color_normal = "#2d0827"
theme.border_color_active = "#67526a"
theme.border_color_active = "#c7acc5"
theme.border_color_marked = "#d93352"
-- }}}

View File

@ -1,5 +1,3 @@
mkdir "$XDG_RUNTIME_DIR/hometemp"
# Get the aliases and functions
[ -f "$XDG_CONFIG_HOME/bash/bashrc" ] && . "$XDG_CONFIG_HOME/bash/bashrc"
@ -18,12 +16,22 @@ export PENTADACTYL_RUINTIME="$XDG_CONFIG_HOME/pentadactyl"
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export SRB2WADDIR="$XDG_DATA_HOME/srb2kart/wads"
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pythonstartup.py"
export GOPATH="$XDG_DATA_HOME/go"
export GOMODCACHE="$XDG_CACHE_HOME/go/mod"
export SQLITE_HISTORY="$XDG_RUNTIME_DIR/sqlite_history"
export PSQL_HISTORY="$XDG_RUNTIME_DIR/psql_history"
export RXVT_SOCKET="$XDG_RUNTIME_DIR/urxvt-$(uname -n)"
# }}}
# other config {{{
export PATH="$HOME/.local/bin:$HOME/.local/scripts:$PATH:$JAVA_HOME/bin"
export EDITOR="vim"
export VISUAL="vim"
export PATH="$HOME/.local/bin:$HOME/.local/scripts:$PATH"
export MANPATH="$XDG_DATA_HOME/man:"
export EDITOR="kak"
export VISUAL="kak"
export TERMINAL="urxvtc"
export FLOATING_TERMINAL="urxvt -name FLOATING_TERMINAL"
export QT_STYLE_OVERRIDE=kvantum
export MENU=fzfmenu
# }}}
# program options {{{
@ -34,23 +42,24 @@ export LESS='-Ri'
# }}}
# fzf {{{
export FZF_DEFAULT_COMMAND="fd -t f --strip-cwd-prefix"
export FZF_DEFAULT_COMMAND='find -nohidden -type f -printf "%P\n"'
export FZF_DEFAULT_OPTS='
--color "fg:7,bg+:0,hl:12,fg+:11,bg+:0,hl+:13,info:9,border:0,prompt:15,pointer:10,marker:2,spinner:13,header:7"
--color "fg:7,bg:-1,hl:12,fg+:11,bg+:0,hl+:13,info:9,border:0,prompt:4,pointer:10,marker:2,spinner:13,header:7"
--border -e
--bind ctrl-space:print-query+abort
--bind alt-enter:replace-query
'
# }}}
#
# nnn {{{
export NNN_OPTS='eA'
export NNN_OPTS="aAeQ"
export NNN_ARCHIVE="\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$"
export NNN_COLORS='#0d0d0d0d0d0d0d0d'
BLK="0B" CHR="0B" DIR="0d" EXE="0a" REG="07" HARDLINK="0e" SYMLINK="0e" MISSING="08" ORPHAN="09" FIFO="03" SOCK="0B" OTHER="06"
export NNN_FCOLORS="$BLK$CHR$DIR$EXE$REG$HARDLINK$SYMLINK$MISSING$ORPHAN$FIFO$SOCK$OTHER"
nc='c:-!magick convert "$nnn" png:- | xclip -sel clipboard -t image/png*'
ng='d:-!git diff --color=always | less*;l:-!git log --color=always | less*'
nm='h:-!hx "$nnn"*;o:-fzopen;p:dragdrop'
export NNN_PLUG="$nc;$ng;$nm"
_nc='c:-!magick convert "$nnn" png:- | xclip -sel clipboard -t image/png*'
_nm='h:-!hx "$nnn"*;o:-fzopen;d:dragdrop;p:preview-tui'
export NNN_PLUG="$_nc;$_nm"
# }}}
# }}}

View File

@ -8,11 +8,10 @@ complete -cf doas
# aliases
# man() { vim -R -c 'filetype plugin on' -c 'set ft=man' -c "Man $*"; }
chtsh() { IFS='+'; curl cht.sh/"$*" ; }
chtsh() { IFS='+' curl cht.sh/"$*" ; }
# local
alias localman='MANPATH=~/.local/share/man man'
alias usersv="SVDIR=${HOME}/.local/service sv"
alias usv="SVDIR=${HOME}/.local/service sv"
# convenience
alias view='vim -R'
@ -20,14 +19,24 @@ alias ls='lsd'
alias xdt='xdotool'
alias tearfree='xrandr --output HDMI-A-0 --set TearFree'
alias ts="stranslate"
alias n="nnn"
alias ed="ed -p '* '"
alias diff='diff --color -u'
alias dotfiles='/usr/bin/git --git-dir=$HOME/.local/dotfiles --work-tree=$HOME'
# XDG aliases
alias startx='startx "$XDG_CONFIG_HOME/X11/xinitrc"'
# Prompt
# PS1='[\u@\h \W]\$ '
PS1="\[\e[97m\][\[\e[95m\]\u\[\e[97m\]@\[\e[92m\]\h\[\e[97m\]] \[\e[90m\]*\[\e[97m\] \[\e[36m\]\w\n\
\[\e[91m\]└─────\[\e[39m\] "
# Prompt and nnn
_c=("\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]")
if [ "${NNNLVL:-0}" -ge 1 ]; then
alias nnn="echo don\'t nest nnn!"
export nnnsel="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection"
_prompt_flags="${_prompt_flags:-} ${_c[9]}nnn"
fi
PS1="${_c[15]}[${_c[13]}\u${_c[15]}@${_c[10]}\h${_c[15]}]${_prompt_flags:-}${_c[15]} ${_c[8]}*${_c[15]} ${_c[6]}\w
${_c[9]}└─────${_c[16]} "
unset _c
unset _prompt_flags

File diff suppressed because one or more lines are too long

View File

@ -4,17 +4,12 @@
<!-- Change the string in the family tag to whatever font -->
<alias>
<family>serif</family>
<prefer><family>TamzenForPowerline</family></prefer>
<prefer><family>New Century Schoolbook</family></prefer>
<accept><family>Cozette</family></accept>
<accept><family>Liberation Serif</family></accept>
<prefer><family>Liberation Serif</family></prefer>
<accept><family>Noto Serif</family></accept>
</alias>
<alias>
<family>sans-serif</family>
<prefer><family>TamzenForPowerline</family></prefer>
<prefer><family>Helvetica</family></prefer>
<accept><family>Cozette</family></accept>
<prefer><family>Liberation Sans</family></prefer>
<accept><family>Noto Sans</family></accept>
</alias>
<alias><family>sans</family>
@ -22,9 +17,10 @@
</alias>
<alias>
<family>monospace</family>
<prefer><family>Terminus</family></prefer>
<accept><family>Cozette</family></accept>
<prefer><family>X11 Fixed</family></prefer>
<accept><family>kakwafont</family></accept>
<accept><family>Terminus</family></accept>
<accept><family>Cozette</family></accept>
<accept><family>TerminessTTF Nerd Font Mono</family></accept>
<accept><family>Comic Mono</family></accept>
</alias>

View File

@ -1,9 +1,103 @@
$include /etc/inputrc
# "\e[33~":backward-kill-word
# "\C-w":backward-kill-word
TAB:menu-complete
"\e[Z":menu-complete-backward
set keymap vi
set editing-mode vi
set keyseq-timeout 200
# menu completions
set completion-ignore-case on
set show-all-if-ambiguous on
set menu-complete-display-prefix on
set colored-stats on
TAB: menu-complete
"\e[Z": menu-complete-backward
Control-n: menu-complete
Control-p: menu-complete-backward
# other stuff
set bind-tty-special-chars fof
set page-completions off
set completion-query-items 200
set colored-completion-prefix on
set revert-all-at-newline on
$if mode=vi
set keymap vi-command
# Don't search history with <Ctrl-s>
\C-u: nop
# Don't open $EDITOR on rlwrap command line with <Ctrl-^>
\C-^^: nop
# Open $EDITOR on rlwrap command line with <Ctrl-x><Ctrl-e>
"daw": "lbdW"
"yaw": "lbyW"
"caw": "lbcW"
"diw": "lbdw"
"yiw": "lbyw"
"ciw": "lbcw"
"da\"": "lF\"df\""
"di\"": "lF\"lmtf\"d`t"
"ci\"": "di\"i"
"ca\"": "da\"i"
"da'": "lF'df'"
"di'": "lF'lmtf'd`t"
"ci'": "di'i"
"ca'": "da'i"
"da`": "lF\`df\`"
"di`": "lF\`lmtf\`d`t"
"ci`": "di`i"
"ca`": "da`i"
"da(": "lF(df)"
"di(": "lF(lmtf)d`t"
"ci(": "di(i"
"ca(": "da(i"
"da)": "lF(df)"
"di)": "lF(lmtf)d`t"
"ci)": "di(i"
"ca)": "da(i"
"da{": "lF{df}"
"di{": "lF{lmtf}d`t"
"ci{": "di{i"
"ca{": "da{i"
"da}": "lF{df}"
"di}": "lF{lmtf}d`t"
"ci}": "di}i"
"ca}": "da}i"
"da[": "lF[df]"
"di[": "lF[lmtf]d`t"
"ci[": "di[i"
"ca[": "da[i"
"da]": "lF[df]"
"di]": "lF[lmtf]d`t"
"ci]": "di]i"
"ca]": "da]i"
"da<": "lF<df>"
"di<": "lF<lmtf>d`t"
"ci<": "di<i"
"ca<": "da<i"
"da>": "lF<df>"
"di>": "lF<lmtf>d`t"
"ci>": "di>i"
"ca>": "da>i"
"da/": "lF/df/"
"di/": "lF/lmtf/d`t"
"ci/": "di/i"
"ca/": "da/i"
"da:": "lF:df:"
"di:": "lF:lmtf:d`t"
"ci:": "di:i"
"ca:": "da:i"
?: reverse-search-history
/: forward-search-history
set keymap vi-insert
# Don't search history with <Ctrl-s>
Control-s: nop
# Don't open $EDITOR on rlwrap command line with <Ctrl-^>
Control-^: nop
# control-l in vi mode
Control-l: clear-screen
set show-mode-in-prompt on
set vi-ins-mode-string " "
set vi-cmd-mode-string ":"
$endif

View File

@ -0,0 +1 @@
/usr/share/kak/autoload

View File

@ -0,0 +1,4 @@
# hook stuff for making working in pandoc markdown/latex much better
hook global WinSetOption filetype=(markdown|latex) %{
map -docstring "compile to latex pdf" global user l ':w<ret><a-|>pandoc -s -V geometry:margin=3cm --pdf-engine tectonic -o "$kak_buffile.pdf" ~/.config/pandoc_header_includes.yaml "$kak_buffile"<ret>'
}

52
.config/kak/kakrc Normal file
View File

@ -0,0 +1,52 @@
# commands
define-command -docstring "save and quit" x "write-all; quit"
define-command -docstring "quit with exit code 1" cq "quit 1"
# hooks
hook global BufOpenFile .* editorconfig-load
hook global BufNewFile .* editorconfig-load
# visual
## colorscheme
colorscheme palenight
## scrolling & wrapping
set-option global scrolloff 1,3
add-highlighter global/ wrap -word -indent
## tabs
set-option global tabstop 4
set-option global indentwidth 0
## statusbar
set-option global ui_options terminal_status_on_top=true
## highlights
### line numbers
add-highlighter global/ number-lines -hlcursor
### whitespace
add-highlighter global/ regex "\h+$" 0:Error
add-highlighter global/ regex "^(\t+ +)|( +\t+)" 0:Error
# keybinds
## qol
map -docstring "next buffer" global user n ":bn<ret>"
map -docstring "previous buffer" global user <a-n> ":bp<ret>"
## spellcheck
map -docstring "spellcheck buffer" global user s ":spell<ret>"
map -docstring "clear spellcheck" global user <a-s> ":spell-clear<ret>"
map -docstring "next wrong spelling" global normal <c-e> ":spell-next<ret>"
map -docstring "next wrong spelling" global normal <c-r> ":spell-replace<ret>"
## clipboard
map -docstring "yank the selection into the clipboard" global user y "<a-|>xclip -sel clipboard<ret>"
map -docstring "prepend the clipboard" global user <a-p> "!xclip -sel clipboard -o<ret>"
map -docstring "append the clipboard" global user p "<a-!>xclip -sel clipboard -o<ret>"
## ctags
map -docstring "search for tag" global user c ":ctags-search<ret>"

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" ?>
<brushes />

View File

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="utf-8" ?>
<keyboard version="1">
<commands>
<key command="Undo" shortcut="Ctrl+U" removed="true" />
<key command="Undo" shortcut="Ctrl+Z" />
<key command="Redo" shortcut="Ctrl+R" removed="true" />
<key command="Redo" shortcut="Ctrl+Y" removed="true" />
<key command="Redo" shortcut="Ctrl+Shift+Z" />
<key command="Flip" shortcut="Shift+H" removed="true">
<param name="orientation" value="horizontal" />
<param name="target" value="mask" />
</key>
<key command="Flip" shortcut="Ctrl+F">
<param name="orientation" value="horizontal" />
<param name="target" value="mask" />
</key>
<key command="Flip" shortcut="Shift+V" removed="true">
<param name="orientation" value="vertical" />
<param name="target" value="mask" />
</key>
<key command="Flip" shortcut="Ctrl+Alt+F">
<param name="orientation" value="vertical" />
<param name="target" value="mask" />
</key>
<key command="DuplicateLayer" shortcut="Ctrl+J" removed="true" />
<key command="DuplicateLayer" shortcut="Ctrl+Shift+D" />
<key command="FlattenLayers" shortcut="Ctrl+Shift+E" removed="true" />
<key command="FlattenLayers" shortcut="Ctrl+Shift+F" />
<key command="RemoveFrame" shortcut="Alt+C" removed="true" />
<key command="RemoveFrame" shortcut="Alt+X" />
<key command="MaskContent" shortcut="Ctrl+T" removed="true" />
<key command="MaskContent" shortcut="Shift+T" />
<key command="DeselectMask" shortcut="Ctrl+D" />
<key command="ReselectMask" shortcut="Ctrl+Shift+D" removed="true" />
<key command="ReselectMask" shortcut="Ctrl+Shift+A" />
<key command="InvertMask" shortcut="Ctrl+Shift+I" removed="true" />
<key command="InvertMask" shortcut="Ctrl+I" />
<key command="SnapToGrid" shortcut="Shift+S" removed="true" />
<key command="ChangeBrush" shortcut="-">
<param name="change" value="decrement-size" />
</key>
<key command="ChangeBrush" shortcut="- Pad">
<param name="change" value="decrement-size" />
</key>
<key command="UndoHistory" shortcut="Ctrl+Alt+Z" />
<key command="MoveMask" shortcut="Left">
<param name="direction" value="left" />
<param name="quantity" value="1" />
<param name="target" value="content" />
<param name="units" value="pixel" />
<param name="wrap" value="1" />
</key>
<key command="MoveMask" shortcut="Right">
<param name="direction" value="right" />
<param name="quantity" value="1" />
<param name="target" value="content" />
<param name="units" value="pixel" />
<param name="wrap" value="1" />
</key>
<key command="MoveMask" shortcut="Up">
<param name="direction" value="up" />
<param name="quantity" value="1" />
<param name="target" value="content" />
<param name="units" value="pixel" />
<param name="wrap" value="1" />
</key>
<key command="MoveMask" shortcut="Down">
<param name="direction" value="down" />
<param name="quantity" value="1" />
<param name="target" value="content" />
<param name="units" value="pixel" />
<param name="wrap" value="1" />
</key>
<key command="Rotate" shortcut="Ctrl+Up">
<param name="angle" value="180" />
<param name="target" value="canvas" />
</key>
<key command="Rotate" shortcut="Ctrl+Right">
<param name="angle" value="90" />
<param name="target" value="canvas" />
</key>
<key command="Rotate" shortcut="Ctrl+Left">
<param name="angle" value="-90" />
<param name="target" value="canvas" />
</key>
<key command="Flip" shortcut="Ctrl+Shift+Right">
<param name="orientation" value="horizontal" />
<param name="target" value="canvas" />
</key>
<key command="Flip" shortcut="Ctrl+Shift+Left">
<param name="orientation" value="horizontal" />
<param name="target" value="canvas" />
</key>
<key command="Flip" shortcut="Ctrl+Shift+Up">
<param name="orientation" value="vertical" />
<param name="target" value="canvas" />
</key>
<key command="Flip" shortcut="Ctrl+Shift+Down">
<param name="orientation" value="vertical" />
<param name="target" value="canvas" />
</key>
<key command="CropSprite" shortcut="Ctrl+R" />
<key command="AutocropSprite" shortcut="Ctrl+T" />
</commands>
<tools>
<key tool="rectangular_marquee" shortcut="M" removed="true" />
<key tool="rectangular_marquee" shortcut="S" />
<key tool="elliptical_marquee" shortcut="Shift+M" removed="true" />
<key tool="elliptical_marquee" shortcut="Shift+S" />
<key tool="lasso" shortcut="Q" removed="true" />
<key tool="lasso" shortcut="Shift+F" />
<key tool="magic_wand" shortcut="W" removed="true" />
<key tool="magic_wand" shortcut="V" />
<key tool="spray" shortcut="Shift+B" />
<key tool="eyedropper" shortcut="I" removed="true" />
<key tool="eyedropper" shortcut="O" />
<key tool="move" shortcut="V" removed="true" />
<key tool="move" shortcut="M" />
<key tool="paint_bucket" shortcut="G" removed="true" />
<key tool="paint_bucket" shortcut="F" />
<key tool="rectangle" shortcut="U" removed="true" />
<key tool="rectangle" shortcut="R" />
<key tool="ellipse" shortcut="Shift+U" removed="true" />
<key tool="ellipse" shortcut="Shift+E" />
<key tool="filled_ellipse" shortcut="Shift+U" removed="true" />
<key tool="filled_ellipse" shortcut="Ctrl+Shift+E" />
<key tool="blur" shortcut="R" removed="true" />
<key tool="blur" shortcut="Shift+U" />
<key tool="jumble" shortcut="R" removed="true" />
</tools>
<quicktools>
<key tool="eyedropper" shortcut="Alt" removed="true" />
<key tool="eyedropper" shortcut="Ctrl" />
<key tool="move" shortcut="Ctrl" removed="true" />
</quicktools>
<actions>
<key action="AutoSelectLayer" shortcut="Ctrl" />
</actions>
</keyboard>

View File

@ -1,20 +0,0 @@
TERM: urxvt
MENU: DMENU
audio/: mpv --player-operation-mode=pseudo-gui --
audio/: mpv --player-operation-mode=pseudo-gui --
image/: nsxiv-rifle
pdf: zathura
djvu: zathura
epub: zathura
text/: urxvt -e $EDITOR
text/html: palemoon
application/vnd.microsoft.portable-executable: wine
x-scheme-handler/http: palemoon
x-scheme-handler/https: palemoon
x-scheme-handler/ftp: palemoon
x-scheme-handler/about: palemoon
x-scheme-handler/unknown: palemoon

25
.config/mimix/mimix.conf Normal file
View File

@ -0,0 +1,25 @@
MENU: fzfmenu
text/: $TERMINAL -e $VISUAL --
inode/x-empty: $TERMINAL -e $VISUAL --
audio/: mpv --player-operation-mode=pseudo-gui --
video/: mpv --player-operation-mode=pseudo-gui --
image/: nsxiv-rifle --
inode/directory: $TERMINAL -e nnn --
image/x-xcf: gimp --
application/pdf: zathura --
application/epub+zip: zathura --
image/vnd.djvu: zathura --
x-scheme-handler/magnet: $TERMINAL -e aria2c --
application/x-bittorrent: $TERMINAL -e aria2c --
x-scheme-handler/http: palemoon --
x-scheme-handler/https: palemoon --
x-scheme-handler/chrome: palemoon --
application/x-extension-htm: palemoon --
application/x-extension-html: palemoon --
application/x-extension-shtml: palemoon --
application/xhtml+xml: palemoon --
application/x-extension-xhtml: palemoon --
application/x-extension-xht: palemoon --

View File

@ -1,45 +1,46 @@
# screenshots
screenshot-format=png
screenshot-high-bit-depth=yes
screenshot-png-compression=7
screenshot-directory=~/Pictures/Screenshots
screenshot-template="%tY-%tm-%td_%tH-%tM-%tS-mpvshot-%F"
# uhhhhh video and audio shit
video-sync=display-resample
gpu-api=vulkan
volume=90
# subtitles
sub-auto=fuzzy
slang=en,ja,live_chat,rechat
sub-font-size=48
no-sub-visibility
# player behavior
keep-open
volume-max=200
no-border
geometry=50%:50%
autofit-larger=1920x900
autofit-smaller=500x500
# OSD shit
# osc=no
osd-font="DejaVu Sans Mono"
osd-font-size=32
# osd-bar=no
cursor-autohide=2000
osd-on-seek=msg-bar
# online shit
ytdl-format=bestvideo[height<=?1080][vcodec!*=?vp9]+bestaudio/best
ytdl-raw-options=ignore-config=,sub-lang="en,ja,live_chat,rechat",write-subs=,write-auto-subs=,yes-playlist=
hls-bitrate=max
[twitch]
profile-cond=get("path", ""):find("^https://www.twitch.tv/videos/") ~= nil
profile-restore=copy-equal
sub-font-size=30
sub-align-x=right
sub-align-y=top
# screenshots
screenshot-format=png
screenshot-high-bit-depth=yes
screenshot-png-compression=7
screenshot-directory=~/pics/screenshots
screenshot-template="%tY-%tm-%td_%tH-%tM-%tS-mpvshot-%F"
# uhhhhh video and audio shit
video-sync=display-resample
# gpu-api=vulkan
volume=90
hwdec
# subtitles
sub-auto=fuzzy
slang=en,ja,live_chat,rechat
sub-font-size=48
no-sub-visibility
# player behavior
keep-open
volume-max=200
no-border
geometry=50%:50%
autofit-larger=1920x900
autofit-smaller=500x500
# OSD shit
# osc=no
osd-font="DejaVu Sans Mono"
osd-font-size=32
# osd-bar=no
cursor-autohide=2000
osd-on-seek=msg-bar
# online shit
ytdl-format=bestvideo[height<=?1080][vcodec!*=?vp9]+bestaudio/best
ytdl-raw-options=ignore-config=,sub-lang="en,ja,live_chat,rechat",write-subs=,write-auto-subs=,yes-playlist=
hls-bitrate=max
[twitch]
profile-cond=get("path", ""):find("^https://www.twitch.tv/videos/") ~= nil
profile-restore=copy-equal
sub-font-size=30
sub-align-x=right
sub-align-y=top

View File

@ -1,7 +1,7 @@
# main
mpd_host = localhost
mpd_port = 6600
mpd_music_dir = ~/Music
mpd_music_dir = ~/music/library
lyrics_directory = ~/.config/ncmpcpp/lyrics
# library
@ -11,7 +11,7 @@ media_library_hide_album_dates = no
media_library_sort_by_mtime = no
browser_sort_mode = format
browser_sort_format = {%n }{%a - }{%t}|{%f} {%l}
song_library_format = "{$3%n $4|$7 }{$7%a $4-$8 %t}|{$8%f}$R$3 %l"
song_library_format = "$3{%n $4|$7 }{$7%a $4-$8 %t}|{$8%f}$R$3 %l"
# random settings
volume_change_step = 5

View File

@ -3,7 +3,10 @@
while read file; do
case "$1" in
"C-c")
xclip -sel clipboard "$file" -t image/png ;;
"c") xclip -sel clipboard "$file" -t image/png ;; # copy image
"d") dragon-drop "$file" & ;; # drag and drop
"o") $TERMINAL -e nnn "$file" & ;; # open in nnn
"p") printf '%s' "$file" | xclip -sel clipboard ;; # copy path
"C-p") printf '%s' "${file##*/}" | xclip -sel clipboard ;; # copy basename
esac
done

View File

@ -3,7 +3,9 @@
set runtimepath=~/.config/pentadactyl
loadplugins '\.(js|penta)$'
group user
" sanitize history downloads formdata
" for some reason pale moon's history eraser likes to just
" revert sometimes, so this works for realsies (need patch)
sanitize history downloads formdata commandline
" standard QoL remappings
map -count -builtin -modes=n,v d <count><C-d>
@ -14,25 +16,25 @@ map -builtin -modes=n,v gr gT
map -builtin -modes=n,v <C--> <text-zoom-out>
map -builtin -modes=n,v <C-=> <text-zoom-in>
map -builtin -modes=n,v <-> <full-zoom-out>
map -builtin -modes=n,v <=> <full-zoom-in>
map -builtin -modes=n,v <+> <full-zoom-in>
map -builtin -modes=n,v D <Nop>
" map -builtin -modes=n,v gf gF
map -builtin -modes=n s <pass-all-keys>
map -builtin -modes=n,v gf gF
map -builtin -modes=i <C-v> <Pass>
map -builtin -modes=i <C-c> <Pass>
map -builtin -modes=i <C-a> <Pass>
map -builtin -modes=n,v gh gT
map -builtin -modes=n,v gl gt
" ex command mappings
map -builtin -modes=n,v,i <C-b> -ex :dia bookmarks
map -builtin -modes=n,v,i <C-p> -ex :pintab!
map -builtin -modes=n,v,i <C-n> -ex :tbt Navigation Toolbar
map -builtin -modes=n,v,i <C-h> -ex :tabmove! -1
map -builtin -modes=n,v,i <C-l> -ex :tabmove! +1
map -builtin -modes=n,v,i <C-S-f> -ex :noh
map -builtin -modes=n,v ,p -ex :pintab!
map -builtin -modes=n,v ,n -ex :tbt Navigation Toolbar
map -builtin -modes=n,v ,t -ex :set showtabline!=always,never
map -builtin -modes=n,v <C-h> -ex :tabmove! -1
map -builtin -modes=n,v <C-l> -ex :tabmove! +1
map -builtin -modes=n,v ,f -ex :noh
" hints
hi Hint font: bold 9px "cure" !important; color: black; padding: 0 1px 0 2px; background: #EAEAEA; border: 2px solid #F00A
hi Hint font: bold 9px "Tamzen" !important; color: black; padding: 0 1px 0 2px; background: #EAEAEA; border: 2px solid #F00A; z-index:100000000
hi Hint[active] border: 2px solid #F0FC
hi HintElem /* The hintable element */ background: rgba(0, 220, 220, 0.4) !important; color: black !important;
hi HintActive /* The hint element of link which will be followed by <k name="CR" link="false"/> */ background: rgba(20, 200, 20, 0.7) !important; color: black !important;
@ -43,25 +45,20 @@ set passkeys+=*:<Left><Right><Up><Down><Space>
" settings
" scrolling
set scroll=24
set scrolltime=50
" smooth scrolling is borked unless you alt tab out and in
set scrollsteps=3
" cosmetic
set titlestring=
set guioptions=Cs
set hlfind
" other
set scroll=24
set newtab=help
set defsearch=srx
set defsearch=projectsearx
set maxitems=10
set complete=bookmark
set editor='urxvt -e sh -c "vim <file>"'
set complete=search,bookmark
set editor='sh -c "exec $FLOATING_TERMINAL -e kak <file>"'
set cdpath=''
set hm=wordstartswith
set shell=/bin/sh
" set noinsertmode
" vim: set ft=pentadactyl:

View File

@ -77,11 +77,11 @@ fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.10;
fade-in-step = 0.075;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 0.10;
fade-out-step = 0.08;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
fade-delta = 8

View File

@ -1,7 +1,8 @@
# Restoring previously saved environment
None of the previous saves are deleted (unless you explicitly do that). All save
files are kept in `~/.tmux/resurrect/` directory.<br/>
files are kept in `~/.tmux/resurrect/` directory, or `~/.local/share/tmux/resurrect`
(unless `${XDG_DATA_HOME}` says otherwise).<br/>
Here are the steps to restore to a previous point in time:
- make sure you start this with a "fresh" tmux instance

@ -0,0 +1 @@
Subproject commit c38f488f152af6f6fd688ecdcf2728498813a01d

View File

@ -0,0 +1 @@
lib/tmux-test/run_tests

View File

@ -0,0 +1 @@
../../lib/tmux-test/tests/helpers/helpers.sh

View File

@ -0,0 +1 @@
../lib/tmux-test/tests/run_tests_in_isolation

View File

@ -1,7 +1,7 @@
unbind C-b
unbind M-a
set -g prefix M-a
bind M-a send-prefix
unbind C-Space
set -g prefix C-Space
bind C-Space send-prefix
set -g default-command bash
set -g base-index 1
set -g pane-base-index 1
@ -15,8 +15,8 @@ set -as terminal-features ',rxvt-unicode*:clipboard'
bind-key O select-pane -t :.-
run-shell ~/.config/tmux/tmux-resurrect/resurrect.tmux
set -g @resurrect-processes 'ncmpcpp aerc'
set -g @resurrect-dir '$HOME/.local/share/tmux/resurrect'
set -g @resurrect-processes 'profanity weechat watch ncmpcpp aerc'
set -g @resurrect-dir '~/.local/share/tmux/resurrect'
# the following is the vim keybinds stuff
# Easy config reload
@ -28,7 +28,7 @@ set -g mode-keys vi
# mouse behavior
set -g mouse on
set -g default-terminal screen-256color
set -g default-terminal tmux-256color
bind-key : command-prompt
bind-key r refresh-client
@ -105,5 +105,7 @@ set -g monitor-activity on
set -g visual-activity on
# Allow the arrow key to be used immediately after changing windows
set -g repeat-time 500
set -g escape-time 10
set -g repeat-time 250
# Disable escape seq unless meta
set -g escape-time 5

View File

@ -1 +0,0 @@
set noexpandtab

View File

@ -1,812 +0,0 @@
" Vim syntax file
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
" Last Change: Dec 20, 2022
" Version: 205
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) and heredoc fixes from Felipe Contreras
" quit when a syntax file was already loaded {{{1
if exists("b:current_syntax")
finish
endif
" If the shell script itself specifies which shell to use, use it
if getline(1) =~ '\<ksh\>'
let b:is_kornshell = 1
elseif getline(1) =~ '\<bash\>'
let b:is_bash = 1
elseif getline(1) =~ '\<dash\>'
let b:is_dash = 1
elseif !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh") && !exists("g:is_dash")
" user did not specify which shell to use, and
" the script itself does not specify which shell to use. FYI: /bin/sh is ambiguous.
" Assuming /bin/sh is executable, and if its a link, find out what it links to.
let s:shell = ""
if executable("/bin/sh")
let s:shell = resolve("/bin/sh")
elseif executable("/usr/bin/sh")
let s:shell = resolve("/usr/bin/sh")
endif
if s:shell =~ '\<ksh\>'
let b:is_kornshell= 1
elseif s:shell =~ '\<bash\>'
let b:is_bash = 1
elseif s:shell =~ '\<dash\>'
let b:is_dash = 1
endif
unlet s:shell
endif
" handling /bin/sh with is_kornshell/is_sh {{{1
" b:is_sh will be set when "#! /bin/sh" is found;
" However, it often is just a masquerade by bash (typically Linux)
" or kornshell (typically workstations with Posix "sh").
" So, when the user sets "g:is_bash", "g:is_kornshell",
" or "g:is_posix", a b:is_sh is converted into b:is_bash/b:is_kornshell,
" respectively.
if !exists("b:is_kornshell") && !exists("b:is_bash") && !exists("b:is_dash")
if exists("g:is_posix") && !exists("g:is_kornshell")
let g:is_kornshell= g:is_posix
endif
if exists("g:is_kornshell")
let b:is_kornshell= 1
if exists("b:is_sh")
unlet b:is_sh
endif
elseif exists("g:is_bash")
let b:is_bash= 1
if exists("b:is_sh")
unlet b:is_sh
endif
elseif exists("g:is_dash")
let b:is_dash= 1
if exists("b:is_sh")
unlet b:is_sh
endif
else
let b:is_sh= 1
endif
endif
" if b:is_dash, set b:is_posix too
if exists("b:is_dash")
let b:is_posix= 1
endif
" set up default g:sh_fold_enabled {{{1
" ================================
if !exists("g:sh_fold_enabled")
let g:sh_fold_enabled= 0
elseif g:sh_fold_enabled != 0 && !has("folding")
let g:sh_fold_enabled= 0
echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support"
endif
let s:sh_fold_functions= and(g:sh_fold_enabled,1)
let s:sh_fold_heredoc = and(g:sh_fold_enabled,2)
let s:sh_fold_ifdofor = and(g:sh_fold_enabled,4)
if g:sh_fold_enabled && &fdm == "manual"
" Given that the user provided g:sh_fold_enabled
" AND g:sh_fold_enabled is manual (usual default)
" implies a desire for syntax-based folding
setl fdm=syntax
endif
" set up the syntax-highlighting for iskeyword
if (v:version == 704 && has("patch-7.4.1142")) || v:version > 704
if !exists("g:sh_syntax_isk") || (exists("g:sh_syntax_isk") && g:sh_syntax_isk)
if exists("b:is_bash")
exe "syn iskeyword ".&iskeyword.",-,:"
else
exe "syn iskeyword ".&iskeyword.",-"
endif
endif
endif
" Set up folding commands for shell {{{1
" =================================
sil! delc ShFoldFunctions
sil! delc ShFoldHereDoc
sil! delc ShFoldIfDoFor
if s:sh_fold_functions
com! -nargs=* ShFoldFunctions <args> fold
else
com! -nargs=* ShFoldFunctions <args>
endif
if s:sh_fold_heredoc
com! -nargs=* ShFoldHereDoc <args> fold
else
com! -nargs=* ShFoldHereDoc <args>
endif
if s:sh_fold_ifdofor
com! -nargs=* ShFoldIfDoFor <args> fold
else
com! -nargs=* ShFoldIfDoFor <args>
endif
" sh syntax is case sensitive {{{1
syn case match
" Clusters: contains=@... clusters {{{1
"==================================
syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError,shOK
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster ErrorList add=shDTestError
endif
syn cluster shArithParenList contains=shArithmetic,shArithParen,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor,shFunctionKey,shFunctionOne,shFunctionTwo
syn cluster shArithList contains=@shArithParenList,shParenError
syn cluster shCaseEsacList contains=shCaseStart,shCaseLabel,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSubBQ,shComment,shDblBrace,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shCaseList add=shForPP
endif
syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
" COMBAK: removing shEscape from shDblQuoteList fails ksh04:43 -- Jun 09, 2022: I don't see the problem with ksh04, so am reinstating shEscape
syn cluster shDblQuoteList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial,shSpecialDQ
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS
syn cluster shDerefVarList contains=shDerefOffset,shDerefOp,shDerefVarArray,shDerefOpError
syn cluster shEchoList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shFunctionList add=shRepeat,shDblBrace,shDblParen,shForPP
syn cluster shDerefList add=shCommandSubList,shEchoDeref
endif
syn cluster shHereBeginList contains=@shCommandSubList
syn cluster shHereList contains=shBeginHere,shHerePayload
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shNumber,shOperator,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shIf,shOption,shSet,shTest,shTestOpr,shTouch
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shLoopoList add=shForPP
endif
syn cluster shPPSLeftList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm
syn cluster shSubShList contains=@shCommandSubList,shCommandSubBQ,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
syn cluster shTestList contains=shArithmetic,shCharClass,shCommandSub,shCommandSubBQ,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
syn cluster shNoZSList contains=shSpecialNoZS
syn cluster shForList contains=shTestOpr,shNumber,shDerefSimple,shDeref,shCommandSub,shCommandSubBQ,shArithmetic
" Echo: {{{1
" ====
" This one is needed INSIDE a CommandSub, so that `echo bla` be correct
syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
syn region shEchoDeref contained matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shEchoDelim end="$" end="[<>;&|()`}]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
syn region shEchoDeref contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" end="[<>;&|()`}]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment
endif
syn match shEchoQuote contained '\%(\\\\\)*\\["`'()]'
" This must be after the strings, so that ... \" will be correct
syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shExDoubleQuote,shDoubleQuote,shCharClass,shCtrlSeq
" Alias: {{{1
" =====
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
syn match shStatement "\<alias\>"
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]*\)\@=" skip="\\$" end="\>\|`"
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]*=\)\@=" skip="\\$" end="="
" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`"
" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="="
" Touch: {{{1
" =====
syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd,shDoubleQuote,shSingleQuote,shDeref,shDerefSimple
syn match shTouchCmd '\<touch\>' contained
endif
" Error Codes: {{{1
" ============
if !exists("g:sh_no_error")
syn match shDoError "\<done\>"
syn match shIfError "\<fi\>"
syn match shInError "\<in\>"
syn match shCaseError ";;"
syn match shEsacError "\<esac\>"
syn match shCurlyError "}"
syn match shParenError ")"
syn match shOK '\.\(done\|fi\|in\|esac\)'
if exists("b:is_kornshell") || exists("b:is_bash")
syn match shDTestError "]]"
endif
syn match shTestError "]"
endif
" Options: {{{1
" ====================
syn match shOption "\s\zs[-+][-_a-zA-Z#@]\+"
syn match shOption "\s\zs--[^ \t$=`'"|);]\+"
" File Redirection Highlighted As Operators: {{{1
"===========================================
syn match shRedir "\d\=>\(&[-0-9]\)\="
syn match shRedir "\d\=>>-\="
syn match shRedir "\d\=<\(&[-0-9]\)\="
syn match shRedir "\d<<-\="
" Operators: {{{1
" ==========
syn match shOperator "<<\|>>" contained
syn match shOperator "[!&;|]" contained
syn match shOperator "\[[[^:]\|\]]" contained
syn match shOperator "[-=/*+%]\==" skipwhite nextgroup=shPattern
syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shDeref
" Subshells: {{{1
" ==========
syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shSpecialNxt
syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" contains=@shSubShList nextgroup=shSpecialNxt
" Tests: {{{1
"=======
syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial
syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1
syn region shNoQuote start='\S' skip='\%(\\\\\)*\\.' end='\ze\s' end="\ze['"]" contained contains=shDerefSimple,shDeref
syn match shAstQuote contained '\*\ze"' nextgroup=shString
syn match shTestOpr contained '[^-+/%]\zs=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern
syn match shTestOpr contained "<=\|>=\|!=\|==\|=\~\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]"
syn match shTestPattern contained '\w\+'
syn region shTestDoubleQuote contained start='\%(\%(\\\\\)*\\\)\@<!"' skip=+\\\\\|\\"+ end='"' contains=shDeref,shDerefSimple,shDerefSpecial
syn match shTestSingleQuote contained '\\.' nextgroup=shTestSingleQuote
syn match shTestSingleQuote contained "'[^']*'"
if exists("b:is_kornshell") || exists("b:is_bash")
syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\%(\\\\\)*\\$+ end="\]\]" contains=@shTestList,shAstQuote,shNoQuote,shComment
syn region shDblParen matchgroup=Delimiter start="((" skip=+\%(\\\\\)*\\$+ end="))" contains=@shTestList,shComment
endif
" Character Class In Range: {{{1
" =========================
syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|tab\):\]"
" Loops: do, if, while, until {{{1
" ======
ShFoldIfDoFor syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
ShFoldIfDoFor syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
ShFoldIfDoFor syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
if exists("b:is_kornshell") || exists("b:is_bash")
ShFoldIfDoFor syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=@shForList
endif
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
syn cluster shCaseList add=shRepeat
syn cluster shFunctionList add=shRepeat
syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace
syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace
if !exists("b:is_posix")
syn region shCaseEsac matchgroup=shConditional start="\<select\s" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList
endif
else
syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<do\>"me=e-2 contains=@shLoopList
syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<do\>"me=e-2 contains=@shLoopList
endif
syn region shCurlyIn contained matchgroup=Delimiter start="{" end="}" contains=@shCurlyList
syn match shComma contained ","
" Case: case...esac {{{1
" ====
syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar
syn match shCaseLabel contained skipwhite "\%(\\.\|[-a-zA-Z0-9_*.]\)\+" contains=shCharClass
if exists("b:is_bash")
ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end=";&" end=";;&" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
elseif exists("b:is_kornshell")
ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end=";&" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
else
ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
endif
ShFoldIfDoFor syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
if exists("b:is_bash") || exists("b:is_kornshell")
syn region shCaseExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial skipwhite skipnl nextgroup=shCaseBar contained
elseif !exists("g:sh_no_error")
syn region shCaseExSingleQuote matchgroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
endif
syn region shCaseSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
syn region shCaseDoubleQuote matchgroup=shQuote start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
syn region shCaseCommandSub start=+`+ skip=+\\\\\|\\.+ end=+`+ contains=@shCommandSubList skipwhite skipnl nextgroup=shCaseBar contained
if exists("b:is_bash")
syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained contains=shCharClass
syn match shCharClass '\[:\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|or\|xdigit\):\]' contained
else
syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained
endif
" Misc: {{{1
"======
syn match shWrapLineOperator "\\$"
syn region shCommandSubBQ start="`" skip="\\\\\|\\." end="`" contains=shBQComment,@shCommandSubList
"COMBAK: see ksh13:50
"syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shSingleQuote,shDoubleQuote,shComment
"COMBAK: see sh11:27
syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shComment
"COMBAK: see ksh13:53
"syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.'
" $() and $(()): {{{1
" $(..) is not supported by sh (Bourne shell). However, apparently
" some systems (HP?) have as their /bin/sh a (link to) Korn shell
" (ie. Posix compliant shell). /bin/ksh should work for those
" systems too, however, so the following syntax will flag $(..) as
" an Error under /bin/sh. By consensus of vimdev'ers!
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze\([^(]\|$\)" skip='\\\\\|\\.' end=")" contains=@shCommandSubList
syn region shArithmetic matchgroup=shArithRegion start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList
syn region shArithmetic matchgroup=shArithRegion start="\$\[" skip='\\\\\|\\.' end="\]" contains=@shArithList
syn match shSkipInitWS contained "^\s\+"
syn region shArithParen matchgroup=shArithRegion contained start="(" end=")" contains=@shArithParenList
elseif !exists("g:sh_no_error")
syn region shCommandSub matchgroup=Error start="\$(" end=")" contains=@shCommandSubList
endif
syn region shCmdParenRegion matchgroup=shCmdSubRegion start="(\ze[^(]" skip='\\\\\|\\.' end=")" contains=@shCommandSubList
if exists("b:is_bash")
syn cluster shCommandSubList add=bashSpecialVariables,bashStatement
syn cluster shCaseList add=bashAdminStatement,bashStatement
syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ALIASES BASH_ARGC BASH_ARGC BASH_ARGV BASH_ARGV BASH_CMDS BASH_CMDS BASH_COMMAND BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_EXECUTION_STRING BASH_LINENO BASH_LINENO BASHOPTS BASHOPTS BASHPID BASHPID BASH_REMATCH BASH_REMATCH BASH_SOURCE BASH_SOURCE BASH_SUBSHELL BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD BASH_XTRACEFD CDPATH COLUMNS COLUMNS COMP_CWORD COMP_CWORD COMP_KEY COMP_KEY COMP_LINE COMP_LINE COMP_POINT COMP_POINT COMPREPLY COMPREPLY COMP_TYPE COMP_TYPE COMP_WORDBREAKS COMP_WORDBREAKS COMP_WORDS COMP_WORDS COPROC COPROC DIRSTACK EMACS EMACS ENV ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNAME FUNCNEST FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_NUMERIC LINENO LINES LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE MAPFILE OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS POSIXLY_CORRECT POSIXLY_CORRECT PPID PROMPT_COMMAND PS1 PS2 PS3 PS4 PWD RANDOM READLINE_LINE READLINE_LINE READLINE_POINT READLINE_POINT REPLY SECONDS SHELL SHELL SHELLOPTS SHLVL TIMEFORMAT TIMEOUT TMPDIR TMPDIR UID
syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep head less ls mkdir mv rm rmdir rpm sed sleep sort strip tail
syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop
syn keyword bashStatement command compgen
endif
if exists("b:is_kornshell") || exists("b:is_posix")
syn cluster shCommandSubList add=kshSpecialVariables,kshStatement
syn cluster shCaseList add=kshStatement
syn keyword kshSpecialVariables contained CDPATH COLUMNS EDITOR ENV ERRNO FCEDIT FPATH HISTFILE HISTSIZE HOME IFS LINENO LINES MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTIND PATH PPID PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELL TMOUT VISUAL
syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep head killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail tput
syn keyword kshStatement command setgroups setsenv
endif
syn match shSource "^\.\s"
syn match shSource "\s\.\s"
"syn region shColon start="^\s*:" end="$" end="\s#"me=e-2 contains=@shColonList
"syn region shColon start="^\s*\zs:" end="$" end="\s#"me=e-2
if exists("b:is_kornshell") || exists("b:is_posix")
syn match shColon '^\s*\zs:'
endif
" String And Character Constants: {{{1
"================================
syn match shNumber "\<\d\+\>#\="
syn match shNumber "\<-\=\.\=\d\+\>#\="
syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained
if exists("b:is_bash") || exists("b:is_kornshell")
syn match shSpecial "[^\\]\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
syn match shSpecial "^\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial nextgroup=shSpecialNxt
syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial nextgroup=shSpecialNxt
elseif !exists("g:sh_no_error")
syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial
syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial
endif
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart,shSpecialSQ
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
syn match shStringSpecial "[^[:print:] \t]" contained
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\(\\[\\"'`$()#]\)\+" nextgroup=shComment
syn match shSpecialSQ "[^\\]\zs\%(\\\\\)*\(\\[\\"'`$()#]\)\+" contained nextgroup=shBkslshSnglQuote,@shNoZSList
syn match shSpecialDQ "[^\\]\zs\%(\\\\\)*\(\\[\\"'`$()#]\)\+" contained nextgroup=shBkslshDblQuote,@shNoZSList
syn match shSpecialStart "\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,shBkslshDblQuote,@shNoZSList
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecialNoZS contained "\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecialNxt contained "\\[\\"'`$()#]"
"syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart
"syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
" Comments: {{{1
"==========
syn cluster shCommentGroup contains=shTodo,@Spell
if exists("b:is_bash")
syn match shTodo contained "\<\%(COMBAK\|FIXME\|TODO\|XXX\)\ze:\=\>"
else
syn keyword shTodo contained COMBAK FIXME TODO XXX
endif
syn match shComment "^\s*\zs#.*$" contains=@shCommentGroup
syn match shComment "\s\zs#.*$" contains=@shCommentGroup
syn match shComment contained "#.*$" contains=@shCommentGroup
syn match shQuickComment contained "#.*$" contains=@shCommentGroup
syn match shBQComment contained "#.\{-}\ze`" contains=@shCommentGroup
" Here Documents: {{{1
" (modified by Felipe Contreras)
" =========================================
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc02 end="^\s*\z1$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc04 end="^\s*\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc06 end="^\s*\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc07 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<-\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc08 end="^\s*\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc09 end="^\z1$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc12 end="^\s*\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc13 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<-\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc14 end="^\s*\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc15 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc16 end="^\s*\z1$"
" Here Strings: {{{1
" =============
" available for: bash; ksh (really should be ksh93 only) but not if its a posix
if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("b:is_posix"))
syn match shHereString "<<<" skipwhite nextgroup=shCmdParenRegion
endif
" Identifiers: {{{1
"=============
syn match shSetOption "\s\zs[-+][a-zA-Z0-9]\+\>" contained
syn match shVariable "\<\h\w*\ze=" nextgroup=shVarAssign
syn match shVarAssign "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote,shVar
syn match shVar contained "\h\w*"
syn region shAtExpr contained start="@(" end=")" contains=@shIdList
if exists("b:is_bash")
syn match shSet "^\s*set\ze\s\+$"
syn region shSetList oneline matchgroup=shSet start="\<\%(declare\|local\|export\)\>\ze[/a-zA-Z_]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList
syn region shSetList oneline matchgroup=shSet start="\<\%(set\|unset\)\>[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList nextgroup=shComment
elseif exists("b:is_kornshell") || exists("b:is_posix")
syn match shSet "^\s*set\ze\s\+$"
if exists("b:is_dash")
syn region shSetList oneline matchgroup=shSet start="\<\%(local\)\>\ze[/]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
endif
syn region shSetList oneline matchgroup=shSet start="\<\(export\)\>\ze[/]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
syn region shSetList oneline matchgroup=shSet start="\<\%(set\|unset\>\)\ze[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList nextgroup=shComment
else
syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
endif
" KornShell namespace: {{{1
if exists("b:is_kornshell")
syn keyword shFunctionKey namespace skipwhite skipnl nextgroup=shFunctionTwo
endif
" Functions: {{{1
if !exists("b:is_posix")
syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo
endif
if exists("b:is_bash")
ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*[A-Za-z_0-9:][-a-zA-Z_0-9:]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_0-9:][-a-zA-Z_0-9:]*\>\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*[A-Za-z_0-9:][-a-zA-Z_0-9:]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<[A-Za-z_0-9:][-a-zA-Z_0-9:]*\>\s*\%(()\)\=\_s*)" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
else
ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\%(do\)\@!\&\<\h\w*\>\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\%(do\)\@!\&\<\h\w*\>\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
endif
" Parameter Dereferencing: {{{1
" ========================
" Note: sh04 failure with following line
"if !exists("g:sh_no_error") && !(exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix"))
if !exists("g:sh_no_error")
syn match shDerefWordError "[^}$[~]" contained
endif
syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray nextgroup=shSpecialStart
syn match shDerefSimple "\$[-#*@!?]" nextgroup=@shNoZSList
syn match shDerefSimple "\$\$" nextgroup=@shNoZSList
syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList nextgroup=shSpecialStart
if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")
syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS,shSpecialStart
syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS,shSpecialStart
endif
" ksh: ${.sh.*} variables: {{{1
" ========================================
if exists("b:is_kornshell")
" syn match shDerefVar contained "[.]*" nextgroup=@shDerefVarList
syn match shDerefVar contained "\.\+" nextgroup=@shDerefVarList
endif
" ksh: ${!var[*]} array index list syntax: {{{1
" ========================================
if exists("b:is_kornshell") || exists("b:is_posix")
syn region shDeref matchgroup=PreProc start="\${!" end="}" contains=@shDerefVarArray
endif
" bash: ${!prefix*} and ${#parameter}: {{{1
" ====================================
if exists("b:is_bash")
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOffset
syn match shDerefVar contained "{\@<=!\h\w*" nextgroup=@shDerefVarList
endif
if exists("b:is_kornshell")
syn match shDerefVar contained "{\@<=!\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList
endif
syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOffset,shDerefOpError
syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp
syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList
syn match shDerefVar contained '\d' nextgroup=@shDerefVarList
if exists("b:is_kornshell") || exists("b:is_posix")
syn match shDerefVar contained "{\@<=\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList
endif
" sh ksh bash : ${var[... ]...} array reference: {{{1
syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError
" Special ${parameter OPERATOR word} handling: {{{1
" sh ksh bash : ${parameter:-word} word is default value
" sh ksh bash : ${parameter:=word} assign word as default value
" sh ksh bash : ${parameter:?word} display word if parameter is null
" sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing
" ksh bash : ${parameter#pattern} remove small left pattern
" ksh bash : ${parameter##pattern} remove large left pattern
" ksh bash : ${parameter%pattern} remove small right pattern
" ksh bash : ${parameter%%pattern} remove large right pattern
" bash : ${parameter^pattern} Case modification
" bash : ${parameter^^pattern} Case modification
" bash : ${parameter,pattern} Case modification
" bash : ${parameter,,pattern} Case modification
" bash : ${@:start:qty} display command line arguments from start to start+qty-1 (inferred)
syn cluster shDerefPatternList contains=shDerefPattern,shDerefString
if !exists("g:sh_no_error")
syn match shDerefOpError contained ":[[:punct:]]"
endif
syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList
syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList
if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")
syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList
syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList
syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern
syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern
syn match shDerefEscape contained '\%(\\\\\)*\\.'
endif
if exists("b:is_bash")
syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList
endif
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial
syn match shDerefString contained "\\["']" nextgroup=shDerefPattern
if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")
" bash ksh posix : ${parameter:offset}
" bash ksh posix : ${parameter:offset:length}
syn region shDerefOffset contained start=':[^-=?+]' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
syn region shDerefOffset contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple,shArithmetic
endif
if exists("b:is_bash")
" bash : ${parameter//pattern/string}
" bash : ${parameter//pattern}
syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft
syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' end='"' nextgroup=shDerefPPSright contains=@shPPSLeftList
syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shPPSRightList
" bash : ${parameter/#substring/replacement}
syn match shDerefPSR contained '/#' nextgroup=shDerefPSRleft,shDoubleQuote,shSingleQuote
syn region shDerefPSRleft contained start='[^"']' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPSRright
syn region shDerefPSRright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}'
endif
" Arithmetic Parenthesized Expressions: {{{1
"syn region shParen matchgroup=shArithRegion start='[^$]\zs(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList
syn region shParen matchgroup=shArithRegion start='\$\@!(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList
" Additional sh Keywords: {{{1
" ===================
syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait
syn keyword shConditional contained elif else then
if !exists("g:sh_no_error")
syn keyword shCondError elif else then
endif
" Additional ksh Keywords and Aliases: {{{1
" ===================================
if exists("b:is_kornshell") || exists("b:is_posix")
syn keyword shStatement bg builtin disown enum export false fg getconf getopts hist jobs let printf sleep true unalias whence
syn keyword shStatement typeset skipwhite nextgroup=shSetOption
syn keyword shStatement autoload compound fc float functions hash history integer nameref nohup r redirect source stop suspend times type
if exists("b:is_posix")
syn keyword shStatement command
else
syn keyword shStatement time
endif
" Additional bash Keywords: {{{1
" =====================
elseif exists("b:is_bash")
syn keyword shStatement bg builtin disown export false fg getopts jobs let printf sleep true unalias
syn keyword shStatement typeset nextgroup=shSetOption
syn keyword shStatement fc hash history source suspend times type
syn keyword shStatement bind builtin caller compopt declare dirs disown enable export help logout mapfile popd pushd readarray shopt source typeset
else
syn keyword shStatement login newgrp
endif
" Synchronization: {{{1
" ================
if !exists("g:sh_minlines")
let s:sh_minlines = 200
else
let s:sh_minlines= g:sh_minlines
endif
if !exists("g:sh_maxlines")
let s:sh_maxlines = 2*s:sh_minlines
if s:sh_maxlines < 25
let s:sh_maxlines= 25
endif
else
let s:sh_maxlines= g:sh_maxlines
endif
exec "syn sync minlines=" . s:sh_minlines . " maxlines=" . s:sh_maxlines
syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>"
syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>"
syn sync match shDoSync grouphere shDo "\<do\>"
syn sync match shDoSync groupthere shDo "\<done\>"
syn sync match shForSync grouphere shFor "\<for\>"
syn sync match shForSync groupthere shFor "\<in\>"
syn sync match shIfSync grouphere shIf "\<if\>"
syn sync match shIfSync groupthere shIf "\<fi\>"
syn sync match shUntilSync grouphere shRepeat "\<until\>"
syn sync match shWhileSync grouphere shRepeat "\<while\>"
" Default Highlighting: {{{1
" =====================
if !exists("skip_sh_syntax_inits")
hi def link shArithRegion shShellVariables
hi def link shAstQuote shDoubleQuote
hi def link shAtExpr shSetList
hi def link shBkslshSnglQuote shSingleQuote
hi def link shBkslshDblQuote shDOubleQuote
hi def link shBeginHere shRedir
hi def link shCaseBar shConditional
hi def link shCaseCommandSub shCommandSub
hi def link shCaseDoubleQuote shDoubleQuote
hi def link shCaseIn shConditional
hi def link shQuote shOperator
hi def link shCaseSingleQuote shSingleQuote
hi def link shCaseStart shConditional
hi def link shCmdSubRegion shShellVariables
hi def link shColon shComment
hi def link shDerefOp shOperator
hi def link shDerefPOL shDerefOp
hi def link shDerefPPS shDerefOp
hi def link shDerefPSR shDerefOp
hi def link shDeref shShellVariables
hi def link shDerefDelim shOperator
hi def link shDerefSimple shDeref
hi def link shDerefSpecial shDeref
hi def link shDerefString shDoubleQuote
hi def link shDerefVar shDeref
hi def link shDoubleQuote shString
hi def link shEcho shString
hi def link shEchoDelim shOperator
hi def link shEchoQuote shString
hi def link shForPP shLoop
hi def link shFunction Function
hi def link shEmbeddedEcho shString
hi def link shEscape shCommandSub
hi def link shExDoubleQuote shDoubleQuote
hi def link shExSingleQuote shSingleQuote
hi def link shHereDoc shString
hi def link shHereString shRedir
hi def link shHerePayload shHereDoc
hi def link shLoop shStatement
hi def link shSpecialNxt shSpecial
hi def link shNoQuote shDoubleQuote
hi def link shOption shCommandSub
hi def link shPattern shString
hi def link shParen shArithmetic
hi def link shPosnParm shShellVariables
hi def link shQuickComment shComment
hi def link shBQComment shComment
hi def link shRange shOperator
hi def link shRedir shOperator
hi def link shSetListDelim shOperator
hi def link shSetOption shOption
hi def link shSingleQuote shString
hi def link shSource shOperator
hi def link shStringSpecial shSpecial
hi def link shSpecialStart shSpecial
hi def link shSubShRegion shOperator
hi def link shTestOpr shConditional
hi def link shTestPattern shString
hi def link shTestDoubleQuote shString
hi def link shTestSingleQuote shString
hi def link shTouchCmd shStatement
hi def link shVariable shSetList
hi def link shWrapLineOperator shOperator
if exists("b:is_bash")
hi def link bashAdminStatement shStatement
hi def link bashSpecialVariables shShellVariables
hi def link bashStatement shStatement
hi def link shCharClass shSpecial
hi def link shDerefOffset shDerefOp
hi def link shDerefLen shDerefOffset
endif
if exists("b:is_kornshell") || exists("b:is_posix")
hi def link kshSpecialVariables shShellVariables
hi def link kshStatement shStatement
endif
if !exists("g:sh_no_error")
hi def link shCaseError Error
hi def link shCondError Error
hi def link shCurlyError Error
hi def link shDerefOpError Error
hi def link shDerefWordError Error
hi def link shDoError Error
hi def link shEsacError Error
hi def link shIfError Error
hi def link shInError Error
hi def link shParenError Error
hi def link shTestError Error
if exists("b:is_kornshell") || exists("b:is_posix")
hi def link shDTestError Error
endif
endif
hi def link shArithmetic Special
hi def link shCharClass Identifier
hi def link shSnglCase Statement
hi def link shCommandSub Special
hi def link shCommandSubBQ shCommandSub
hi def link shComment Comment
hi def link shConditional Conditional
hi def link shCtrlSeq Special
hi def link shExprRegion Delimiter
hi def link shFunctionKey Function
hi def link shFunctionName Function
hi def link shNumber Number
hi def link shOperator Operator
hi def link shRepeat Repeat
hi def link shSet Statement
hi def link shSetList Identifier
hi def link shShellVariables PreProc
hi def link shSpecial Special
hi def link shSpecialDQ Special
hi def link shSpecialSQ Special
hi def link shSpecialNoZS shSpecial
hi def link shStatement Statement
hi def link shString String
hi def link shTodo Todo
hi def link shAlias Identifier
hi def link shHereDoc01 shRedir
hi def link shHereDoc02 shRedir
hi def link shHereDoc03 shRedir
hi def link shHereDoc04 shRedir
hi def link shHereDoc05 shRedir
hi def link shHereDoc06 shRedir
hi def link shHereDoc07 shRedir
hi def link shHereDoc08 shRedir
hi def link shHereDoc09 shRedir
hi def link shHereDoc10 shRedir
hi def link shHereDoc11 shRedir
hi def link shHereDoc12 shRedir
hi def link shHereDoc13 shRedir
hi def link shHereDoc14 shRedir
hi def link shHereDoc15 shRedir
hi def link shHereDoc16 shRedir
endif
" Delete shell folding commands {{{1
" =============================
delc ShFoldFunctions
delc ShFoldHereDoc
delc ShFoldIfDoFor
" Set Current Syntax: {{{1
" ===================
if exists("b:is_bash")
let b:current_syntax = "bash"
elseif exists("b:is_kornshell")
let b:current_syntax = "ksh"
elseif exists("b:is_posix")
let b:current_syntax = "posix"
else
let b:current_syntax = "sh"
endif
" vim: ts=16 fdm=marker

View File

@ -25,41 +25,29 @@ set viewdir=$XDG_STATE_HOME/vim/view
syntax on
set number
set relativenumber
hi LineNr ctermfg=11 cterm=bold
hi StatusLine ctermfg=7 ctermbg=0 cterm=none
hi StatusLineNC cterm=none ctermfg=7
hi VertSplit cterm=none ctermbg=7 ctermfg=7
hi WildMenu cterm=bold
hi Search ctermfg=0 ctermbg=7
hi TabLineFill cterm=none
hi TabLineSel ctermbg=8
hi CurSearch ctermfg=15 ctermbg=10
hi IncSearch ctermfg=0 ctermbg=7
hi SpellLocal ctermbg=0 ctermfg=3
hi SpellCap ctermbg=0 ctermfg=4
hi SpellBad ctermbg=0 ctermfg=1
hi SpellRare ctermbg=0 ctermfg=6
set background=dark
colorscheme sorbet
hi Normal ctermbg=none
hi StatusLine ctermbg=8 ctermfg=15 cterm=none
hi StatusLineNC cterm=none ctermbg=none ctermfg=7
hi LineNr ctermfg=5 cterm=bold
hi CurSearch ctermfg=7 ctermbg=2
" }}}
" tabs & windows {{{
noremap <C-t> :tabnew
noremap <C-j> <C-w>w
noremap <C-k> <C-w>W
noremap <C-w>t <C-w>T
noremap <C-w>l <C-w>L
noremap <C-w>h <C-w>H
noremap <C-w>j <C-w>J
noremap <C-w>k <C-w>K
noremap <C-w>H <C-w><
noremap <C-w>L <C-w>>
noremap <C-w>J <C-w>-
noremap <C-w>K <C-w>+
noremap <C-w>G :sb <CR>
noremap <C-w><C-h> <C-w><
noremap <C-w><C-l> <C-w>>
noremap <C-w><C-j> <C-w>-
noremap <C-w><C-k> <C-w>+
nnoremap gr gT
nnoremap <Tab> gt
nnoremap <S-Tab> gT
" }}}
" searching & completion {{{
set path=.,**
set wildmenu
set lazyredraw
set showmatch
@ -68,7 +56,6 @@ set hlsearch
set ignorecase
set smartcase
set wildignorecase
noremap <C-S-f> :noh<CR>
" }}}
" folding {{{
@ -85,24 +72,33 @@ set preserveindent
set tabstop=4
set softtabstop=0
set shiftwidth=4
nnoremap <BS> "_X
nnoremap <Del> "_x
nnoremap <C-w>w :wq<CR>
" quickfix for spelling
inoremap <C-l> <C-g>u<Esc>[s1z=`]a<C-g>u
" some emacs-esque keybinds in insert mode
inoremap <C-e> <End>
inoremap <C-a> <Home>
inoremap <C-f> <C-Right>
inoremap <C-b> <C-Left>
" }}}
" other funny remaps {{{
noremap! <C-BS> <C-w>
noremap! <C-h> <C-w>
nnoremap gr gT
" misc keybinds {{{
" git stuff
noremap <Leader>1 :diffget LOCAL<CR>
noremap <Leader>2 :diffget BASE<CR>
noremap <Leader>3 :diffget REMOTE<CR>
" noh
nnoremap <C-_> :noh<CR>
" }}}
" misc. options {{{
set mouse=a
set backspace=indent,eol,start
set whichwrap+=<,>,h,l
set wrap smoothscroll
set linebreak
set shellredir=>
set copyindent
" }}}
" status bar ugh {{{
@ -127,8 +123,10 @@ let g:netrw_liststyle=3
" }}}
" FILETYPE SHIT {{{
autocmd FileType c setlocal sw=8 ts=8
autocmd FileType rust setlocal noet ci pi sts=0 sw=8 ts=8
autocmd FileType python setlocal noet ci pi sts=0 sw=8 ts=8
autocmd FileType haskell setlocal et
autocmd FileType c,cpp setlocal sw=8 ts=8 cc=80 tw=80
autocmd FileType rust setlocal cc=100 tw=100
autocmd FileType haskell,tex setlocal et
autocmd FileType tex setlocal sw=2 sts=2 conceallevel=1
autocmd BufNewFile,BufFilePre,BufRead *.md set filetype=markdown.pandoc
autocmd BufNewFile,BufFilePre,BufRead *.shp set ft=html
" }}}

View File

@ -6,42 +6,44 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
config_version = 2
[cmd]
AAWAY = "allserv /away"
ANICK = "allserv /nick"
BEEP = "print -beep"
BYE = "quit"
C = "buffer clear"
CHAT = "dcc chat"
CL = "buffer clear"
CLOSE = "buffer close"
EXIT = "quit"
IG = "ignore"
J = "join"
K = "kick"
KB = "kickban"
LEAVE = "part"
M = "msg"
MSGBUF = "command -buffer $1 * /input send $2-"
MUB = "unban *"
N = "names"
Q = "query"
REDRAW = "window refresh"
SAY = "msg *"
SIGNOFF = "quit"
T = "topic"
UB = "unban"
UMODE = "mode $nick"
V = "command core version"
W = "who"
WC = "window close"
WI = "whois"
WII = "whois $1 $1"
WM = "window merge"
WW = "whowas"
aaway = "allserv /away"
anick = "allserv /nick"
beep = "print -beep"
bye = "quit"
c = "buffer clear"
chat = "dcc chat"
cl = "buffer clear"
close = "buffer close"
exit = "quit"
ig = "ignore"
j = "join"
k = "kick"
kb = "kickban"
leave = "part"
m = "msg"
msgbuf = "command -buffer $1 * /input send $2-"
mub = "unban *"
n = "names"
q = "query"
redraw = "window refresh"
say = "msg *"
signoff = "quit"
t = "topic"
ub = "unban"
umode = "mode $nick"
v = "command core version"
w = "who"
wc = "window close"
wi = "whois"
wii = "whois $1 $1"
wm = "window merge"
ww = "whowas"
[completion]
MSGBUF = "%(buffers_plugins_names)"
msgbuf = "%(buffers_plugins_names)"

View File

@ -0,0 +1,24 @@
#
# weechat -- autosort.conf
#
# WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running.
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[sorting]
case_sensitive = off
debug_log = off
replacements = ""
rules = ""
signal_delay = 5
signals = "buffer_opened buffer_merged buffer_unmerged buffer_renamed"
sort_limit = 100
sort_on_config_change = on
[v3]
helpers = "{"core_first": "${if:${buffer.full_name}!=core.weechat}", "irc_raw_first": "${if:${buffer.full_name}!=irc.irc_raw}", "irc_raw_last": "${if:${buffer.full_name}==irc.irc_raw}", "hashless_name": "${info:autosort_replace,#,,${info:autosort_escape,${buffer.name}}}", "script_or_plugin": "${if:${script_name}?${script_name}:${plugin}}"}"
rules = "["${core_first}", "${info:autosort_order,${info:autosort_escape,${script_or_plugin}},core,*,irc,bitlbee,matrix,slack}", "${script_or_plugin}", "${irc_raw_first}", "${server}", "${info:autosort_order,${type},server,*,channel,private}", "${hashless_name}", "${buffer.full_name}"]"

View File

@ -6,7 +6,7 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[look]
@ -15,27 +15,27 @@ auto_scroll = 50
display_conditions = "${buffer.hidden}==0"
enabled = on
mouse_jump_visited_buffer = off
mouse_move_buffer = on
mouse_move_buffer = off
mouse_wheel = on
nick_prefix = off
nick_prefix_empty = on
nick_prefix = on
nick_prefix_empty = off
signals_refresh = ""
sort = "number,-active"
sort = "irc_server.name,irc_channel.type,number,-active"
use_items = 1
[format]
buffer = "${format_number} ${format_nick_prefix}${color_hotlist}${format_name}"
buffer = "${format_number}${indent}${if:(${buffer.filter} == 0)?${color:magenta} }${format_nick_prefix}${color_hotlist}${if:(${buffer.full_name} =~ ^irc)?${if:(${irc_server.away_time} > 0 && ${buffer.name} =~ ^server)?${color:yellow}>}${if:(${irc_channel.part} == 1)?${color:magenta}▒}${if:(${irc_server.is_connected} == 0)?${color:*magenta}█}}${if:${type}==private?↪}${name}"
buffer_current = "${color:,8}${format_buffer}"
hotlist = " ${color:green}(${hotlist}${color:green})"
hotlist_highlight = "${color:13}"
hotlist_low = "${color:15}"
hotlist_message = "${color:12}"
hotlist_none = "${color:7}"
hotlist_none = "${color:7}${if:${type}==server?${color:8}}"
hotlist_private = "${color:10}"
hotlist_separator = "${color:default},"
indent = " "
indent = "${color:8}${if:${buffer.next_buffer.local_variables.type}=~^(channel|private)$?├ :└─}"
lag = " ${color:green}[${color:brown}${lag}${color:green}]"
name = "${name}"
nick_prefix = "${color_nick_prefix}${nick_prefix}"
number = "${color:*9}${number}${if:${number_displayed}?.: }"
number = "${color:3}${number}${if:${number_displayed}? : }"
tls_version = " ${color:default}(${if:${tls_version}==TLS1.3?${color:green}:${if:${tls_version}==TLS1.2?${color:yellow}:${color:red}}}${translate:${tls_version}}${color:default})"

View File

@ -6,7 +6,7 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[default]

View File

@ -6,7 +6,7 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[command]

View File

@ -6,7 +6,7 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[file]

View File

@ -6,7 +6,7 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[look]
@ -32,6 +32,10 @@ option1 = ""
option2 = "${marked} ${name} ${type} ${value2}${newline} ${empty_name} ${_default_value}${color:darkgray} -- ${min}..${max}${newline} ${empty_name} ${description}"
[color]
allowed_values = default
allowed_values_selected = white
color_name = 246
color_name_selected = default
default_value = default
default_value_selected = white
description = default

View File

@ -6,9 +6,11 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
config_version = 3
[look]
buffer_open_before_autojoin = on
buffer_open_before_join = off
@ -27,7 +29,9 @@ display_ctcp_unknown = on
display_extended_join = on
display_host_join = on
display_host_join_local = on
display_host_notice = on
display_host_quit = on
display_host_wallops = on
display_join_message = "329,332,333,366"
display_old_topic = on
display_pv_away_once = on
@ -38,14 +42,20 @@ highlight_channel = "$nick"
highlight_pv = "$nick"
highlight_server = "$nick"
highlight_tags_restrict = "irc_privmsg,irc_notice"
ignore_tag_messages = off
item_channel_modes_hide_args = "k"
item_display_server = buffer_plugin
item_nick_modes = on
item_nick_prefix = on
join_auto_add_chantype = off
list_buffer = on
list_buffer_scroll_horizontal = 10
list_buffer_sort = "~name2"
list_buffer_topic_strip_colors = on
msgbuffer_fallback = current
new_channel_position = none
new_pv_position = none
new_channel_position = near_server
new_list_position = none
new_pv_position = near_server
nick_completion_smart = speakers
nick_mode = prefix
nick_mode_empty = off
@ -55,15 +65,16 @@ notice_welcome_redirect = on
notice_welcome_tags = ""
notify_tags_ison = "notify_message"
notify_tags_whois = "notify_message"
open_pv_buffer_echo_msg = on
part_closes_buffer = off
pv_buffer = independent
pv_tags = "notify_private"
raw_messages = 256
server_buffer = merge_with_core
server_buffer = independent
smart_filter = on
smart_filter_account = on
smart_filter_chghost = on
smart_filter_delay = 5
smart_filter_delay = 4320
smart_filter_join = on
smart_filter_join_unmask = 30
smart_filter_mode = "+"
@ -84,6 +95,8 @@ item_nick_modes = default
item_tls_version_deprecated = yellow
item_tls_version_insecure = red
item_tls_version_ok = green
list_buffer_line_selected = white
list_buffer_line_selected_bg = 24
message_account = cyan
message_chghost = brown
message_join = green
@ -95,6 +108,7 @@ nick_prefixes = "y:lightred;q:lightred;a:lightcyan;o:lightgreen;h:lightmagenta;v
notice = green
reason_kick = default
reason_quit = default
term_remap = "0,-1:darkgray"
topic_current = default
topic_new = white
topic_old = default
@ -121,11 +135,14 @@ whois_double_nick = off
[ctcp]
[ignore]
ignore = *;*;^feuciest@E72FD268\.A672B81D\.CE167817\.IP$
ignore = *;*;^plaizz@12685D8A\.2BBC815A\.CE167817\.IP$
ignore = *;*;^~kiofle@vps-3fcaee4e\.vps\.ovh\.net$
ignore = *;*;^baamy@C66BC7FC\.90BDAA00\.CE167817\.IP$
[server_default]
addresses = ""
anti_flood_prio_high = 2
anti_flood_prio_low = 2
anti_flood = 2000
autoconnect = off
autojoin = ""
autojoin_dynamic = off
@ -144,7 +161,7 @@ default_chantypes = "#&"
ipv6 = on
local_hostname = ""
msg_kick = ""
msg_part = "WeeChat ${info:version}"
msg_part = "Bailing out, you are on your own now. Good luck."
msg_quit = "Bailing out, you are on your own now. Good luck."
nicks = "yosh,yoshi,yoshiyosh,yoshiyoshiyosh,yoshiyoshyosh"
nicks_alternate = on
@ -152,6 +169,7 @@ notify = ""
password = ""
proxy = ""
realname = ""
registered_mode = "r"
sasl_fail = reconnect
sasl_key = ""
sasl_mechanism = plain
@ -159,13 +177,13 @@ sasl_password = ""
sasl_timeout = 15
sasl_username = ""
split_msg_max_length = 512
ssl = off
ssl_cert = ""
ssl_dhkey_size = 2048
ssl_fingerprint = ""
ssl_password = ""
ssl_priorities = "NORMAL:-VERS-SSL3.0"
ssl_verify = on
tls = off
tls_cert = ""
tls_dhkey_size = 2048
tls_fingerprint = ""
tls_password = ""
tls_priorities = "NORMAL:-VERS-SSL3.0"
tls_verify = on
usermode = ""
username = "yosh"
@ -173,25 +191,25 @@ username = "yosh"
libera.addresses = "irc.libera.chat/6697"
libera.proxy
libera.ipv6
libera.ssl = on
libera.ssl_cert
libera.ssl_password
libera.ssl_priorities
libera.ssl_dhkey_size
libera.ssl_fingerprint
libera.ssl_verify
libera.tls = on
libera.tls_cert
libera.tls_password
libera.tls_priorities
libera.tls_dhkey_size
libera.tls_fingerprint
libera.tls_verify
libera.password
libera.capabilities
libera.sasl_mechanism
libera.sasl_username = ""
libera.sasl_password = ""
libera.sasl_username = "yoshiyosh"
libera.sasl_password = "${sec.data.libera}"
libera.sasl_key
libera.sasl_timeout
libera.sasl_fail
libera.autoconnect
libera.autoconnect = on
libera.autoreconnect
libera.autoreconnect_delay
libera.nicks
libera.nicks = "yoshiyosh"
libera.nicks_alternate
libera.username
libera.realname
@ -199,13 +217,12 @@ libera.local_hostname
libera.usermode
libera.command
libera.command_delay
libera.autojoin
libera.autojoin = "##furry,#voidlinux,#kakoune,#aerc"
libera.autojoin_dynamic
libera.autorejoin
libera.autorejoin_delay
libera.connection_timeout
libera.anti_flood_prio_high
libera.anti_flood_prio_low
libera.anti_flood
libera.away_check
libera.away_check_max_nicks
libera.msg_kick
@ -215,16 +232,17 @@ libera.notify
libera.split_msg_max_length
libera.charset_message
libera.default_chantypes
libera.registered_mode
abime.addresses = "irc.abime.net/6667"
abime.proxy
abime.ipv6
abime.ssl
abime.ssl_cert
abime.ssl_password
abime.ssl_priorities
abime.ssl_dhkey_size
abime.ssl_fingerprint
abime.ssl_verify
abime.tls
abime.tls_cert
abime.tls_password
abime.tls_priorities
abime.tls_dhkey_size
abime.tls_fingerprint
abime.tls_verify
abime.password
abime.capabilities
abime.sasl_mechanism
@ -249,8 +267,7 @@ abime.autojoin_dynamic
abime.autorejoin
abime.autorejoin_delay
abime.connection_timeout
abime.anti_flood_prio_high
abime.anti_flood_prio_low
abime.anti_flood
abime.away_check
abime.away_check_max_nicks
abime.msg_kick
@ -260,16 +277,17 @@ abime.notify
abime.split_msg_max_length
abime.charset_message
abime.default_chantypes
abime.registered_mode
efnet.addresses = "irc.choopa.net"
efnet.proxy
efnet.ipv6
efnet.ssl
efnet.ssl_cert
efnet.ssl_password
efnet.ssl_priorities
efnet.ssl_dhkey_size
efnet.ssl_fingerprint
efnet.ssl_verify
efnet.tls
efnet.tls_cert
efnet.tls_password
efnet.tls_priorities
efnet.tls_dhkey_size
efnet.tls_fingerprint
efnet.tls_verify
efnet.password
efnet.capabilities
efnet.sasl_mechanism
@ -278,7 +296,7 @@ efnet.sasl_password
efnet.sasl_key
efnet.sasl_timeout
efnet.sasl_fail
efnet.autoconnect = on
efnet.autoconnect
efnet.autoreconnect
efnet.autoreconnect_delay
efnet.nicks
@ -294,8 +312,7 @@ efnet.autojoin_dynamic
efnet.autorejoin
efnet.autorejoin_delay
efnet.connection_timeout
efnet.anti_flood_prio_high
efnet.anti_flood_prio_low
efnet.anti_flood
efnet.away_check
efnet.away_check_max_nicks
efnet.msg_kick
@ -305,16 +322,17 @@ efnet.notify
efnet.split_msg_max_length
efnet.charset_message
efnet.default_chantypes
efnet.registered_mode
yiffnet.addresses = "irc.yiffnet.org"
yiffnet.proxy
yiffnet.ipv6
yiffnet.ssl
yiffnet.ssl_cert
yiffnet.ssl_password
yiffnet.ssl_priorities
yiffnet.ssl_dhkey_size
yiffnet.ssl_fingerprint
yiffnet.ssl_verify
yiffnet.tls
yiffnet.tls_cert
yiffnet.tls_password
yiffnet.tls_priorities
yiffnet.tls_dhkey_size
yiffnet.tls_fingerprint
yiffnet.tls_verify
yiffnet.password
yiffnet.capabilities
yiffnet.sasl_mechanism
@ -339,8 +357,7 @@ yiffnet.autojoin_dynamic
yiffnet.autorejoin
yiffnet.autorejoin_delay
yiffnet.connection_timeout
yiffnet.anti_flood_prio_high
yiffnet.anti_flood_prio_low
yiffnet.anti_flood
yiffnet.away_check
yiffnet.away_check_max_nicks
yiffnet.msg_kick
@ -350,16 +367,17 @@ yiffnet.notify
yiffnet.split_msg_max_length
yiffnet.charset_message
yiffnet.default_chantypes
yiffnet.registered_mode
anthrochat.addresses = "irc.anthrochat.net"
anthrochat.proxy
anthrochat.ipv6
anthrochat.ssl
anthrochat.ssl_cert
anthrochat.ssl_password
anthrochat.ssl_priorities
anthrochat.ssl_dhkey_size
anthrochat.ssl_fingerprint
anthrochat.ssl_verify
anthrochat.tls
anthrochat.tls_cert
anthrochat.tls_password
anthrochat.tls_priorities
anthrochat.tls_dhkey_size
anthrochat.tls_fingerprint
anthrochat.tls_verify
anthrochat.password
anthrochat.capabilities
anthrochat.sasl_mechanism
@ -384,8 +402,7 @@ anthrochat.autojoin_dynamic
anthrochat.autorejoin
anthrochat.autorejoin_delay
anthrochat.connection_timeout
anthrochat.anti_flood_prio_high
anthrochat.anti_flood_prio_low
anthrochat.anti_flood
anthrochat.away_check
anthrochat.away_check_max_nicks
anthrochat.msg_kick
@ -395,16 +412,17 @@ anthrochat.notify
anthrochat.split_msg_max_length
anthrochat.charset_message
anthrochat.default_chantypes
furnet.addresses = "irc.furnet.org"
anthrochat.registered_mode
furnet.addresses = "irc.furnet.org/6697"
furnet.proxy
furnet.ipv6
furnet.ssl
furnet.ssl_cert
furnet.ssl_password
furnet.ssl_priorities
furnet.ssl_dhkey_size
furnet.ssl_fingerprint
furnet.ssl_verify
furnet.tls = on
furnet.tls_cert
furnet.tls_password
furnet.tls_priorities
furnet.tls_dhkey_size
furnet.tls_fingerprint
furnet.tls_verify = off
furnet.password
furnet.capabilities
furnet.sasl_mechanism
@ -413,7 +431,7 @@ furnet.sasl_password
furnet.sasl_key
furnet.sasl_timeout
furnet.sasl_fail
furnet.autoconnect = on
furnet.autoconnect
furnet.autoreconnect
furnet.autoreconnect_delay
furnet.nicks
@ -422,15 +440,14 @@ furnet.username
furnet.realname
furnet.local_hostname
furnet.usermode
furnet.command = "/msg nickserv identify ${sec.data.furnet}"
furnet.command = "/msg nickserv identify ${sec.data.furnet};/umode +R"
furnet.command_delay
furnet.autojoin = "#SoftPaws,#linux"
furnet.autojoin = "#linux"
furnet.autojoin_dynamic
furnet.autorejoin
furnet.autorejoin_delay
furnet.connection_timeout
furnet.anti_flood_prio_high
furnet.anti_flood_prio_low
furnet.anti_flood
furnet.away_check
furnet.away_check_max_nicks
furnet.msg_kick
@ -440,16 +457,17 @@ furnet.notify
furnet.split_msg_max_length
furnet.charset_message
furnet.default_chantypes
entropynet.addresses = "irc.entropynet.net"
furnet.registered_mode
entropynet.addresses = "irc.entropynet.net/6697"
entropynet.proxy
entropynet.ipv6
entropynet.ssl
entropynet.ssl_cert
entropynet.ssl_password
entropynet.ssl_priorities
entropynet.ssl_dhkey_size
entropynet.ssl_fingerprint
entropynet.ssl_verify
entropynet.tls = on
entropynet.tls_cert
entropynet.tls_password
entropynet.tls_priorities
entropynet.tls_dhkey_size
entropynet.tls_fingerprint
entropynet.tls_verify
entropynet.password
entropynet.capabilities
entropynet.sasl_mechanism
@ -474,8 +492,7 @@ entropynet.autojoin_dynamic
entropynet.autorejoin
entropynet.autorejoin_delay
entropynet.connection_timeout
entropynet.anti_flood_prio_high
entropynet.anti_flood_prio_low
entropynet.anti_flood
entropynet.away_check
entropynet.away_check_max_nicks
entropynet.msg_kick
@ -485,3 +502,94 @@ entropynet.notify
entropynet.split_msg_max_length
entropynet.charset_message
entropynet.default_chantypes
entropynet.registered_mode
hackint.addresses = "irc.hackint.org/6697"
hackint.proxy
hackint.ipv6
hackint.tls = on
hackint.tls_cert
hackint.tls_password
hackint.tls_priorities
hackint.tls_dhkey_size
hackint.tls_fingerprint
hackint.tls_verify
hackint.password
hackint.capabilities
hackint.sasl_mechanism
hackint.sasl_username
hackint.sasl_password
hackint.sasl_key
hackint.sasl_timeout
hackint.sasl_fail
hackint.autoconnect
hackint.autoreconnect
hackint.autoreconnect_delay
hackint.nicks
hackint.nicks_alternate
hackint.username
hackint.realname
hackint.local_hostname
hackint.usermode
hackint.command
hackint.command_delay
hackint.autojoin
hackint.autojoin_dynamic
hackint.autorejoin
hackint.autorejoin_delay
hackint.connection_timeout
hackint.anti_flood
hackint.away_check
hackint.away_check_max_nicks
hackint.msg_kick
hackint.msg_part
hackint.msg_quit
hackint.notify
hackint.split_msg_max_length
hackint.charset_message
hackint.default_chantypes
hackint.registered_mode
espernet.addresses = "na.irc.esper.net/6697"
espernet.proxy
espernet.ipv6
espernet.tls = on
espernet.tls_cert
espernet.tls_password
espernet.tls_priorities
espernet.tls_dhkey_size
espernet.tls_fingerprint
espernet.tls_verify
espernet.password
espernet.capabilities
espernet.sasl_mechanism
espernet.sasl_username
espernet.sasl_password
espernet.sasl_key
espernet.sasl_timeout
espernet.sasl_fail
espernet.autoconnect = on
espernet.autoreconnect
espernet.autoreconnect_delay
espernet.nicks
espernet.nicks_alternate
espernet.username
espernet.realname
espernet.local_hostname
espernet.usermode
espernet.command = "/msg nickserv identify ${sec.data.espernet}"
espernet.command_delay
espernet.autojoin = "#furry"
espernet.autojoin_dynamic
espernet.autorejoin
espernet.autorejoin_delay
espernet.connection_timeout
espernet.anti_flood
espernet.away_check
espernet.away_check_max_nicks
espernet.msg_kick
espernet.msg_part
espernet.msg_quit
espernet.notify
espernet.split_msg_max_length
espernet.charset_message
espernet.default_chantypes
espernet.registered_mode

View File

@ -6,7 +6,7 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[look]
@ -23,10 +23,11 @@ color_lines = off
flush_delay = 120
fsync = off
info_lines = off
log_conditions = ""
mask = "$plugin.$name.weechatlog"
name_lower_case = on
nick_prefix = ""
nick_suffix = ""
nick_prefix = "<"
nick_suffix = ">"
path = "${weechat_data_dir}/logs"
replacement_char = "_"
rotation_compression_level = 20
@ -35,6 +36,6 @@ rotation_size_max = "0"
time_format = "%Y-%m-%d %H:%M:%S"
[level]
irc = 4
irc = 2
[mask]

View File

@ -6,9 +6,59 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[var]
python.notify_send.desktop_entry = "weechat"
python.notify_send.ellipsis = "[..]"
python.notify_send.escape_html = "on"
python.notify_send.hide_messages_in_buffers_that_match = ""
python.notify_send.icon = "/home/yosh/.local/share/icons/NsCDE/32x32/actions/mail-message-new.png"
python.notify_send.ignore_buffers = ""
python.notify_send.ignore_buffers_starting_with = ""
python.notify_send.ignore_messages_tagged_with = "notify_none,irc_join,irc_quit,irc_part,irc_status,irc_nick_back,irc_401,irc_402"
python.notify_send.ignore_nicks = "-,--,-->"
python.notify_send.ignore_nicks_starting_with = ""
python.notify_send.max_length = "72"
python.notify_send.min_notification_delay = "500"
python.notify_send.nick_separator = ": "
python.notify_send.notify_for_current_buffer = "on"
python.notify_send.notify_on_all_messages_in_buffers = ""
python.notify_send.notify_on_all_messages_in_buffers_that_match = ""
python.notify_send.notify_on_all_messages_in_current_buffer = "off"
python.notify_send.notify_on_filtered_messages = "off"
python.notify_send.notify_on_highlights = "on"
python.notify_send.notify_on_messages_that_match = ""
python.notify_send.notify_on_privmsgs = "on"
python.notify_send.notify_when_away = "on"
python.notify_send.timeout = "5000"
python.notify_send.transient = "on"
python.notify_send.urgency = "normal"
[desc]
python.notify_send.desktop_entry = "Name of the desktop entry for WeeChat. Default: weechat."
python.notify_send.ellipsis = "Ellipsis to be used for notifications that are too long. Default: [..]."
python.notify_send.escape_html = "Escapes the '<', '>', and '&' characters in notification messages. Default: on."
python.notify_send.hide_messages_in_buffers_that_match = "A comma-separated list of regex patterns for names of buffers from which you want to receive notifications without messages. Default: ""."
python.notify_send.icon = "Path to an icon to be shown in notifications. Default: /usr/share/icons/hicolor/32x32/apps/weechat.png."
python.notify_send.ignore_buffers = "A comma-separated list of buffers from which no notifications should be shown. Default: ""."
python.notify_send.ignore_buffers_starting_with = "A comma-separated list of buffer prefixes from which no notifications should be shown. Default: ""."
python.notify_send.ignore_messages_tagged_with = "A comma-separated list of message tags for which no notifications should be shown. Default: notify_none,irc_join,irc_quit,irc_part,irc_status,irc_nick_back,irc_401,irc_402."
python.notify_send.ignore_nicks = "A comma-separated list of nicks from which no notifications should be shown. Default: -,--,-->."
python.notify_send.ignore_nicks_starting_with = "A comma-separated list of nick prefixes from which no notifications should be shown. Default: ""."
python.notify_send.max_length = "Maximal length of a notification (0 means no limit). Default: 72."
python.notify_send.min_notification_delay = "A minimal delay between successive notifications from the same buffer (in milliseconds; set to 0 to show all notifications). Default: 500."
python.notify_send.nick_separator = "A separator between a nick and a message. Default: : ."
python.notify_send.notify_for_current_buffer = "Send also notifications for the currently active buffer. Default: on."
python.notify_send.notify_on_all_messages_in_buffers = "A comma-separated list of buffers for which you want to receive notifications on all messages that appear in them. Default: ""."
python.notify_send.notify_on_all_messages_in_buffers_that_match = "A comma-separated list of regex patterns of buffers for which you want to receive notifications on all messages that appear in them. Default: ""."
python.notify_send.notify_on_all_messages_in_current_buffer = "Send a notification on all messages in the currently active buffer. Default: off."
python.notify_send.notify_on_filtered_messages = "Send notifications also on filtered (hidden) messages. Default: off."
python.notify_send.notify_on_highlights = "Send notifications on highlights. Default: on."
python.notify_send.notify_on_messages_that_match = "A comma-separated list of regex patterns that you want to receive notifications on when message matches. Default: ""."
python.notify_send.notify_on_privmsgs = "Send notifications on private messages. Default: on."
python.notify_send.notify_when_away = "Send also notifications when away. Default: on."
python.notify_send.timeout = "Time after which the notification disappears (in milliseconds; set to 0 to disable). Default: 5000."
python.notify_send.transient = "When a notification expires or is dismissed, remove it from the notification bar. Default: on."
python.notify_send.urgency = "Urgency (low, normal, critical). Default: normal."

View File

@ -0,0 +1,14 @@
#
# weechat -- python.conf
#
# WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running.
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[look]
check_license = off
eval_keep_context = on

View File

@ -6,9 +6,11 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
config_version = 2
[look]
auto_open_buffer = on
raw_messages = 256
@ -37,8 +39,8 @@ nonce_size = 16
password = ""
password_hash_algo = "*"
password_hash_iterations = 100000
ssl_cert_key = "${weechat_config_dir}/ssl/relay.pem"
ssl_priorities = "NORMAL:-VERS-SSL3.0"
tls_cert_key = "${weechat_config_dir}/ssl/relay.pem"
tls_priorities = "NORMAL:-VERS-SSL3.0"
totp_secret = ""
totp_window = 0
websocket_allowed_origins = ""

View File

@ -6,7 +6,7 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[look]

25
.config/weechat/sec.conf Normal file
View File

@ -0,0 +1,25 @@
#
# weechat -- sec.conf
#
# WARNING: It is NOT recommended to edit this file by hand,
# especially if WeeChat is running.
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[crypt]
cipher = aes256
hash_algo = sha256
passphrase_command = ""
salt = on
[data]
__passphrase__ = on
libera = "874F102617028EC2637052EE542C1F5B2F7248E762DF3A985C656C0FF5D79C9ACEE6EECE0B30C19F995CD3DD5DCEC125B5257A8AB929A9C764148478EC3BC354209B625A1E38DF3177F1A99C6F6FE156C9"
abime = "7FD4758B3A620FF39A8CFB96A26E4FC68D1A11574B006D3E7944EEF69294FA09807BB05CFCD865FAD72100DBC7922FC0303EF57313F065CE8B390E76A2530EFFE80538D5DE8319D87ABB6CE1A5CFBFD0BA"
anthrochat = "56C1A8D1BC85C9CB6242C5219F2FBE49D12FDA68EB54206DC5C3C3B82CCE8DBEB960CF984C2DA83D9BD9DDF85EC246DCF84E3F902B010119672D44D0F2"
furnet = "F5D900BBE884927F1183AD6CAA7DE49854544EEF295C17C19F79DA852C99F5D2B65CB145EABE2DC8B0D2CDD0D1718DFDF13D705B0CDEFA8CEA77201B540FD754F643266F5905102D67"
entropynet = "A39030661373A8B092F655A514D2EC726666666D826720FE7CBE95F5D6F8F1305A16049C1D945F002CE229415969983FB8C354BBF43F07C37A6F86F86344363E8D464B9F366F405DFA64D8655D5E618890"
espernet = "E87094FD2E26EABEF09B6E5EE29069F67485A720CB83AD1AEB5796522B25EBEFB35C146475171791E177E63C36DD1030BF6AD29D7379D24026AD741141A7F970767CE7C5A88E95D962C94123F390DB58B79412AD775F341006B159A9D5E09A51DD30D4B3BFEDCE3CB8"

View File

@ -6,7 +6,7 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[look]
@ -22,8 +22,6 @@ flag_return_code = lightmagenta
identifier = cyan
regex = white
replace = cyan
trigger = green
trigger_disabled = red
[trigger]
beep.arguments = ""

View File

@ -6,7 +6,7 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[look]

View File

@ -6,9 +6,11 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
config_version = 2
[debug]
[startup]
@ -32,9 +34,10 @@ buffer_notify_default = all
buffer_position = end
buffer_search_case_sensitive = off
buffer_search_force_default = off
buffer_search_history = local
buffer_search_regex = off
buffer_search_where = prefix_message
buffer_time_format = "%H:%M:%S"
buffer_time_format = "[%H:%M]"
buffer_time_same = ""
chat_space_right = off
color_basic_force_bold = off
@ -76,6 +79,7 @@ hotlist_suffix = ""
hotlist_unique_numbers = on
hotlist_update_on_buffer_switch = on
input_cursor_scroll = 20
input_multiline_lead_linebreak = on
input_share = none
input_share_overwrite = off
input_undo_max = 32
@ -89,20 +93,19 @@ jump_previous_buffer_when_closing = on
jump_smart_back_to_buffer = on
key_bind_safe = on
key_grab_delay = 800
mouse = off
mouse = on
mouse_timer_delay = 100
nick_color_force = ""
nick_color_hash = djb2
nick_color_hash_salt = ""
nick_color_stop_chars = "_|["
nick_prefix = ""
nick_suffix = ""
paste_auto_add_newline = on
nick_color_stop_chars = "_|[{"
nick_prefix = "<"
nick_suffix = ">"
paste_bracketed = on
paste_bracketed_timer_delay = 10
paste_max_lines = 1
prefix_action = " *"
prefix_align = right
prefix_align = none
prefix_align_max = 0
prefix_align_min = 0
prefix_align_more = "+"
@ -164,9 +167,9 @@ chat_nick_offline = default
chat_nick_offline_highlight = default
chat_nick_offline_highlight_bg = blue
chat_nick_other = cyan
chat_nick_prefix = green
chat_nick_prefix = 15
chat_nick_self = white
chat_nick_suffix = green
chat_nick_suffix = 15
chat_prefix_action = white
chat_prefix_buffer = brown
chat_prefix_buffer_inactive_buffer = default
@ -179,6 +182,8 @@ chat_prefix_suffix = green
chat_read_marker = magenta
chat_read_marker_bg = default
chat_server = brown
chat_status_disabled = red
chat_status_enabled = green
chat_tags = red
chat_text_found = yellow
chat_text_found_bg = lightmagenta
@ -188,6 +193,7 @@ chat_value = cyan
chat_value_null = blue
emphasized = yellow
emphasized_bg = magenta
eval_syntax_colors = "green,lightred,lightblue,lightmagenta,yellow,cyan"
input_actions = lightgreen
input_text_not_found = red
item_away = yellow
@ -206,7 +212,8 @@ status_filter = green
status_more = yellow
status_mouse = green
status_name = white
status_name_ssl = lightgreen
status_name_insecure = lightmagenta
status_name_tls = white
status_nicklist_count = default
status_number = yellow
status_time = default
@ -266,7 +273,7 @@ buflist.filling_left_right = vertical
buflist.filling_top_bottom = columns_vertical
buflist.hidden = off
buflist.items = "buflist"
buflist.position = bottom
buflist.position = left
buflist.priority = 0
buflist.separator = on
buflist.size = 0
@ -343,8 +350,8 @@ title.hidden = off
title.items = "buffer_title"
title.position = top
title.priority = 500
title.separator = off
title.size = 1
title.separator = on
title.size = 0
title.size_max = 0
title.type = window
@ -352,57 +359,63 @@ title.type = window
[layout]
[buffer]
[notify]
[filter]
irc_smart = on;*;irc_smart_filter;*
[key]
ctrl-? = "/input delete_previous_char"
ctrl-A = "/input move_beginning_of_line"
ctrl-B = "/input move_previous_char"
ctrl-C_ = "/input insert \x1F"
ctrl-Cb = "/input insert \x02"
ctrl-Cc = "/input insert \x03"
ctrl-Ci = "/input insert \x1D"
ctrl-Co = "/input insert \x0F"
ctrl-Cv = "/input insert \x16"
ctrl-D = "/input delete_next_char"
ctrl-E = "/input move_end_of_line"
ctrl-F = "/input move_next_char"
ctrl-H = "/input delete_previous_char"
ctrl-I = "/input complete_next"
ctrl-J = "/input return"
ctrl-K = "/input delete_end_of_line"
ctrl-L = "/window refresh"
ctrl-M = "/input return"
ctrl-N = "/buffer +1"
ctrl-P = "/buffer -1"
ctrl-R = "/input search_text_here"
ctrl-Sctrl-U = "/input set_unread"
ctrl-T = "/input transpose_chars"
ctrl-U = "/input delete_beginning_of_line"
ctrl-W = "/input delete_previous_word"
ctrl-X = "/input switch_active_buffer"
ctrl-Y = "/input clipboard_paste"
meta-ctrl-M = "/input insert \n"
meta-meta-OP = "/bar scroll buflist * b"
meta-meta-OQ = "/bar scroll buflist * e"
meta-meta2-11~ = "/bar scroll buflist * b"
meta-meta2-12~ = "/bar scroll buflist * e"
meta-meta2-1~ = "/window scroll_top"
meta-meta2-23~ = "/bar scroll nicklist * b"
meta-meta2-24~ = "/bar scroll nicklist * e"
meta-meta2-4~ = "/window scroll_bottom"
meta-meta2-5~ = "/window scroll_up"
meta-meta2-6~ = "/window scroll_down"
meta-meta2-7~ = "/window scroll_top"
meta-meta2-8~ = "/window scroll_bottom"
meta-meta2-A = "/buffer -1"
meta-meta2-B = "/buffer +1"
meta-meta2-C = "/buffer +1"
meta-meta2-D = "/buffer -1"
backspace = "/input delete_previous_char"
ctrl-_ = "/input undo"
ctrl-a = "/input move_beginning_of_line"
ctrl-b = "/input move_previous_char"
ctrl-c,_ = "/input insert \x1F"
ctrl-c,b = "/input insert \x02"
ctrl-c,c = "/input insert \x03"
ctrl-c,i = "/input insert \x1D"
ctrl-c,o = "/input insert \x0F"
ctrl-c,v = "/input insert \x16"
ctrl-d = "/input delete_next_char"
ctrl-down = "/input history_global_next"
ctrl-e = "/input move_end_of_line"
ctrl-f = "/input move_next_char"
ctrl-f1 = "/bar scroll buflist * -100%"
ctrl-f11 = "/bar scroll nicklist * -100%"
ctrl-f12 = "/bar scroll nicklist * +100%"
ctrl-f2 = "/bar scroll buflist * +100%"
ctrl-k = "/input delete_end_of_line"
ctrl-l = "/window refresh"
ctrl-left = "/input move_previous_word"
ctrl-n = "/buffer +1"
ctrl-p = "/buffer -1"
ctrl-r = "/input search_text_here"
ctrl-right = "/input move_next_word"
ctrl-s,ctrl-u = "/allbuf /buffer set unread"
ctrl-t = "/input transpose_chars"
ctrl-u = "/input delete_beginning_of_line"
ctrl-up = "/input history_global_previous"
ctrl-w = "/input delete_previous_word"
ctrl-x = "/buffer switch"
ctrl-y = "/input clipboard_paste"
delete = "/input delete_next_char"
down = "/input history_next"
end = "/input move_end_of_line"
f1 = "/bar scroll buflist * -100%"
f10 = "/bar scroll title * +30%"
f11 = "/bar scroll nicklist * -100%"
f12 = "/bar scroll nicklist * +100%"
f2 = "/bar scroll buflist * +100%"
f5 = "/buffer -1"
f6 = "/buffer +1"
f7 = "/window -1"
f8 = "/window +1"
f9 = "/bar scroll title * -30%"
home = "/input move_beginning_of_line"
left = "/input move_previous_char"
meta-- = "/filter toggle @"
meta-/ = "/input jump_last_buffer_displayed"
meta-/ = "/buffer jump last_displayed"
meta-0 = "/buffer *10"
meta-1 = "/buffer *1"
meta-2 = "/buffer *2"
@ -413,245 +426,202 @@ meta-6 = "/buffer *6"
meta-7 = "/buffer *7"
meta-8 = "/buffer *8"
meta-9 = "/buffer *9"
meta-< = "/input jump_previously_visited_buffer"
meta-< = "/buffer jump prev_visited"
meta-= = "/filter toggle"
meta-> = "/input jump_next_visited_buffer"
meta-> = "/buffer jump next_visited"
meta-B = "/buflist toggle"
meta-N = "/bar toggle nicklist"
meta-OA = "/input history_global_previous"
meta-OB = "/input history_global_next"
meta-OC = "/input move_next_word"
meta-OD = "/input move_previous_word"
meta-OF = "/input move_end_of_line"
meta-OH = "/input move_beginning_of_line"
meta-OP = "/bar scroll buflist * -100%"
meta-OQ = "/bar scroll buflist * +100%"
meta-Oa = "/input history_global_previous"
meta-Ob = "/input history_global_next"
meta-Oc = "/input move_next_word"
meta-Od = "/input move_previous_word"
meta2-11^ = "/bar scroll buflist * -100%"
meta2-11~ = "/bar scroll buflist * -100%"
meta2-12^ = "/bar scroll buflist * +100%"
meta2-12~ = "/bar scroll buflist * +100%"
meta2-15~ = "/buffer -1"
meta2-17~ = "/buffer +1"
meta2-18~ = "/window -1"
meta2-19~ = "/window +1"
meta2-1;3A = "/buffer -1"
meta2-1;3B = "/buffer +1"
meta2-1;3C = "/buffer +1"
meta2-1;3D = "/buffer -1"
meta2-1;3F = "/window scroll_bottom"
meta2-1;3H = "/window scroll_top"
meta2-1;3P = "/bar scroll buflist * b"
meta2-1;3Q = "/bar scroll buflist * e"
meta2-1;5A = "/input history_global_previous"
meta2-1;5B = "/input history_global_next"
meta2-1;5C = "/input move_next_word"
meta2-1;5D = "/input move_previous_word"
meta2-1;5P = "/bar scroll buflist * -100%"
meta2-1;5Q = "/bar scroll buflist * +100%"
meta2-1~ = "/input move_beginning_of_line"
meta2-200~ = "/input paste_start"
meta2-201~ = "/input paste_stop"
meta2-20~ = "/bar scroll title * -30%"
meta2-21~ = "/bar scroll title * +30%"
meta2-23;3~ = "/bar scroll nicklist * b"
meta2-23;5~ = "/bar scroll nicklist * -100%"
meta2-23^ = "/bar scroll nicklist * -100%"
meta2-23~ = "/bar scroll nicklist * -100%"
meta2-24;3~ = "/bar scroll nicklist * e"
meta2-24;5~ = "/bar scroll nicklist * +100%"
meta2-24^ = "/bar scroll nicklist * +100%"
meta2-24~ = "/bar scroll nicklist * +100%"
meta2-3~ = "/input delete_next_char"
meta2-4~ = "/input move_end_of_line"
meta2-5;3~ = "/window scroll_up"
meta2-5~ = "/window page_up"
meta2-6;3~ = "/window scroll_down"
meta2-6~ = "/window page_down"
meta2-7~ = "/input move_beginning_of_line"
meta2-8~ = "/input move_end_of_line"
meta2-A = "/input history_previous"
meta2-B = "/input history_next"
meta2-C = "/input move_next_char"
meta2-D = "/input move_previous_char"
meta2-F = "/input move_end_of_line"
meta2-G = "/window page_down"
meta2-H = "/input move_beginning_of_line"
meta2-I = "/window page_up"
meta2-Z = "/input complete_previous"
meta2-[E = "/buffer -1"
meta-_ = "/input redo"
meta-a = "/input jump_smart"
meta-a = "/buffer jump smart"
meta-b = "/input move_previous_word"
meta-d = "/input delete_next_word"
meta-down = "/buffer +1"
meta-end = "/window scroll_bottom"
meta-f = "/input move_next_word"
meta-hmeta-R = "/input hotlist_restore_all"
meta-hmeta-c = "/input hotlist_clear"
meta-hmeta-m = "/input hotlist_remove_buffer"
meta-hmeta-r = "/input hotlist_restore_buffer"
meta-jmeta-f = "/buffer -"
meta-jmeta-l = "/buffer +"
meta-jmeta-r = "/server raw"
meta-jmeta-s = "/server jump"
meta-j01 = "/buffer *1"
meta-j02 = "/buffer *2"
meta-j03 = "/buffer *3"
meta-j04 = "/buffer *4"
meta-j05 = "/buffer *5"
meta-j06 = "/buffer *6"
meta-j07 = "/buffer *7"
meta-j08 = "/buffer *8"
meta-j09 = "/buffer *9"
meta-j10 = "/buffer *10"
meta-j11 = "/buffer *11"
meta-j12 = "/buffer *12"
meta-j13 = "/buffer *13"
meta-j14 = "/buffer *14"
meta-j15 = "/buffer *15"
meta-j16 = "/buffer *16"
meta-j17 = "/buffer *17"
meta-j18 = "/buffer *18"
meta-j19 = "/buffer *19"
meta-j20 = "/buffer *20"
meta-j21 = "/buffer *21"
meta-j22 = "/buffer *22"
meta-j23 = "/buffer *23"
meta-j24 = "/buffer *24"
meta-j25 = "/buffer *25"
meta-j26 = "/buffer *26"
meta-j27 = "/buffer *27"
meta-j28 = "/buffer *28"
meta-j29 = "/buffer *29"
meta-j30 = "/buffer *30"
meta-j31 = "/buffer *31"
meta-j32 = "/buffer *32"
meta-j33 = "/buffer *33"
meta-j34 = "/buffer *34"
meta-j35 = "/buffer *35"
meta-j36 = "/buffer *36"
meta-j37 = "/buffer *37"
meta-j38 = "/buffer *38"
meta-j39 = "/buffer *39"
meta-j40 = "/buffer *40"
meta-j41 = "/buffer *41"
meta-j42 = "/buffer *42"
meta-j43 = "/buffer *43"
meta-j44 = "/buffer *44"
meta-j45 = "/buffer *45"
meta-j46 = "/buffer *46"
meta-j47 = "/buffer *47"
meta-j48 = "/buffer *48"
meta-j49 = "/buffer *49"
meta-j50 = "/buffer *50"
meta-j51 = "/buffer *51"
meta-j52 = "/buffer *52"
meta-j53 = "/buffer *53"
meta-j54 = "/buffer *54"
meta-j55 = "/buffer *55"
meta-j56 = "/buffer *56"
meta-j57 = "/buffer *57"
meta-j58 = "/buffer *58"
meta-j59 = "/buffer *59"
meta-j60 = "/buffer *60"
meta-j61 = "/buffer *61"
meta-j62 = "/buffer *62"
meta-j63 = "/buffer *63"
meta-j64 = "/buffer *64"
meta-j65 = "/buffer *65"
meta-j66 = "/buffer *66"
meta-j67 = "/buffer *67"
meta-j68 = "/buffer *68"
meta-j69 = "/buffer *69"
meta-j70 = "/buffer *70"
meta-j71 = "/buffer *71"
meta-j72 = "/buffer *72"
meta-j73 = "/buffer *73"
meta-j74 = "/buffer *74"
meta-j75 = "/buffer *75"
meta-j76 = "/buffer *76"
meta-j77 = "/buffer *77"
meta-j78 = "/buffer *78"
meta-j79 = "/buffer *79"
meta-j80 = "/buffer *80"
meta-j81 = "/buffer *81"
meta-j82 = "/buffer *82"
meta-j83 = "/buffer *83"
meta-j84 = "/buffer *84"
meta-j85 = "/buffer *85"
meta-j86 = "/buffer *86"
meta-j87 = "/buffer *87"
meta-j88 = "/buffer *88"
meta-j89 = "/buffer *89"
meta-j90 = "/buffer *90"
meta-j91 = "/buffer *91"
meta-j92 = "/buffer *92"
meta-j93 = "/buffer *93"
meta-j94 = "/buffer *94"
meta-j95 = "/buffer *95"
meta-j96 = "/buffer *96"
meta-j97 = "/buffer *97"
meta-j98 = "/buffer *98"
meta-j99 = "/buffer *99"
meta-f1 = "/bar scroll buflist * b"
meta-f11 = "/bar scroll nicklist * b"
meta-f12 = "/bar scroll nicklist * e"
meta-f2 = "/bar scroll buflist * e"
meta-h,meta-R = "/hotlist restore -all"
meta-h,meta-c = "/hotlist clear"
meta-h,meta-m = "/hotlist remove"
meta-h,meta-r = "/hotlist restore"
meta-home = "/window scroll_top"
meta-j,0,1 = "/buffer *1"
meta-j,0,2 = "/buffer *2"
meta-j,0,3 = "/buffer *3"
meta-j,0,4 = "/buffer *4"
meta-j,0,5 = "/buffer *5"
meta-j,0,6 = "/buffer *6"
meta-j,0,7 = "/buffer *7"
meta-j,0,8 = "/buffer *8"
meta-j,0,9 = "/buffer *9"
meta-j,1,0 = "/buffer *10"
meta-j,1,1 = "/buffer *11"
meta-j,1,2 = "/buffer *12"
meta-j,1,3 = "/buffer *13"
meta-j,1,4 = "/buffer *14"
meta-j,1,5 = "/buffer *15"
meta-j,1,6 = "/buffer *16"
meta-j,1,7 = "/buffer *17"
meta-j,1,8 = "/buffer *18"
meta-j,1,9 = "/buffer *19"
meta-j,2,0 = "/buffer *20"
meta-j,2,1 = "/buffer *21"
meta-j,2,2 = "/buffer *22"
meta-j,2,3 = "/buffer *23"
meta-j,2,4 = "/buffer *24"
meta-j,2,5 = "/buffer *25"
meta-j,2,6 = "/buffer *26"
meta-j,2,7 = "/buffer *27"
meta-j,2,8 = "/buffer *28"
meta-j,2,9 = "/buffer *29"
meta-j,3,0 = "/buffer *30"
meta-j,3,1 = "/buffer *31"
meta-j,3,2 = "/buffer *32"
meta-j,3,3 = "/buffer *33"
meta-j,3,4 = "/buffer *34"
meta-j,3,5 = "/buffer *35"
meta-j,3,6 = "/buffer *36"
meta-j,3,7 = "/buffer *37"
meta-j,3,8 = "/buffer *38"
meta-j,3,9 = "/buffer *39"
meta-j,4,0 = "/buffer *40"
meta-j,4,1 = "/buffer *41"
meta-j,4,2 = "/buffer *42"
meta-j,4,3 = "/buffer *43"
meta-j,4,4 = "/buffer *44"
meta-j,4,5 = "/buffer *45"
meta-j,4,6 = "/buffer *46"
meta-j,4,7 = "/buffer *47"
meta-j,4,8 = "/buffer *48"
meta-j,4,9 = "/buffer *49"
meta-j,5,0 = "/buffer *50"
meta-j,5,1 = "/buffer *51"
meta-j,5,2 = "/buffer *52"
meta-j,5,3 = "/buffer *53"
meta-j,5,4 = "/buffer *54"
meta-j,5,5 = "/buffer *55"
meta-j,5,6 = "/buffer *56"
meta-j,5,7 = "/buffer *57"
meta-j,5,8 = "/buffer *58"
meta-j,5,9 = "/buffer *59"
meta-j,6,0 = "/buffer *60"
meta-j,6,1 = "/buffer *61"
meta-j,6,2 = "/buffer *62"
meta-j,6,3 = "/buffer *63"
meta-j,6,4 = "/buffer *64"
meta-j,6,5 = "/buffer *65"
meta-j,6,6 = "/buffer *66"
meta-j,6,7 = "/buffer *67"
meta-j,6,8 = "/buffer *68"
meta-j,6,9 = "/buffer *69"
meta-j,7,0 = "/buffer *70"
meta-j,7,1 = "/buffer *71"
meta-j,7,2 = "/buffer *72"
meta-j,7,3 = "/buffer *73"
meta-j,7,4 = "/buffer *74"
meta-j,7,5 = "/buffer *75"
meta-j,7,6 = "/buffer *76"
meta-j,7,7 = "/buffer *77"
meta-j,7,8 = "/buffer *78"
meta-j,7,9 = "/buffer *79"
meta-j,8,0 = "/buffer *80"
meta-j,8,1 = "/buffer *81"
meta-j,8,2 = "/buffer *82"
meta-j,8,3 = "/buffer *83"
meta-j,8,4 = "/buffer *84"
meta-j,8,5 = "/buffer *85"
meta-j,8,6 = "/buffer *86"
meta-j,8,7 = "/buffer *87"
meta-j,8,8 = "/buffer *88"
meta-j,8,9 = "/buffer *89"
meta-j,9,0 = "/buffer *90"
meta-j,9,1 = "/buffer *91"
meta-j,9,2 = "/buffer *92"
meta-j,9,3 = "/buffer *93"
meta-j,9,4 = "/buffer *94"
meta-j,9,5 = "/buffer *95"
meta-j,9,6 = "/buffer *96"
meta-j,9,7 = "/buffer *97"
meta-j,9,8 = "/buffer *98"
meta-j,9,9 = "/buffer *99"
meta-j,meta-f = "/buffer -"
meta-j,meta-l = "/buffer +"
meta-j,meta-r = "/server raw"
meta-j,meta-s = "/server jump"
meta-k = "/input grab_key_command"
meta-l = "/window bare"
meta-left = "/buffer -1"
meta-m = "/mute mouse toggle"
meta-n = "/window scroll_next_highlight"
meta-p = "/window scroll_previous_highlight"
meta-pgdn = "/window scroll_down"
meta-pgup = "/window scroll_up"
meta-r = "/input delete_line"
meta-return = "/input insert \n"
meta-right = "/buffer +1"
meta-s = "/mute spell toggle"
meta-u = "/window scroll_unread"
meta-wmeta-meta2-A = "/window up"
meta-wmeta-meta2-B = "/window down"
meta-wmeta-meta2-C = "/window right"
meta-wmeta-meta2-D = "/window left"
meta-wmeta2-1;3A = "/window up"
meta-wmeta2-1;3B = "/window down"
meta-wmeta2-1;3C = "/window right"
meta-wmeta2-1;3D = "/window left"
meta-wmeta-b = "/window balance"
meta-wmeta-s = "/window swap"
meta-x = "/input zoom_merged_buffer"
meta-up = "/buffer -1"
meta-w,meta-b = "/window balance"
meta-w,meta-down = "/window down"
meta-w,meta-left = "/window left"
meta-w,meta-right = "/window right"
meta-w,meta-s = "/window swap"
meta-w,meta-up = "/window up"
meta-x = "/buffer zoom"
meta-z = "/window zoom"
ctrl-_ = "/input undo"
pgdn = "/window page_down"
pgup = "/window page_up"
return = "/input return"
right = "/input move_next_char"
shift-tab = "/input complete_previous"
tab = "/input complete_next"
up = "/input history_previous"
[key_search]
ctrl-I = "/input search_switch_where"
ctrl-J = "/input search_stop_here"
ctrl-M = "/input search_stop_here"
ctrl-Q = "/input search_stop"
ctrl-R = "/input search_switch_regex"
meta2-A = "/input search_previous"
meta2-B = "/input search_next"
ctrl-q = "/input search_stop"
ctrl-r = "/input search_switch_regex"
down = "/input search_next"
meta-c = "/input search_switch_case"
return = "/input search_stop_here"
tab = "/input search_switch_where"
up = "/input search_previous"
[key_histsearch]
ctrl-o = "/input history_use_get_next"
ctrl-q = "/input search_stop"
ctrl-r = "/input search_previous"
ctrl-s = "/input search_next"
ctrl-x = "/input search_switch_regex"
down = "/input search_next"
meta-c = "/input search_switch_case"
return = "/input search_stop_here"
tab = "/input search_switch_where"
up = "/input search_previous"
[key_cursor]
ctrl-J = "/cursor stop"
ctrl-M = "/cursor stop"
meta-meta2-A = "/cursor move area_up"
meta-meta2-B = "/cursor move area_down"
meta-meta2-C = "/cursor move area_right"
meta-meta2-D = "/cursor move area_left"
meta2-1;3A = "/cursor move area_up"
meta2-1;3B = "/cursor move area_down"
meta2-1;3C = "/cursor move area_right"
meta2-1;3D = "/cursor move area_left"
meta2-A = "/cursor move up"
meta2-B = "/cursor move down"
meta2-C = "/cursor move right"
meta2-D = "/cursor move left"
@chat:Q = "hsignal:chat_quote_time_prefix_message;/cursor stop"
@chat:m = "hsignal:chat_quote_message;/cursor stop"
@chat:q = "hsignal:chat_quote_prefix_message;/cursor stop"
@item(buffer_nicklist):K = "/window ${_window_number};/kickban ${nick}"
@item(buffer_nicklist):b = "/window ${_window_number};/ban ${nick}"
@item(buffer_nicklist):k = "/window ${_window_number};/kick ${nick}"
@item(buffer_nicklist):q = "/window ${_window_number};/query ${nick};/cursor stop"
@item(buffer_nicklist):w = "/window ${_window_number};/whois ${nick}"
@chat:Q = "hsignal:chat_quote_time_prefix_message;/cursor stop"
@chat:m = "hsignal:chat_quote_message;/cursor stop"
@chat:q = "hsignal:chat_quote_prefix_message;/cursor stop"
down = "/cursor move down"
left = "/cursor move left"
meta-down = "/cursor move area_down"
meta-left = "/cursor move area_left"
meta-right = "/cursor move area_right"
meta-up = "/cursor move area_up"
return = "/cursor stop"
right = "/cursor move right"
up = "/cursor move up"
[key_mouse]
@*:button3 = "/cursor go ${_x},${_y}"
@bar(buflist):ctrl-wheeldown = "hsignal:buflist_mouse"
@bar(buflist):ctrl-wheelup = "hsignal:buflist_mouse"
@bar(input):button2 = "/input grab_mouse_area"
@ -659,14 +629,29 @@ meta2-D = "/cursor move left"
@bar(nicklist):button1-gesture-down-long = "/bar scroll nicklist ${_window_number} e"
@bar(nicklist):button1-gesture-up = "/bar scroll nicklist ${_window_number} -100%"
@bar(nicklist):button1-gesture-up-long = "/bar scroll nicklist ${_window_number} b"
@bar:wheeldown = "/bar scroll ${_bar_name} ${_window_number} +20%"
@bar:wheelup = "/bar scroll ${_bar_name} ${_window_number} -20%"
@chat(fset.fset):button1 = "/window ${_window_number};/fset -go ${_chat_line_y}"
@chat(fset.fset):button2* = "hsignal:fset_mouse"
@chat(fset.fset):wheeldown = "/fset -down 5"
@chat(fset.fset):wheelup = "/fset -up 5"
@chat(irc.list_*):button1 = "/window ${_window_number};/list -go ${_chat_line_y}"
@chat(irc.list_*):button2* = "hsignal:irc_list_mouse"
@chat(irc.list_*):wheeldown = "/list -down 5"
@chat(irc.list_*):wheelup = "/list -up 5"
@chat(script.scripts):button1 = "/window ${_window_number};/script go ${_chat_line_y}"
@chat(script.scripts):button2 = "/window ${_window_number};/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}"
@chat(script.scripts):wheeldown = "/script down 5"
@chat(script.scripts):wheelup = "/script up 5"
@chat:button1 = "/window ${_window_number}"
@chat:button1-gesture-left = "/window ${_window_number};/buffer -1"
@chat:button1-gesture-left-long = "/window ${_window_number};/buffer 1"
@chat:button1-gesture-right = "/window ${_window_number};/buffer +1"
@chat:button1-gesture-right-long = "/window ${_window_number};/buffer +"
@chat:ctrl-wheeldown = "/window scroll_horiz -window ${_window_number} +10%"
@chat:ctrl-wheelup = "/window scroll_horiz -window ${_window_number} -10%"
@chat:wheeldown = "/window scroll_down -window ${_window_number}"
@chat:wheelup = "/window scroll_up -window ${_window_number}"
@item(buffer_nicklist):button1 = "/window ${_window_number};/query ${nick}"
@item(buffer_nicklist):button1-gesture-left = "/window ${_window_number};/kick ${nick}"
@item(buffer_nicklist):button1-gesture-left-long = "/window ${_window_number};/kickban ${nick}"
@ -678,15 +663,7 @@ meta2-D = "/cursor move left"
@item(buflist2):button2* = "hsignal:buflist_mouse"
@item(buflist3):button1* = "hsignal:buflist_mouse"
@item(buflist3):button2* = "hsignal:buflist_mouse"
@bar:wheeldown = "/bar scroll ${_bar_name} ${_window_number} +20%"
@bar:wheelup = "/bar scroll ${_bar_name} ${_window_number} -20%"
@chat:button1 = "/window ${_window_number}"
@chat:button1-gesture-left = "/window ${_window_number};/buffer -1"
@chat:button1-gesture-left-long = "/window ${_window_number};/buffer 1"
@chat:button1-gesture-right = "/window ${_window_number};/buffer +1"
@chat:button1-gesture-right-long = "/window ${_window_number};/input jump_last_buffer"
@chat:ctrl-wheeldown = "/window scroll_horiz -window ${_window_number} +10%"
@chat:ctrl-wheelup = "/window scroll_horiz -window ${_window_number} -10%"
@chat:wheeldown = "/window scroll_down -window ${_window_number}"
@chat:wheelup = "/window scroll_up -window ${_window_number}"
@*:button3 = "/cursor go ${_x},${_y}"
@item(buflist4):button1* = "hsignal:buflist_mouse"
@item(buflist4):button2* = "hsignal:buflist_mouse"
@item(buflist5):button1* = "hsignal:buflist_mouse"
@item(buflist5):button2* = "hsignal:buflist_mouse"

View File

@ -6,7 +6,7 @@
#
# Use commands like /set or /fset to change settings in WeeChat.
#
# For more info, see: https://weechat.org/doc/quickstart/
# For more info, see: https://weechat.org/doc/weechat/quickstart/
#
[look]

View File

@ -0,0 +1,29 @@
# Completion script for the "doas" command.
function completion/doas {
typeset OPTIONS ARGOPT
OPTIONS=( #>#
"C:; specify a config file to parse"
"L; clear any persisted authentications, then exit"
"n; non-interactive mode, fail if rule doesn't have nopass"
"s; execute the shell from \$SHELL or /etc/passwd"
"u:; specify the user to execute the command as"
) #<#
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
(C)
complete -f
;;
(u)
complete -u
;;
(*)
command -f completion//getoperands
command -f completion//reexecute
;;
esac
}

View File

@ -0,0 +1,346 @@
# (C) 2023 yosh
# Completion script for the xbps suite.
function completion/xbps::parse_help {
typeset IFS line word copt lopt
while IFS="" read -r line; do
# line must start with a blank
[[ "$line" == [[:blank:]]* ]] || continue
if [[ "$line" =~ ^[[:blank:]]{1,5}"-" ]]; then
[[ -n "${copt:-}" ]] && printf '%s\n' "$copt" && copt=""
IFS=" =,"
set -f
set -- $line
set +f
# if $1 is a short option, remove leading dash and shift. trim line.
[[ "$1" == "-"[a-zA-Z0-9] ]] && copt="${1#-}" && shift
# test if long option, will add space if short option exists. trim line.
[[ "$1" =~ ^"--"[a-zA-Z-]+$ ]] && copt="${copt:+$copt }$1" && line="${line#*$1}" && shift
# test opt args
if [[ "$1" == "<"*">" ]]; then copt="${copt/ /: }:" && shift
elif [[ "$1" == "["*"]" ]]; then copt="${copt/ /:: }::" && shift
elif [[ "$1" =~ ^[][,.A-Z]{2,}$ ]]; then copt="${copt/ /: }:" && shift; fi
# trim *anything* before the first instance of 2 spaces or ending chars
# this catches xbps-query's --cat=FILE PKG option and xbps-query --property
# also trim everything before first tab
line="${line#*[] ] }"
line="${line#* }"
# trim leading and trailing whitespace
line="${line#"${line%%[![:blank:]]*}"}"
line="${line%"${line##*[![:blank:]]}"}"
copt="$copt;${line:+ $line}"
elif [[ "$line" =~ ^[[:blank:]]{5,} ]]; then
# this only triggers if it starts with > 5 blanks but there's no --,
# which means it can only be an extension of a prev cmd description
# or a footer note, which can be detected by number of spaces
line="$(IFS=" "; printf ' %s' $line)"
[[ "$copt" == *";" ]] && line=" ${line# }"
[[ "$line" == " "[A-Z]* ]] && [[ "$copt" != *";" ]] && [[ "$copt" != *"." ]] && line=".$line"
copt="${copt% }$line"
fi
done <( "$1" --help 2>&1 )
printf '%s\n' "$copt"
}
function completion/xbps::installed_packages {
xbps-query -s "$1*" | sed 's/^... \([^ ]*\)-[^-]* .*/\1/'
}
function completion/xbps::all_packages {
xbps-query -Rs "$1*" | sed 's/^... \([^ ]*\)-[^-]* .*/\1/'
}
function completion/xbps::set_options {
typeset IFS='
'
OPTIONS=( $(command -f completion/xbps::parse_help "$1") )
}
function completion/xbps::query_words {
for word in "${WORDS[@]}"; do
for arg in "$@"; do
[[ "$word" == "$arg" ]] && return 0
done
done
return 1
}
function completion/xbps-alternatives {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-alternatives
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
([Cc]|--config|--rootdir)
complete -P "$PREFIX" -d
;;
(g|--group)
complete -P "$PREFIX" $(xbps-alternatives -l | grep -v '^ ')
;;
(*)
complete $(command -f completion/xbps::installed_packages "$TARGETWORD")
;;
esac
}
function completion/xbps-checkvers {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-checkvers
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
([CDr]|--config|--distdir|--rootdir)
complete -P "$PREFIX" -d
;;
(*)
complete -f
esac
}
function completion/xbps-create {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-create
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
(*)
complete -d
;;
esac
}
function completion/xbps-dgraph {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-dgraph
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
([Cr]|--config|--rootdir)
complete -P "$PREFIX" -d
;;
(c|--graph-config)
complete -P "$PREFIX" -f
;;
(*)
complete $(command -f completion/xbps::all_packages)
;;
esac
}
function completion/xbps-digest {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-digest
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
(*)
complete -f
;;
esac
}
function completion/xbps-fetch {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-fetch
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
(o)
complete -P "$PREFIX" -f
;;
(*)
;;
esac
}
function completion/xbps-install {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-install
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
([Ccr]|--config|--cachedir|--rootdir)
complete -P "$PREFIX" -d
;;
(*)
complete $(command -f completion/xbps::all_packages "$TARGETWORD")
;;
esac
}
function completion/xbps-pkgdb {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-pkgdb
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
([Cr]|--config|--rootdir)
complete -P "$PREFIX" -d
;;
(m|--mode)
complete -P "$PREFIX" -D "mark PKGNAME as if it was installed automatically" auto
complete -P "$PREFIX" -D "mark PKGNAME as if it was installed manually" manual
complete -P "$PREFIX" -D "hold PKGNAME. Held packages are not updated" hold
complete -P "$PREFIX" -D "unhold PKGNAME" unhold
complete -P "$PREFIX" -D "make PKGNAME only accept updates from the same repo used for installation" repolock
complete -P "$PREFIX" -D "allow PKGNAME to accept updates from any repo" repounlock
;;
(*)
complete $(command -f completion/xbps::installed_packages "$TARGETWORD")
;;
esac
}
function completion/xbps-query {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-query
command -f completion//parseoptions -e
case $ARGOPT in
("-")
command -f completion//completeoptions
;;
([Ccr]|--config|--cachedir|--rootdir)
complete -P "$PREFIX" -d
;;
(p|--property)
if [ -n "$PREFIX" ]; then
complete -P "$PREFIX" ""
else
PREFIX="${TARGETWORD%"${TARGETWORD##*,}"}"
complete -T -S ',' -P "$PREFIX" -D 'group and file alternatives provided by the package.' alternatives
complete -T -S ',' -P "$PREFIX" -D 'target architecture the package was build for.' architecture
complete -T -S ',' -P "$PREFIX" -D 'returns "yes" if the package was installed automatically.' automatic-install
complete -T -S ',' -P "$PREFIX" -D 'enabled options the package was built with.' build-options
complete -T -S ',' -P "$PREFIX" -D 'changelog URL for the package.' changelog
complete -T -S ',' -P "$PREFIX" -D 'configuration file(s) installed by the package.' conf_files
complete -T -S ',' -P "$PREFIX" -D 'other packages this package conflicts with.' conflicts
complete -T -S ',' -P "$PREFIX" -D 'hash of the package file.' filename-sha256
complete -T -S ',' -P "$PREFIX" -D 'size of the package file.' filename-size
complete -T -S ',' -P "$PREFIX" -D 'returns "yes" if the package is held and will not be updated.' hold
complete -T -S ',' -P "$PREFIX" -D 'home URL of the package project.' homepage
complete -T -S ',' -P "$PREFIX" -D 'date when the package was installed.' install-date
complete -T -S ',' -P "$PREFIX" -D 'post-install message provided by the package.' install-msg
complete -T -S ',' -P "$PREFIX" -D 'script used for installing the package.' install-script
complete -T -S ',' -P "$PREFIX" -D 'total size of files installed by the package.' installed_size
complete -T -S ',' -P "$PREFIX" -D 'license(s) for distributing the package.' license
complete -T -S ',' -P "$PREFIX" -D 'contact of the maintainer of the package.' maintainer
complete -T -S ',' -P "$PREFIX" -D 'hash of the plist package files metadata.' metafile-sha256
complete -T -S ',' -P "$PREFIX" -D 'name of the package.' pkgname
complete -T -S ',' -P "$PREFIX" -D 'version of the package.' pkgver
complete -T -S ',' -P "$PREFIX" -D 'returns "yes" if the package will not be removed automatically on update.' preserve
complete -T -S ',' -P "$PREFIX" -D 'abstract facility provided by the package.' provides
complete -T -S ',' -P "$PREFIX" -D 'post-remove message provided by the package.' remove-msg
complete -T -S ',' -P "$PREFIX" -D 'script used for removing the package.' remove-script
complete -T -S ',' -P "$PREFIX" -D 'other packages that the package replaces.' replaces
complete -T -S ',' -P "$PREFIX" -D 'returns "yes" if the package only accepts updates from original repository.' repolock
complete -T -S ',' -P "$PREFIX" -D 'repository where the package was installed from.' repository
complete -T -S ',' -P "$PREFIX" -D 'previous provided version this package replaces.' reverts
complete -T -S ',' -P "$PREFIX" -D 'other runtime dependency packages for the package.' run_depends
complete -T -S ',' -P "$PREFIX" -D 'shared libraries provided by the package.' shlib-provides
complete -T -S ',' -P "$PREFIX" -D 'shared libraries required by the package.' shlib-requires
complete -T -S ',' -P "$PREFIX" -D 'short description of the package.' short_desc
complete -T -S ',' -P "$PREFIX" -D 'commit hash of package last change from the void-packages repository.' source-revisions
complete -T -S ',' -P "$PREFIX" -D 'installation state of the package.' state
complete -T -S ',' -P "$PREFIX" -D 'list of categories the package is associated with.' tags
fi
;;
(o|--cat)
complete -P "$PREFIX" -f
;;
(*)
if command -f completion/xbps::query_words "-R" "--repository"; then complete $(command -f completion/xbps::all_packages "$TARGETWORD")
else complete $(command -f completion/xbps::installed_packages "$TARGETWORD"); fi
;;
esac
}
function completion/xbps-reconfigure {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-reconfigure
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
([Cr]|--config|--rootdir)
complete -P "$PREFIX" -d
;;
(*)
complete $(command -f completion/xbps::installed_packages "$TARGETWORD")
;;
esac
}
function completion/xbps-remove {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-remove
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
([Ccr]|--config|--cachedir|--rootdir)
complete -P "$PREFIX" -d
;;
(*)
complete $(command -f completion/xbps::installed_packages "$TARGETWORD")
;;
esac
}
function completion/xbps-rindex {
typeset OPTIONS ARGOPT PREFIX
command -f completion/xbps::set_options xbps-rindex
command -f completion//parseoptions
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
([crs]|--clean|--remove-obsoletes|--sign)
complete -P "$PREFIX" -d
;;
([aS]|--add|--sign-pkg)
complete -P "$PREFIX" -A '*.xbps' -df
;;
(--compression)
complete -P "$PREFIX" none gzip bzip2 lz4 xz zstd
;;
(*)
complete -f
;;
esac
}
# the rest will be created when xbps updates to 0.60, since that update will
# have more consistent --help naming schemes.

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1 @@
/home/yosh/.config/yash/completion/xbps

View File

@ -0,0 +1,73 @@
# aliases
# man() { vim -R -c 'filetype plugin on' -c 'set ft=man' -c "Man $*"; }
chtsh() { IFS='+' curl cht.sh/"$*" ; }
# local
alias usv="SVDIR=${HOME}/.local/service sv"
# convenience
alias view='vim -R'
alias ls='lsd'
alias xdt='xdotool'
alias tearfree='xrandr --output HDMI-A-0 --set TearFree'
alias ts="stranslate"
alias ed="ed -p '* '"
alias diff='diff --color -u'
alias dotfiles='/usr/bin/git --git-dir=$HOME/.local/dotfiles --work-tree=$HOME'
# XDG aliases
alias startx='startx "$XDG_CONFIG_HOME/X11/xinitrc"'
# Prompt and nnn
_c=("\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]")
if [ "${NNNLVL:-0}" -ge 1 ]; then
alias nnn="echo don\'t nest nnn!"
export nnnsel="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection"
_prompt_flags="${_prompt_flags:-} ${_c[10]}nnn"
fi
YASH_PS1="${_c[16]}[${_c[14]}"'$USER'"${_c[16]}@${_c[11]}"'$(uname -n)'"${_c[16]}]${_prompt_flags:-}${_c[16]} ${_c[9]}*${_c[16]} ${_c[7]}"'${PWD/#~/\~}'"
${_c[10]}└─────${_c[17]} "
YASH_PS1S=''
YASH_PS1P='\fkt.'
PS1='[$USER@$(uname -n)] /${PWD##*/} $ '
PS1S="$YASH_PS1S"
PS1P="$YASH_PS1P"
unset _c
unset _prompt_flags
set -o vi
set -o le-predict
set -o le-no-conv-meta # fix utf8
set -o notify-le
set -o no-unset
set -o brace-expand
# ensure job control works as expected
case $- in (*m*)
trap - TSTP TTIN TTOU
esac
# keybinds {{{
# adding functionality {{{
bindkey -e '\^L' clear-and-redraw-all
bindkey -a '\^L' clear-and-redraw-all
bindkey -v '\^L' clear-and-redraw-all
bindkey -e '\^[[1;5D' backward-emacsword
bindkey -e '\^[[1;5C' forward-emacsword
bindkey -v '\^[[1;5D' backward-emacsword
bindkey -v '\^[[1;5C' forward-emacsword
bindkey -a '\^[[1;5D' backward-emacsword
bindkey -a '\^[[1;5C' forward-emacsword
# }}}
# some emacs functionality in vi-insert, mainly for prediction {{{
bindkey -v '\^B' backward-viword
bindkey -v '\^F' forward-viword
bindkey -v '\^E' end-of-line
bindkey -v '\^A' beginning-of-line
# }}}
# }}}
# vim: ft=sh

View File

@ -1,6 +1,5 @@
-o "%(title).192B [%(id)s].%(ext)s"
-o "%(title).192B [%(display_id)s].%(ext)s"
--merge-output-format mkv
-f bv+ba/best
--external-downloader aria2c
--yes-playlist
--add-chapters

View File

@ -1 +1 @@
selection-clipboard = clipboard
set selection-clipboard clipboard

View File

@ -0,0 +1 @@
../autosort.py

View File

@ -0,0 +1 @@
../notify_send.py

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,769 @@
# -*- coding: utf-8 -*-
#
# Project: weechat-notify-send
# Homepage: https://github.com/s3rvac/weechat-notify-send
# Description: Sends highlight and message notifications through notify-send.
# Requires libnotify.
# License: MIT (see below)
#
# Copyright (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
from __future__ import print_function
import os
import re
import subprocess
import sys
import time
# Ensure that we are running under WeeChat.
try:
import weechat
except ImportError:
sys.exit('This script has to run under WeeChat (https://weechat.org/).')
# Name of the script.
SCRIPT_NAME = 'notify_send'
# Author of the script.
SCRIPT_AUTHOR = 's3rvac'
# Version of the script.
SCRIPT_VERSION = '0.10 (dev)'
# License under which the script is distributed.
SCRIPT_LICENSE = 'MIT'
# Description of the script.
SCRIPT_DESC = 'Sends highlight and message notifications through notify-send.'
# Name of a function to be called when the script is unloaded.
SCRIPT_SHUTDOWN_FUNC = ''
# Used character set (utf-8 by default).
SCRIPT_CHARSET = ''
# Script options.
OPTIONS = {
'notify_on_highlights': (
'on',
'Send notifications on highlights.'
),
'notify_on_privmsgs': (
'on',
'Send notifications on private messages.'
),
'notify_on_filtered_messages': (
'off',
'Send notifications also on filtered (hidden) messages.'
),
'notify_when_away': (
'on',
'Send also notifications when away.'
),
'notify_for_current_buffer': (
'on',
'Send also notifications for the currently active buffer.'
),
'notify_on_all_messages_in_current_buffer': (
'off',
'Send a notification on all messages in the currently active buffer.'
),
'notify_on_all_messages_in_buffers': (
'',
'A comma-separated list of buffers for which you want to receive '
'notifications on all messages that appear in them.'
),
'notify_on_all_messages_in_buffers_that_match': (
'',
'A comma-separated list of regex patterns of buffers for which you '
'want to receive notifications on all messages that appear in them.'
),
'notify_on_messages_that_match': (
'',
'A comma-separated list of regex patterns that you want to receive '
'notifications on when message matches.'
),
'min_notification_delay': (
'500',
'A minimal delay between successive notifications from the same '
'buffer (in milliseconds; set to 0 to show all notifications).'
),
'ignore_messages_tagged_with': (
','.join([
'notify_none', # Buffer with line is not added to hotlist
'irc_join', # Joined IRC
'irc_quit', # Quit IRC
'irc_part', # Parted a channel
'irc_status', # Status messages
'irc_nick_back', # A nick is back on server
'irc_401', # No such nick/channel
'irc_402', # No such server
]),
'A comma-separated list of message tags for which no notifications '
'should be shown.'
),
'ignore_buffers': (
'',
'A comma-separated list of buffers from which no notifications should '
'be shown.'
),
'ignore_buffers_starting_with': (
'',
'A comma-separated list of buffer prefixes from which no '
'notifications should be shown.'
),
'ignore_nicks': (
'-,--,-->',
'A comma-separated list of nicks from which no notifications should '
'be shown.'
),
'ignore_nicks_starting_with': (
'',
'A comma-separated list of nick prefixes from which no '
'notifications should be shown.'
),
'hide_messages_in_buffers_that_match': (
'',
'A comma-separated list of regex patterns for names of buffers from '
'which you want to receive notifications without messages.'
),
'nick_separator': (
': ',
'A separator between a nick and a message.'
),
'escape_html': (
'on',
"Escapes the '<', '>', and '&' characters in notification messages."
),
'max_length': (
'72',
'Maximal length of a notification (0 means no limit).'
),
'ellipsis': (
'[..]',
'Ellipsis to be used for notifications that are too long.'
),
'icon': (
'/usr/share/icons/hicolor/32x32/apps/weechat.png',
'Path to an icon to be shown in notifications.'
),
'desktop_entry': (
'weechat',
'Name of the desktop entry for WeeChat.'
),
'timeout': (
'5000',
'Time after which the notification disappears (in milliseconds; '
'set to 0 to disable).'
),
'transient': (
'on',
'When a notification expires or is dismissed, remove it from the '
'notification bar.'
),
'urgency': (
'normal',
'Urgency (low, normal, critical).'
)
}
class Notification(object):
"""A representation of a notification."""
def __init__(self, source, message, icon, desktop_entry, timeout, transient, urgency):
self.source = source
self.message = message
self.icon = icon
self.desktop_entry = desktop_entry
self.timeout = timeout
self.transient = transient
self.urgency = urgency
def default_value_of(option):
"""Returns the default value of the given option."""
return OPTIONS[option][0]
def add_default_value_to(description, default_value):
"""Adds the given default value to the given option description."""
# All descriptions end with a period, so do not add another period.
return '{} Default: {}.'.format(
description,
default_value if default_value else '""'
)
def nick_that_sent_message(tags, prefix):
"""Returns a nick that sent the message based on the given data passed to
the callback.
"""
# 'tags' is a comma-separated list of tags that WeeChat passed to the
# callback. It should contain a tag of the following form: nick_XYZ, where
# XYZ is the nick that sent the message.
for tag in tags:
if tag.startswith('nick_'):
return tag[5:]
# There is no nick in the tags, so check the prefix as a fallback.
# 'prefix' (str) is the prefix of the printed line with the message.
# Usually (but not always), it is a nick with an optional mode (e.g. on
# IRC, @ denotes an operator and + denotes a user with voice). We have to
# remove the mode (if any) before returning the nick.
# Strip also a space as some protocols (e.g. Matrix) may start prefixes
# with a space. It probably means that the nick has no mode set.
if prefix.startswith(('~', '&', '@', '%', '+', '-', ' ')):
return prefix[1:]
return prefix
def parse_tags(tags):
"""Parses the given "list" of tags (str) from WeeChat into a list."""
return tags.split(',')
def message_printed_callback(data, buffer, date, tags, is_displayed,
is_highlight, prefix, message):
"""A callback when a message is printed."""
is_displayed = int(is_displayed)
is_highlight = int(is_highlight)
tags = parse_tags(tags)
nick = nick_that_sent_message(tags, prefix)
if notification_should_be_sent(buffer, tags, nick, is_displayed, is_highlight, message):
notification = prepare_notification(buffer, nick, message)
send_notification(notification)
return weechat.WEECHAT_RC_OK
def notification_should_be_sent(buffer, tags, nick, is_displayed, is_highlight, message):
"""Should a notification be sent?"""
if notification_should_be_sent_disregarding_time(buffer, tags, nick,
is_displayed, is_highlight, message):
# The following function should be called only when the notification
# should be sent (it updates the last notification time).
if not is_below_min_notification_delay(buffer):
return True
return False
def notification_should_be_sent_disregarding_time(buffer, tags, nick,
is_displayed, is_highlight, message):
"""Should a notification be sent when not considering time?"""
if not nick:
# A nick is required to form a correct notification source/message.
return False
if i_am_author_of_message(buffer, nick):
return False
if not is_displayed:
if not notify_on_filtered_messages():
return False
if is_away(buffer):
if not notify_when_away():
return False
if ignore_notifications_from_messages_tagged_with(tags):
return False
if ignore_notifications_from_nick(nick):
return False
if ignore_notifications_from_buffer(buffer):
return False
if buffer == weechat.current_buffer():
if not notify_for_current_buffer():
return False
elif notify_on_all_messages_in_current_buffer():
return True
if is_private_message(buffer):
return notify_on_private_messages()
if is_highlight:
return notify_on_highlights()
if notify_on_messages_that_match(message):
return True
if notify_on_all_messages_in_buffer(buffer):
return True
return False
def is_below_min_notification_delay(buffer):
"""Is a notification in the given buffer below the minimal delay between
successive notifications from the same buffer?
When called, this function updates the time of the last notification.
"""
# We store the time of the last notification in a buffer-local variable to
# make it persistent over the lifetime of this script.
LAST_NOTIFICATION_TIME_VAR = 'notify_send_last_notification_time'
last_notification_time = buffer_get_float(
buffer,
'localvar_' + LAST_NOTIFICATION_TIME_VAR
)
min_notification_delay = weechat.config_get_plugin('min_notification_delay')
# min_notification_delay is in milliseconds (str). To compare it with
# last_notification_time (float in seconds), we have to convert it to
# seconds (float).
min_notification_delay = float(min_notification_delay) / 1000
current_time = time.time()
# We have to update the last notification time before returning the result.
buffer_set_float(
buffer,
'localvar_set_' + LAST_NOTIFICATION_TIME_VAR,
current_time
)
return (min_notification_delay > 0 and
current_time - last_notification_time < min_notification_delay)
def buffer_get_float(buffer, property):
"""A variant of weechat.buffer_get_x() for floats.
This variant is needed because WeeChat supports only buffer_get_string()
and buffer_get_int().
"""
value = weechat.buffer_get_string(buffer, property)
return float(value) if value else 0.0
def buffer_set_float(buffer, property, value):
"""A variant of weechat.buffer_set() for floats.
This variant is needed because WeeChat supports only integers and strings.
"""
weechat.buffer_set(buffer, property, str(value))
def names_for_buffer(buffer):
"""Returns a list of all names for the given buffer."""
# The 'buffer' parameter passed to our callback is actually the buffer's ID
# (e.g. '0x2719cf0'). We have to check its name (e.g. 'freenode.#weechat')
# and short name (e.g. '#weechat') because these are what users specify in
# their configs.
buffer_names = []
full_name = weechat.buffer_get_string(buffer, 'name')
if full_name:
buffer_names.append(full_name)
short_name = weechat.buffer_get_string(buffer, 'short_name')
if short_name:
buffer_names.append(short_name)
# Consider >channel and #channel to be equal buffer names. The reason
# is that the https://github.com/rawdigits/wee-slack script replaces
# '#' with '>' to indicate that someone in the buffer is typing. This
# fixes the behavior of several configuration options (e.g.
# 'notify_on_all_messages_in_buffers') when weechat_notify_send is used
# together with the wee_slack script.
#
# Note that this is only needed to be done for the short name. Indeed,
# the full name always stays unchanged.
if short_name.startswith('>'):
buffer_names.append('#' + short_name[1:])
return buffer_names
def notify_for_current_buffer():
"""Should we also send notifications for the current buffer?"""
return weechat.config_get_plugin('notify_for_current_buffer') == 'on'
def notify_on_all_messages_in_current_buffer():
"""Should we send a notication on all messages in the current buffer?"""
return weechat.config_get_plugin('notify_on_all_messages_in_current_buffer') == 'on'
def notify_on_highlights():
"""Should we send notifications on highlights?"""
return weechat.config_get_plugin('notify_on_highlights') == 'on'
def notify_on_private_messages():
"""Should we send notifications on private messages?"""
return weechat.config_get_plugin('notify_on_privmsgs') == 'on'
def notify_on_filtered_messages():
"""Should we also send notifications for filtered (hidden) messages?"""
return weechat.config_get_plugin('notify_on_filtered_messages') == 'on'
def notify_when_away():
"""Should we also send notifications when away?"""
return weechat.config_get_plugin('notify_when_away') == 'on'
def is_away(buffer):
"""Is the user away?"""
return weechat.buffer_get_string(buffer, 'localvar_away') != ''
def is_private_message(buffer):
"""Has a private message been sent?"""
return weechat.buffer_get_string(buffer, 'localvar_type') == 'private'
def i_am_author_of_message(buffer, nick):
"""Am I (the current WeeChat user) the author of the message?"""
return weechat.buffer_get_string(buffer, 'localvar_nick') == nick
def split_option_value(option, separator=','):
"""Splits the value of the given plugin option by the given separator and
returns the result in a list.
"""
values = weechat.config_get_plugin(option)
if not values:
# When there are no values, return the empty list instead of [''].
return []
return [value.strip() for value in values.split(separator)]
def ignore_notifications_from_messages_tagged_with(tags):
"""Should notifications be ignored for a message tagged with the given
tags?
"""
ignored_tags = split_option_value('ignore_messages_tagged_with')
for ignored_tag in ignored_tags:
for tag in tags:
if tag == ignored_tag:
return True
return False
def ignore_notifications_from_buffer(buffer):
"""Should notifications from the given buffer be ignored?"""
buffer_names = names_for_buffer(buffer)
for buffer_name in buffer_names:
if buffer_name and buffer_name in ignored_buffers():
return True
for buffer_name in buffer_names:
for prefix in ignored_buffer_prefixes():
if prefix and buffer_name.startswith(prefix):
return True
return False
def ignored_buffers():
"""A generator of buffers from which notifications should be ignored."""
for buffer in split_option_value('ignore_buffers'):
yield buffer
def ignored_buffer_prefixes():
"""A generator of buffer prefixes from which notifications should be
ignored.
"""
for prefix in split_option_value('ignore_buffers_starting_with'):
yield prefix
def ignore_notifications_from_nick(nick):
"""Should notifications from the given nick be ignored?"""
if nick in ignored_nicks():
return True
for prefix in ignored_nick_prefixes():
if prefix and nick.startswith(prefix):
return True
return False
def ignored_nicks():
"""A generator of nicks from which notifications should be ignored."""
for nick in split_option_value('ignore_nicks'):
yield nick
def ignored_nick_prefixes():
"""A generator of nick prefixes from which notifications should be
ignored.
"""
for prefix in split_option_value('ignore_nicks_starting_with'):
yield prefix
def notify_on_messages_that_match(message):
"""Should we send a notification for the given message, provided it matches
any of the requested patterns?
"""
message_patterns = split_option_value('notify_on_messages_that_match')
for pattern in message_patterns:
if re.search(pattern, message):
return True
return False
def buffers_to_notify_on_all_messages():
"""A generator of buffer names in which the user wants to be notified for
all messages.
"""
for buffer in split_option_value('notify_on_all_messages_in_buffers'):
yield buffer
def buffer_patterns_to_notify_on_all_messages():
"""A generator of buffer-name patterns in which the user wants to be
notifier for all messages.
"""
for pattern in split_option_value('notify_on_all_messages_in_buffers_that_match'):
yield pattern
def notify_on_all_messages_in_buffer(buffer):
"""Does the user want to be notified for all messages in the given buffer?
"""
buffer_names = names_for_buffer(buffer)
# Option notify_on_all_messages_in_buffers:
for buf in buffers_to_notify_on_all_messages():
if buf in buffer_names:
return True
# Option notify_on_all_messages_in_buffers_that_match:
for pattern in buffer_patterns_to_notify_on_all_messages():
for buf in buffer_names:
if re.search(pattern, buf):
return True
return False
def buffer_patterns_to_hide_messages():
"""A generator of buffer-name patterns in which the user wants to hide
messages.
"""
for pattern in split_option_value('hide_messages_in_buffers_that_match'):
yield pattern
def hide_message_in_buffer(buffer):
"""Should messages in the given buffer be hidden?"""
buffer_names = names_for_buffer(buffer)
for pattern in buffer_patterns_to_hide_messages():
for buf in buffer_names:
if re.search(pattern, buf):
return True
return False
def prepare_notification(buffer, nick, message):
"""Prepares a notification from the given data."""
if is_private_message(buffer):
source = nick
else:
source = (weechat.buffer_get_string(buffer, 'short_name') or
weechat.buffer_get_string(buffer, 'name'))
message = nick + nick_separator() + message
if hide_message_in_buffer(buffer):
message = ''
max_length = int(weechat.config_get_plugin('max_length'))
if max_length > 0:
ellipsis = weechat.config_get_plugin('ellipsis')
message = shorten_message(message, max_length, ellipsis)
if weechat.config_get_plugin('escape_html') == 'on':
message = escape_html(message)
message = escape_slashes(message)
icon = weechat.config_get_plugin('icon')
desktop_entry = weechat.config_get_plugin('desktop_entry')
timeout = weechat.config_get_plugin('timeout')
transient = should_notifications_be_transient()
urgency = weechat.config_get_plugin('urgency')
return Notification(source, message, icon, desktop_entry, timeout, transient, urgency)
def should_notifications_be_transient():
"""Should the sent notifications be transient, i.e. should they be removed
from the notification bar once they expire or are dismissed?
"""
return weechat.config_get_plugin('transient') == 'on'
def nick_separator():
"""Returns a nick separator to be used."""
separator = weechat.config_get_plugin('nick_separator')
return separator if separator else default_value_of('nick_separator')
def shorten_message(message, max_length, ellipsis):
"""Shortens the message to at most max_length characters by using the given
ellipsis.
"""
# In Python 2, we need to decode the message and ellipsis into Unicode to
# correctly (1) detect their length and (2) shorten the message. Failing to
# do that could make the shortened message invalid and cause notify-send to
# fail. For example, when we have bytes, we cannot guarantee that we do not
# split the message inside of a multibyte character.
if sys.version_info.major == 2:
try:
message = message.decode('utf-8')
ellipsis = ellipsis.decode('utf-8')
except UnicodeDecodeError:
# Either (or both) of the two cannot be decoded. Continue in a
# best-effort manner.
pass
message = shorten_unicode_message(message, max_length, ellipsis)
if sys.version_info.major == 2:
if not isinstance(message, str):
message = message.encode('utf-8')
return message
def shorten_unicode_message(message, max_length, ellipsis):
"""An internal specialized version of shorten_message() when the both the
message and ellipsis are str (in Python 3) or unicode (in Python 2).
"""
if max_length <= 0 or len(message) <= max_length:
# Nothing to shorten.
return message
if len(ellipsis) >= max_length:
# We cannot include any part of the message.
return ellipsis[:max_length]
return message[:max_length - len(ellipsis)] + ellipsis
def escape_html(message):
"""Escapes HTML characters in the given message."""
# Only the following characters need to be escaped
# (https://wiki.ubuntu.com/NotificationDevelopmentGuidelines).
message = message.replace('&', '&amp;')
message = message.replace('<', '&lt;')
message = message.replace('>', '&gt;')
return message
def escape_slashes(message):
"""Escapes slashes in the given message."""
# We need to escape backslashes to prevent notify-send from interpreting
# them, e.g. we do not want to print a newline when the message contains
# '\n'.
return message.replace('\\', r'\\')
def send_notification(notification):
"""Sends the given notification to the user."""
notify_cmd = ['notify-send', '--app-name', 'weechat']
if notification.icon:
notify_cmd += ['--icon', notification.icon]
if notification.desktop_entry:
notify_cmd += ['--hint', 'string:desktop-entry:{}'.format(notification.desktop_entry)]
if notification.timeout:
notify_cmd += ['--expire-time', str(notification.timeout)]
if notification.transient:
notify_cmd += ['--hint', 'int:transient:1']
if notification.urgency:
notify_cmd += ['--urgency', notification.urgency]
# The "im.received" category means "A received instant message
# notification".
notify_cmd += ['--category', 'im.received']
# We need to add '--' before the source and message to ensure that
# notify-send considers the remaining parameters as the source and the
# message. This prevents errors when a source or message starts with '--'.
notify_cmd += [
'--',
# notify-send fails with "No summary specified." when no source is
# specified, so ensure that there is always a non-empty source.
notification.source or '-',
notification.message
]
# Prevent notify-send from messing up the WeeChat screen when occasionally
# emitting assertion messages by redirecting the output to /dev/null (users
# would need to run /redraw to fix the screen).
# In Python < 3.3, there is no subprocess.DEVNULL, so we have to use a
# workaround.
with open(os.devnull, 'wb') as devnull:
try:
subprocess.check_call(
notify_cmd,
stderr=subprocess.STDOUT,
stdout=devnull,
)
except Exception as ex:
error_message = '{} (reason: {!r}). {}'.format(
'Failed to send the notification via notify-send',
'{}: {}'.format(ex.__class__.__name__, ex),
'Ensure that you have notify-send installed in your system.',
)
print(error_message, file=sys.stderr)
if __name__ == '__main__':
# Registration.
weechat.register(
SCRIPT_NAME,
SCRIPT_AUTHOR,
SCRIPT_VERSION,
SCRIPT_LICENSE,
SCRIPT_DESC,
SCRIPT_SHUTDOWN_FUNC,
SCRIPT_CHARSET
)
# Initialization.
for option, (default_value, description) in OPTIONS.items():
description = add_default_value_to(description, default_value)
weechat.config_set_desc_plugin(option, description)
if not weechat.config_is_set_plugin(option):
weechat.config_set_plugin(option, default_value)
# Catch all messages on all buffers and strip colors from them before
# passing them into the callback.
weechat.hook_print('', '', '', 1, 'message_printed_callback', '')

69
.yash_profile Normal file
View File

@ -0,0 +1,69 @@
# load global profile
. /etc/profile
# xdg yash loadpath
export YASH_LOADPATH="$XDG_CONFIG_HOME/yash:$YASH_LOADPATH"
export HISTFILE="$XDG_DATA_HOME/yash/history"
# xdg support shit {{{
export INPUTRC="$XDG_CONFIG_HOME/inputrc"
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
export XSERVERRC="$XDG_CONFIG_HOME/X11/xserverrc"
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
export VIMINIT="set nocp | source $XDG_CONFIG_HOME/vim/vimrc"
export WINEPREFIX="$XDG_DATA_HOME/wine"
export PASSAGE_DIR="$XDG_DATA_HOME/passage/store"
export PASSAGE_IDENTITIES_FILE="$XDG_DATA_HOME/passage/identities"
export PENTADACTYL_INIT="source $XDG_CONFIG_HOME/pentadactyl/pentadactylrc"
export PENTADACTYL_RUINTIME="$XDG_CONFIG_HOME/pentadactyl"
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export SRB2WADDIR="$XDG_DATA_HOME/srb2kart/wads"
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pythonstartup.py"
export GOPATH="$XDG_DATA_HOME/go"
export GOMODCACHE="$XDG_CACHE_HOME/go/mod"
export SQLITE_HISTORY="$XDG_RUNTIME_DIR/sqlite_history"
export PSQL_HISTORY="$XDG_RUNTIME_DIR/psql_history"
export RXVT_SOCKET="$XDG_RUNTIME_DIR/urxvt-$(uname -n)"
# }}}
# other config {{{
export PATH="$HOME/.local/bin:$HOME/.local/scripts:$PATH"
export MANPATH="$XDG_DATA_HOME/man:"
export EDITOR="vim"
export VISUAL="vim"
export TERMINAL="urxvtc"
export FLOATING_TERMINAL="urxvtc -name FLOATING_TERMINAL"
export QT_STYLE_OVERRIDE=kvantum
# }}}
# program options {{{
# misc {{{
export JAVA_HOME="/usr/lib/jvm/openjdk17"
export LESS='-Ri'
# }}}
# fzf {{{
export FZF_DEFAULT_COMMAND='bfs -nohidden -type f -printf "%P\n"'
export FZF_DEFAULT_OPTS='
--color "fg:7,bg:-1,hl:12,fg+:11,bg+:0,hl+:13,info:9,border:0,prompt:4,pointer:10,marker:2,spinner:13,header:7"
--border -e
--bind ctrl-space:print-query+abort
'
# }}}
# nnn {{{
export NNN_OPTS="aAeQ"
export NNN_ARCHIVE="\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$"
export NNN_COLORS='#0d0d0d0d0d0d0d0d'
BLK="0B" CHR="0B" DIR="0d" EXE="0a" REG="07" HARDLINK="0e" SYMLINK="0e" MISSING="08" ORPHAN="09" FIFO="03" SOCK="0B" OTHER="06"
export NNN_FCOLORS="$BLK$CHR$DIR$EXE$REG$HARDLINK$SYMLINK$MISSING$ORPHAN$FIFO$SOCK$OTHER"
_nc='c:-!magick convert "$nnn" png:- | xclip -sel clipboard -t image/png*'
_nm='h:-!hx "$nnn"*;o:-fzopen;d:dragdrop;p:preview-tui'
export NNN_PLUG="$_nc;$_nm"
# }}}
# }}}
# vim: ft=sh