Compare commits
62 Commits
Author | SHA1 | Date |
---|---|---|
yosh | 498ae8a411 | |
yosh | d259a1d8b9 | |
yosh | 66d65417a6 | |
yosh | 6ae096cf90 | |
yosh | 6b9663b4cb | |
yosh | c115d7ac2e | |
yosh | ab580d8b98 | |
yosh | 9a8ca755a2 | |
yosh | 18e89cd5a7 | |
yosh | d1cdea3f36 | |
yosh | c513a7d7ad | |
yosh | 7c4fafc42d | |
yosh | 57a11c78a2 | |
yosh | 1b1169afcd | |
yosh | 69fb7101ce | |
yosh | edf273e26c | |
yosh | 44235f2aaf | |
yosh | d9ebdd69ec | |
yosh | 939d0692c0 | |
yosh | a69c0da866 | |
yosh | 26244f2848 | |
yosh | e90b1d59f7 | |
yosh | 6ff5b72dea | |
yosh | 74ce120a23 | |
yosh | f4b4edeb66 | |
yosh | a262ec6780 | |
yosh | 181764c9dd | |
yosh | e0b292f4f8 | |
yosh | 837ac35f35 | |
yosh | 33df113c6f | |
yosh | 666878d5a6 | |
yosh | af3c60f9c4 | |
yosh | 33d47c5331 | |
yosh | 0e6a57997b | |
yosh | 955ab86e24 | |
yosh | e937970673 | |
yosh | 06d1042ccf | |
yosh | 80641d5965 | |
yosh | 1093aa9570 | |
yosh | 6e8ee04f45 | |
yosh | b6353e7663 | |
yosh | 5fb37e0625 | |
yosh | 08b42eb03a | |
yosh | 4346b18fa3 | |
yosh | 0c021853b1 | |
yosh | 32ce05ab3c | |
yosh | be5abc88bd | |
yosh | dea5122df1 | |
yosh | 1fef48cdb8 | |
yosh | 4d6bbe8f96 | |
yosh | 7c6a7269ab | |
yosh | c950c5b5d5 | |
yosh | a0c7f1c154 | |
yosh | 18cff6f4f5 | |
yosh | fac875b070 | |
yosh | 093b414f7d | |
yosh | bc1dfb02de | |
yosh | 54892eacbe | |
yosh | b1cadab90c | |
yosh | d35fcf5b58 | |
yosh | 5c07b48615 | |
yosh | 82687da229 |
|
@ -32,6 +32,20 @@
|
|||
(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)
|
||||
(image-convert-indexed-max-colors 8)
|
||||
(image-convert-indexed-remove-duplicates no)
|
||||
(image-convert-indexed-dither-type fs-lowbleed)
|
||||
(image-resize-layer-set all)
|
||||
(layer-new-name "black3")
|
||||
(layer-add-mask-type alpha)
|
||||
(selection-feather-radius 2)
|
||||
(selection-grow-radius 3)
|
||||
(selection-grow-radius 15)
|
||||
(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 8)
|
||||
(unit pixels)
|
||||
(cap-style butt)
|
||||
(join-style miter)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# This file is written on GIMP startup and on every theme change.
|
||||
# It is NOT supposed to be edited manually. Edit your personal
|
||||
# gtkrc file instead (/home/yosh/.config/GIMP/2.10/gtkrc).
|
||||
# gtkrc file instead (/home/fox/.config/GIMP/2.10/gtkrc).
|
||||
|
||||
style "gimp-spin-scale-style"
|
||||
{
|
||||
|
@ -11,8 +11,8 @@ style "gimp-spin-scale-style"
|
|||
|
||||
class "GimpSpinScale" style "gimp-spin-scale-style"
|
||||
|
||||
include "/home/yosh/.config/GIMP/2.10/themes/Dark-Mod/gtkrc"
|
||||
include "/home/fox/.config/GIMP/2.10/themes/Dark-Mod/gtkrc"
|
||||
include "/etc/gimp/2.0/gtkrc"
|
||||
include "/home/yosh/.config/GIMP/2.10/gtkrc"
|
||||
include "/home/fox/.config/GIMP/2.10/gtkrc"
|
||||
|
||||
# end of themerc
|
||||
|
|
|
@ -58,14 +58,14 @@ gtk-auto-mnemonics = 1
|
|||
gtk-toolbar-style = GTK_TOOLBAR_ICONS
|
||||
gtk-application-prefer-dark-theme = true
|
||||
|
||||
gtk-font-name = "Terminus 8"
|
||||
gtk-font-name = "X11 Fixed 8"
|
||||
|
||||
# KDE hack to match gtk/gnome defaults
|
||||
gtk-button-images = 0
|
||||
|
||||
style "gimp-dark-default-style"
|
||||
{
|
||||
font_name = "Terminus 8"
|
||||
font_name = "X11 Fixed 8"
|
||||
|
||||
color["clr1"] = "#DDDDDD"
|
||||
color["clr2"] = "#FFFFFF"
|
||||
|
|
|
@ -1,37 +1,38 @@
|
|||
*.font: -*-helvetica-bold-r-normal-*-12-*
|
||||
Xcursor.theme: Eevee-cursors
|
||||
|
||||
! Colors {{{
|
||||
*.foreground: #f9f5e9
|
||||
*.background: #2d0827
|
||||
*.cursorColor: #f9f5e9
|
||||
*.foreground: #cbd6e2
|
||||
*.background: #0b1c2c
|
||||
*.cursorColor: #cbd6e2
|
||||
|
||||
! 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: #0b1c2c
|
||||
*.color8: #627e99
|
||||
*.color1: #bf5656
|
||||
*.color9: #bf568b
|
||||
*.color2: #56bf8b
|
||||
*.color10: #8bbf56
|
||||
*.color3: #bf8b56
|
||||
*.color11: #bfbf56
|
||||
*.color4: #234796
|
||||
*.color12: #568bbf
|
||||
*.color5: #8346d2
|
||||
*.color13: #ad68f0
|
||||
*.color6: #29819b
|
||||
*.color14: #2fb9d7
|
||||
*.color7: #cbd6e2
|
||||
*.color15: #f7f9fb
|
||||
! }}}
|
||||
|
||||
! URxvt {{{
|
||||
URxvt.perl-ext-common: url-select-plus,eval,52-osc
|
||||
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: 128x48
|
||||
URxvt.iso14755: false
|
||||
URxvt.iso14755_52: false
|
||||
URxvt.saveLines: 4096
|
||||
|
@ -41,80 +42,41 @@ URxvt.secondaryScroll: 0
|
|||
URxvt.url-launcher: xdg-open
|
||||
URxvt.url-select-plus.button: 9
|
||||
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.altlauncher: urxvt -e lynx
|
||||
URxvt.url-select-plus.mediaplayer: mpv
|
||||
URxvt.url-select-plus.imgviewer: feh
|
||||
|
||||
! 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.M-K: command:\033]720;1\007
|
||||
URxvt.keysym.M-J: command:\033]721;1\007
|
||||
URxvt.keysym.C-Right: \033[1;5C
|
||||
URxvt.keysym.C-Left: \033[1;5D
|
||||
URxvt.keysym.M-u: perl:url-select-plus:select_next
|
||||
URxvt.keysym.C-BackSpace:
|
||||
|
||||
! Fonts & Misc. Appearance
|
||||
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.fading: 20
|
||||
URxvt.iconFile: /home/yosh/Pictures/Misc. Images/Icons/Terminal.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" }
|
||||
! Appearance
|
||||
URxvt.scrollBar: false
|
||||
URxvt.cursorBlink: true
|
||||
URxvt.cursorUnderline: false
|
||||
URxvt.fading: 7
|
||||
URxvt.font: -*-fixed-medium-r-semicondensed-*-13-*,xft:Cozette
|
||||
URxvt.boldFont: -*-fixed-bold-r-semicondensed-*-13-*,xft:Cozette
|
||||
URxvt.matcher.rend.0: Uline fg14
|
||||
|
||||
! 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
|
||||
URxvt*inherentPixmap: true
|
||||
URxvt.background.expr: keep { shade -0.75, rootalign root }
|
||||
! }}}
|
||||
|
||||
! 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-*
|
||||
! }}}
|
||||
|
||||
! xbomb {{{
|
||||
XBomb*background: #c7acc5
|
||||
XBomb*foreground: #2d0827
|
||||
XBomb.form.grid.grid.font: -*-terminus-bold-r-normal-*-16-*
|
||||
XBomb.form.grid.grid.hidden: #f9f5e9
|
||||
XBomb.form.grid.grid.bombmark: #c873c9
|
||||
XBomb.form.grid.grid.bombreal: #f15b94
|
||||
XBomb.form.grid.grid.bomb: #402c4e
|
||||
XBomb.form.grid.grid.correct: #0d814a
|
||||
XBomb.form.grid.grid.number1: #1e53db
|
||||
XBomb.form.grid.grid.number2: #0d814a
|
||||
XBomb.form.grid.grid.number3: #d93352
|
||||
XBomb.form.grid.grid.number4: #15a4aa
|
||||
XBomb.form.grid.grid.number5: #f1d6a1
|
||||
XBomb.form.grid.grid.number6: #9a2b94
|
||||
XBomb.form.grid.grid.number7: #67526a
|
||||
XBomb.form.grid.grid.number8: #402c4e
|
||||
XBomb.form.grid.grid.number9: #7d97f4
|
||||
XBomb.form.grid.grid.number10: #0d814a
|
||||
XBomb.form.grid.grid.number11: #d93352
|
||||
XBomb.form.grid.grid.number12: #05fffb
|
||||
! }}}
|
||||
|
||||
! Oneko {{{
|
||||
Oneko.reverse: true
|
||||
Oneko.time: 100000
|
||||
! XBomb {{{
|
||||
XBomb*background: #DDDDDD
|
||||
XBomb*foreground: #000000
|
||||
XBomb.form.grid.grid.font: -*-fixed-*-*-*-*-20-*
|
||||
! }}}
|
||||
|
||||
! nsxiv {{{
|
||||
Nsxiv.bar.font: Fixed:pixelsize=13:style=SemiCondensed
|
||||
Nsxiv.bar.font: Fixed:pixelsize=13:style=SemiCondensed
|
||||
! }}}
|
||||
|
||||
! vim:set tabstop=8:
|
||||
|
|
|
@ -1,23 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$DISPLAY" = ":9" ]; then # running in Xephyr
|
||||
xrdb -I"$XDG_CONFIG_HOME/X11/Xresources-themes" ~/.config/X11/Xresources
|
||||
feh --no-fehbg --bg-tile -z ~/pics/wallpapers/tile/marbs-dark.png
|
||||
exec cwm -c ~/.config/cwm/cwmrc
|
||||
fi
|
||||
|
||||
# options
|
||||
numlockx on
|
||||
xrandr --output eDP --set TearFree on
|
||||
xinput set-prop 'ETPS/2 Elantech Touchpad' 'libinput Natural Scrolling Enabled' 1
|
||||
|
||||
# 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"
|
||||
# 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
|
||||
# load resources
|
||||
xrdb -I"$XDG_CONFIG_HOME/X11/Xresources-themes" ~/.config/X11/Xresources
|
||||
|
||||
# programs
|
||||
runsvdir "$HOME/.local/service" &
|
||||
case $WM in
|
||||
cwm)
|
||||
exec dbus-run-session cwm -c ~/.config/cwm/cwmrc
|
||||
;;
|
||||
twm) export NO_COLOR=1; exec twm -f "$XDG_CONFIG_HOME/twm/twmrc" ;;
|
||||
*) exec awesome # dbus-launch --autolaunch="$(cat /var/lib/dbus/machine-id)" awesome ;;
|
||||
esac
|
||||
# progs
|
||||
runsvdir ~/.local/service &
|
||||
xbanish -t 3 -i mod5 -i mod4 &
|
||||
# the setsid id here prevents a kill 0 from killing the exec session
|
||||
setsid start-lemonbar &
|
||||
gkrellm -g +0+0 &
|
||||
|
||||
urxvt -e sh -c 'vim ~/startup.txt' &
|
||||
|
||||
# xwallpaper --maximize ~/pics/wallpapers/desk-tile
|
||||
xwallpaper --maximize ~/pics/wallpapers/desk
|
||||
|
||||
xcompmgr &
|
||||
exec dbus-run-session cwm -c ~/.config/cwm/cwmrc
|
||||
|
|
|
@ -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,89 @@
|
|||
# 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 +116,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 +124,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,42 +147,35 @@ 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.
|
||||
#
|
||||
# Default: default
|
||||
styleset-name=luma
|
||||
styleset-name=harmonic-dark
|
||||
|
||||
# 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 +187,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 +209,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 +231,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 +246,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 +254,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 +293,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 +311,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 +331,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 +344,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 +376,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 +391,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
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
#
|
||||
# aerc luma styleset
|
||||
#
|
||||
|
||||
*.default=true
|
||||
|
||||
title.reverse=true
|
||||
header.bold=true
|
||||
|
||||
*error.bold=true
|
||||
error.fg=9
|
||||
warning.fg=11
|
||||
success.fg=10
|
||||
|
||||
statusline*.default=true
|
||||
statusline_error.reverse=true
|
||||
|
||||
completion_pill.reverse=true
|
||||
|
||||
border.fg=0
|
||||
|
||||
selector_focused.reverse=true
|
||||
selector_chooser.bold=true
|
||||
|
||||
# Colors: Luma
|
||||
|
||||
*.selected.bg=8
|
||||
*.selected.fg=15
|
||||
|
||||
msglist_marked.bg=8
|
||||
msglist_marked.fg=12
|
||||
msglist_marked.selected.bg=4
|
||||
msglist_marked.selected.fg=7
|
||||
|
||||
msglist_flagged.fg=2
|
||||
msglist_flagged.selected.bg=2
|
||||
msglist_flagged.bold=true
|
||||
|
||||
msglist_unread.fg=11
|
||||
msglist_unread.bold=true
|
||||
msglist_unread.selected.fg=0
|
||||
msglist_unread.selected.bg=3
|
||||
|
||||
msglist_read.fg=7
|
||||
|
||||
statusline_default.fg=7
|
||||
statusline_default.bg=0
|
||||
statusline_error.fg=1
|
||||
|
||||
tab.fg=7
|
||||
tab.bg=0
|
||||
tab.selected.bg=8
|
||||
tab.selected.fg=15
|
||||
|
||||
dirlist_unread.fg=11
|
||||
dirlist_unread.selected.bg=11
|
||||
dirlist_unread.selected.fg=0
|
||||
dirlist_unread.bold=true
|
||||
dirlist_recent.fg=6
|
||||
dirlist_default.fg=7
|
|
@ -1,44 +0,0 @@
|
|||
-- Only allow symbols available in all Lua versions
|
||||
std = "min"
|
||||
|
||||
-- Get rid of "unused argument self"-warnings
|
||||
self = false
|
||||
|
||||
-- The default config may set global variables
|
||||
-- files["init.lua"].allow_defined_top = true
|
||||
|
||||
-- This file itself
|
||||
files[".luacheckrc"].ignore = {"111", "112", "131"}
|
||||
|
||||
-- Global objects defined by the C code
|
||||
read_globals = {
|
||||
"awesome",
|
||||
"button",
|
||||
"client",
|
||||
"dbus",
|
||||
"drawable",
|
||||
"drawin",
|
||||
"key",
|
||||
"keygrabber",
|
||||
"mousegrabber",
|
||||
"root",
|
||||
"selection",
|
||||
"tag",
|
||||
"window",
|
||||
-- Global settings.
|
||||
"modkey",
|
||||
}
|
||||
|
||||
-- screen may not be read-only, because newer luacheck versions complain about
|
||||
-- screen[1].tags[1].selected = true.
|
||||
-- The same happens with the following code:
|
||||
-- local tags = mouse.screen.tags
|
||||
-- tags[7].index = 4
|
||||
-- client may not be read-only due to client.focus.
|
||||
globals = {
|
||||
"screen",
|
||||
"mouse",
|
||||
"client"
|
||||
}
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
|
@ -1,20 +0,0 @@
|
|||
# Based on https://github.com/mpeterv/hererocks
|
||||
|
||||
language: python
|
||||
sudo: false
|
||||
|
||||
env:
|
||||
- LUA="lua 5.3"
|
||||
|
||||
install:
|
||||
- pip install hererocks
|
||||
- hererocks env --$LUA -rlatest
|
||||
- source env/bin/activate
|
||||
- luarocks install luacheck
|
||||
|
||||
script:
|
||||
- luacheck *.lua
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
|
@ -1,339 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{description}
|
||||
Copyright (C) {year} {fullname}
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -1,359 +0,0 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
|
||||
|
||||
- [awesome-cyclefocus](#awesome-cyclefocus)
|
||||
- [Screenshot](#screenshot)
|
||||
- [Installation](#installation)
|
||||
- [Keybindings](#keybindings)
|
||||
- [Example 1: cycle through all windows](#example-1-cycle-through-all-windows)
|
||||
- [Example 2: cycle through windows on the same screen and tag](#example-2-cycle-through-windows-on-the-same-screen-and-tag)
|
||||
- [`cycle_filters`](#cycle_filters)
|
||||
- [Predefined filters](#predefined-filters)
|
||||
- [Example 3: cycle through clients with the same class](#example-3-cycle-through-clients-with-the-same-class)
|
||||
- [Reference](#reference)
|
||||
- [Configuration](#configuration)
|
||||
- [<a name="settings"></a>Settings](#a-namesettingsasettings)
|
||||
- [Status](#status)
|
||||
- [Bugs, Feedback and Support](#bugs-feedback-and-support)
|
||||
- [Donate](#donate)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
# awesome-cyclefocus
|
||||
|
||||
awesome-cyclefocus is a module/plugin for the [awesome window
|
||||
manager][], which provides methods to cycle through
|
||||
the most recently used clients (typically known as Alt-Tab).
|
||||
|
||||
It allows to easily filter the list of windows to be cycled through, e.g. by
|
||||
screen, tags, window class, name/title etc.
|
||||
|
||||
## Screenshot
|
||||
|
||||
![Screenshot](screenshot.png)
|
||||
|
||||
Please note that the graphical aspect needs to be developed, but since people
|
||||
like screenshots…
|
||||
|
||||
## Installation
|
||||
|
||||
*Requirements:* awesome-cyclefocus requires Awesome 4+.
|
||||
|
||||
Create a subdirectory `cyclefocus` in your awesome config directory, e.g.
|
||||
|
||||
cd ~/.config/awesome
|
||||
git clone https://github.com/blueyed/awesome-cyclefocus cyclefocus
|
||||
|
||||
Then include it from your config file (`~/.config/awesome/rc.lua`), somewhere
|
||||
at the beginning:
|
||||
|
||||
```lua
|
||||
local cyclefocus = require('cyclefocus')
|
||||
```
|
||||
|
||||
## Keybindings
|
||||
|
||||
Then you can define the keybindings.
|
||||
|
||||
While you can use it with the `globalkeys` configuration, you should use
|
||||
the `clientkeys` table for any bindings which use `cycle_filters`.
|
||||
|
||||
The default for `modkey+Tab` in awesome (3.5.2) is:
|
||||
```lua
|
||||
awful.key({ modkey, }, "Tab",
|
||||
function ()
|
||||
awful.client.focus.history.previous()
|
||||
if client.focus then
|
||||
client.focus:raise()
|
||||
end
|
||||
end),
|
||||
```
|
||||
You should disable it (e.g. by commenting it out), and add your method below.
|
||||
|
||||
Here are three methods to setup the key mappings:
|
||||
|
||||
### Example 1: cycle through all windows
|
||||
|
||||
Setup `modkey+Tab` to cycle through all windows (assuming `modkey` is
|
||||
`Mod4`/`Super_L`, which is the default):
|
||||
|
||||
```lua
|
||||
-- modkey+Tab: cycle through all clients.
|
||||
awful.key({ modkey }, "Tab", function(c)
|
||||
cyclefocus.cycle({modifier="Super_L"})
|
||||
end),
|
||||
-- modkey+Shift+Tab: backwards
|
||||
awful.key({ modkey, "Shift" }, "Tab", function(c)
|
||||
cyclefocus.cycle({modifier="Super_L"})
|
||||
end),
|
||||
```
|
||||
|
||||
You can pass a table of optional arguments.
|
||||
We need to pass the modifier (as seen by awesome's `keygrabber`) here.
|
||||
Internally the direction gets set according to if the `Shift` modifier key
|
||||
is present, so that the second definition is only necessary to trigger it in
|
||||
the opposite direction from the beginning.
|
||||
|
||||
See the `init.lua` file (or the [settings section below](#settings)) for a full
|
||||
reference.
|
||||
|
||||
### Example 2: cycle through windows on the same screen and tag
|
||||
|
||||
You can use `cyclefocus.key` (a wrapper around `awful.key`) like this:
|
||||
|
||||
```lua
|
||||
-- Alt-Tab: cycle through clients on the same screen.
|
||||
-- This must be a clientkeys mapping to have source_c available in the callback.
|
||||
cyclefocus.key({ "Mod1", }, "Tab", {
|
||||
-- cycle_filters as a function callback:
|
||||
-- cycle_filters = { function (c, source_c) return c.screen == source_c.screen end },
|
||||
|
||||
-- cycle_filters from the default filters:
|
||||
cycle_filters = { cyclefocus.filters.same_screen, cyclefocus.filters.common_tag },
|
||||
keys = {'Tab', 'ISO_Left_Tab'} -- default, could be left out
|
||||
}),
|
||||
```
|
||||
|
||||
The first two arguments are the same as with `awful.key`: a list of modifiers
|
||||
and the key. Then the table with optional arguments to `cyclefocus.cycle()`
|
||||
follows.
|
||||
(here the `modifier` argument is not required, because it gets used from
|
||||
the first argument).
|
||||
|
||||
NOTE: this needs to go into `clientkeys`.
|
||||
|
||||
#### `cycle_filters`
|
||||
|
||||
In this case the `cycle_filters` argument is used, which is a list of filters
|
||||
to apply while cycling through the focus history: it gets passed a `client`
|
||||
object, and optionally another `client` object for the source (where the
|
||||
cycling started).
|
||||
For the source client to be available, it needs to be an entry in the
|
||||
`clientkeys` table.
|
||||
|
||||
You can pass functions here, or use one of the predefined filters:
|
||||
|
||||
#### Predefined filters
|
||||
|
||||
The following filters are available by default:
|
||||
|
||||
```lua
|
||||
-- A set of default filters, which can be used for cyclefocus.cycle_filters.
|
||||
cyclefocus.filters = {
|
||||
-- Filter clients on the same screen.
|
||||
same_screen = function (c, source_c) return c.screen == source_c.screen end,
|
||||
|
||||
same_class = function (c, source_c)
|
||||
return c.class == source_c.class
|
||||
end,
|
||||
|
||||
-- Only marked clients (via awful.client.mark and .unmark).
|
||||
marked = function (c, source_c)
|
||||
return awful.client.ismarked(c)
|
||||
end,
|
||||
|
||||
common_tag = function (c, source_c)
|
||||
for _, t in pairs(c:tags()) do
|
||||
for _, t2 in pairs(source_c:tags()) do
|
||||
if t == t2 then
|
||||
cyclefocus.debug("Filter: client shares tag '" .. t.name .. " with " .. c.name)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
}
|
||||
```
|
||||
|
||||
### Example 3: cycle through clients with the same class
|
||||
|
||||
The following will cycle through windows, which share the same window class
|
||||
(e.g. only Firefox windows, when starting from a Firefox window):
|
||||
|
||||
```lua
|
||||
-- Alt-^: cycle through clients with the same class name.
|
||||
cyclefocus.key({ "Mod1", }, "#49", 1, {
|
||||
cycle_filter = function (c, source_c) return c.class == source_c.class end,
|
||||
keys = { "°", "^" }, -- the keys to be handled, wouldn't be required if the keycode was available in keygrabber.
|
||||
}),
|
||||
cyclefocus.key({ "Mod1", "Shift", }, "#49", -1, { -- keycode #49 => ^/° on german keyboard, upper left below Escape and next to 1.
|
||||
cycle_filter = function (c, source_c) return c.class == source_c.class end,
|
||||
keys = { "°", "^" }, -- the keys to be handled, wouldn't be required if the keycode was available in keygrabber.
|
||||
}),
|
||||
```
|
||||
|
||||
The key argument uses the keycode notation (`#49`) and refers (probably) to the key
|
||||
below Escape, above Tab and next to the first digit (1).
|
||||
It should be the same shortcut, as what Ubuntu's Unity uses to cycle through
|
||||
the windows of a single application.
|
||||
|
||||
NOTE: You need to pass the keys this refers to via the `keys` argument, so that
|
||||
the keygrabber considers those only.
|
||||
In the example above, `^` and `°` refers to the key on the German keyboard
|
||||
layout (un-shifted and shifted, i.e. with Shift pressed and released).
|
||||
|
||||
NOTE: this needs to go into `clientkeys`.
|
||||
|
||||
## Reference
|
||||
|
||||
### Configuration
|
||||
|
||||
awesome-cyclefocus can be configured by passing optional arguments to the
|
||||
`cyclefocus.cycle` or `cyclefocus.key` functions, or by setting defaults, after
|
||||
loading `cyclefocus`:
|
||||
|
||||
#### <a name="settings"></a>Settings
|
||||
|
||||
The default settings are:
|
||||
|
||||
```lua
|
||||
cyclefocus = {
|
||||
-- Should clients get shown during cycling?
|
||||
-- This should be a function (or `false` to disable showing clients), which
|
||||
-- receives a client object, and can make use of `cyclefocus.show_client`
|
||||
-- (the default implementation).
|
||||
show_clients = true,
|
||||
-- Should clients get focused during cycling?
|
||||
-- This is required for the tasklist to highlight the selected entry.
|
||||
focus_clients = true,
|
||||
-- Should the selected client get raised?
|
||||
-- This calls `cyclefocus.raise_client_without_focus` by default, which you
|
||||
-- can use when overriding this with a function (that gets the client as
|
||||
-- argument).
|
||||
raise_client = true,
|
||||
-- Should the mouse pointer be moved away during cycling?
|
||||
-- This is normally done to avoid interference from sloppy focus handling,
|
||||
-- but can be disabled if you do not use sloppy focus.
|
||||
move_mouse_pointer = true,
|
||||
|
||||
-- How many entries should get displayed before and after the current one?
|
||||
display_next_count = 3,
|
||||
display_prev_count = 3,
|
||||
|
||||
-- Default preset to use for entries.
|
||||
-- `preset_for_offset` (below) gets added to it.
|
||||
default_preset = {},
|
||||
|
||||
--- Templates for entries in the list.
|
||||
-- The following arguments get passed to a callback:
|
||||
-- - client: the current client object.
|
||||
-- - idx: index number of current entry in clients list.
|
||||
-- - displayed_list: the list of entries in the list, possibly filtered.
|
||||
preset_for_offset = {
|
||||
-- Default callback, which will gets applied for all offsets (first).
|
||||
default = function (preset, args)
|
||||
-- Default font and icon size (gets overwritten for current/0 index).
|
||||
preset.font = 'sans 8'
|
||||
preset.icon_size = dpi(24)
|
||||
preset.text = escape_markup(cyclefocus.get_client_title(args.client, false))
|
||||
end,
|
||||
|
||||
-- Preset for current entry.
|
||||
["0"] = function (preset, args)
|
||||
preset.font = 'sans 14'
|
||||
preset.icon_size = dpi(36)
|
||||
preset.text = escape_markup(cyclefocus.get_client_title(args.client, true))
|
||||
-- Add screen number if there is more than one.
|
||||
if screen.count() > 1 then
|
||||
preset.text = preset.text .. " [screen " .. tostring(args.client.screen.index) .. "]"
|
||||
end
|
||||
preset.text = preset.text .. " [#" .. args.idx .. "] "
|
||||
preset.text = '<b>' .. preset.text .. '</b>'
|
||||
end,
|
||||
|
||||
-- You can refer to entries by their offset.
|
||||
-- ["-1"] = function (preset, args)
|
||||
-- -- preset.icon_size = 32
|
||||
-- end,
|
||||
-- ["1"] = function (preset, args)
|
||||
-- -- preset.icon_size = 32
|
||||
-- end
|
||||
},
|
||||
|
||||
-- Default builtin filters.
|
||||
-- (meant to get applied always, but you could override them)
|
||||
cycle_filters = {
|
||||
function(c, source_c) return not c.minimized end, --luacheck: no unused args
|
||||
},
|
||||
|
||||
-- Experimental: Width of icon column ("max_icon_size", used for margin).
|
||||
-- This could be "margin" etc instead, but currently only the width for the
|
||||
-- current entry is known.
|
||||
icon_col_width = dpi(36),
|
||||
|
||||
-- EXPERIMENTAL: only add clients to the history that have been focused by
|
||||
-- cyclefocus.
|
||||
-- This allows to switch clients using other methods, but those are then
|
||||
-- not added to cyclefocus' internal history.
|
||||
-- The get_next_client function will then first consider the most recent
|
||||
-- entry in the history stack, if it's not focused currently.
|
||||
--
|
||||
-- You can use cyclefocus.history.add to manually add an entry, or
|
||||
-- cyclefocus.history.append if you want to add it to the end of the stack.
|
||||
-- This might be useful in a request::activate signal handler.
|
||||
-- only_add_internal_focus_changes_to_history = true,
|
||||
|
||||
-- The filter to ignore clients altogether (get not added to the history stack).
|
||||
-- This is different from the cycle_filters.
|
||||
-- The function should return true / the client if it's ok, nil otherwise.
|
||||
filter_focus_history = awful.client.focus.filter,
|
||||
|
||||
-- Display notifications while cycling?
|
||||
-- WARNING: without raise_clients this will not make sense probably!
|
||||
display_notifications = true,
|
||||
|
||||
-- Debugging: messages get printed, and should show up in ~/.xsession-errors etc.
|
||||
-- 1: enable, 2: verbose, 3: very verbose, 4: much verbose.
|
||||
debug_level = 0,
|
||||
-- Use naughty notifications for debugging (additional to printing)?
|
||||
debug_use_naughty_notify = false,
|
||||
}
|
||||
```
|
||||
|
||||
You can change them like this:
|
||||
```lua
|
||||
cyclefocus = require("cyclefocus")
|
||||
cyclefocus.debug_level = 2
|
||||
```
|
||||
|
||||
You can also use custom settings when calling `cyclefocus.cycle` or
|
||||
`cyclefocus.key` via `args`, e.g. to not display notifications when switching
|
||||
between clients on the same tag:
|
||||
```lua
|
||||
cyclefocus.key({ modkey, }, "Tab", 1, {
|
||||
cycle_filters = { cyclefocus.filters.common_tag },
|
||||
display_notifications = false,
|
||||
modifier='Super_L', keys={'Tab', 'ISO_Left_Tab'}
|
||||
}),
|
||||
cyclefocus.key({ modkey, "Shift", }, "Tab", 1, {
|
||||
cycle_filters = { cyclefocus.filters.common_tag },
|
||||
display_notifications = false,
|
||||
modifier='Super_L', keys={'Tab', 'ISO_Left_Tab'}
|
||||
}),
|
||||
```
|
||||
|
||||
## Status
|
||||
|
||||
Stable: it works well for me and others.
|
||||
Internals, default settings and behavior might still change.
|
||||
|
||||
I came up with this while dipping my toes in the waters of awesome. If you have
|
||||
problems, please enable `cyclefocus.debug_level` (goes up to 3) and report your
|
||||
findings on the [Github issue tracker][].
|
||||
|
||||
# Bugs, Feedback and Support
|
||||
|
||||
You can report bugs and wishes at the [Github issue tracker][].
|
||||
|
||||
Pull requests would be awesome! :)
|
||||
|
||||
## Donate
|
||||
|
||||
[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=blueyed&url=https://github.com/blueyed/awesome-cyclefocus&title=awesome-cyclefocus&language=en&tags=github&category=software)
|
||||
|
||||
Bitcoin: 16EVhEpXxfNiT93qT2uxo4DsZSHzNdysSp
|
||||
|
||||
[awesome window manager]: http://awesome.naquadah.org/
|
||||
[Github issue tracker]: https://github.com/blueyed/awesome-cyclefocus/issues
|
Before Width: | Height: | Size: 261 KiB |
|
@ -1,800 +0,0 @@
|
|||
-- awesome_mode: api-level=4:screen=on
|
||||
-- If LuaRocks is installed, make sure that packages installed through it are
|
||||
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
|
||||
pcall(require, "luarocks.loader")
|
||||
|
||||
-- Standard awesome library
|
||||
local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
require("awful.autofocus")
|
||||
-- Widget and layout library
|
||||
local wibox = require("wibox")
|
||||
-- Theme handling library
|
||||
local beautiful = require("beautiful")
|
||||
-- Notification library
|
||||
local naughty = require("naughty")
|
||||
-- Declarative object management
|
||||
local ruled = require("ruled")
|
||||
local menubar = require("menubar")
|
||||
local hotkeys_popup = require("awful.hotkeys_popup")
|
||||
-- Enable hotkeys help widget for VIM and other apps
|
||||
-- when client with a matching name is opened:
|
||||
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
|
||||
-- another config (This code will only ever execute for the fallback config)
|
||||
naughty.connect_signal("request::display_error", function(message, startup)
|
||||
naughty.notification {
|
||||
urgency = "critical",
|
||||
title = "Oops, an error happened"..(startup and " during startup!" or "!"),
|
||||
message = message
|
||||
}
|
||||
end)
|
||||
-- }}}
|
||||
|
||||
-- {{{ Variable definitions
|
||||
-- Themes define colours, icons, font and wallpapers.
|
||||
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"
|
||||
editor = os.getenv("EDITOR") or "vim"
|
||||
editor_cmd = terminal .. " -e " .. editor
|
||||
tag_names = { "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX" }
|
||||
|
||||
-- Default modkey.
|
||||
-- Usually, Mod4 is the key with a logo between Control and Alt.
|
||||
-- If you do not like this or do not have such a key,
|
||||
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
|
||||
-- However, you can use another modifier like Mod1, but it may interact with others.
|
||||
modkey = "Mod4"
|
||||
|
||||
-- functions {{{
|
||||
function viewwithclients(dir)
|
||||
local s = awful.screen.focused()
|
||||
local tags = s.tags
|
||||
local ind = s.selected_tag.index + dir
|
||||
|
||||
while ind ~= s.selected_tag.index do
|
||||
if (ind > #tags) then ind = 1 end
|
||||
if (ind < 1) then ind = #tags end
|
||||
local t = tags[ind]
|
||||
if #t:clients() > 0 then
|
||||
t:view_only()
|
||||
return
|
||||
end
|
||||
ind = ind + dir
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
-- where can be 'left' 'right' 'top' 'bottom' 'center' 'topleft' 'topright' 'bottomleft' 'bottomright' nil
|
||||
function snap_edge(c, where, geom)
|
||||
local sg = screen[c.screen].geometry --screen geometry
|
||||
local sw = screen[c.screen].workarea --screen workarea
|
||||
local workarea = { x_min = sw.x, x_max=sw.x + sw.width, y_min = sw.y, y_max = sw.y + sw.height }
|
||||
local cg = geom or c:geometry()
|
||||
local border = c.border_width
|
||||
local cs = c:struts()
|
||||
cs['left'] = 0 cs['top'] = 0 cs['bottom'] = 0 cs['right'] = 0
|
||||
if where ~= nil then
|
||||
c:struts(cs) -- cancel struts when snapping to edge
|
||||
end
|
||||
if where == 'right' then
|
||||
cg.x = workarea.x_max - cg.width
|
||||
elseif where == 'left' then
|
||||
cg.x = workarea.x_min
|
||||
elseif where == 'bottom' then
|
||||
cg.y = workarea.y_max - cg.height
|
||||
elseif where == 'top' then
|
||||
cg.y = workarea.y_min
|
||||
elseif where == 'center' then
|
||||
awful.placement.centered(c)
|
||||
return
|
||||
elseif where == nil then
|
||||
c:struts(cs)
|
||||
c:geometry(cg)
|
||||
return
|
||||
end
|
||||
-- c.floating = true
|
||||
-- if c.maximized then c.maximized = false end
|
||||
c:geometry(cg)
|
||||
awful.placement.no_offscreen(c)
|
||||
return
|
||||
end
|
||||
-- }}}
|
||||
-- }}}
|
||||
|
||||
--[[
|
||||
-- {{{ Menu
|
||||
Create a launcher widget and a main menu
|
||||
myawesomemenu = {
|
||||
{ "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
|
||||
{ "manual", terminal .. " -e man awesome" },
|
||||
{ "edit config", editor_cmd .. " " .. awesome.conffile },
|
||||
{ "restart", awesome.restart },
|
||||
{ "quit", function() awesome.quit() end },
|
||||
}
|
||||
|
||||
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
|
||||
{ "open terminal", terminal }
|
||||
}
|
||||
})
|
||||
|
||||
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
||||
menu = mymainmenu })
|
||||
|
||||
Menubar configuration
|
||||
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
|
||||
-- }}}
|
||||
--]]
|
||||
|
||||
-- {{{ Tag layout
|
||||
-- Table of layouts to cover with awful.layout.inc, order matters.
|
||||
tag.connect_signal("request::default_layouts", function()
|
||||
awful.layout.append_default_layouts({
|
||||
awful.layout.suit.floating,
|
||||
awful.layout.suit.tile,
|
||||
-- awful.layout.suit.tile.left,
|
||||
-- awful.layout.suit.tile.bottom,
|
||||
-- awful.layout.suit.tile.top,
|
||||
awful.layout.suit.fair,
|
||||
awful.layout.suit.fair.horizontal,
|
||||
-- awful.layout.suit.spiral,
|
||||
-- awful.layout.suit.spiral.dwindle,
|
||||
-- awful.layout.suit.max,
|
||||
-- awful.layout.suit.max.fullscreen,
|
||||
awful.layout.suit.magnifier,
|
||||
awful.layout.suit.corner.nw,
|
||||
})
|
||||
end)
|
||||
-- }}}
|
||||
|
||||
--[[
|
||||
-- {{{ Wallpaper
|
||||
screen.connect_signal("request::wallpaper", function(s)
|
||||
awful.wallpaper {
|
||||
screen = s,
|
||||
widget = {
|
||||
{
|
||||
image = beautiful.wallpaper,
|
||||
upscale = true,
|
||||
downscale = true,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
valign = "center",
|
||||
halign = "center",
|
||||
tiled = false,
|
||||
widget = wibox.container.tile,
|
||||
}
|
||||
}
|
||||
end)
|
||||
-- }}}
|
||||
--]]
|
||||
|
||||
-- {{{ Wibar
|
||||
|
||||
-- Keyboard map indicator and switcher
|
||||
mykeyboardlayout = awful.widget.keyboardlayout()
|
||||
|
||||
-- Create a textclock widget
|
||||
mytextclock = wibox.widget.textclock(" %Y-%m-%d @ %H:%M ")
|
||||
|
||||
-- Small separator widget
|
||||
smallseparator = wibox.widget {
|
||||
{
|
||||
color = "#67526a",
|
||||
forced_height = 8,
|
||||
forced_width = 8,
|
||||
shape = gears.shape.hexagon,
|
||||
widget = wibox.widget.separator,
|
||||
},
|
||||
widget = wibox.container.place,
|
||||
}
|
||||
|
||||
screen.connect_signal("request::desktop_decoration", function(s)
|
||||
-- Each screen has its own tag table.
|
||||
awful.tag(
|
||||
tag_names, s,
|
||||
{
|
||||
awful.layout.suit.tile,
|
||||
awful.layout.suit.floating,
|
||||
awful.layout.suit.floating,
|
||||
awful.layout.suit.floating,
|
||||
awful.layout.suit.floating,
|
||||
awful.layout.suit.floating,
|
||||
awful.layout.suit.floating,
|
||||
awful.layout.suit.floating,
|
||||
awful.layout.suit.floating,
|
||||
})
|
||||
|
||||
-- Create a promptbox for each screen
|
||||
-- s.mypromptbox = awful.widget.prompt()
|
||||
|
||||
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
|
||||
-- We need one layoutbox per screen.
|
||||
s.mylayoutbox = awful.widget.layoutbox {
|
||||
screen = s,
|
||||
forced_width = 16,
|
||||
forced_height = 16,
|
||||
buttons = {
|
||||
awful.button({ }, 1, function () awful.layout.inc( 1) end),
|
||||
awful.button({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 5, function () awful.layout.inc( 1) end),
|
||||
}
|
||||
}
|
||||
|
||||
-- Create a taglist widget
|
||||
s.mytaglist = awful.widget.taglist {
|
||||
screen = s,
|
||||
filter = awful.widget.taglist.filter.all,
|
||||
buttons = {
|
||||
awful.button({ }, 1, function(t) t:view_only() end),
|
||||
awful.button({ modkey }, 1, function(t)
|
||||
if client.focus then
|
||||
client.focus:move_to_tag(t)
|
||||
end
|
||||
end),
|
||||
awful.button({ }, 3, awful.tag.viewtoggle),
|
||||
awful.button({ modkey }, 3, function(t)
|
||||
if client.focus then
|
||||
client.focus:toggle_tag(t)
|
||||
end
|
||||
end),
|
||||
awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
|
||||
awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
|
||||
}
|
||||
}
|
||||
|
||||
-- Create a tasklist widget
|
||||
s.mytasklist = awful.widget.tasklist {
|
||||
screen = s,
|
||||
filter = awful.widget.tasklist.filter.currenttags,
|
||||
style = {
|
||||
shape = gears.shape.hexagon,
|
||||
},
|
||||
buttons = {
|
||||
awful.button({ }, 1, function (c)
|
||||
c:activate { context = "tasklist", action = "toggle_minimization" }
|
||||
end),
|
||||
awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end),
|
||||
awful.button({ }, 4, function() awful.client.focus.byidx(-1) end),
|
||||
awful.button({ }, 5, function() awful.client.focus.byidx( 1) end),
|
||||
},
|
||||
layout = {
|
||||
spacing = 20,
|
||||
spacing_widget = smallseparator,
|
||||
layout = wibox.layout.flex.horizontal,
|
||||
},
|
||||
widget_template = {
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
id = "icon_role",
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
right = 8,
|
||||
top = 1,
|
||||
bottom = 1,
|
||||
widget = wibox.container.margin,
|
||||
},
|
||||
{
|
||||
id = "text_role",
|
||||
widget = wibox.widget.textbox,
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
left = 12,
|
||||
right = 10,
|
||||
widget = wibox.container.margin,
|
||||
},
|
||||
id = "background_role",
|
||||
widget = wibox.container.background,
|
||||
}
|
||||
}
|
||||
|
||||
-- Create the wibox
|
||||
s.mywibox = awful.wibar {
|
||||
position = "top",
|
||||
screen = s,
|
||||
widget = {
|
||||
layout = wibox.layout.align.horizontal,
|
||||
{ -- Left widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
-- mylauncher,
|
||||
s.mytaglist,
|
||||
-- s.mypromptbox,
|
||||
wibox.container.margin(smallseparator, 5, 5),
|
||||
},
|
||||
wibox.container.margin(s.mytasklist, 0, 0, 1, 1),
|
||||
{ -- Right widgets
|
||||
wibox.container.margin(smallseparator, 5, 5),
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
mykeyboardlayout,
|
||||
wibox.widget.systray(),
|
||||
mytextclock,
|
||||
wibox.container.margin(s.mylayoutbox, 2, 2, 2, 2),
|
||||
},
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
-- }}}
|
||||
|
||||
--[[
|
||||
-- {{{ Mouse bindings
|
||||
awful.mouse.append_global_mousebindings({
|
||||
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
||||
awful.button({ }, 4, awful.tag.viewprev),
|
||||
awful.button({ }, 5, awful.tag.viewnext),
|
||||
})
|
||||
-- }}}
|
||||
--]]
|
||||
|
||||
-- {{{ Key bindings
|
||||
|
||||
-- General Awesome keys
|
||||
awful.keyboard.append_global_keybindings({
|
||||
awful.key({ modkey, }, "/", hotkeys_popup.show_help,
|
||||
{ description="show help", group="awesome" }),
|
||||
awful.key({ modkey, }, "w", function () awful.spawn("j4.sh") end,
|
||||
{ description = "show menu", group = "awesome" }),
|
||||
awful.key({ modkey, "Shift", "Control" }, "r", awesome.restart,
|
||||
{ description = "reload awesome", group = "awesome" }),
|
||||
awful.key({ modkey, "Shift", "Control" }, "q", awesome.quit,
|
||||
{ description = "quit awesome", group = "awesome" }),
|
||||
-- awful.key({ modkey }, "x",
|
||||
-- function ()
|
||||
-- awful.prompt.run {
|
||||
-- prompt = "Run Lua code: ",
|
||||
-- textbox = awful.screen.focused().mypromptbox.widget,
|
||||
-- exe_callback = awful.util.eval,
|
||||
-- history_path = awful.util.get_cache_dir() .. "/history_eval"
|
||||
-- }
|
||||
-- end,
|
||||
-- { 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,
|
||||
{ description = "run prompt", group = "launcher" }),
|
||||
|
||||
-- user-defined keybinds ig
|
||||
awful.key({ modkey }, "s", function () awful.spawn("screenshot -r -f") end,
|
||||
{ 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,
|
||||
{ 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,
|
||||
{ description = "file manager", group = "launcher" }),
|
||||
|
||||
-- dummy for discord
|
||||
awful.key({ modkey }, "x", function () end,
|
||||
{ description = "dummy", group = "awesome" }),
|
||||
})
|
||||
|
||||
-- Focus related keybindings
|
||||
awful.keyboard.append_global_keybindings({
|
||||
cyclefocus.key({ "Mod1", }, "Tab", {
|
||||
cycle_filters = { cyclefocus.filters.same_screen, cyclefocus.filters.common_tag },
|
||||
}),
|
||||
--[[
|
||||
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
|
||||
{description = "focus the next screen", group = "screen"}),
|
||||
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,
|
||||
{description = "focus the previous screen", group = "screen"}),
|
||||
--]]
|
||||
awful.key({ modkey, "Shift" }, "n",
|
||||
function ()
|
||||
local c = awful.client.restore()
|
||||
-- Focus restored client
|
||||
if c then
|
||||
c:activate { raise = true, context = "key.unminimize" }
|
||||
end
|
||||
end,
|
||||
{description = "restore minimized", group = "client"}),
|
||||
})
|
||||
|
||||
-- Tags related keybindings
|
||||
awful.keyboard.append_global_keybindings({
|
||||
awful.key({ modkey, "Shift" }, "Tab", function() viewwithclients(-1) end,
|
||||
{ description = "view previous occupied", group = "tag" }),
|
||||
awful.key({ modkey, }, "Tab", function() viewwithclients(1) end,
|
||||
{ description = "view next occupied", group = "tag" }),
|
||||
awful.key({ modkey, "Shift" }, "h", awful.tag.viewprev,
|
||||
{ description = "view previous", group = "tag" }),
|
||||
awful.key({ modkey, "Shift" }, "l", awful.tag.viewnext,
|
||||
{ description = "view next", group = "tag" }),
|
||||
awful.key({ modkey, }, "`", awful.tag.history.restore,
|
||||
{ description = "go back", group = "tag" }),
|
||||
})
|
||||
|
||||
-- Layout related keybindings
|
||||
awful.keyboard.append_global_keybindings({
|
||||
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
|
||||
{ description = "swap with next client by index", group = "client" }),
|
||||
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
|
||||
{ description = "swap with previous client by index", group = "client" }),
|
||||
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
|
||||
{ description = "jump to urgent client", group = "client" }),
|
||||
awful.key({ modkey, "Control" }, "l", function () awful.tag.incmwfact( 0.02) end,
|
||||
{ description = "increase master width factor", group = "layout" }),
|
||||
awful.key({ modkey, "Control" }, "h", function () awful.tag.incmwfact(-0.02) end,
|
||||
{ description = "decrease master width factor", group = "layout" }),
|
||||
awful.key({ modkey, "Control" }, "semicolon", function() awful.screen.focused().selected_tag.master_width_factor = 0.5 end,
|
||||
{ description = "reset master width factor", group = "layout" }),
|
||||
-- awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
|
||||
-- { description = "increase the number of master clients", group = "layout" }),
|
||||
-- awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
|
||||
-- { description = "decrease the number of master clients", group = "layout" }),
|
||||
awful.key({ modkey, "Control", "Shift" }, "h", function () awful.tag.incncol( 1, nil, true) end,
|
||||
{ description = "increase the number of columns", group = "layout" }),
|
||||
awful.key({ modkey, "Control", "Shift" }, "l", function () awful.tag.incncol(-1, nil, true) end,
|
||||
{ description = "decrease the number of columns", group = "layout" }),
|
||||
awful.key({ modkey, "Control" }, "space", function () awful.layout.inc( 1) end,
|
||||
{ description = "next layout", group = "layout" }),
|
||||
|
||||
awful.key({ modkey, "Shift" }, "space", function () awful.layout.set(awful.layout.suit.floating) end,
|
||||
{ description = "layout: floating", group = "layout" }),
|
||||
awful.key({ modkey, "Shift" }, "m", function() awful.layout.set(awful.layout.suit.magnifier) end,
|
||||
{ description = "layout: magnifier", group = "layout" }),
|
||||
awful.key({ modkey, "Shift" }, "semicolon", function() awful.layout.set(awful.layout.suit.tile) end,
|
||||
{ description = "layout: tile vertically", group = "layout" }),
|
||||
awful.key({ modkey, "Shift" }, "comma", function() awful.layout.set(awful.layout.suit.fair) end,
|
||||
{ description = "layout: fair vertical", group = "layout" }),
|
||||
awful.key({ modkey, "Shift" }, "period", function() awful.layout.set(awful.layout.suit.fair.horizontal) end,
|
||||
{ description = "layout: fair horizontal", group = "layout" }),
|
||||
})
|
||||
|
||||
|
||||
awful.keyboard.append_global_keybindings({
|
||||
awful.key {
|
||||
modifiers = { modkey },
|
||||
keygroup = "numrow",
|
||||
description = "only view tag",
|
||||
group = "tag",
|
||||
on_press = function (index)
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[index]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end,
|
||||
},
|
||||
awful.key {
|
||||
modifiers = { modkey, "Control" },
|
||||
keygroup = "numrow",
|
||||
description = "toggle tag",
|
||||
group = "tag",
|
||||
on_press = function (index)
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[index]
|
||||
if tag then
|
||||
awful.tag.viewtoggle(tag)
|
||||
end
|
||||
end,
|
||||
},
|
||||
awful.key {
|
||||
modifiers = { modkey, "Shift" },
|
||||
keygroup = "numrow",
|
||||
description = "move focused client to tag",
|
||||
group = "tag",
|
||||
on_press = function (index)
|
||||
if client.focus then
|
||||
local tag = client.focus.screen.tags[index]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
awful.key {
|
||||
modifiers = { modkey, "Control", "Shift" },
|
||||
keygroup = "numrow",
|
||||
description = "toggle focused client on tag",
|
||||
group = "tag",
|
||||
on_press = function (index)
|
||||
if client.focus then
|
||||
local tag = client.focus.screen.tags[index]
|
||||
if tag then
|
||||
client.focus:toggle_tag(tag)
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
awful.key {
|
||||
modifiers = { modkey },
|
||||
keygroup = "numpad",
|
||||
description = "select layout directly",
|
||||
group = "layout",
|
||||
on_press = function (index)
|
||||
local t = awful.screen.focused().selected_tag
|
||||
if t then
|
||||
t.layout = t.layouts[index] or t.layout
|
||||
end
|
||||
end,
|
||||
}
|
||||
})
|
||||
|
||||
client.connect_signal("request::default_mousebindings", function()
|
||||
awful.mouse.append_client_mousebindings({
|
||||
awful.button({ }, 1, function (c)
|
||||
c:activate { context = "mouse_click" }
|
||||
end),
|
||||
awful.button({ modkey }, 1, function (c)
|
||||
c:activate { context = "mouse_click", action = "mouse_move" }
|
||||
end),
|
||||
awful.button({ modkey }, 3, function (c)
|
||||
c:activate { context = "mouse_click", action = "mouse_resize"}
|
||||
end),
|
||||
})
|
||||
end)
|
||||
|
||||
client.connect_signal("request::default_keybindings", function()
|
||||
awful.keyboard.append_client_keybindings({
|
||||
awful.key({ modkey, }, "f",
|
||||
function (c)
|
||||
c.fullscreen = not c.fullscreen
|
||||
c:raise()
|
||||
end,
|
||||
{ description = "toggle fullscreen", group = "client" }),
|
||||
awful.key({ modkey, }, "q", function (c) c:kill() end,
|
||||
{ description = "close", group = "client" }),
|
||||
awful.key({ modkey, "Mod1", }, "space", awful.client.floating.toggle ,
|
||||
{ description = "center", group = "client" }),
|
||||
awful.key({ modkey, }, "space", function(c) snap_edge(c, 'center') end,
|
||||
{ description = "toggle floating", group = "client" }),
|
||||
awful.key({ modkey, }, "h", function(c) snap_edge(c, 'left') end,
|
||||
{ description = "snap to left", group = "client" }),
|
||||
awful.key({ modkey, }, "j", function(c) snap_edge(c, 'bottom') end,
|
||||
{ description = "snap to bottom", group = "client" }),
|
||||
awful.key({ modkey, }, "k", function(c) snap_edge(c, 'top') end,
|
||||
{ description = "snap to top", group = "client" }),
|
||||
awful.key({ modkey, }, "l", function(c) snap_edge(c, 'right') end,
|
||||
{ description = "snap to right", group = "client" }),
|
||||
awful.key({ modkey, "Shift" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
|
||||
{ description = "move to master", group = "client" }),
|
||||
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
|
||||
{ description = "move to screen", group = "client" }),
|
||||
awful.key({ modkey, }, "t", function (c) c.above = not c.above end,
|
||||
{ description = "toggle keep on top", group = "client" }),
|
||||
awful.key({ modkey, "Shift" }, "t", function (c) c.ontop = not c.ontop end,
|
||||
{ description = "toggle on top of everything", group = "client" }),
|
||||
awful.key({ modkey, "Control" }, "t", function (c) c.sticky = not c.sticky end,
|
||||
{ description = "toggle sticky", group = "client" }),
|
||||
awful.key({ modkey, }, "n",
|
||||
function (c)
|
||||
-- The client currently has the input focus, so it cannot be
|
||||
-- minimized, since minimized clients can't have the focus.
|
||||
c.minimized = true
|
||||
end ,
|
||||
{ description = "minimize", group = "client" }),
|
||||
awful.key({ modkey, }, "m",
|
||||
function (c)
|
||||
c.maximized = not c.maximized
|
||||
c:raise()
|
||||
end ,
|
||||
{ description = "(un)maximize", group = "client" }),
|
||||
awful.key({ modkey, }, "semicolon",
|
||||
function (c)
|
||||
c.maximized_vertical = not c.maximized_vertical
|
||||
c:raise()
|
||||
end ,
|
||||
{ description = "(un)maximize vertically", group = "client" }),
|
||||
awful.key({ modkey, }, "period",
|
||||
function (c)
|
||||
c.maximized_horizontal = not c.maximized_horizontal
|
||||
c:raise()
|
||||
end ,
|
||||
{ description = "(un)maximize horizontally", group = "client" }),
|
||||
})
|
||||
end)
|
||||
|
||||
-- }}}
|
||||
|
||||
-- {{{ Rules
|
||||
-- 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",
|
||||
rule = { },
|
||||
properties = {
|
||||
focus = awful.client.focus.filter,
|
||||
raise = true,
|
||||
screen = awful.screen.preferred,
|
||||
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
||||
}
|
||||
}
|
||||
|
||||
-- {{{ floating clients
|
||||
ruled.client.append_rule {
|
||||
id = "floating",
|
||||
rule_any = {
|
||||
instance = { "Devtools", "xmascot", },
|
||||
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.
|
||||
name = {
|
||||
"Event Tester", -- xev.
|
||||
"kbdisplay",
|
||||
},
|
||||
role = {
|
||||
"AlarmWindow", -- Thunderbird's calendar.
|
||||
"ConfigManager", -- Thunderbird's about:config.
|
||||
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
||||
"GtkFileChooserDialog",
|
||||
}
|
||||
},
|
||||
properties = { floating = true }
|
||||
}
|
||||
-- }}}
|
||||
|
||||
-- {{{ maximized/fullscreen clients
|
||||
ruled.client.append_rule {
|
||||
id = "maximized",
|
||||
rule_any = {
|
||||
instance = { "chromium" },
|
||||
class = { "discord", "Steam" },
|
||||
name = { "Pale Moon" },
|
||||
},
|
||||
properties = { maximized = true }
|
||||
}
|
||||
ruled.client.append_rule {
|
||||
id = "fullscreen",
|
||||
rule_any = {
|
||||
class = { "SCREENSHOT_FEH" },
|
||||
},
|
||||
properties = { fullscreen = true }
|
||||
}
|
||||
-- }}}
|
||||
|
||||
-- {{{ ontop / sticky
|
||||
ruled.client.append_rule {
|
||||
id = "ontop",
|
||||
rule_any = {
|
||||
class = { "Dragon-drop" },
|
||||
},
|
||||
properties = { ontop = true }
|
||||
}
|
||||
ruled.client.append_rule {
|
||||
id = "noontop",
|
||||
rule_any = {
|
||||
class = { "QuiteRss" },
|
||||
},
|
||||
properties = { ontop = false, above = false }
|
||||
}
|
||||
-- }}}
|
||||
|
||||
-- {{{ auto tags
|
||||
ruled.client.append_rule {
|
||||
id = "2",
|
||||
rule_any = {
|
||||
instance = { "chromium" },
|
||||
name = { "Pale Moon", "Mozilla Firefox" },
|
||||
},
|
||||
properties = { tag = tag_names[2] },
|
||||
}
|
||||
|
||||
ruled.client.append_rule {
|
||||
id = "9",
|
||||
rule_any = {
|
||||
class = { "discord", "Steam" },
|
||||
},
|
||||
properties = {tag = tag_names[9] },
|
||||
}
|
||||
-- }}}
|
||||
|
||||
-- {{{ special cases
|
||||
ruled.client.append_rule {
|
||||
id = "noborder",
|
||||
rule_any = {
|
||||
class = { "SCREENSHOT_FEH" },
|
||||
name = { "xkoko" },
|
||||
},
|
||||
properties = { border_width = 0 }
|
||||
}
|
||||
-- }}}
|
||||
|
||||
-- {{{ centered
|
||||
ruled.client.append_rule {
|
||||
id = "centered",
|
||||
rule_any = {
|
||||
class = { "Dragon-drop" },
|
||||
},
|
||||
callback = function(c) awful.placement.centered(c, nil) end
|
||||
}
|
||||
-- }}}
|
||||
|
||||
--[[
|
||||
-- global titlebars {{{
|
||||
ruled.client.append_rule {
|
||||
id = "titlebars",
|
||||
rule_any = { type = { "normal", "dialog" } },
|
||||
properties = { titlebars_enabled = false }
|
||||
}
|
||||
}}}
|
||||
--]]
|
||||
end)
|
||||
-- }}}
|
||||
|
||||
--[[
|
||||
-- {{{ Titlebars
|
||||
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
||||
client.connect_signal("request::titlebars", function(c)
|
||||
-- buttons for the titlebar
|
||||
local buttons = {
|
||||
awful.button({ }, 1, function()
|
||||
c:activate { context = "titlebar", action = "mouse_move" }
|
||||
end),
|
||||
awful.button({ }, 3, function()
|
||||
c:activate { context = "titlebar", action = "mouse_resize"}
|
||||
end),
|
||||
}
|
||||
|
||||
awful.titlebar(c).widget = {
|
||||
{ -- Left
|
||||
awful.titlebar.widget.iconwidget(c),
|
||||
buttons = buttons,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
{ -- Middle
|
||||
{ -- Title
|
||||
halign = "center",
|
||||
widget = awful.titlebar.widget.titlewidget(c)
|
||||
},
|
||||
buttons = buttons,
|
||||
layout = wibox.layout.flex.horizontal
|
||||
},
|
||||
{ -- Right
|
||||
awful.titlebar.widget.floatingbutton (c),
|
||||
awful.titlebar.widget.maximizedbutton(c),
|
||||
awful.titlebar.widget.stickybutton (c),
|
||||
awful.titlebar.widget.ontopbutton (c),
|
||||
awful.titlebar.widget.closebutton (c),
|
||||
layout = wibox.layout.fixed.horizontal()
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
end)
|
||||
-- }}}
|
||||
--]]
|
||||
|
||||
-- {{{ Notifications
|
||||
|
||||
ruled.notification.connect_signal('request::rules', function()
|
||||
-- All notifications will match this rule.
|
||||
ruled.notification.append_rule {
|
||||
rule = { },
|
||||
properties = {
|
||||
screen = awful.screen.preferred,
|
||||
implicit_timeout = 5,
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
naughty.connect_signal("request::display", function(n)
|
||||
naughty.layout.box { notification = n }
|
||||
end)
|
||||
|
||||
-- }}}
|
||||
|
||||
--[[
|
||||
-- Enable sloppy focus, so that focus follows mouse.
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
c:activate { context = "mouse_enter", raise = false }
|
||||
end)
|
||||
--]]
|
Before Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 171 B |
|
@ -1,140 +0,0 @@
|
|||
-- luma
|
||||
|
||||
local themes_path = "/home/yosh/.config/awesome/themes/"
|
||||
local rnotification = require("ruled.notification")
|
||||
local dpi = require("beautiful.xresources").apply_dpi
|
||||
|
||||
-- {{{ Main
|
||||
local theme = {}
|
||||
-- }}}
|
||||
|
||||
-- {{{ Styles
|
||||
theme.font = "Terminus 9"
|
||||
|
||||
-- {{{ Colors
|
||||
theme.fg_normal = "#c7acc5"
|
||||
theme.fg_focus = "#f9f5e9"
|
||||
theme.fg_urgent = "#d93352"
|
||||
theme.bg_normal = "#2d0827"
|
||||
theme.bg_focus = "#402c4e"
|
||||
theme.bg_urgent = "#2d0827"
|
||||
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_color_normal = "#2d0827"
|
||||
theme.border_color_active = "#67526a"
|
||||
theme.border_color_marked = "#d93352"
|
||||
-- }}}
|
||||
|
||||
-- {{{ Wibar
|
||||
theme.wibar_height = dpi(20)
|
||||
theme.wibar_bg = theme.bg_normal
|
||||
-- }}}
|
||||
|
||||
-- {{{ Titlebars
|
||||
theme.titlebar_bg_focus = "#3F3F3F"
|
||||
theme.titlebar_bg_normal = "#3F3F3F"
|
||||
-- }}}
|
||||
|
||||
-- There are other variable sets
|
||||
-- overriding the default one when
|
||||
-- defined, the sets are:
|
||||
-- [taglist|tasklist]_[bg|fg]_[focus|urgent|occupied|empty|volatile]
|
||||
-- titlebar_[normal|focus]
|
||||
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
|
||||
-- Example:
|
||||
--theme.taglist_bg_focus = "#CC9393"
|
||||
-- }}}
|
||||
|
||||
-- {{{ Widgets
|
||||
-- You can add as many variables as
|
||||
-- you wish and access them by using
|
||||
-- beautiful.variable in your rc.lua
|
||||
--theme.fg_widget = "#AECF96"
|
||||
--theme.fg_center_widget = "#88A175"
|
||||
--theme.fg_end_widget = "#FF5656"
|
||||
--theme.bg_widget = "#494B4F"
|
||||
--theme.border_widget = "#3F3F3F"
|
||||
-- }}}
|
||||
|
||||
-- {{{ Menu
|
||||
-- Variables set for theming the menu:
|
||||
-- menu_[bg|fg]_[normal|focus]
|
||||
-- menu_[border_color|border_width]
|
||||
theme.menu_height = dpi(15)
|
||||
theme.menu_width = dpi(100)
|
||||
-- }}}
|
||||
|
||||
-- {{{ Icons
|
||||
-- {{{ Taglist
|
||||
theme.taglist_squares_sel = themes_path .. "luma/taglist/squarefz.png"
|
||||
theme.taglist_squares_unsel = themes_path .. "luma/taglist/squarez.png"
|
||||
--theme.taglist_squares_resize = "false"
|
||||
-- }}}
|
||||
|
||||
-- {{{ Misc
|
||||
theme.awesome_icon = themes_path .. "luma/awesome-icon.png"
|
||||
theme.menu_submenu_icon = themes_path .. "default/submenu.png"
|
||||
-- }}}
|
||||
|
||||
-- {{{ Layout
|
||||
theme.layout_tile = themes_path .. "luma/layouts/tile.png"
|
||||
theme.layout_tileleft = themes_path .. "luma/layouts/tileleft.png"
|
||||
theme.layout_tilebottom = themes_path .. "luma/layouts/tilebottom.png"
|
||||
theme.layout_tiletop = themes_path .. "luma/layouts/tiletop.png"
|
||||
theme.layout_fairv = themes_path .. "luma/layouts/fairv.png"
|
||||
theme.layout_fairh = themes_path .. "luma/layouts/fairh.png"
|
||||
theme.layout_spiral = themes_path .. "luma/layouts/spiral.png"
|
||||
theme.layout_dwindle = themes_path .. "luma/layouts/dwindle.png"
|
||||
theme.layout_max = themes_path .. "luma/layouts/max.png"
|
||||
theme.layout_fullscreen = themes_path .. "luma/layouts/fullscreen.png"
|
||||
theme.layout_magnifier = themes_path .. "luma/layouts/magnifier.png"
|
||||
theme.layout_floating = themes_path .. "luma/layouts/floating.png"
|
||||
theme.layout_cornernw = themes_path .. "luma/layouts/cornernw.png"
|
||||
theme.layout_cornerne = themes_path .. "luma/layouts/cornerne.png"
|
||||
theme.layout_cornersw = themes_path .. "luma/layouts/cornersw.png"
|
||||
theme.layout_cornerse = themes_path .. "luma/layouts/cornerse.png"
|
||||
-- }}}
|
||||
|
||||
-- {{{ Titlebar
|
||||
theme.titlebar_close_button_focus = themes_path .. "luma/titlebar/close_focus.png"
|
||||
theme.titlebar_close_button_normal = themes_path .. "luma/titlebar/close_normal.png"
|
||||
|
||||
theme.titlebar_minimize_button_normal = themes_path .. "default/titlebar/minimize_normal.png"
|
||||
theme.titlebar_minimize_button_focus = themes_path .. "default/titlebar/minimize_focus.png"
|
||||
|
||||
theme.titlebar_ontop_button_focus_active = themes_path .. "luma/titlebar/ontop_focus_active.png"
|
||||
theme.titlebar_ontop_button_normal_active = themes_path .. "luma/titlebar/ontop_normal_active.png"
|
||||
theme.titlebar_ontop_button_focus_inactive = themes_path .. "luma/titlebar/ontop_focus_inactive.png"
|
||||
theme.titlebar_ontop_button_normal_inactive = themes_path .. "luma/titlebar/ontop_normal_inactive.png"
|
||||
|
||||
theme.titlebar_sticky_button_focus_active = themes_path .. "luma/titlebar/sticky_focus_active.png"
|
||||
theme.titlebar_sticky_button_normal_active = themes_path .. "luma/titlebar/sticky_normal_active.png"
|
||||
theme.titlebar_sticky_button_focus_inactive = themes_path .. "luma/titlebar/sticky_focus_inactive.png"
|
||||
theme.titlebar_sticky_button_normal_inactive = themes_path .. "luma/titlebar/sticky_normal_inactive.png"
|
||||
|
||||
theme.titlebar_floating_button_focus_active = themes_path .. "luma/titlebar/floating_focus_active.png"
|
||||
theme.titlebar_floating_button_normal_active = themes_path .. "luma/titlebar/floating_normal_active.png"
|
||||
theme.titlebar_floating_button_focus_inactive = themes_path .. "luma/titlebar/floating_focus_inactive.png"
|
||||
theme.titlebar_floating_button_normal_inactive = themes_path .. "luma/titlebar/floating_normal_inactive.png"
|
||||
|
||||
theme.titlebar_maximized_button_focus_active = themes_path .. "luma/titlebar/maximized_focus_active.png"
|
||||
theme.titlebar_maximized_button_normal_active = themes_path .. "luma/titlebar/maximized_normal_active.png"
|
||||
theme.titlebar_maximized_button_focus_inactive = themes_path .. "luma/titlebar/maximized_focus_inactive.png"
|
||||
theme.titlebar_maximized_button_normal_inactive = themes_path .. "luma/titlebar/maximized_normal_inactive.png"
|
||||
-- }}}
|
||||
-- }}}
|
||||
|
||||
-- Set different colors for urgent notifications.
|
||||
rnotification.connect_signal('request::rules', function()
|
||||
rnotification.append_rule {
|
||||
rule = { urgency = 'critical' },
|
||||
properties = { bg = '#ff0000', fg = '#ffffff' }
|
||||
}
|
||||
end)
|
||||
|
||||
return theme
|
Before Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 90 B |
Before Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 106 B |
Before Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 103 B |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 86 B |
|
@ -1,56 +1,59 @@
|
|||
mkdir "$XDG_RUNTIME_DIR/hometemp"
|
||||
|
||||
# Get the aliases and functions
|
||||
[ -f "$XDG_CONFIG_HOME/bash/bashrc" ] && . "$XDG_CONFIG_HOME/bash/bashrc"
|
||||
. "$XDG_CONFIG_HOME/bash/bashrc"
|
||||
|
||||
# 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"
|
||||
# }}}
|
||||
|
||||
# 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 TERMINAL="footclient"
|
||||
export FLOATING_TERMINAL="foot -a floating_term"
|
||||
export XCURSOR_THEME="Eevee-cursors"
|
||||
export VISUAL="kak"
|
||||
export EDITOR="kak"
|
||||
export MAILPATH="$HOME/Mail"
|
||||
export MAIL="$HOME/Mail"
|
||||
export QT_QPA_PLATFORM="wayland-egl"
|
||||
export SDL_VIDEODRIVER="wayland"
|
||||
export MENU="fuzzel -d"
|
||||
|
||||
# }}}
|
||||
|
||||
# program options {{{
|
||||
|
||||
# misc {{{
|
||||
export JAVA_HOME="/usr/lib/jvm/openjdk17"
|
||||
export PAGER=less
|
||||
# export LESSOPEN="|lesspipe.sh %s"
|
||||
export LESS='-Ri'
|
||||
export LEDGER_FILE="$HOME/.ledger/ledger"
|
||||
# }}}
|
||||
|
||||
# fzf {{{
|
||||
export FZF_DEFAULT_COMMAND="fd -t f --strip-cwd-prefix"
|
||||
export FZF_DEFAULT_COMMAND="find -type f"
|
||||
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:8,hl:12,fg+:7,bg+:4,hl+:1,info:9,border:0,prompt:15,pointer:10,marker:2,spinner:13,header:7"
|
||||
--border -e
|
||||
'
|
||||
# }}}
|
||||
|
||||
# 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_COLORS='#0e0e0e0e0e0e0e0e'
|
||||
BLK="0B" CHR="0B" DIR="0C" EXE="02" REG="00" HARDLINK="06" SYMLINK="0e" MISSING="00" 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"
|
||||
nm='h:-!hx "$nnn"*;o:-fzopen;d:dragdrop;p:preview-tui'
|
||||
export NNN_PLUG="$nc;$nm"
|
||||
# }}}
|
||||
|
||||
# }}}
|
||||
|
|
|
@ -3,31 +3,38 @@
|
|||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
|
||||
# completion
|
||||
complete -cf doas
|
||||
|
||||
# aliases
|
||||
# man() { vim -R -c 'filetype plugin on' -c 'set ft=man' -c "Man $*"; }
|
||||
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
|
||||
# aliases
|
||||
alias view='vim -R'
|
||||
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'
|
||||
alias tearfree='xrandr --output eDP --set TearFree'
|
||||
|
||||
# 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\] "
|
||||
c=("\[\e[30m\]" "\[\e[31m\]" "\[\e[32m\]" "\[\e[33m\]" "\[\e[34m\]" "\[\e[35m\]" "\[\e[36m\]" "\[\e[37m\]" "\[\e[90m\]" "\[\e[91m\]" "\[\e[92m\]" "\[\e[93m\]" "\[\e[94m\]" "\[\e[95m\]" "\[\e[96m\]" "\[\e[97m\]")
|
||||
PS1="${c[15]}[${c[13]}\u${c[15]}@${c[10]}\h${c[15]}] ${c[8]}*${c[15]} ${c[14]}\w
|
||||
${c[9]}└─────\[\e[0m\] "
|
||||
|
||||
if [ "${NNNLVL:-0}" -ge 1 ]; then
|
||||
alias nnn="echo don\'t nest nnn!"
|
||||
PS1="${c[15]}[${c[13]}\u${c[15]}@${c[10]}\h${c[15]}] ${c[9]}nnn${c[15]} ${c[14]}\w
|
||||
${c[9]}└─────\[\e[39m\] "
|
||||
export sel="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection"
|
||||
fi
|
||||
|
||||
# Ls colors
|
||||
eval "$(dircolors "$XDG_CONFIG_HOME/bash/dircolors")"
|
||||
|
||||
unset c
|
||||
|
|
|
@ -0,0 +1,233 @@
|
|||
# Configuration file for dircolors, a utility to help you set the
|
||||
# LS_COLORS environment variable used by GNU ls with the --color option.
|
||||
# Copyright (C) 1996-2023 Free Software Foundation, Inc.
|
||||
# Copying and distribution of this file, with or without modification,
|
||||
# are permitted provided the copyright notice and this notice are preserved.
|
||||
#
|
||||
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
|
||||
# slackware version of dircolors) are recognized but ignored.
|
||||
# Global config options can be specified before TERM or COLORTERM entries
|
||||
# ===================================================================
|
||||
# Terminal filters
|
||||
# ===================================================================
|
||||
# Below are TERM or COLORTERM entries, which can be glob patterns, which
|
||||
# restrict following config to systems with matching environment variables.
|
||||
COLORTERM ?*
|
||||
TERM Eterm
|
||||
TERM ansi
|
||||
TERM *color*
|
||||
TERM con[0-9]*x[0-9]*
|
||||
TERM cons25
|
||||
TERM console
|
||||
TERM cygwin
|
||||
TERM *direct*
|
||||
TERM dtterm
|
||||
TERM gnome
|
||||
TERM hurd
|
||||
TERM jfbterm
|
||||
TERM konsole
|
||||
TERM kterm
|
||||
TERM linux
|
||||
TERM linux-c
|
||||
TERM mlterm
|
||||
TERM putty
|
||||
TERM rxvt*
|
||||
TERM screen*
|
||||
TERM st
|
||||
TERM terminator
|
||||
TERM tmux*
|
||||
TERM vt100
|
||||
TERM xterm*
|
||||
# ===================================================================
|
||||
# Basic file attributes
|
||||
# ===================================================================
|
||||
# Below are the color init strings for the basic file types.
|
||||
# One can use codes for 256 or more colors supported by modern terminals.
|
||||
# The default color codes use the capabilities of an 8 color terminal
|
||||
# with some additional attributes as per the following codes:
|
||||
# Attribute codes:
|
||||
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
|
||||
# Text color codes:
|
||||
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
|
||||
# Background color codes:
|
||||
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
||||
#NORMAL 00 # no color code at all
|
||||
#FILE 00 # regular file: use no color at all
|
||||
RESET 0 # reset to "normal" color
|
||||
DIR 01;94 # directory
|
||||
LINK 01;96 # symbolic link. (If you set this to 'target' instead of a
|
||||
# numerical value, the color is as for the file pointed to.)
|
||||
MULTIHARDLINK 00 # regular file with more than one link
|
||||
FIFO 40;33 # pipe
|
||||
SOCK 01;35 # socket
|
||||
DOOR 01;35 # door
|
||||
BLK 40;33;01 # block device driver
|
||||
CHR 40;33;01 # character device driver
|
||||
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
|
||||
MISSING 00 # ... and the files they point to
|
||||
SETUID 37;41 # file that is setuid (u+s)
|
||||
SETGID 30;43 # file that is setgid (g+s)
|
||||
CAPABILITY 00 # file with capability (very expensive to lookup)
|
||||
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
|
||||
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
|
||||
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
|
||||
# This is for files with execute permission:
|
||||
EXEC 01;32
|
||||
# ===================================================================
|
||||
# File extension attributes
|
||||
# ===================================================================
|
||||
# List any file extensions like '.gz' or '.tar' that you would like ls
|
||||
# to color below. Put the suffix, a space, and the color init string.
|
||||
# (and any comments you want to add after a '#').
|
||||
# Suffixes are matched case insensitively, but if you define different
|
||||
# init strings for separate cases, those will be honored.
|
||||
#
|
||||
# If you use DOS-style suffixes, you may want to uncomment the following:
|
||||
#.cmd 01;32 # executables (bright green)
|
||||
#.exe 01;32
|
||||
#.com 01;32
|
||||
#.btm 01;32
|
||||
#.bat 01;32
|
||||
# Or if you want to color scripts even if they do not have the
|
||||
# executable bit actually set.
|
||||
#.sh 01;32
|
||||
#.csh 01;32
|
||||
# archives or compressed (bright red)
|
||||
.tar 01;31
|
||||
.tgz 01;31
|
||||
.arc 01;31
|
||||
.arj 01;31
|
||||
.taz 01;31
|
||||
.lha 01;31
|
||||
.lz4 01;31
|
||||
.lzh 01;31
|
||||
.lzma 01;31
|
||||
.tlz 01;31
|
||||
.txz 01;31
|
||||
.tzo 01;31
|
||||
.t7z 01;31
|
||||
.zip 01;31
|
||||
.z 01;31
|
||||
.dz 01;31
|
||||
.gz 01;31
|
||||
.lrz 01;31
|
||||
.lz 01;31
|
||||
.lzo 01;31
|
||||
.xz 01;31
|
||||
.zst 01;31
|
||||
.tzst 01;31
|
||||
.bz2 01;31
|
||||
.bz 01;31
|
||||
.tbz 01;31
|
||||
.tbz2 01;31
|
||||
.tz 01;31
|
||||
.deb 01;31
|
||||
.rpm 01;31
|
||||
.jar 01;31
|
||||
.war 01;31
|
||||
.ear 01;31
|
||||
.sar 01;31
|
||||
.rar 01;31
|
||||
.alz 01;31
|
||||
.ace 01;31
|
||||
.zoo 01;31
|
||||
.cpio 01;31
|
||||
.7z 01;31
|
||||
.rz 01;31
|
||||
.cab 01;31
|
||||
.wim 01;31
|
||||
.swm 01;31
|
||||
.dwm 01;31
|
||||
.esd 01;31
|
||||
# image formats
|
||||
.avif 01;35
|
||||
.jpg 01;35
|
||||
.jpeg 01;35
|
||||
.mjpg 01;35
|
||||
.mjpeg 01;35
|
||||
.gif 01;35
|
||||
.bmp 01;35
|
||||
.pbm 01;35
|
||||
.pgm 01;35
|
||||
.ppm 01;35
|
||||
.tga 01;35
|
||||
.xbm 01;35
|
||||
.xpm 01;35
|
||||
.tif 01;35
|
||||
.tiff 01;35
|
||||
.png 01;35
|
||||
.svg 01;35
|
||||
.svgz 01;35
|
||||
.mng 01;35
|
||||
.pcx 01;35
|
||||
.mov 01;35
|
||||
.mpg 01;35
|
||||
.mpeg 01;35
|
||||
.m2v 01;35
|
||||
.mkv 01;35
|
||||
.webm 01;35
|
||||
.webp 01;35
|
||||
.ogm 01;35
|
||||
.mp4 01;35
|
||||
.m4v 01;35
|
||||
.mp4v 01;35
|
||||
.vob 01;35
|
||||
.qt 01;35
|
||||
.nuv 01;35
|
||||
.wmv 01;35
|
||||
.asf 01;35
|
||||
.rm 01;35
|
||||
.rmvb 01;35
|
||||
.flc 01;35
|
||||
.avi 01;35
|
||||
.fli 01;35
|
||||
.flv 01;35
|
||||
.gl 01;35
|
||||
.dl 01;35
|
||||
.xcf 01;35
|
||||
.xwd 01;35
|
||||
.yuv 01;35
|
||||
.cgm 01;35
|
||||
.emf 01;35
|
||||
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
|
||||
.ogv 01;35
|
||||
.ogx 01;35
|
||||
# audio formats
|
||||
.aac 00;36
|
||||
.au 00;36
|
||||
.flac 00;36
|
||||
.m4a 00;36
|
||||
.mid 00;36
|
||||
.midi 00;36
|
||||
.mka 00;36
|
||||
.mp3 00;36
|
||||
.mpc 00;36
|
||||
.ogg 00;36
|
||||
.ra 00;36
|
||||
.wav 00;36
|
||||
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
|
||||
.oga 00;36
|
||||
.opus 00;36
|
||||
.spx 00;36
|
||||
.xspf 00;36
|
||||
# backup files
|
||||
*~ 00;90
|
||||
*# 00;90
|
||||
.bak 00;90
|
||||
.old 00;90
|
||||
.orig 00;90
|
||||
.part 00;90
|
||||
.rej 00;90
|
||||
.swp 00;90
|
||||
.tmp 00;90
|
||||
.dpkg-dist 00;90
|
||||
.dpkg-old 00;90
|
||||
.ucf-dist 00;90
|
||||
.ucf-new 00;90
|
||||
.ucf-old 00;90
|
||||
.rpmnew 00;90
|
||||
.rpmorig 00;90
|
||||
.rpmsave 00;90
|
||||
#
|
||||
# Subsequent TERM or COLORTERM entries, can be used to add / override
|
||||
# config specific to those matching environment variables.
|
|
@ -1,196 +0,0 @@
|
|||
## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting.
|
||||
|
||||
|
||||
[general]
|
||||
|
||||
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
|
||||
; mode = normal
|
||||
|
||||
# Accepts only non-negative values.
|
||||
; framerate = 60
|
||||
|
||||
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
|
||||
# new as of 0.6.0 autosens of low values (dynamic range)
|
||||
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
|
||||
; autosens = 1
|
||||
; overshoot = 20
|
||||
|
||||
# Manual sensitivity in %. If autosens is enabled, this will only be the initial value.
|
||||
# 200 means double height. Accepts only non-negative values.
|
||||
; sensitivity = 100
|
||||
|
||||
# The number of bars (0-200). 0 sets it to auto (fill up console).
|
||||
# Bars' width and space between bars in number of characters.
|
||||
; bars = 0
|
||||
bar_width = 1
|
||||
bar_spacing = 1
|
||||
# bar_height is only used for output in "noritake" format
|
||||
; bar_height = 32
|
||||
|
||||
# For SDL width and space between bars is in pixels, defaults are:
|
||||
; bar_width = 20
|
||||
; bar_spacing = 5
|
||||
|
||||
|
||||
# Lower and higher cutoff frequencies for lowest and highest bars
|
||||
# the bandwidth of the visualizer.
|
||||
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
|
||||
# Cava will automatically increase the higher cutoff if a too low band is specified.
|
||||
; lower_cutoff_freq = 50
|
||||
higher_cutoff_freq = 15000
|
||||
|
||||
|
||||
# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and
|
||||
# only check for input once per second. Cava will wake up once input is detected. 0 = disable.
|
||||
; sleep_timer = 0
|
||||
|
||||
|
||||
[input]
|
||||
|
||||
# Audio capturing method. Possible methods are: 'pulse', 'alsa', 'fifo', 'sndio' or 'shmem'
|
||||
# Defaults to 'pulse', 'alsa' or 'fifo', in that order, dependent on what support cava was built with.
|
||||
#
|
||||
# All input methods uses the same config variable 'source'
|
||||
# to define where it should get the audio.
|
||||
#
|
||||
# For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
|
||||
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
|
||||
#
|
||||
# For alsa 'source' will be the capture device.
|
||||
# For fifo 'source' will be the path to fifo-file.
|
||||
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
|
||||
|
||||
method = pulse
|
||||
source = 71
|
||||
|
||||
; method = alsa
|
||||
; source = hw:Loopback,1
|
||||
|
||||
; method = fifo
|
||||
; source = /tmp/mpd.fifo
|
||||
; sample_rate = 44100
|
||||
; sample_bits = 16
|
||||
|
||||
; method = shmem
|
||||
; source = /squeezelite-AA:BB:CC:DD:EE:FF
|
||||
|
||||
; method = portaudio
|
||||
; source = auto
|
||||
|
||||
[output]
|
||||
|
||||
# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake' or 'sdl'.
|
||||
# 'noncurses' uses a custom framebuffer technique and prints only changes
|
||||
# from frame to frame in the terminal. 'ncurses' is default if supported.
|
||||
#
|
||||
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
|
||||
# stream of the bar heights that can be used to send to other applications.
|
||||
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
|
||||
#
|
||||
# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display
|
||||
# in graphic mode. It only support the 3000 series graphical VFDs for now.
|
||||
#
|
||||
# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context.
|
||||
; method = ncurses
|
||||
|
||||
# Visual channels. Can be 'stereo' or 'mono'.
|
||||
# 'stereo' mirrors both channels with low frequencies in center.
|
||||
# 'mono' outputs left to right lowest to highest frequencies.
|
||||
# 'mono_option' set mono to either take input from 'left', 'right' or 'average'.
|
||||
# set 'reverse' to 1 to display frequencies the other way around.
|
||||
channels = mono
|
||||
; mono_option = average
|
||||
; reverse = 0
|
||||
|
||||
# Raw output target. A fifo will be created if target does not exist.
|
||||
; raw_target = /dev/stdout
|
||||
|
||||
# Raw data format. Can be 'binary' or 'ascii'.
|
||||
; data_format = binary
|
||||
|
||||
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
|
||||
; bit_format = 16bit
|
||||
|
||||
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
|
||||
; ascii_max_range = 1000
|
||||
|
||||
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
|
||||
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
|
||||
; bar_delimiter = 59
|
||||
; frame_delimiter = 10
|
||||
|
||||
# sdl window size and position. -1,-1 is centered.
|
||||
; sdl_width = 1000
|
||||
; sdl_height = 500
|
||||
; sdl_x = -1
|
||||
; sdl_y= -1
|
||||
|
||||
[color]
|
||||
|
||||
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
|
||||
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires
|
||||
# ncurses output method and a terminal that can change color definitions such as Gnome-terminal or rxvt.
|
||||
# if supported, ncurses mode will be forced on if user defined colors are used.
|
||||
# default is to keep current terminal color
|
||||
; background = default
|
||||
; foreground = default
|
||||
|
||||
# SDL only support hex code colors, these are the default:
|
||||
; background = '#111111'
|
||||
; foreground = '#33cccc'
|
||||
|
||||
|
||||
# Gradient mode, only hex defined colors (and thereby ncurses mode) are supported,
|
||||
# background must also be defined in hex or remain commented out. 1 = on, 0 = off.
|
||||
# You can define as many as 8 different colors. They range from bottom to top of screen
|
||||
gradient = 1
|
||||
; gradient_count = 8
|
||||
; gradient_color_1 = '#59cc33'
|
||||
; gradient_color_2 = '#80cc33'
|
||||
; gradient_color_3 = '#a6cc33'
|
||||
; gradient_color_4 = '#cccc33'
|
||||
; gradient_color_5 = '#cca633'
|
||||
; gradient_color_6 = '#cc8033'
|
||||
; gradient_color_7 = '#cc5933'
|
||||
; gradient_color_8 = '#cc3333'
|
||||
|
||||
|
||||
|
||||
[smoothing]
|
||||
|
||||
# Percentage value for integral smoothing. Takes values from 0 - 100.
|
||||
# Higher values means smoother, but less precise. 0 to disable.
|
||||
# DEPRECATED as of 0.8.0, use noise_reduction instead
|
||||
; integral = 77
|
||||
|
||||
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
|
||||
; monstercat = 1
|
||||
; waves = 1
|
||||
|
||||
# Set gravity percentage for "drop off". Higher values means bars will drop faster.
|
||||
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
|
||||
# DEPRECATED as of 0.8.0, use noise_reduction instead
|
||||
; gravity = 100
|
||||
|
||||
|
||||
# In bar height, bars that would have been lower that this will not be drawn.
|
||||
# DEPRECATED as of 0.8.0
|
||||
; ignore = 0
|
||||
|
||||
# Noise reduction, float 0 - 1. default 0.77
|
||||
# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth
|
||||
# 1 will be very slow and smooth, 0 will be fast but noisy.
|
||||
noise_reduction = 0.5
|
||||
|
||||
[eq]
|
||||
|
||||
# This one is tricky. You can have as much keys as you want.
|
||||
# Remember to uncomment more then one key! More keys = more precision.
|
||||
# Look at readme.md on github for further explanations and examples.
|
||||
# DEPRECATED as of 0.8.0 can be brought back by popular request, open issue at:
|
||||
# https://github.com/karlstav/cava
|
||||
; 1 = 1 # bass
|
||||
; 2 = 1
|
||||
; 3 = 1 # midtone
|
||||
; 4 = 1
|
||||
; 5 = 1 # treble
|
|
@ -0,0 +1,168 @@
|
|||
# options {{{
|
||||
# window visuals {{{
|
||||
# color inactiveborder "#E5E7E9" # light
|
||||
# color activeborder "#000000" # light
|
||||
color inactiveborder "#0a1a28"
|
||||
color activeborder "#627e99"
|
||||
color urgencyborder "#FFF7F7"
|
||||
color groupborder "#DDDDDD"
|
||||
color ungroupborder "#444444"
|
||||
color font "#000000"
|
||||
color selfont "#FFFFFF"
|
||||
color menubg "#FFFFFF"
|
||||
color menufg "#000000"
|
||||
# }}}
|
||||
|
||||
# autogroups and ignores {{{
|
||||
autogroup 2 'chromium,Chromium'
|
||||
autogroup 2 'Navigator,Firefox'
|
||||
autogroup 0 "LEMONBAR,LEMONBAR"
|
||||
autogroup 0 "gkrellm,Gkrellm"
|
||||
ignore "LEMONBAR"
|
||||
ignore "gkrellm"
|
||||
# }}}
|
||||
|
||||
sticky yes
|
||||
# gap 2 2 2 2
|
||||
gap 0 0 0 0
|
||||
snapdist 8
|
||||
moveamount 2
|
||||
fontname "X11 Fixed:pixelsize=13"
|
||||
command term urxvt
|
||||
# }}}
|
||||
|
||||
# bindings {{{
|
||||
|
||||
# unbind all keys
|
||||
unbind-key all
|
||||
unbind-mouse all
|
||||
|
||||
# base keys
|
||||
bind-key 4CS-q quit
|
||||
bind-key 4CS-r restart
|
||||
bind-key 4CS-d 'doas zzz'
|
||||
bind-key 4CS-BackSpace 'doas shutdown -h now'
|
||||
|
||||
# groups {{{
|
||||
bind-key 4-1 group-only-1
|
||||
bind-key 4-2 group-only-2
|
||||
bind-key 4-3 group-only-3
|
||||
bind-key 4-4 group-only-4
|
||||
bind-key 4-5 group-only-5
|
||||
bind-key 4-6 group-only-6
|
||||
bind-key 4-7 group-only-7
|
||||
bind-key 4-8 group-only-8
|
||||
bind-key 4-9 group-only-9
|
||||
bind-key 45-1 group-toggle-1
|
||||
bind-key 45-2 group-toggle-2
|
||||
bind-key 45-3 group-toggle-3
|
||||
bind-key 45-4 group-toggle-4
|
||||
bind-key 45-5 group-toggle-5
|
||||
bind-key 45-6 group-toggle-6
|
||||
bind-key 45-7 group-toggle-7
|
||||
bind-key 45-8 group-toggle-8
|
||||
bind-key 45-9 group-toggle-9
|
||||
bind-key 4S-1 window-movetogroup-1
|
||||
bind-key 4S-2 window-movetogroup-2
|
||||
bind-key 4S-3 window-movetogroup-3
|
||||
bind-key 4S-4 window-movetogroup-4
|
||||
bind-key 4S-5 window-movetogroup-5
|
||||
bind-key 4S-6 window-movetogroup-6
|
||||
bind-key 4S-7 window-movetogroup-7
|
||||
bind-key 4S-8 window-movetogroup-8
|
||||
bind-key 4S-9 window-movetogroup-9
|
||||
bind-key 4-Tab group-cycle
|
||||
bind-key 4S-Tab group-rcycle
|
||||
# }}}
|
||||
|
||||
# windows {{{
|
||||
# kb {{{
|
||||
bind-key M-Tab window-cycle
|
||||
bind-key MS-Tab window-rcycle
|
||||
bind-key 4-f window-fullscreen
|
||||
bind-key 4-m window-maximize
|
||||
bind-key 4-period window-hmaximize
|
||||
bind-key 4-semicolon window-vmaximize
|
||||
bind-key 4-t window-stick
|
||||
bind-key 4S-t window-freeze
|
||||
bind-key 4-n window-hide
|
||||
bind-key 4-q window-close
|
||||
bind-key 4CS-j window-lower
|
||||
bind-key 4CS-k window-raise
|
||||
|
||||
# move and resize {{{
|
||||
bind-key 4-space window-center
|
||||
bind-key 4-h window-snap-left
|
||||
bind-key 4-j window-snap-down
|
||||
bind-key 4-k window-snap-up
|
||||
bind-key 4-l window-snap-right
|
||||
bind-key 4S-h window-move-left
|
||||
bind-key 4S-l window-move-right
|
||||
bind-key 4S-j window-move-down
|
||||
bind-key 4S-k window-move-up
|
||||
bind-key 4C-h window-move-left-big
|
||||
bind-key 4C-l window-move-right-big
|
||||
bind-key 4C-k window-move-up-big
|
||||
bind-key 4C-j window-move-down-big
|
||||
bind-key 4M-h window-resize-left
|
||||
bind-key 4M-k window-resize-up
|
||||
bind-key 4M-l window-resize-right
|
||||
bind-key 4M-j window-resize-down
|
||||
bind-key 4MS-h window-resize-left-big
|
||||
bind-key 4MS-k window-resize-up-big
|
||||
bind-key 4MS-l window-resize-right-big
|
||||
bind-key 4MS-j window-resize-down-big
|
||||
# }}}
|
||||
|
||||
# tiling {{{
|
||||
bind-key 4S-semicolon window-vtile
|
||||
bind-key 4S-apostrophe window-htile
|
||||
bind-key 4S-comma window-vfair
|
||||
bind-key 4S-period window-hfair
|
||||
# }}}
|
||||
|
||||
# }}}
|
||||
|
||||
# mouse {{{
|
||||
bind-mouse 4-1 window-move
|
||||
bind-mouse 4-3 window-resize
|
||||
bind-mouse 4S-1 window-raise
|
||||
bind-mouse 4S-3 window-lower
|
||||
# }}}
|
||||
# }}}
|
||||
|
||||
# mouse {{{
|
||||
bind-key 5S-a pointer-move-left
|
||||
bind-key 5S-d pointer-move-right
|
||||
bind-key 5S-w pointer-move-up
|
||||
bind-key 5S-s pointer-move-down
|
||||
bind-key 5-a pointer-move-left-big
|
||||
bind-key 5-d pointer-move-right-big
|
||||
bind-key 5-w pointer-move-up-big
|
||||
bind-key 5-s pointer-move-down-big
|
||||
bind-key 5-q 'xdotool click 1'
|
||||
bind-key 5-e 'xdotool click 3'
|
||||
bind-key 5-r 'xdotool click 4'
|
||||
bind-key 5-f 'xdotool click 5'
|
||||
# }}}
|
||||
|
||||
# launching stuff {{{
|
||||
bind-key 4-Return terminal
|
||||
bind-key 4-p 'urxvt -e nnn -e'
|
||||
bind-key 4-r 'fzfmenu-run'
|
||||
bind-key 4-w 'j4.sh'
|
||||
bind-key 4-c 'shclip-menu'
|
||||
bind-key 4-slash menu-window
|
||||
bind-key 4S-slash menu-window-hidden
|
||||
bind-key 4-s 'screenshot -rf'
|
||||
bind-key 4S-s 'ffrec'
|
||||
bind-key Print 'screenshot'
|
||||
bind-key M-Print 'screenshot -w'
|
||||
|
||||
bind-key 5-F6 'doas backlightctl -c 4'
|
||||
bind-key 5-F5 'doas backlightctl -c -4'
|
||||
# }}}
|
||||
|
||||
# }}}
|
||||
|
||||
# vim: tabstop=8:softtabstop=8:shiftwidth=8:
|
|
@ -1,53 +1,36 @@
|
|||
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
|
||||
<!-- Change the string in the family tag to whatever font -->
|
||||
<!-- unneeded since I made font jail, firefox is a mess :(
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family" target="default" compare="eq"><string>X11 Fixed</string></test>
|
||||
<edit name="width" mode="assign" binding="strong"><const>semicondensed</const></edit>
|
||||
</match>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<alias>
|
||||
<family>X11 Fixed</family>
|
||||
<prefer><family>X11 Fixed</family></prefer>
|
||||
<accept><family>X11 Fixed JA</family></accept>
|
||||
<accept><family>X11 Fixed KO</family></accept>
|
||||
</alias>
|
||||
-->
|
||||
|
||||
<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>
|
||||
<accept><family>Noto Serif</family></accept>
|
||||
<prefer><family>X11 Fixed</family></prefer>
|
||||
<prefer><family>DejaVu Serif</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer><family>TamzenForPowerline</family></prefer>
|
||||
<prefer><family>Helvetica</family></prefer>
|
||||
<accept><family>Cozette</family></accept>
|
||||
<accept><family>Noto Sans</family></accept>
|
||||
</alias>
|
||||
<alias><family>sans</family>
|
||||
<prefer><family>sans-serif</family></prefer>
|
||||
<prefer><family>X11 Fixed</family></prefer>
|
||||
<prefer><family>DejaVu Sans</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer><family>Terminus</family></prefer>
|
||||
<accept><family>Cozette</family></accept>
|
||||
<accept><family>kakwafont</family></accept>
|
||||
<accept><family>TerminessTTF Nerd Font Mono</family></accept>
|
||||
<accept><family>Comic Mono</family></accept>
|
||||
<prefer><family>X11 Fixed</family></prefer>
|
||||
<prefer><family>DejaVu Sans Mono</family></prefer>
|
||||
</alias>
|
||||
|
||||
<!-- weird testing -->
|
||||
<!--
|
||||
<alias>
|
||||
<family>Tamzen5x9-2x</family>
|
||||
<prefer><family>TamzenForPowerline</family></prefer>
|
||||
</alias>
|
||||
<match target="font">
|
||||
<test qual="any" name="family"><string>Tamzen5x9-2x</string></test>
|
||||
<edit name="dpi" mode="assign"><double>48</double></edit>
|
||||
</match>
|
||||
-->
|
||||
|
||||
<!-- disable antialising globally -->
|
||||
<!--
|
||||
<match target="font">
|
||||
<edit mode="assign" name="antialias">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
-->
|
||||
|
||||
</fontconfig>
|
||||
|
|
|
@ -1,9 +1,62 @@
|
|||
$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
|
||||
set show-mode-in-prompt on
|
||||
set emacs-mode-string " "
|
||||
|
||||
$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
|
||||
"diW": "lBdW"
|
||||
"yiW": "lByW"
|
||||
"ciW": "lBcW"
|
||||
"diw": "lbdw"
|
||||
"yiw": "lbyw"
|
||||
"ciw": "lbcw"
|
||||
?: reverse-search-history
|
||||
/: forward-search-history
|
||||
\C-p: reverse-search-history
|
||||
\C-n: 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 vi-ins-mode-string " "
|
||||
set vi-cmd-mode-string ":"
|
||||
$endif
|
||||
|
||||
$if term=foot
|
||||
set emacs-mode-string "\1\e]133;A\e\\\2 "
|
||||
$if mode=vi
|
||||
# Uncomment and/or adjust if you're using the vi editing-mode.
|
||||
set vi-cmd-mode-string "\1\e]133;A\e\\\2:"
|
||||
set vi-ins-mode-string "\1\e]133;A\e\\\2 "
|
||||
$endif
|
||||
$endif
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/usr/share/kak/autoload
|
|
@ -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>'
|
||||
}
|
|
@ -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-|>wl-copy<ret>"
|
||||
map -docstring "prepend the clipboard" global user <a-p> "!wl-paste -n<ret>"
|
||||
map -docstring "append the clipboard" global user p "<a-!>wl-paste -n<ret>"
|
||||
|
||||
## ctags
|
||||
map -docstring "search for tag" global user c ":ctags-search<ret>"
|
|
@ -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
|
|
@ -0,0 +1,27 @@
|
|||
MENU: fzfmenu
|
||||
|
||||
.ghw: gtkwave --
|
||||
|
||||
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/: swayimg -a --
|
||||
|
||||
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: env MOZ_ENABLE_WAYLAND=1 firefox --
|
||||
x-scheme-handler/https: env MOZ_ENABLE_WAYLAND=1 firefox --
|
||||
x-scheme-handler/chrome: env MOZ_ENABLE_WAYLAND=1 firefox --
|
||||
application/x-extension-htm: env MOZ_ENABLE_WAYLAND=1 firefox --
|
||||
application/x-extension-html: env MOZ_ENABLE_WAYLAND=1 firefox --
|
||||
application/x-extension-shtml: env MOZ_ENABLE_WAYLAND=1 firefox --
|
||||
application/xhtml+xml: env MOZ_ENABLE_WAYLAND=1 firefox --
|
||||
application/x-extension-xhtml: env MOZ_ENABLE_WAYLAND=1 firefox --
|
||||
application/x-extension-xht: env MOZ_ENABLE_WAYLAND=1 firefox --
|
|
@ -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
|
||||
volume=90
|
||||
vo=gpu
|
||||
hwdec=auto
|
||||
|
||||
# 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="X11 Fixed"
|
||||
osd-font-size=20
|
||||
# osd-bar=no
|
||||
cursor-autohide=2000
|
||||
osd-on-seek=msg-bar
|
||||
|
||||
# online shit
|
||||
ytdl-format=bv*[height<=1080]+ba/b*
|
||||
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
|
||||
|
|
|
@ -166,7 +166,7 @@ local function load_twitch_chat(is_new_session)
|
|||
end
|
||||
|
||||
local msg_part_1, msg_part_2, msg_separator
|
||||
if o.show_name and curr_comment_node.commenter then
|
||||
if o.show_name then
|
||||
msg_part_1 = curr_comment_node.commenter.displayName
|
||||
msg_part_2 = break_message_body(msg_text)
|
||||
msg_separator = ': '
|
||||
|
@ -179,13 +179,10 @@ local function load_twitch_chat(is_new_session)
|
|||
if o.color then
|
||||
if curr_comment_node.message.userColor then
|
||||
msg_color = curr_comment_node.message.userColor
|
||||
elseif curr_comment_node.commenter then
|
||||
else
|
||||
msg_color = string.format('#%06x', curr_comment_node.commenter.id % 16777216)
|
||||
end
|
||||
|
||||
if msg_color then
|
||||
msg_part_1 = string.format('<font color="%s">%s</font>', msg_color, msg_part_1)
|
||||
end
|
||||
msg_part_1 = string.format('<font color="%s">%s</font>', msg_color, msg_part_1)
|
||||
end
|
||||
|
||||
local msg_line = msg_part_1 .. msg_separator .. msg_part_2
|
||||
|
|
|
@ -1,581 +0,0 @@
|
|||
##############################################################
|
||||
## This is the example bindings file. Copy it to ##
|
||||
## $XDG_CONFIG_HOME/ncmpcpp/bindings or ~/.ncmpcpp/bindings ##
|
||||
## and set up your preferences. ##
|
||||
##############################################################
|
||||
##
|
||||
##### General rules #####
|
||||
##
|
||||
## 1) Because each action has runtime checks whether it's
|
||||
## ok to run it, a few actions can be bound to one key.
|
||||
## Actions will be bound in order given in configuration
|
||||
## file. When a key is pressed, first action in order
|
||||
## will test itself whether it's possible to run it. If
|
||||
## test succeeds, action is executed and other actions
|
||||
## bound to this key are ignored. If it doesn't, next
|
||||
## action in order tests itself etc.
|
||||
##
|
||||
## 2) It's possible to bind more that one action at once
|
||||
## to a key. It can be done using the following syntax:
|
||||
##
|
||||
## def_key "key"
|
||||
## action1
|
||||
## action2
|
||||
## ...
|
||||
##
|
||||
## This creates a chain of actions. When such chain is
|
||||
## executed, each action in chain is run until the end of
|
||||
## chain is reached or one of its actions fails to execute
|
||||
## due to its requirements not being met. If multiple actions
|
||||
## and/or chains are bound to the same key, they will be
|
||||
## consecutively run until one of them gets fully executed.
|
||||
##
|
||||
## 3) When ncmpcpp starts, bindings configuration file is
|
||||
## parsed and then ncmpcpp provides "missing pieces"
|
||||
## of default keybindings. If you want to disable some
|
||||
## bindings, there is a special action called 'dummy'
|
||||
## for that purpose. Eg. if you want to disable ability
|
||||
## to crop playlists, you need to put the following
|
||||
## into configuration file:
|
||||
##
|
||||
## def_key "C"
|
||||
## dummy
|
||||
##
|
||||
## After that ncmpcpp will not bind any default action
|
||||
## to this key.
|
||||
##
|
||||
## 4) To let you write simple macros, the following special
|
||||
## actions are provided:
|
||||
##
|
||||
## - push_character "character" - pushes given special
|
||||
## character into input queue, so it will be immediately
|
||||
## picked by ncmpcpp upon next call to readKey function.
|
||||
## Accepted values: mouse, up, down, page_up, page_down,
|
||||
## home, end, space, enter, insert, delete, left, right,
|
||||
## tab, ctrl-a, ctrl-b, ..., ctrl-z, ctrl-[, ctrl-\\,
|
||||
## ctrl-], ctrl-^, ctrl-_, f1, f2, ..., f12, backspace.
|
||||
## In addition, most of these names can be prefixed with
|
||||
## alt-/ctrl-/shift- to be recognized with the appropriate
|
||||
## modifier key(s).
|
||||
##
|
||||
## - push_characters "string" - pushes given string into
|
||||
## input queue.
|
||||
##
|
||||
## - require_runnable "action" - checks whether given action
|
||||
## is runnable and fails if it isn't. This is especially
|
||||
## useful when mixed with previous two functions. Consider
|
||||
## the following macro definition:
|
||||
##
|
||||
## def_key "key"
|
||||
## push_characters "custom_filter"
|
||||
## apply_filter
|
||||
##
|
||||
## If apply_filter can't be currently run, we end up with
|
||||
## sequence of characters in input queue which will be
|
||||
## treated just as we typed them. This may lead to unexpected
|
||||
## results (in this case 'c' will most likely clear current
|
||||
## playlist, 'u' will trigger database update, 's' will stop
|
||||
## playback etc.). To prevent such thing from happening, we
|
||||
## need to change above definition to this one:
|
||||
##
|
||||
## def_key "key"
|
||||
## require_runnable "apply_filter"
|
||||
## push_characters "custom_filter"
|
||||
## apply_filter
|
||||
##
|
||||
## Here, first we test whether apply_filter can be actually run
|
||||
## before we stuff characters into input queue, so if condition
|
||||
## is not met, whole chain is aborted and we're fine.
|
||||
##
|
||||
## - require_screen "screen" - checks whether given screen is
|
||||
## currently active. accepted values: browser, clock, help,
|
||||
## media_library, outputs, playlist, playlist_editor,
|
||||
## search_engine, tag_editor, visualizer, last_fm, lyrics,
|
||||
## selected_items_adder, server_info, song_info,
|
||||
## sort_playlist_dialog, tiny_tag_editor.
|
||||
##
|
||||
## - run_external_command "command" - runs given command using
|
||||
## system() function.
|
||||
##
|
||||
## - run_external_console_command "command" - runs given console
|
||||
## command using system() function.
|
||||
##
|
||||
##
|
||||
## 5) In addition to binding to a key, you can also bind actions
|
||||
## or chains of actions to a command. If it comes to commands,
|
||||
## syntax is very similar to defining keys. Here goes example
|
||||
## definition of a command:
|
||||
##
|
||||
## def_command "quit" [deferred]
|
||||
## stop
|
||||
## quit
|
||||
##
|
||||
## If you execute the above command (which can be done by
|
||||
## invoking action execute_command, typing 'quit' and pressing
|
||||
## enter), ncmpcpp will stop the player and then quit. Note the
|
||||
## presence of word 'deferred' enclosed in square brackets. It
|
||||
## tells ncmpcpp to wait for confirmation (ie. pressing enter)
|
||||
## after you typed quit. Instead of 'deferred', 'immediate'
|
||||
## could be used. Then ncmpcpp will not wait for confirmation
|
||||
## (enter) and will execute the command the moment it sees it.
|
||||
##
|
||||
## Note: while command chains are executed, internal environment
|
||||
## update (which includes current window refresh and mpd status
|
||||
## update) is not performed for performance reasons. However, it
|
||||
## may be desirable to do so in some situration. Therefore it's
|
||||
## possible to invoke by hand by performing 'update enviroment'
|
||||
## action.
|
||||
##
|
||||
## Note: There is a difference between:
|
||||
##
|
||||
## def_key "key"
|
||||
## action1
|
||||
##
|
||||
## def_key "key"
|
||||
## action2
|
||||
##
|
||||
## and
|
||||
##
|
||||
## def_key "key"
|
||||
## action1
|
||||
## action2
|
||||
##
|
||||
## First one binds two single actions to the same key whilst
|
||||
## second one defines a chain of actions. The behavior of
|
||||
## these two is different and is described in (1) and (2).
|
||||
##
|
||||
## Note: Function def_key accepts non-ascii characters.
|
||||
##
|
||||
##### List of unbound actions #####
|
||||
##
|
||||
## The following actions are not bound to any key/command:
|
||||
##
|
||||
## - set_volume
|
||||
## - load
|
||||
##
|
||||
#
|
||||
def_key "mouse"
|
||||
mouse_event
|
||||
#
|
||||
def_key "up"
|
||||
scroll_up
|
||||
#
|
||||
def_key "k"
|
||||
scroll_up
|
||||
#
|
||||
def_key "K"
|
||||
select_item
|
||||
scroll_up
|
||||
#
|
||||
def_key "down"
|
||||
scroll_down
|
||||
#
|
||||
def_key "j"
|
||||
scroll_down
|
||||
#
|
||||
def_key "J"
|
||||
select_item
|
||||
scroll_down
|
||||
#
|
||||
def_key "["
|
||||
scroll_up_album
|
||||
#
|
||||
def_key "]"
|
||||
scroll_down_album
|
||||
#
|
||||
def_key "{"
|
||||
scroll_up_artist
|
||||
#
|
||||
def_key "}"
|
||||
scroll_down_artist
|
||||
#
|
||||
def_key "ctrl-u"
|
||||
page_up
|
||||
#
|
||||
def_key "page_up"
|
||||
page_up
|
||||
#
|
||||
def_key "ctrl-d"
|
||||
page_down
|
||||
#
|
||||
def_key "page_down"
|
||||
page_down
|
||||
#
|
||||
def_key "home"
|
||||
move_home
|
||||
#
|
||||
def_key "g"
|
||||
move_home
|
||||
#
|
||||
def_key "end"
|
||||
move_end
|
||||
#
|
||||
def_key "G"
|
||||
move_end
|
||||
#
|
||||
def_key "insert"
|
||||
select_item
|
||||
#
|
||||
def_key "enter"
|
||||
enter_directory
|
||||
#
|
||||
def_key "enter"
|
||||
toggle_output
|
||||
#
|
||||
def_key "enter"
|
||||
run_action
|
||||
#
|
||||
def_key "enter"
|
||||
play_item
|
||||
#
|
||||
def_key "space"
|
||||
add_item_to_playlist
|
||||
#
|
||||
def_key "space"
|
||||
toggle_lyrics_update_on_song_change
|
||||
#
|
||||
def_key "space"
|
||||
toggle_visualization_type
|
||||
#
|
||||
def_key "x"
|
||||
delete_playlist_items
|
||||
#
|
||||
def_key "delete"
|
||||
delete_browser_items
|
||||
#
|
||||
def_key "delete"
|
||||
delete_stored_playlist
|
||||
#
|
||||
def_key "l"
|
||||
next_column
|
||||
#
|
||||
def_key "l"
|
||||
slave_screen
|
||||
#
|
||||
def_key "right"
|
||||
next_column
|
||||
#
|
||||
def_key "right"
|
||||
slave_screen
|
||||
#
|
||||
def_key ")"
|
||||
volume_up
|
||||
#
|
||||
def_key "+"
|
||||
volume_up
|
||||
#
|
||||
def_key "h"
|
||||
previous_column
|
||||
#
|
||||
def_key "h"
|
||||
master_screen
|
||||
#
|
||||
def_key "left"
|
||||
previous_column
|
||||
#
|
||||
def_key "left"
|
||||
master_screen
|
||||
#
|
||||
def_key "("
|
||||
volume_down
|
||||
#
|
||||
def_key "-"
|
||||
volume_down
|
||||
#
|
||||
def_key ":"
|
||||
execute_command
|
||||
#
|
||||
def_key "tab"
|
||||
next_screen
|
||||
#
|
||||
def_key "shift-tab"
|
||||
previous_screen
|
||||
#
|
||||
def_key "f1"
|
||||
show_help
|
||||
#
|
||||
def_key "1"
|
||||
show_playlist
|
||||
#
|
||||
def_key "2"
|
||||
show_browser
|
||||
#
|
||||
def_key "2"
|
||||
change_browse_mode
|
||||
#
|
||||
def_key "3"
|
||||
show_search_engine
|
||||
#
|
||||
def_key "3"
|
||||
reset_search_engine
|
||||
#
|
||||
def_key "4"
|
||||
show_media_library
|
||||
#
|
||||
def_key "4"
|
||||
toggle_media_library_columns_mode
|
||||
#
|
||||
def_key "5"
|
||||
show_playlist_editor
|
||||
#
|
||||
def_key "6"
|
||||
show_tag_editor
|
||||
#
|
||||
def_key "7"
|
||||
show_outputs
|
||||
#
|
||||
def_key "8"
|
||||
show_visualizer
|
||||
#
|
||||
def_key "="
|
||||
show_clock
|
||||
#
|
||||
def_key "@"
|
||||
show_server_info
|
||||
#
|
||||
def_key "ctrl-c"
|
||||
stop
|
||||
#
|
||||
def_key "p"
|
||||
pause
|
||||
#
|
||||
def_key "ctrl-n"
|
||||
next
|
||||
#
|
||||
def_key "ctrl-p"
|
||||
previous
|
||||
#
|
||||
def_key "ctrl-h"
|
||||
jump_to_parent_directory
|
||||
#
|
||||
def_key "ctrl-h"
|
||||
replay_song
|
||||
#
|
||||
def_key "backspace"
|
||||
jump_to_parent_directory
|
||||
#
|
||||
#def_key "backspace"
|
||||
# replay_song
|
||||
#
|
||||
def_key "backspace"
|
||||
play
|
||||
#
|
||||
def_key "L"
|
||||
seek_forward
|
||||
#
|
||||
def_key "H"
|
||||
seek_backward
|
||||
#
|
||||
def_key "r"
|
||||
toggle_repeat
|
||||
#
|
||||
def_key "z"
|
||||
toggle_random
|
||||
#
|
||||
def_key "y"
|
||||
save_tag_changes
|
||||
#
|
||||
def_key "y"
|
||||
start_searching
|
||||
#
|
||||
def_key "R"
|
||||
toggle_single
|
||||
#
|
||||
def_key "R"
|
||||
toggle_consume
|
||||
#
|
||||
def_key "Y"
|
||||
toggle_replay_gain_mode
|
||||
#
|
||||
def_key "T"
|
||||
toggle_add_mode
|
||||
#
|
||||
def_key "|"
|
||||
toggle_mouse
|
||||
#
|
||||
def_key "#"
|
||||
toggle_bitrate_visibility
|
||||
#
|
||||
def_key "Z"
|
||||
shuffle
|
||||
#
|
||||
def_key "f"
|
||||
toggle_crossfade
|
||||
#
|
||||
def_key "F"
|
||||
set_crossfade
|
||||
#
|
||||
def_key "u"
|
||||
update_database
|
||||
#
|
||||
def_key "ctrl-s"
|
||||
sort_playlist
|
||||
#
|
||||
def_key "ctrl-s"
|
||||
toggle_browser_sort_mode
|
||||
#
|
||||
def_key "ctrl-s"
|
||||
toggle_media_library_sort_mode
|
||||
#
|
||||
def_key "ctrl-r"
|
||||
reverse_playlist
|
||||
#
|
||||
def_key "ctrl-f"
|
||||
apply_filter
|
||||
#
|
||||
def_key "ctrl-_"
|
||||
select_found_items
|
||||
#
|
||||
def_key "/"
|
||||
find
|
||||
#
|
||||
def_key "/"
|
||||
find_item_forward
|
||||
#
|
||||
def_key "?"
|
||||
find
|
||||
#
|
||||
def_key "?"
|
||||
find_item_backward
|
||||
#
|
||||
def_key "n"
|
||||
next_found_item
|
||||
#
|
||||
def_key "N"
|
||||
previous_found_item
|
||||
#
|
||||
def_key "w"
|
||||
toggle_find_mode
|
||||
#
|
||||
def_key "e"
|
||||
edit_song
|
||||
#
|
||||
def_key "e"
|
||||
edit_library_tag
|
||||
#
|
||||
def_key "e"
|
||||
edit_library_album
|
||||
#
|
||||
def_key "e"
|
||||
edit_directory_name
|
||||
#
|
||||
def_key "e"
|
||||
edit_playlist_name
|
||||
#
|
||||
def_key "e"
|
||||
edit_lyrics
|
||||
#
|
||||
def_key "i"
|
||||
show_song_info
|
||||
#
|
||||
def_key "I"
|
||||
show_artist_info
|
||||
#
|
||||
def_key "ctrl-g"
|
||||
jump_to_position_in_song
|
||||
#
|
||||
def_key "L"
|
||||
dummy
|
||||
#
|
||||
def_key "ctrl-v"
|
||||
select_range
|
||||
#
|
||||
def_key "D"
|
||||
reverse_selection
|
||||
#
|
||||
def_key "d"
|
||||
remove_selection
|
||||
#
|
||||
def_key "B"
|
||||
select_album
|
||||
#
|
||||
def_key "a"
|
||||
add_selected_items
|
||||
#
|
||||
def_key "C"
|
||||
clear_playlist
|
||||
#
|
||||
def_key "C"
|
||||
clear_main_playlist
|
||||
#
|
||||
def_key "c"
|
||||
crop_playlist
|
||||
#
|
||||
def_key "c"
|
||||
crop_main_playlist
|
||||
#
|
||||
def_key "M"
|
||||
move_sort_order_up
|
||||
#
|
||||
def_key "M"
|
||||
move_selected_items_up
|
||||
#
|
||||
def_key "m"
|
||||
move_sort_order_down
|
||||
#
|
||||
def_key "m"
|
||||
move_selected_items_down
|
||||
#
|
||||
def_key "ctrl-m"
|
||||
move_selected_items_to
|
||||
#
|
||||
def_key "A"
|
||||
add
|
||||
#
|
||||
def_key "S"
|
||||
save_playlist
|
||||
#
|
||||
def_key "o"
|
||||
jump_to_playing_song
|
||||
#
|
||||
def_key "G"
|
||||
jump_to_browser
|
||||
#
|
||||
def_key "G"
|
||||
jump_to_playlist_editor
|
||||
#
|
||||
def_key "~"
|
||||
jump_to_media_library
|
||||
#
|
||||
def_key "E"
|
||||
jump_to_tag_editor
|
||||
#
|
||||
def_key "U"
|
||||
toggle_playing_song_centering
|
||||
#
|
||||
#def_key "P"
|
||||
# toggle_display_mode
|
||||
#
|
||||
def_key "\\"
|
||||
toggle_interface
|
||||
#
|
||||
def_key "!"
|
||||
toggle_separators_between_albums
|
||||
#
|
||||
#def_key "L"
|
||||
# toggle_lyrics_fetcher
|
||||
#
|
||||
def_key "F"
|
||||
dummy
|
||||
#
|
||||
def_key "alt-l"
|
||||
dummy
|
||||
#
|
||||
def_key "ctrl-l"
|
||||
dummy
|
||||
#
|
||||
def_key "`"
|
||||
toggle_library_tag_type
|
||||
#
|
||||
def_key "`"
|
||||
refetch_lyrics
|
||||
#
|
||||
def_key "`"
|
||||
add_random_items
|
||||
#
|
||||
def_key "ctrl-p"
|
||||
set_selected_items_priority
|
||||
#
|
||||
def_key "q"
|
||||
quit
|
||||
#
|
|
@ -1,45 +0,0 @@
|
|||
# main
|
||||
mpd_host = localhost
|
||||
mpd_port = 6600
|
||||
mpd_music_dir = ~/Music
|
||||
lyrics_directory = ~/.config/ncmpcpp/lyrics
|
||||
|
||||
# library
|
||||
media_library_primary_tag = album_artist
|
||||
media_library_albums_split_by_date = yes
|
||||
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"
|
||||
|
||||
# random settings
|
||||
volume_change_step = 5
|
||||
seek_time = 3
|
||||
lines_scrolled = 5
|
||||
|
||||
# ui settings
|
||||
titles_visibility = no
|
||||
user_interface = alternative
|
||||
playlist_display_mode = classic
|
||||
playlist_show_remaining_time = yes
|
||||
now_playing_prefix = "$7 $2*$b"
|
||||
# now_playing_prefix = "$b$8 - " # non-urxvt
|
||||
song_list_format = "{$7 %64a $4-$8 %t}|{$8 %f}$R$3 %l "
|
||||
# song_list_format = {$7%48a $8- $4%t}|{$4%f}$R$3%l # non-urxvt
|
||||
song_status_format = "{$7%a $4-$8 %t}|{$4%f}"
|
||||
# song_status_format = {$7%a $4%t}|{$4%f} # non-urxvt
|
||||
alternative_header_first_line_format = $1──┤ $b$8{%a - %t}|{%f}$/b$1 ├──
|
||||
alternative_header_second_line_format = $b{$7%A$8 - $4%b}|{$4%f}{$8 (%y)}$/b
|
||||
header_visibility = yes
|
||||
volume_color = 3
|
||||
statusbar_time_color = 3
|
||||
|
||||
# funny visualizer!!
|
||||
visualizer_data_source = "/tmp/mpd.fifo"
|
||||
visualizer_output_name = "my_fifo"
|
||||
visualizer_in_stereo = "yes"
|
||||
visualizer_spectrum_smooth_look = no
|
||||
visualizer_autoscale = no
|
||||
visualizer_spectrum_dft_size = 1
|
||||
visualizer_spectrum_gain = 5
|
|
@ -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
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
"1.4.0
|
||||
|
||||
set runtimepath=~/.config/pentadactyl
|
||||
loadplugins '\.(js|penta)$'
|
||||
group user
|
||||
" sanitize history downloads formdata
|
||||
|
||||
" standard QoL remappings
|
||||
map -count -builtin -modes=n,v d <count><C-d>
|
||||
map -count -builtin -modes=n,v u <count><C-u>
|
||||
map -count -builtin -modes=n,v x <count>d
|
||||
map -count -builtin -modes=n,v X <count>u
|
||||
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=i <C-v> <Pass>
|
||||
map -builtin -modes=i <C-c> <Pass>
|
||||
map -builtin -modes=i <C-a> <Pass>
|
||||
|
||||
" 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
|
||||
|
||||
" hints
|
||||
hi Hint font: bold 9px "cure" !important; color: black; padding: 0 1px 0 2px; background: #EAEAEA; border: 2px solid #F00A
|
||||
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;
|
||||
set extendedhinttags=[iI]:img,[asOTvVW]:':-moz-any-link',area[href],img[src],iframe[src],[A]:[id],a[name],[f]:body,[F]:body,code,div,html,p,pre,span,[S]:'input:not([type=hidden])',textarea,button,select,[y]:':-moz-any-link',area[href]
|
||||
|
||||
" passkeys
|
||||
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 newtab=help
|
||||
set defsearch=srx
|
||||
set maxitems=10
|
||||
set complete=bookmark
|
||||
set editor='urxvt -e sh -c "vim <file>"'
|
||||
set cdpath=''
|
||||
set hm=wordstartswith
|
||||
set shell=/bin/sh
|
||||
|
||||
" vim: set ft=pentadactyl:
|
|
@ -1,13 +0,0 @@
|
|||
uniform float opacity;
|
||||
uniform bool invert_color;
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main() {
|
||||
vec4 c = texture2D(tex, gl_TexCoord[0].xy);
|
||||
float g = 0.2126 * c.r + 0.7152 * c.g + 0.0722 * c.b; // CIELAB luma, based on human tristimulus.
|
||||
c = vec4(vec3(g), c.a);
|
||||
if (invert_color)
|
||||
c = vec4(vec3(c.a, c.a, c.a) - vec3(c), c.a);
|
||||
c *= opacity;
|
||||
gl_FragColor = c;
|
||||
}
|
|
@ -1,418 +0,0 @@
|
|||
#################################
|
||||
# Shadows #
|
||||
#################################
|
||||
|
||||
|
||||
# Enabled client-side shadows on windows. Note desktop windows
|
||||
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
|
||||
# unless explicitly requested using the wintypes option.
|
||||
#
|
||||
# shadow = false
|
||||
# shadow = true;
|
||||
|
||||
# The blur radius for shadows, in pixels. (defaults to 12)
|
||||
# shadow-radius = 12
|
||||
# shadow-radius = 7;
|
||||
|
||||
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
|
||||
# shadow-opacity = .75
|
||||
|
||||
# The left offset for shadows, in pixels. (defaults to -15)
|
||||
# shadow-offset-x = -15
|
||||
# shadow-offset-x = -7;
|
||||
|
||||
# The top offset for shadows, in pixels. (defaults to -15)
|
||||
# shadow-offset-y = -15
|
||||
# shadow-offset-y = -7;
|
||||
|
||||
# Red color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-red = 0
|
||||
|
||||
# Green color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-green = 0
|
||||
|
||||
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-blue = 0
|
||||
|
||||
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
|
||||
# shadow-color = "#000000"
|
||||
|
||||
# Specify a list of conditions of windows that should have no shadow.
|
||||
#
|
||||
# examples:
|
||||
# shadow-exclude = "n:e:Notification";
|
||||
#
|
||||
# shadow-exclude = []
|
||||
shadow-exclude = [
|
||||
"name = 'Notification'",
|
||||
"class_g = 'Conky'",
|
||||
"class_g ?= 'Notify-osd'",
|
||||
"class_g = 'Cairo-clock'",
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
|
||||
# clip-shadow-above = []
|
||||
|
||||
# Specify a X geometry that describes the region in which shadow should not
|
||||
# be painted in, such as a dock window region. Use
|
||||
# shadow-exclude-reg = "x10+0+0"
|
||||
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
|
||||
#
|
||||
# shadow-exclude-reg = ""
|
||||
|
||||
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
|
||||
# xinerama-shadow-crop = false
|
||||
|
||||
|
||||
#################################
|
||||
# Fading #
|
||||
#################################
|
||||
|
||||
|
||||
# Fade windows in/out when opening/closing and when opacity changes,
|
||||
# unless no-fading-openclose is used.
|
||||
# fading = false
|
||||
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;
|
||||
|
||||
# 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;
|
||||
|
||||
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
|
||||
fade-delta = 8
|
||||
|
||||
# Specify a list of conditions of windows that should not be faded.
|
||||
# fade-exclude = []
|
||||
|
||||
# Do not fade on window open/close.
|
||||
# no-fading-openclose = false
|
||||
|
||||
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
|
||||
# no-fading-destroyed-argb = false
|
||||
|
||||
|
||||
#################################
|
||||
# Transparency / Opacity #
|
||||
#################################
|
||||
|
||||
|
||||
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
|
||||
# inactive-opacity = 1
|
||||
inactive-opacity = 1;
|
||||
|
||||
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
|
||||
# frame-opacity = 1.0
|
||||
frame-opacity = 1.0;
|
||||
|
||||
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
|
||||
# inactive-opacity-override = true
|
||||
inactive-opacity-override = false;
|
||||
|
||||
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
|
||||
active-opacity = 1;
|
||||
|
||||
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
|
||||
# inactive-dim = 0.0
|
||||
|
||||
# Specify a list of conditions of windows that should never be considered focused.
|
||||
# focus-exclude = []
|
||||
focus-exclude = [ "class_g = 'Cairo-clock'" ];
|
||||
|
||||
# Use fixed inactive dim value, instead of adjusting according to window opacity.
|
||||
# inactive-dim-fixed = 1.0
|
||||
|
||||
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
|
||||
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
|
||||
# Note we don't make any guarantee about possible conflicts with other
|
||||
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
|
||||
# example:
|
||||
# opacity-rule = [ "80:class_g = 'URxvt'" ];
|
||||
#
|
||||
opacity-rule = [
|
||||
"95:class_g = 'discord'",
|
||||
"95:focused && (class_g = 'chatty-Chatty')",
|
||||
"90:!focused && (class_g = 'chatty-Chatty')",
|
||||
"85:class_g = 'awesome'",
|
||||
];
|
||||
|
||||
|
||||
#################################
|
||||
# Corners #
|
||||
#################################
|
||||
|
||||
# Sets the radius of rounded window corners. When > 0, the compositor will
|
||||
# round the corners of windows. Does not interact well with
|
||||
# `transparent-clipping`.
|
||||
# corner-radius = 0
|
||||
|
||||
# Exclude conditions for rounded corners.
|
||||
rounded-corners-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'"
|
||||
];
|
||||
|
||||
|
||||
#################################
|
||||
# Background-Blurring #
|
||||
#################################
|
||||
|
||||
|
||||
# Parameters for background blurring, see the *BLUR* section for more information.
|
||||
# blur-method =
|
||||
# blur-size = 12
|
||||
#
|
||||
# blur-deviation = false
|
||||
#
|
||||
# blur-strength = 5
|
||||
|
||||
# Blur background of semi-transparent / ARGB windows.
|
||||
# Bad in performance, with driver-dependent behavior.
|
||||
# The name of the switch may change without prior notifications.
|
||||
#
|
||||
# blur-background = true
|
||||
|
||||
# Blur background of windows when the window frame is not opaque.
|
||||
# Implies:
|
||||
# blur-background
|
||||
# Bad in performance, with driver-dependent behavior. The name may change.
|
||||
#
|
||||
# blur-background-frame = true
|
||||
|
||||
|
||||
# Use fixed blur strength rather than adjusting according to window opacity.
|
||||
# blur-background-fixed = false
|
||||
|
||||
|
||||
# Specify the blur convolution kernel, with the following format:
|
||||
# example:
|
||||
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
|
||||
#
|
||||
# blur-kern = ""
|
||||
# blur-kern = "3x3box";
|
||||
|
||||
|
||||
# Exclude conditions for background blur.
|
||||
# blur-background-exclude = []
|
||||
blur-background-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'",
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
#################################
|
||||
# General Settings #
|
||||
#################################
|
||||
|
||||
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
|
||||
# daemon = false
|
||||
|
||||
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
|
||||
# `xrender` is the default one.
|
||||
#
|
||||
# backend = "glx"
|
||||
backend = "xrender";
|
||||
|
||||
# Enable/disable VSync.
|
||||
# vsync = false
|
||||
vsync = false;
|
||||
|
||||
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
|
||||
# dbus = false
|
||||
|
||||
# Try to detect WM windows (a non-override-redirect window with no
|
||||
# child that has 'WM_STATE') and mark them as active.
|
||||
#
|
||||
# mark-wmwin-focused = false
|
||||
mark-wmwin-focused = true;
|
||||
|
||||
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
|
||||
# mark-ovredir-focused = false
|
||||
mark-ovredir-focused = true;
|
||||
|
||||
# Try to detect windows with rounded corners and don't consider them
|
||||
# shaped windows. The accuracy is not very high, unfortunately.
|
||||
#
|
||||
# detect-rounded-corners = false
|
||||
detect-rounded-corners = true;
|
||||
|
||||
# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
|
||||
# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
|
||||
#
|
||||
# detect-client-opacity = false
|
||||
detect-client-opacity = true;
|
||||
|
||||
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
|
||||
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
|
||||
# provided that the WM supports it.
|
||||
#
|
||||
# use-ewmh-active-win = false
|
||||
|
||||
# Unredirect all windows if a full-screen opaque window is detected,
|
||||
# to maximize performance for full-screen windows. Known to cause flickering
|
||||
# when redirecting/unredirecting windows.
|
||||
#
|
||||
# unredir-if-possible = false
|
||||
|
||||
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
|
||||
# unredir-if-possible-delay = 0
|
||||
|
||||
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
|
||||
# unredir-if-possible-exclude = []
|
||||
|
||||
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
|
||||
# in the same group focused at the same time.
|
||||
#
|
||||
# detect-transient = false
|
||||
detect-transient = true;
|
||||
|
||||
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
|
||||
# group focused at the same time. This usually means windows from the same application
|
||||
# will be considered focused or unfocused at the same time.
|
||||
# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too.
|
||||
#
|
||||
# detect-client-leader = false
|
||||
|
||||
# Resize damaged region by a specific number of pixels.
|
||||
# A positive value enlarges it while a negative one shrinks it.
|
||||
# If the value is positive, those additional pixels will not be actually painted
|
||||
# to screen, only used in blur calculation, and such. (Due to technical limitations,
|
||||
# with use-damage, those pixels will still be incorrectly painted to screen.)
|
||||
# Primarily used to fix the line corruption issues of blur,
|
||||
# in which case you should use the blur radius value here
|
||||
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
|
||||
# with a 5x5 one you use `--resize-damage 2`, and so on).
|
||||
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
|
||||
#
|
||||
# resize-damage = 1
|
||||
|
||||
# Specify a list of conditions of windows that should be painted with inverted color.
|
||||
# Resource-hogging, and is not well tested.
|
||||
#
|
||||
# invert-color-include = []
|
||||
|
||||
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
|
||||
# Might cause incorrect opacity when rendering transparent content (but never
|
||||
# practically happened) and may not work with blur-background.
|
||||
# My tests show a 15% performance boost. Recommended.
|
||||
#
|
||||
# glx-no-stencil = false
|
||||
|
||||
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||
# Probably could improve performance on rapid window content changes,
|
||||
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
|
||||
# Recommended if it works.
|
||||
#
|
||||
# glx-no-rebind-pixmap = false
|
||||
|
||||
# Disable the use of damage information.
|
||||
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
|
||||
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
|
||||
# The opposing option is use-damage
|
||||
#
|
||||
# no-use-damage = false
|
||||
use-damage = true;
|
||||
|
||||
# Use X Sync fence to sync clients' draw calls, to make sure all draw
|
||||
# calls are finished before picom starts drawing. Needed on nvidia-drivers
|
||||
# with GLX backend for some users.
|
||||
#
|
||||
# xrender-sync-fence = false
|
||||
|
||||
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
|
||||
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
|
||||
# in the source tree for examples.
|
||||
#
|
||||
# glx-fshader-win = ""
|
||||
|
||||
# Force all windows to be painted with blending. Useful if you
|
||||
# have a glx-fshader-win that could turn opaque pixels transparent.
|
||||
#
|
||||
# force-win-blend = false
|
||||
|
||||
# Do not use EWMH to detect fullscreen windows.
|
||||
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
|
||||
#
|
||||
# no-ewmh-fullscreen = false
|
||||
|
||||
# Dimming bright windows so their brightness doesn't exceed this set value.
|
||||
# Brightness of a window is estimated by averaging all pixels in the window,
|
||||
# so this could comes with a performance hit.
|
||||
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
|
||||
#
|
||||
# max-brightness = 1.0
|
||||
|
||||
# Make transparent windows clip other windows like non-transparent windows do,
|
||||
# instead of blending on top of them.
|
||||
#
|
||||
# transparent-clipping = false
|
||||
|
||||
# Set the log level. Possible values are:
|
||||
# "trace", "debug", "info", "warn", "error"
|
||||
# in increasing level of importance. Case doesn't matter.
|
||||
# If using the "TRACE" log level, it's better to log into a file
|
||||
# using *--log-file*, since it can generate a huge stream of logs.
|
||||
#
|
||||
# log-level = "debug"
|
||||
log-level = "warn";
|
||||
|
||||
# Set the log file.
|
||||
# If *--log-file* is never specified, logs will be written to stderr.
|
||||
# Otherwise, logs will to written to the given file, though some of the early
|
||||
# logs might still be written to the stderr.
|
||||
# When setting this option from the config file, it is recommended to use an absolute path.
|
||||
#
|
||||
# log-file = "/path/to/your/log/file"
|
||||
|
||||
# Show all X errors (for debugging)
|
||||
# show-all-xerrors = false
|
||||
|
||||
# Write process ID to a file.
|
||||
# write-pid-path = "/path/to/your/log/file"
|
||||
|
||||
# Window type settings
|
||||
#
|
||||
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
|
||||
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
|
||||
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
|
||||
# "tooltip", "notification", "combo", and "dnd".
|
||||
#
|
||||
# Following per window-type options are available: ::
|
||||
#
|
||||
# fade, shadow:::
|
||||
# Controls window-type-specific shadow and fade settings.
|
||||
#
|
||||
# opacity:::
|
||||
# Controls default opacity of the window type.
|
||||
#
|
||||
# focus:::
|
||||
# Controls whether the window of this type is to be always considered focused.
|
||||
# (By default, all window types except "normal" and "dialog" has this on.)
|
||||
#
|
||||
# full-shadow:::
|
||||
# Controls whether shadow is drawn under the parts of the window that you
|
||||
# normally won't be able to see. Useful when the window has parts of it
|
||||
# transparent, and you want shadows in those areas.
|
||||
#
|
||||
# clip-shadow-above:::
|
||||
# Controls wether shadows that would have been drawn above the window should
|
||||
# be clipped. Useful for dock windows that should have no shadow painted on top.
|
||||
#
|
||||
# redir-ignore:::
|
||||
# Controls whether this type of windows should cause screen to become
|
||||
# redirected again after been unredirected. If you have unredir-if-possible
|
||||
# set, and doesn't want certain window to cause unnecessary screen redirection,
|
||||
# you can set this to `true`.
|
||||
#
|
||||
wintypes:
|
||||
{
|
||||
tooltip = { fade = true; shadow = true; opacity = 0.85; focus = true; full-shadow = false; };
|
||||
dock = { shadow = false; clip-shadow-above = true; }
|
||||
dnd = { shadow = false; }
|
||||
popup_menu = { opacity = 0.9; }
|
||||
dropdown_menu = { opacity = 0.9; }
|
||||
};
|
|
@ -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
|
||||
|
@ -10,12 +10,10 @@ set -g renumber-windows on
|
|||
set -g set-titles on
|
||||
|
||||
set -g set-clipboard external
|
||||
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'
|
||||
|
||||
# the following is the vim keybinds stuff
|
||||
|
@ -28,7 +26,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
|
||||
|
@ -97,7 +95,7 @@ set -g status-style fg=white
|
|||
set -g status-left '#[fg=colour10]#H #[default]'
|
||||
set -g status-right '#[fg=colour10]%H:%M:%S #[fg=colour7]|#[fg=colour14] %a %Y-%m-%d'
|
||||
|
||||
set -g pane-active-border-style fg=colour12
|
||||
set -g pane-active-border-style fg=colour14
|
||||
set -g pane-border-style fg=colour8
|
||||
|
||||
# Set window notifications
|
||||
|
@ -105,5 +103,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
|
||||
|
|
|
@ -1,217 +0,0 @@
|
|||
# $Fuller: myprograms/twmrc/vars,v 1.2 2002/07/08 08:09:55 fullermd Exp $
|
||||
# $XConsortium: system.twmrc,v 1.8 91/04/23 21:10:58 gildea Exp $
|
||||
#
|
||||
# Default twm configuration file; needs to be kept small to conserve string
|
||||
# space in systems whose compilers don't handle medium-sized strings.
|
||||
#
|
||||
# Yeah right. This file is now officially INSANE
|
||||
# Rewritten by Matt <fullermd@over-yonder.net> to do crazy things
|
||||
|
||||
# Simple toggles
|
||||
DecorateTransients
|
||||
IconifyByUnmapping
|
||||
MaxWindowSize "1920x1080"
|
||||
MoveDelta 3 # Minimum pixels to move before window starts moving
|
||||
NoBackingStore # Don't use backing store for menus
|
||||
NoGrabServer # Don't grab the server and eat CPU when doing stuff
|
||||
# NoRaiseOnMove
|
||||
OpaqueMove
|
||||
RandomPlacement
|
||||
RestartPreviousState # Store state across restarts
|
||||
ShowIconManager
|
||||
SortIconManager
|
||||
|
||||
# Font settings
|
||||
IconFont "-*-helvetica-bold-r-normal-*-12-*"
|
||||
IconManagerFont "-*-helvetica-bold-r-normal-*-12-*"
|
||||
MenuFont "-*-helvetica-bold-r-normal-*-12-*"
|
||||
ResizeFont "-*-helvetica-bold-r-normal-*-12-*"
|
||||
TitleFont "-*-helvetica-bold-r-normal-*-12-*"
|
||||
|
||||
|
||||
# Stuff with lots of args
|
||||
Color
|
||||
{
|
||||
BorderColor "black"
|
||||
DefaultBackground "white"
|
||||
DefaultForeground "black"
|
||||
TitleBackground "white"
|
||||
TitleForeground "black"
|
||||
MenuBackground "white"
|
||||
MenuForeground "black"
|
||||
MenuTitleBackground "gray70"
|
||||
MenuTitleForeground "black"
|
||||
IconBackground "black"
|
||||
IconForeground "white"
|
||||
IconBorderColor "black"
|
||||
IconManagerBackground "white"
|
||||
IconManagerForeground "black"
|
||||
}
|
||||
|
||||
IconManagerDontShow
|
||||
{
|
||||
"xclock"
|
||||
"xbiff"
|
||||
"xbuffy"
|
||||
"xeyes"
|
||||
"xpostit"
|
||||
"PostItNote"
|
||||
"WorkSpaceManager"
|
||||
}
|
||||
|
||||
NoBorder
|
||||
{
|
||||
"WorkSpaceManager"
|
||||
}
|
||||
|
||||
AutoRaise {
|
||||
"xkoko"
|
||||
}
|
||||
|
||||
NoTitle
|
||||
{
|
||||
"xkoko"
|
||||
"xclock"
|
||||
"xbiff"
|
||||
"xbuffy"
|
||||
"TWM Icon Manager"
|
||||
"xeyes"
|
||||
"xpostit"
|
||||
"PostItNote"
|
||||
"xconsole"
|
||||
"WorkSpaceManager"
|
||||
}
|
||||
# $Fuller: myprograms/twmrc/functions,v 1.3 2002/07/08 08:19:31 fullermd Exp $
|
||||
|
||||
# Semi-standard
|
||||
Function "move-or-lower" { f.move f.deltastop f.lower }
|
||||
Function "move-or-raise" { f.move f.deltastop f.raise }
|
||||
Function "move-or-iconify" { f.move f.deltastop f.iconify }
|
||||
|
||||
# My special stuff
|
||||
Function "newrestart" {!"(cd ~/.twm && make for_twm)" f.restart}
|
||||
# $Fuller: myprograms/twmrc/iconmgrs,v 1.1 2002/07/08 07:45:15 fullermd Exp $
|
||||
|
||||
IconManagers
|
||||
{
|
||||
"mozilla-bin,Netscape,opera" "Browsers Icons" "-0+52" 1
|
||||
# "Netscape" "-0+52" 1
|
||||
}
|
||||
# $Fuller: myprograms/twmrc/bindings,v 1.1 2002/07/08 07:45:15 fullermd Exp $
|
||||
|
||||
# Key bindings
|
||||
# Meece
|
||||
Button1 = : root : f.menu "main"
|
||||
Button2 = : root : f.menu "xlock1"
|
||||
Button3 = : root : f.menu "twmstuff"
|
||||
|
||||
Button1 = : title : f.function "move-or-raise"
|
||||
Button2 = : title : f.raiselower
|
||||
Button3 = : title : f.lower
|
||||
|
||||
Button1 = meta : title : f.menu "winops"
|
||||
|
||||
Button1 = : icon : f.function "move-or-iconify"
|
||||
Button2 = : icon : f.iconify
|
||||
Button3 = : icon : f.menu "winops"
|
||||
|
||||
Button1 = : iconmgr : f.iconify
|
||||
Button2 = : iconmgr : f.raise
|
||||
Button3 = : iconmgr : f.menu "winops"
|
||||
|
||||
Button1 = meta : window|icon : f.function "move-or-lower"
|
||||
Button2 = meta : window|icon : f.iconify
|
||||
Button3 = meta : window|icon : f.function "move-or-raise"
|
||||
|
||||
# Keyboard
|
||||
"F1" = : all : f.raise
|
||||
"F2" = : all : f.lower
|
||||
"F3" = : all : f.identify
|
||||
"F4" = : all : f.move
|
||||
menu "twmstuff"
|
||||
{
|
||||
"TWM stuff " f.title
|
||||
"Show Iconmgr " f.showiconmgr
|
||||
"Hide iconmgr " f.hideiconmgr
|
||||
" " f.nop
|
||||
"Restart TWM " f.restart
|
||||
"Exit " f.menu "exit"
|
||||
}
|
||||
|
||||
menu "main"
|
||||
{
|
||||
"Twm " f.title
|
||||
"Window Ops " f.menu "winops"
|
||||
" " f.nop
|
||||
#"Xlock " !"/usr/X11R6/bin/xlock -mode hyper -fg WHITE -bg BLACK &"
|
||||
#" " f.nop
|
||||
# "Xlocks " f.menu "xlock"
|
||||
# " " f.nop
|
||||
"TWM Stuff " f.menu "twmstuff"
|
||||
" " f.nop
|
||||
"Xterm " !"/usr/bin/xterm -cm &"
|
||||
"Web Stuff " f.menu "webstuff"
|
||||
}
|
||||
|
||||
menu "exit"
|
||||
{
|
||||
"Exit? " f.title
|
||||
" " f.nop
|
||||
"Yes, dammit " f.quit
|
||||
}
|
||||
|
||||
menu "winops"
|
||||
{
|
||||
"Window Ops " f.title
|
||||
"Iconify " f.iconify
|
||||
"Resize " f.resize
|
||||
"Move " f.move
|
||||
"Raise " f.raise
|
||||
"Lower " f.lower
|
||||
" " f.nop
|
||||
"Focus " f.focus
|
||||
"Unfocus " f.unfocus
|
||||
" " f.nop
|
||||
"Kill " f.destroy
|
||||
"Delete " f.delete
|
||||
}
|
||||
|
||||
menu "webstuff"
|
||||
{
|
||||
"Web stuff " f.title
|
||||
"Pale Moon " !"firejail palemoon &"
|
||||
"Chromium " !"firejail chromium --force-dark-mode &"
|
||||
"badwolf " !"badwolf &"
|
||||
}
|
||||
|
||||
menu "xlock2"
|
||||
{
|
||||
"Xlock 2 " f.title
|
||||
"eyes " !"/usr/X11R6/bin/xlock -mode eyes -fg WHITE -bg BLACK &"
|
||||
"fadeplot " !"/usr/X11R6/bin/xlock -mode fadeplot -fg WHITE -bg BLACK &"
|
||||
"flag " !"/usr/X11R6/bin/xlock -mode flag -fg WHITE -bg BLACK &"
|
||||
"flame " !"/usr/X11R6/bin/xlock -mode flame -fg WHITE -bg BLACK &"
|
||||
"flow " !"/usr/X11R6/bin/xlock -mode flow -fg WHITE -bg BLACK &"
|
||||
"forest " !"/usr/X11R6/bin/xlock -mode forest -fg WHITE -bg BLACK &"
|
||||
"galaxy " !"/usr/X11R6/bin/xlock -mode galaxy -fg WHITE -bg BLACK &"
|
||||
"gears " !"/usr/X11R6/bin/xlock -mode gears -fg WHITE -bg BLACK &"
|
||||
"goop " !"/usr/X11R6/bin/xlock -mode goop -fg WHITE -bg BLACK &"
|
||||
"grav " !"/usr/X11R6/bin/xlock -mode grav -fg WHITE -bg BLACK &"
|
||||
"helix " !"/usr/X11R6/bin/xlock -mode helix -fg WHITE -bg BLACK &"
|
||||
"hop " !"/usr/X11R6/bin/xlock -mode hop -fg WHITE -bg BLACK &"
|
||||
"hyper " !"/usr/X11R6/bin/xlock -mode hyper -fg WHITE -bg BLACK &"
|
||||
"ico " !"/usr/X11R6/bin/xlock -mode ico -fg WHITE -bg BLACK &"
|
||||
"ifs " !"/usr/X11R6/bin/xlock -mode ifs -fg WHITE -bg BLACK &"
|
||||
"image " !"/usr/X11R6/bin/xlock -mode image -fg WHITE -bg BLACK &"
|
||||
"invert " !"/usr/X11R6/bin/xlock -mode invert -fg WHITE -bg BLACK &"
|
||||
"juggle " !"/usr/X11R6/bin/xlock -mode juggle -fg WHITE -bg BLACK &"
|
||||
"julia " !"/usr/X11R6/bin/xlock -mode julia -fg WHITE -bg BLACK &"
|
||||
"kaleid " !"/usr/X11R6/bin/xlock -mode kaleid -fg WHITE -bg BLACK &"
|
||||
"kumppa " !"/usr/X11R6/bin/xlock -mode kumppa -fg WHITE -bg BLACK &"
|
||||
"lament " !"/usr/X11R6/bin/xlock -mode lament -fg WHITE -bg BLACK &"
|
||||
"laser " !"/usr/X11R6/bin/xlock -mode laser -fg WHITE -bg BLACK &"
|
||||
"life " !"/usr/X11R6/bin/xlock -mode life -fg WHITE -bg BLACK &"
|
||||
"life1d " !"/usr/X11R6/bin/xlock -mode life1d -fg WHITE -bg BLACK &"
|
||||
"\-more\- " f.menu "xlock3"
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
set noexpandtab
|
|
@ -1,8 +0,0 @@
|
|||
if has("autocmd")
|
||||
au BufRead,BufNewFile *.mw set filetype=mediawiki
|
||||
au BufRead,BufNewFile *.wiki set filetype=mediawiki
|
||||
au BufRead,BufNewFile *.mediawiki set filetype=mediawiki
|
||||
au BufRead,BufNewFile *.wikipedia.org* set filetype=mediawiki
|
||||
au BufRead,BufNewFile *.wikibooks.org* set filetype=mediawiki
|
||||
au BufRead,BufNewFile *.wikimedia.org* set filetype=mediawiki
|
||||
endif
|
|
@ -0,0 +1,16 @@
|
|||
name: Vint
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
vint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Setup dependencies
|
||||
run: pip install vim-vint
|
||||
- name: Run Vimscript Linter
|
||||
run: vint .
|
|
@ -0,0 +1,5 @@
|
|||
*.html
|
||||
*.pdf
|
||||
*.swp
|
||||
tags
|
||||
doc/tags
|
|
@ -0,0 +1,5 @@
|
|||
cmdargs:
|
||||
severity: style_problem
|
||||
color: true
|
||||
env:
|
||||
neovim: false
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2013-2019 vim-pandoc-syntax 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.
|
|
@ -0,0 +1,68 @@
|
|||
# vim-pandoc-syntax
|
||||
|
||||
[![Vint](https://github.com/vim-pandoc/vim-pandoc-syntax/workflows/Vint/badge.svg)](https://github.com/vim-pandoc/vim-pandoc-syntax/actions?workflow=Vint)
|
||||
|
||||
Standalone pandoc syntax module, to be used alongside
|
||||
[vim-pandoc](http://github.com/vim-pandoc/vim-pandoc).
|
||||
|
||||
Forked from the version provided by `fmoralesc/vim-pantondoc`, in turn taken
|
||||
from `vim-pandoc/vim-pandoc`.
|
||||
|
||||
## Requirements
|
||||
|
||||
* A vim version with `+conceal`
|
||||
* [vim-pandoc](http://github.com/vim-pandoc/vim-pandoc), to set the
|
||||
`pandoc` filetype (otherwise you'll have to set it up yourself).
|
||||
|
||||
## Installation
|
||||
|
||||
The repository follows the usual bundle structure, so it's easy to install it
|
||||
using [pathogen](https://github.com/tpope/vim-pathogen),
|
||||
[Vundle](https://github.com/gmarik/vundle) or NeoBundle.
|
||||
|
||||
For Vundle users, it should be enough to add
|
||||
|
||||
Plugin 'vim-pandoc/vim-pandoc-syntax'
|
||||
|
||||
to `.vimrc`, and then run `:PluginInstall`.
|
||||
|
||||
For those who need it, a tarball is available from
|
||||
[here](https://github.com/vim-pandoc/vim-pandoc-syntax/archive/master.zip).
|
||||
|
||||
### Standalone
|
||||
|
||||
If you want to use `vim-pandoc-syntax` without vim-pandoc, you'll need to tell
|
||||
Vim to load it for certain files. Just add something like this to your vimrc:
|
||||
|
||||
~~~ vim
|
||||
augroup pandoc_syntax
|
||||
au! BufNewFile,BufFilePre,BufRead *.md set filetype=markdown.pandoc
|
||||
augroup END
|
||||
~~~
|
||||
|
||||
For vimwiki users, use
|
||||
|
||||
~~~ vim
|
||||
augroup pandoc_syntax
|
||||
autocmd! FileType vimwiki set syntax=markdown.pandoc
|
||||
augroup END
|
||||
~~~
|
||||
|
||||
|
||||
## Features
|
||||
|
||||
* Supports most (if not all) pandoc's markdown features, including tables,
|
||||
delimited codeblocks, references, etc.
|
||||
* Can handle multiple embedded languages (LaTeX, YAML headers, many languages
|
||||
in delimited codeblocks). Some commands are provided to help with this (see
|
||||
`:help pandoc-syntax-commands`)
|
||||
* Pretty display using `conceal` (optional).
|
||||
* Configurable (see `:help pandoc-syntax-configuration` for an overview of the
|
||||
options).
|
||||
|
||||
## Screenshots
|
||||
|
||||
![img1](http://i.imgur.com/UKXbG2V.png)
|
||||
![img2](http://i.imgur.com/z8FpxRP.png)
|
||||
![img3](http://i.imgur.com/ziNjQiE.png)
|
||||
![img4](http://i.imgur.com/UKoOxzP.png)
|
|
@ -0,0 +1,134 @@
|
|||
" vim: set fdm=marker :
|
||||
"
|
||||
" file: autoload/pandoc/syntax/color.vim
|
||||
" author: Felipe Morales
|
||||
" version: 0.1
|
||||
" description: functions to manipulate color
|
||||
|
||||
" Conversion: {{{1
|
||||
"
|
||||
" color conversion algorithms adapted from http://www.cs.rit.edu/~ncs/color/t_convert.html
|
||||
|
||||
function! s:RGB2HSV(r, g, b) abort "{{{2
|
||||
let rp = a:r/255.0
|
||||
let gp = a:g/255.0
|
||||
let bp = a:b/255.0
|
||||
let cmax = max([float2nr(rp*100.0), float2nr(gp*100.0), float2nr(bp*100.0)])/100.0
|
||||
let cmin = min([float2nr(rp*100.0), float2nr(gp*100.0), float2nr(bp*100.0)])/100.0
|
||||
let delta = cmax - cmin
|
||||
let v = cmax
|
||||
if cmax == 0.0
|
||||
let s = 0.0
|
||||
let h = -1.0
|
||||
else
|
||||
let s = delta/cmax
|
||||
if rp == cmax
|
||||
let h = (gp - bp)/ delta
|
||||
elseif gp == cmax
|
||||
let h = (2.0 + (bp - rp))/delta
|
||||
else
|
||||
let h = (4.0 + (rp - gp))/delta
|
||||
endif
|
||||
let h = h * 60.0
|
||||
if h < 0.0
|
||||
let h = h+ 360.0
|
||||
endif
|
||||
endif
|
||||
return [h, s, v]
|
||||
endfunction
|
||||
|
||||
function! s:HSV2RGB(h, s, v) abort "{{{2
|
||||
if a:s == 0 "achromatic
|
||||
return [a:v, a:v, a:v]
|
||||
endif
|
||||
let h = a:h/60 " sector 0 to 5
|
||||
let i = floor(h)
|
||||
let f = h - i
|
||||
let p = a:v * ( 1 - a:s)
|
||||
let q = a:v * ( 1 - a:s * f)
|
||||
let t = a:v * ( 1 - a:s * (1 - f))
|
||||
|
||||
if i == 0
|
||||
let r = a:v
|
||||
let g = t
|
||||
let b = p
|
||||
elseif i == 1
|
||||
let r = q
|
||||
let g = a:v
|
||||
let b = p
|
||||
elseif i == 2
|
||||
let r = p
|
||||
let g = a:v
|
||||
let b = t
|
||||
elseif i == 3
|
||||
let r = p
|
||||
let g = q
|
||||
let b = a:v
|
||||
elseif i == 4
|
||||
let r = t
|
||||
let g = p
|
||||
let b = a:v
|
||||
else
|
||||
let r = a:v
|
||||
let g = p
|
||||
let b = q
|
||||
endif
|
||||
return [float2nr(r*255), float2nr(g*255), float2nr(b*255)]
|
||||
endfunction
|
||||
|
||||
function! s:Hex2RGB(hex) abort "{{{2
|
||||
let hex = split(a:hex, '\zs')
|
||||
let h_r = '0x'.join(hex[:1], '')
|
||||
let h_g = '0x'.join(hex[2:3], '')
|
||||
let h_b = '0x'.join(hex[4:6], '')
|
||||
return map([h_r, h_g, h_b], 'eval(v:val)')
|
||||
endfunction
|
||||
|
||||
function! s:RGB2Hex(r, g, b) abort "{{{2
|
||||
let h_r = printf('%02x', a:r)
|
||||
let h_g = printf('%02x', a:g)
|
||||
let h_b = printf('%02x', a:b)
|
||||
return join([h_r, h_g, h_b], '')
|
||||
endfunction
|
||||
|
||||
" Instrospection: {{{1
|
||||
|
||||
function! pandoc#syntax#color#Instrospect(group) abort
|
||||
redir => hi_output
|
||||
exe 'silent hi '. a:group
|
||||
redir END
|
||||
let hi_output = split(hi_output, '\n')[0]
|
||||
let parts = split(hi_output, '\s\+')[2:]
|
||||
if parts[0] ==# 'links'
|
||||
let info = Hi_Info(parts[2])
|
||||
let info['linked_to'] = parts[2]
|
||||
else
|
||||
let info = {}
|
||||
for i in parts
|
||||
let data = split(i, '=')
|
||||
let info[data[0]] = data[1]
|
||||
endfor
|
||||
endif
|
||||
return info
|
||||
endfunction
|
||||
|
||||
" Palette: {{{1
|
||||
|
||||
function! pandoc#syntax#color#SaturationPalette(hex, partitions) abort
|
||||
let rgb = s:Hex2RGB(a:hex)
|
||||
let hsv = s:RGB2HSV(rgb[0], rgb[1], rgb[2])
|
||||
let hsv_palette = []
|
||||
for i in range(1, a:partitions)
|
||||
let s = 1.0/a:partitions * i " linear
|
||||
call add(hsv_palette, [hsv[0], s, hsv[2]])
|
||||
endfor
|
||||
let rgb_palette = []
|
||||
for hsv in hsv_palette
|
||||
call add(rgb_palette, s:HSV2RGB(hsv[0], hsv[1], hsv[2]))
|
||||
endfor
|
||||
let hex_palette = []
|
||||
for rgb in rgb_palette
|
||||
call add(hex_palette, s:RGB2Hex(rgb[0], rgb[1], rgb[2]))
|
||||
endfor
|
||||
return hex_palette
|
||||
endfunction
|
|
@ -0,0 +1,138 @@
|
|||
*vim-pandoc-syntax*
|
||||
*pandoc-syntax*
|
||||
|
||||
OVERVIEW
|
||||
|
||||
vim-pandoc-syntax is a standalone syntax file for highlighting pandoc flavored
|
||||
markdown documents, to be used alongside vim-pandoc (see |pandoc|). It is
|
||||
based on the version once provided by vim-pandoc-legacy, which it obsoletes.
|
||||
|
||||
The project resides at http://www.github.com/vim-pandoc/vim-pandoc-syntax. You
|
||||
are welcome to help, suggest ideas, report bugs or contribute code.
|
||||
|
||||
|
||||
CONFIGURATION *vim-pandoc-syntax-configuration*
|
||||
|
||||
+ *g:pandoc#syntax#conceal#use*
|
||||
Use |conceal| for pretty highlighting. Default is 1 for vim version > 7.3
|
||||
|
||||
+ *g:pandoc#syntax#conceal#blacklist* A list of rules |conceal| should not be
|
||||
used with. Works as a blacklist, and defaults to [] (use conceal everywhere).
|
||||
|
||||
This is a list of the rules wich can be used here:
|
||||
|
||||
- titleblock
|
||||
- image
|
||||
- block
|
||||
- subscript
|
||||
- superscript
|
||||
- strikeout
|
||||
- atx
|
||||
- codeblock_start
|
||||
- codeblock_delim
|
||||
- footnote
|
||||
- definition
|
||||
- list
|
||||
- newline
|
||||
- dashes
|
||||
- ellipses
|
||||
- quotes
|
||||
- inlinecode
|
||||
- inlinemath
|
||||
|
||||
To review what are the rules for, look for the call to |s:WithConceal| in
|
||||
syntax/pandoc.vim that takes the corresponding rulename as first argument.
|
||||
|
||||
+ *g:pandoc#syntax#conceal#cchar_overrides*
|
||||
A dictionary of what characters should be used in conceal rules. These
|
||||
override the defaults (see those in |s:cchars|). For example, if you prefer
|
||||
to mark footnotes with the `*` symbol:
|
||||
|
||||
let g:pandoc#syntax#conceal#cchar_overrides = {"footnote" : "*"}
|
||||
|
||||
+ *g:pandoc#syntax#conceal#urls*
|
||||
Conceal the urls in links.
|
||||
|
||||
+ *g:pandoc#syntax#codeblocks#ignore*
|
||||
Prevent highlighting specific codeblock types so that they remain Normal.
|
||||
Codeblock types include 'definition' for codeblocks inside definition blocks
|
||||
and 'delimited' for delimited codeblocks. Default = []
|
||||
|
||||
+ *g:pandoc#syntax#codeblocks#embeds#use*
|
||||
Use embedded highlighting for delimited codeblocks where a language is
|
||||
specified. Default = 1
|
||||
|
||||
+ *g:pandoc#syntax#codeblocks#embeds#langs*
|
||||
For what languages and using what syntax files to highlight embeds. This is
|
||||
a list of language names. When the language pandoc and vim use don't match,
|
||||
you can use the "PANDOC=VIM" syntax. For example:
|
||||
|
||||
let g:pandoc#syntax#codeblocks#embeds#langs = ["ruby",
|
||||
"literatehaskell=lhaskell", "bash=sh"]
|
||||
|
||||
+ *g:pandoc#syntax#style#emphases*
|
||||
Use italics and strong in emphases. Default = 1
|
||||
0 will add "block" to |g:pandoc#syntax#conceal#blacklist|, because otherwise
|
||||
you couldn't tell where the styles are applied.
|
||||
|
||||
+ *g:pandoc#syntax#style#underline_special*
|
||||
Underline subscript, superscript and strikeout text styles. Default = 1
|
||||
|
||||
+ *g:pandoc#syntax#style#use_definition_lists*
|
||||
Detect and highlight definition lists. Disabling this can improve
|
||||
performance. Default = 1 (i.e., enabled by default)
|
||||
|
||||
COMMANDS *pandoc-syntax-commands*
|
||||
|
||||
+ *:PandocHighlight* LANG
|
||||
|
||||
Enable embedded highlighting for language LANG in codeblocks. Uses the
|
||||
syntax for items in |g:pandoc#syntax#codeblocks#embeds#langs|.
|
||||
|
||||
+ *:PandocUnhighlight* LANG
|
||||
|
||||
Disable embedded highlighting for language LANG in codeblocks.
|
||||
|
||||
FUNCTIONS *pandoc-syntax-functions*
|
||||
|
||||
+ *EnableEmbedsForCodeblocksWithLang(langname)*
|
||||
As |:PandocHighlight|.
|
||||
|
||||
+ *DisableEmbedsForCodeblocksWithLang(langname)*
|
||||
As |:PandocUnhighlight|.
|
||||
|
||||
+ *s:WithConceal(RULE_GROUP,RULE,CONCEAL_RULE)*
|
||||
Executes a |:syntax| command RULE, which could incorporate conceal rules
|
||||
(CONCEAL_RULE) if conceals are enabled. The rule gets named RULE_GROUP,
|
||||
as used in |g:pandoc#syntax#conceal#blacklist|.
|
||||
|
||||
For example, if conceals are enabled
|
||||
|
||||
call s:WithConceal("atx", 'syn match AtxStart /#/ contained
|
||||
containedin=pandocAtxHeader', 'conceal cchar='.s:cchars["atx"])
|
||||
|
||||
will execute
|
||||
|
||||
syn match AtxStart /#/ contained containedin=pandocAtxHeader conceal cchar=§
|
||||
|
||||
and
|
||||
|
||||
syn match AtxStart /#/ contained containedin=pandocAtxHeader
|
||||
|
||||
otherwise.
|
||||
|
||||
TODO
|
||||
|
||||
This is a list of know stuff missing from the syntax file.
|
||||
|
||||
1. Highlight code within verbatim text when a language is specified in the attrib,
|
||||
like in
|
||||
|
||||
hey, `print 1 + 3`.{python} is no longer valid in python 3.
|
||||
|
||||
|
||||
MISC
|
||||
|
||||
The plugin sets a global variable, *g:vim_pandoc_syntax_exists* to indicate its
|
||||
existence. This is currently used by vim-pandoc to switch between syntax
|
||||
assisted and basic folding rules.
|
|
@ -0,0 +1 @@
|
|||
let g:vim_pandoc_syntax_exists = 1
|
|
@ -0,0 +1,5 @@
|
|||
" vim: set fdm=marker:
|
||||
|
||||
" Pandoc: {{{1
|
||||
" load vim-pandoc-syntax {{{2
|
||||
runtime syntax/pandoc.vim
|
|
@ -0,0 +1,714 @@
|
|||
scriptencoding utf-8
|
||||
" vim: set fdm=marker foldlevel=0:
|
||||
"
|
||||
" Vim syntax file
|
||||
"
|
||||
" Language: Pandoc (superset of Markdown)
|
||||
" Maintainer: Felipe Morales <hel.sheep@gmail.com>
|
||||
" Maintainer: Caleb Maclennan <caleb@alerque.com>
|
||||
" Contributor: David Sanson <dsanson@gmail.com>
|
||||
" Contributor: Jorge Israel Peña <jorge.israel.p@gmail.com>
|
||||
" OriginalAuthor: Jeremy Schultz <taozhyn@gmail.com>
|
||||
" Version: 5.0
|
||||
|
||||
" Configuration: {{{1
|
||||
"
|
||||
" use conceal? {{{2
|
||||
if !exists('g:pandoc#syntax#conceal#use')
|
||||
if v:version < 703
|
||||
let g:pandoc#syntax#conceal#use = 0
|
||||
else
|
||||
let g:pandoc#syntax#conceal#use = 1
|
||||
endif
|
||||
else
|
||||
" exists, but we cannot use it, disable anyway
|
||||
if v:version < 703
|
||||
let g:pandoc#syntax#conceal#use = 0
|
||||
endif
|
||||
endif
|
||||
"}}}2
|
||||
|
||||
" what groups not to use conceal in. works as a blacklist {{{2
|
||||
if !exists('g:pandoc#syntax#conceal#blacklist')
|
||||
let g:pandoc#syntax#conceal#blacklist = []
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" cchars used in conceal rules {{{2
|
||||
" utf-8 defaults (preferred)
|
||||
if &encoding ==# 'utf-8'
|
||||
let s:cchars = {
|
||||
\'newline': '↵',
|
||||
\'image': '▨',
|
||||
\'super': 'ⁿ',
|
||||
\'sub': 'ₙ',
|
||||
\'strike': 'x̶',
|
||||
\'atx': '§',
|
||||
\'codelang': 'λ',
|
||||
\'codeend': '—',
|
||||
\'abbrev': '→',
|
||||
\'footnote': '†',
|
||||
\'definition': ' ',
|
||||
\'li': '•',
|
||||
\'html_c_s': '‹',
|
||||
\'html_c_e': '›',
|
||||
\'quote_s': '“',
|
||||
\'quote_e': '”'}
|
||||
else
|
||||
" ascii defaults
|
||||
let s:cchars = {
|
||||
\'newline': ' ',
|
||||
\'image': 'i',
|
||||
\'super': '^',
|
||||
\'sub': '_',
|
||||
\'strike': '~',
|
||||
\'atx': '#',
|
||||
\'codelang': 'l',
|
||||
\'codeend': '-',
|
||||
\'abbrev': 'a',
|
||||
\'footnote': 'f',
|
||||
\'definition': ' ',
|
||||
\'li': '*',
|
||||
\'html_c_s': '+',
|
||||
\'html_c_e': '+'}
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" if the user has a dictionary with replacements for the default cchars, use those {{{2
|
||||
if exists('g:pandoc#syntax#conceal#cchar_overrides')
|
||||
let s:cchars = extend(s:cchars, g:pandoc#syntax#conceal#cchar_overrides)
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
"should the urls in links be concealed? {{{2
|
||||
if !exists('g:pandoc#syntax#conceal#urls')
|
||||
let g:pandoc#syntax#conceal#urls = 0
|
||||
endif
|
||||
" should backslashes in escapes be concealed? {{{2
|
||||
if !exists('g:pandoc#syntax#conceal#backslash')
|
||||
let g:pandoc#syntax#conceal#backslash = 0
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" leave specified codeblocks as Normal (i.e. 'unhighlighted') {{{2
|
||||
if !exists('g:pandoc#syntax#codeblocks#ignore')
|
||||
let g:pandoc#syntax#codeblocks#ignore = []
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" use embedded highlighting for delimited codeblocks where a language is specifed. {{{2
|
||||
if !exists('g:pandoc#syntax#codeblocks#embeds#use')
|
||||
let g:pandoc#syntax#codeblocks#embeds#use = 1
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" for what languages and using what vim syntax files highlight those embeds. {{{2
|
||||
" defaults to None.
|
||||
if !exists('g:pandoc#syntax#codeblocks#embeds#langs')
|
||||
let g:pandoc#syntax#codeblocks#embeds#langs = []
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" use italics ? {{{2
|
||||
if !exists('g:pandoc#syntax#style#emphases')
|
||||
let g:pandoc#syntax#style#emphases = 1
|
||||
endif
|
||||
" if 0, we don't conceal the emphasis marks, otherwise there wouldn't be a way
|
||||
" to tell where the styles apply.
|
||||
if g:pandoc#syntax#style#emphases == 0
|
||||
call add(g:pandoc#syntax#conceal#blacklist, 'block')
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" underline subscript, superscript and strikeout? {{{2
|
||||
if !exists('g:pandoc#syntax#style#underline_special')
|
||||
let g:pandoc#syntax#style#underline_special = 1
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" protect code blocks? {{{2
|
||||
if !exists('g:pandoc#syntax#protect#codeblocks')
|
||||
let g:pandoc#syntax#protect#codeblocks = 1
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" use color column? {{{2
|
||||
if !exists('g:pandoc#syntax#colorcolumn')
|
||||
let g:pandoc#syntax#colorcolumn = 0
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" highlight new lines? {{{2
|
||||
if !exists('g:pandoc#syntax#newlines')
|
||||
let g:pandoc#syntax#newlines = 1
|
||||
endif
|
||||
" }}}
|
||||
|
||||
" detect roman-numeral list items? {{{2
|
||||
if !exists('g:pandoc#syntax#roman_lists')
|
||||
let g:pandoc#syntax#roman_lists = 0
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" disable syntax highlighting for definition lists? (better performances) {{{2
|
||||
if !exists('g:pandoc#syntax#use_definition_lists')
|
||||
let g:pandoc#syntax#use_definition_lists = 1
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
" Functions: {{{1
|
||||
" EnableEmbedsforCodeblocksWithLang {{{2
|
||||
function! EnableEmbedsforCodeblocksWithLang(entry)
|
||||
" prevent embedded language syntaxes from changing 'foldmethod'
|
||||
if has('folding')
|
||||
let s:foldmethod = &l:foldmethod
|
||||
let s:foldtext = &l:foldtext
|
||||
endif
|
||||
|
||||
try
|
||||
let s:langname = matchstr(a:entry, '^[^=]*')
|
||||
let s:langsyntaxfile = matchstr(a:entry, '[^=]*$')
|
||||
unlet! b:current_syntax
|
||||
exe 'syn include @'.toupper(s:langname).' syntax/'.s:langsyntaxfile.'.vim'
|
||||
" We might have just turned off spellchecking by including the file,
|
||||
" so we turn it back on here.
|
||||
exe 'syntax spell toplevel'
|
||||
exe 'syn region pandocDelimitedCodeBlock_' . s:langname . ' start=/\(\_^\( \+\|\t\)\=\(`\{3,}`*\|\~\{3,}\~*\)\s*\%({[^.]*\.\)\=' . s:langname . '\>.*\n\)\@<=\_^/' .
|
||||
\' end=/\_$\n\(\( \+\|\t\)\=\(`\{3,}`*\|\~\{3,}\~*\)\_$\n\_$\)\@=/ contained containedin=pandocDelimitedCodeBlock' .
|
||||
\' contains=@' . toupper(s:langname)
|
||||
exe 'syn region pandocDelimitedCodeBlockinBlockQuote_' . s:langname . ' start=/>\s\(`\{3,}`*\|\~\{3,}\~*\)\s*\%({[^.]*\.\)\=' . s:langname . '\>/' .
|
||||
\ ' end=/\(`\{3,}`*\|\~\{3,}\~*\)/ contained containedin=pandocDelimitedCodeBlock' .
|
||||
\' contains=@' . toupper(s:langname) .
|
||||
\',pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd,pandodDelimitedCodeblockLang,pandocBlockQuoteinDelimitedCodeBlock'
|
||||
catch /E484/
|
||||
echo "No syntax file found for '" . s:langsyntaxfile . "'"
|
||||
endtry
|
||||
|
||||
if exists('s:foldmethod') && s:foldmethod !=# &l:foldmethod
|
||||
let &l:foldmethod = s:foldmethod
|
||||
endif
|
||||
if exists('s:foldtext') && s:foldtext !=# &l:foldtext
|
||||
let &l:foldtext = s:foldtext
|
||||
endif
|
||||
endfunction
|
||||
" }}}2
|
||||
|
||||
" DisableEmbedsforCodeblocksWithLang {{{2
|
||||
function! DisableEmbedsforCodeblocksWithLang(langname)
|
||||
try
|
||||
exe 'syn clear pandocDelimitedCodeBlock_'.a:langname
|
||||
exe 'syn clear pandocDelimitedCodeBlockinBlockQuote_'.a:langname
|
||||
catch /E28/
|
||||
echo "No existing highlight definitions found for '" . a:langname . "'"
|
||||
endtry
|
||||
endfunction
|
||||
" }}}2
|
||||
|
||||
" WithConceal {{{2
|
||||
function! s:WithConceal(rule_group, rule, conceal_rule)
|
||||
let l:rule_tail = ''
|
||||
if g:pandoc#syntax#conceal#use != 0
|
||||
if index(g:pandoc#syntax#conceal#blacklist, a:rule_group) == -1
|
||||
let l:rule_tail = ' ' . a:conceal_rule
|
||||
endif
|
||||
endif
|
||||
execute a:rule . l:rule_tail
|
||||
endfunction
|
||||
" }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
" Commands: {{{1
|
||||
command! -buffer -nargs=1 -complete=syntax PandocHighlight call EnableEmbedsforCodeblocksWithLang(<f-args>)
|
||||
command! -buffer -nargs=1 -complete=syntax PandocUnhighlight call DisableEmbedsforCodeblocksWithLang(<f-args>)
|
||||
" }}}1
|
||||
|
||||
" BASE:
|
||||
syntax clear
|
||||
syntax spell toplevel
|
||||
" apply extra settings: {{{1
|
||||
if g:pandoc#syntax#colorcolumn == 1
|
||||
exe 'setlocal colorcolumn='.string(&textwidth+5)
|
||||
elseif g:pandoc#syntax#colorcolumn == 2
|
||||
exe 'setlocal colorcolumn='.join(range(&textwidth+5, 2*&columns), ',')
|
||||
endif
|
||||
if g:pandoc#syntax#conceal#use != 0
|
||||
setlocal conceallevel=2
|
||||
endif
|
||||
" }}}1
|
||||
|
||||
" Syntax Rules: {{{1
|
||||
|
||||
" Embeds: {{{2
|
||||
|
||||
" prevent embedded language syntaxes from changing 'foldmethod'
|
||||
if has('folding')
|
||||
let s:foldmethod = &l:foldmethod
|
||||
endif
|
||||
|
||||
" HTML: {{{3
|
||||
" Set embedded HTML highlighting
|
||||
syn include @HTML syntax/html.vim
|
||||
syn match pandocHTML /<\/\?\a\_.\{-}>/ contains=@HTML
|
||||
" Support HTML multi line comments
|
||||
syn region pandocHTMLComment start=/<!--\s\=/ end=/\s\=-->/ keepend contains=pandocHTMLCommentStart,pandocHTMLCommentEnd
|
||||
call s:WithConceal('html_c_s', 'syn match pandocHTMLCommentStart /<!--/ contained', 'conceal cchar='.s:cchars['html_c_s'])
|
||||
call s:WithConceal('html_c_e', 'syn match pandocHTMLCommentEnd /-->/ contained', 'conceal cchar='.s:cchars['html_c_e'])
|
||||
" }}}3
|
||||
|
||||
" LaTeX: {{{3
|
||||
" Set embedded LaTex (pandoc extension) highlighting
|
||||
" Unset current_syntax so the 2nd include will work
|
||||
unlet b:current_syntax
|
||||
syn include @LATEX syntax/tex.vim
|
||||
if index(g:pandoc#syntax#conceal#blacklist, 'inlinemath') == -1
|
||||
" Can't use WithConceal here because it will mess up all other conceals
|
||||
" when dollar signs are used normally. It must be skipped entirely if
|
||||
" inlinemath is blacklisted
|
||||
syn region pandocLaTeXInlineMath start=/\v\\@<!\$\S@=/ end=/\v\\@<!\$\d@!/ keepend contains=@LATEX
|
||||
syn region pandocLaTeXInlineMath start=/\\\@<!\\(/ end=/\\\@<!\\)/ keepend contains=@LATEX
|
||||
endif
|
||||
syn match pandocEscapedDollar /\\\$/ conceal cchar=$
|
||||
syn match pandocProtectedFromInlineLaTeX /\\\@<!\${.*}\(\(\s\|[[:punct:]]\)\([^$]*\|.*\(\\\$.*\)\{2}\)\n\n\|$\)\@=/ display
|
||||
" contains=@LATEX
|
||||
syn region pandocLaTeXMathBlock start=/\$\$/ end=/\$\$/ keepend contains=@LATEX
|
||||
syn region pandocLaTeXMathBlock start=/\\\@<!\\\[/ end=/\\\@<!\\\]/ keepend contains=@LATEX
|
||||
syn match pandocLaTeXCommand /\\[[:alpha:]]\+\(\({.\{-}}\)\=\(\[.\{-}\]\)\=\)*/ contains=@LATEX
|
||||
syn region pandocLaTeXRegion start=/\\begin{\z(.\{-}\)}/ end=/\\end{\z1}/ keepend contains=@LATEX
|
||||
" we rehighlight sectioning commands, because otherwise tex.vim captures all text until EOF or a new sectioning command
|
||||
syn region pandocLaTexSection start=/\\\(part\|chapter\|\(sub\)\{,2}section\|\(sub\)\=paragraph\)\*\=\(\[.*\]\)\={/ end=/\}/ keepend
|
||||
syn match pandocLaTexSectionCmd /\\\(part\|chapter\|\(sub\)\{,2}section\|\(sub\)\=paragraph\)/ contained containedin=pandocLaTexSection
|
||||
syn match pandocLaTeXDelimiter /[[\]{}]/ contained containedin=pandocLaTexSection
|
||||
" }}}3
|
||||
|
||||
if exists('s:foldmethod') && s:foldmethod !=# &l:foldmethod
|
||||
let &l:foldmethod = s:foldmethod
|
||||
endif
|
||||
|
||||
" }}}2
|
||||
|
||||
" Titleblock: {{{2
|
||||
syn region pandocTitleBlock start=/\%^%/ end=/\n\n/ contains=pandocReferenceLabel,pandocReferenceURL,pandocNewLine
|
||||
call s:WithConceal('titleblock', 'syn match pandocTitleBlockMark /%\ / contained containedin=pandocTitleBlock,pandocTitleBlockTitle', 'conceal')
|
||||
syn match pandocTitleBlockTitle /\%^%.*\n/ contained containedin=pandocTitleBlock
|
||||
" }}}2
|
||||
|
||||
" Blockquotes: {{{2
|
||||
syn match pandocBlockQuote /^\s\{,3}>.*\n\(.*\n\@1<!\n\)*/ contains=@Spell,pandocEmphasis,pandocStrong,pandocPCite,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocUListItem,pandocNoFormatted,pandocAmpersandEscape,pandocLaTeXInlineMath,pandocEscapedDollar,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXRegion skipnl
|
||||
syn match pandocBlockQuoteMark /\_^\s\{,3}>/ contained containedin=pandocEmphasis,pandocStrong,pandocPCite,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocUListItem,pandocNoFormatted
|
||||
" }}}2
|
||||
|
||||
" Code Blocks: {{{2
|
||||
if g:pandoc#syntax#protect#codeblocks == 1
|
||||
syn match pandocCodeblock /\([ ]\{4}\|\t\).*$/
|
||||
endif
|
||||
syn region pandocCodeBlockInsideIndent start=/\(\(\d\|\a\|*\).*\n\)\@<!\(^\(\s\{8,}\|\t\+\)\).*\n/ end=/.\(\n^\s*\n\)\@=/ contained
|
||||
" }}}2
|
||||
|
||||
" Links: {{{2
|
||||
|
||||
" Base: {{{3
|
||||
syn region pandocReferenceLabel matchgroup=pandocOperator start=/!\{,1}\\\@<!\^\@<!\[/ skip=/\(\\\@<!\]\]\@=\|`.*\\\@<!].*`\)/ end=/\\\@<!\]/ keepend display
|
||||
if g:pandoc#syntax#conceal#urls == 1
|
||||
syn region pandocReferenceURL matchgroup=pandocOperator start=/\]\@1<=(/ end=/)/ keepend conceal
|
||||
else
|
||||
syn region pandocReferenceURL matchgroup=pandocOperator start=/\]\@1<=(/ end=/)/ keepend
|
||||
endif
|
||||
" let's not consider "a [label] a" as a label, remove formatting - Note: breaks implicit links
|
||||
syn match pandocNoLabel /\]\@1<!\(\s\{,3}\|^\)\[[^\[\]]\{-}\]\(\s\+\|$\)[\[(]\@!/ contains=pandocPCite
|
||||
syn match pandocLinkTip /\s*".\{-}"/ contained containedin=pandocReferenceURL contains=@Spell,pandocAmpersandEscape display
|
||||
call s:WithConceal('image', 'syn match pandocImageIcon /!\[\@=/ display', 'conceal cchar='. s:cchars['image'])
|
||||
" }}}3
|
||||
|
||||
" Definitions: {{{3
|
||||
syn region pandocReferenceDefinition start=/\[.\{-}\]:/ end=/\(\n\s*".*"$\|$\)/ keepend
|
||||
syn match pandocReferenceDefinitionLabel /\[\zs.\{-}\ze\]:/ contained containedin=pandocReferenceDefinition display
|
||||
syn match pandocReferenceDefinitionAddress /:\s*\zs.*/ contained containedin=pandocReferenceDefinition
|
||||
syn match pandocReferenceDefinitionTip /\s*".\{-}"/ contained containedin=pandocReferenceDefinition,pandocReferenceDefinitionAddress contains=@Spell,pandocAmpersandEscape
|
||||
" }}}3
|
||||
|
||||
" Automatic_links: {{{3
|
||||
syn match pandocAutomaticLink /<\(https\{0,1}.\{-}\|[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~.]\{-}@[A-Za-z0-9\-]\{-}\.\w\{-}\)>/ contains=NONE
|
||||
" }}}3
|
||||
|
||||
" }}}2
|
||||
|
||||
" Citations: {{{2
|
||||
" parenthetical citations
|
||||
syn match pandocPCite "\^\@<!\[[^\[\]]\{-}-\{0,1}@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*.\{-}\]" contains=pandocEmphasis,pandocStrong,pandocLatex,pandocCiteKey,@Spell,pandocAmpersandEscape display
|
||||
" in-text citations with location
|
||||
syn match pandocICite "@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*\s\[.\{-1,}\]" contains=pandocCiteKey,@Spell display
|
||||
" cite keys
|
||||
syn match pandocCiteKey /\(-\=@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*\)/ containedin=pandocPCite,pandocICite contains=@NoSpell display
|
||||
syn match pandocCiteAnchor /[-@]/ contained containedin=pandocCiteKey display
|
||||
syn match pandocCiteLocator /[\[\]]/ contained containedin=pandocPCite,pandocICite
|
||||
" }}}2
|
||||
|
||||
" Text Styles: {{{2
|
||||
|
||||
" Emphasis: {{{3
|
||||
call s:WithConceal('block', 'syn region pandocEmphasis matchgroup=pandocOperator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\*\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath,pandocAmpersandEscape', 'concealends')
|
||||
call s:WithConceal('block', 'syn region pandocEmphasis matchgroup=pandocOperator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@1<=_\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,pandocNoFormattedInEmphasis,pandocLatexInlineMath,pandocAmpersandEscape', 'concealends')
|
||||
" }}}3
|
||||
|
||||
" Strong: {{{3
|
||||
call s:WithConceal('block', 'syn region pandocStrong matchgroup=pandocOperator start=/\(\\\@<!\*\)\{2}/ end=/\(\\\@<!\*\)\{2}/ contains=@Spell,pandocNoFormattedInStrong,pandocLatexInlineMath,pandocAmpersandEscape', 'concealends')
|
||||
call s:WithConceal('block', 'syn region pandocStrong matchgroup=pandocOperator start=/__/ end=/__/ contains=@Spell,pandocNoFormattedInStrong,pandocLatexInlineMath,pandocAmpersandEscape', 'concealends')
|
||||
" }}}3
|
||||
|
||||
" Strong Emphasis: {{{3
|
||||
call s:WithConceal('block', 'syn region pandocStrongEmphasis matchgroup=pandocOperator start=/\*\{3}\(\S[^*]*\(\*\S\|\n[^*]*\*\S\)\)\@=/ end=/\S\@<=\*\{3}/ contains=@Spell,pandocAmpersandEscape', 'concealends')
|
||||
call s:WithConceal('block', 'syn region pandocStrongEmphasis matchgroup=pandocOperator start=/\(___\)\S\@=/ end=/\S\@<=___/ contains=@Spell,pandocAmpersandEscape', 'concealends')
|
||||
" }}}3
|
||||
|
||||
" Mixed: {{{3
|
||||
call s:WithConceal('block', 'syn region pandocStrongInEmphasis matchgroup=pandocOperator start=/\*\*/ end=/\*\*/ contained containedin=pandocEmphasis contains=@Spell,pandocAmpersandEscape', 'concealends')
|
||||
call s:WithConceal('block', 'syn region pandocStrongInEmphasis matchgroup=pandocOperator start=/__/ end=/__/ contained containedin=pandocEmphasis contains=@Spell,pandocAmpersandEscape', 'concealends')
|
||||
call s:WithConceal('block', 'syn region pandocEmphasisInStrong matchgroup=pandocOperator start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=\*\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=pandocStrong contains=@Spell,pandocAmpersandEscape', 'concealends')
|
||||
call s:WithConceal('block', 'syn region pandocEmphasisInStrong matchgroup=pandocOperator start=/\\\@<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=_\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=pandocStrong contains=@Spell,pandocAmpersandEscape', 'concealends')
|
||||
" }}}3
|
||||
|
||||
" Inline Code: {{{3
|
||||
" Using single back ticks
|
||||
call s:WithConceal('inlinecode', 'syn region pandocNoFormatted matchgroup=pandocOperator start=/\\\@<!`/ end=/\\\@<!`/ nextgroup=pandocNoFormattedAttrs', 'concealends')
|
||||
call s:WithConceal('inlinecode', 'syn region pandocNoFormattedInEmphasis matchgroup=pandocOperator start=/\\\@<!`/ end=/\\\@<!`/ nextgroup=pandocNoFormattedAttrs contained', 'concealends')
|
||||
call s:WithConceal('inlinecode', 'syn region pandocNoFormattedInStrong matchgroup=pandocOperator start=/\\\@<!`/ end=/\\\@<!`/ nextgroup=pandocNoFormattedAttrs contained', 'concealends')
|
||||
" Using double back ticks
|
||||
call s:WithConceal('inlinecode', 'syn region pandocNoFormatted matchgroup=pandocOperator start=/\\\@<!``/ end=/\\\@<!``/ nextgroup=pandocNoFormattedAttrs', 'concealends')
|
||||
call s:WithConceal('inlinecode', 'syn region pandocNoFormattedInEmphasis matchgroup=pandocOperator start=/\\\@<!``/ end=/\\\@<!``/ nextgroup=pandocNoFormattedAttrs contained', 'concealends')
|
||||
call s:WithConceal('inlinecode', 'syn region pandocNoFormattedInStrong matchgroup=pandocOperator start=/\\\@<!``/ end=/\\\@<!``/ nextgroup=pandocNoFormattedAttrs contained', 'concealends')
|
||||
syn match pandocNoFormattedAttrs /{.\{-}}/ contained
|
||||
" }}}3
|
||||
|
||||
" Subscripts: {{{3
|
||||
syn region pandocSubscript start=/\~\(\([[:graph:]]\(\\ \)\=\)\{-}\~\)\@=/ end=/\~/ keepend
|
||||
call s:WithConceal('subscript', 'syn match pandocSubscriptMark /\~/ contained containedin=pandocSubscript', 'conceal cchar='.s:cchars['sub'])
|
||||
" }}}3
|
||||
|
||||
" Superscript: {{{3
|
||||
syn region pandocSuperscript start=/\^\(\([[:graph:]]\(\\ \)\=\)\{-}\^\)\@=/ skip=/\\ / end=/\^/ keepend
|
||||
call s:WithConceal('superscript', 'syn match pandocSuperscriptMark /\^/ contained containedin=pandocSuperscript', 'conceal cchar='.s:cchars['super'])
|
||||
" }}}3
|
||||
|
||||
" Strikeout: {{{3
|
||||
syn region pandocStrikeout start=/\~\~/ end=/\~\~/ contains=@Spell,pandocAmpersandEscape keepend
|
||||
call s:WithConceal('strikeout', 'syn match pandocStrikeoutMark /\~\~/ contained containedin=pandocStrikeout', 'conceal cchar='.s:cchars['strike'])
|
||||
" }}}3
|
||||
|
||||
" }}}2
|
||||
|
||||
" Headers: {{{2
|
||||
syn match pandocAtxHeader /\(\%^\|<.\+>.*\n\|^\s*\n\)\@<=#\{1,6}.*\n/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape,pandocReferenceLabel,pandocReferenceURL display
|
||||
syn match pandocAtxHeaderMark /\(^#\{1,6}\|\\\@<!#\+\(\s*.*$\)\@=\)/ contained containedin=pandocAtxHeader
|
||||
call s:WithConceal('atx', 'syn match pandocAtxStart /#/ contained containedin=pandocAtxHeaderMark', 'conceal cchar='.s:cchars['atx'])
|
||||
syn match pandocSetexHeader /^.\+\n[=]\+$/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape
|
||||
syn match pandocSetexHeader /^.\+\n[-]\+$/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape
|
||||
syn match pandocHeaderAttr /{.*}/ contained containedin=pandocAtxHeader,pandocSetexHeader
|
||||
syn match pandocHeaderID /#[-_:.[:lower:][:upper:]]*/ contained containedin=pandocHeaderAttr
|
||||
" }}}2
|
||||
|
||||
" Line Blocks: {{{2
|
||||
syn region pandocLineBlock start=/^|/ end=/\(^|\(.*\n|\@!\)\@=.*\)\@<=\n/ transparent
|
||||
syn match pandocLineBlockDelimiter /^|/ contained containedin=pandocLineBlock
|
||||
" }}}2
|
||||
|
||||
" Tables: {{{2
|
||||
|
||||
" Simple: {{{3
|
||||
syn region pandocSimpleTable start=/\%#=2\(^.*[[:graph:]].*\n\)\@<!\(^.*[[:graph:]].*\n\)\(-\{2,}\s*\)\+\n\n\@!/ end=/\n\n/ containedin=ALLBUT,pandocDelimitedCodeBlock,pandocDelimitedCodeBlockStart,pandocYAMLHeader keepend
|
||||
syn match pandocSimpleTableDelims /\-/ contained containedin=pandocSimpleTable
|
||||
syn match pandocSimpleTableHeader /\%#=2\(^.*[[:graph:]].*\n\)\@<!\(^.*[[:graph:]].*\n\)/ contained containedin=pandocSimpleTable
|
||||
|
||||
syn region pandocTable start=/\%#=2^\(-\{2,}\s*\)\+\n\n\@!/ end=/\%#=2^\(-\{2,}\s*\)\+\n\n/ containedin=ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
|
||||
syn match pandocTableDelims /\-/ contained containedin=pandocTable
|
||||
syn region pandocTableMultilineHeader start=/\%#=2\(^-\{2,}\n\)\@<=./ end=/\%#=2\n-\@=/ contained containedin=pandocTable
|
||||
" }}}3
|
||||
|
||||
" Grid: {{{3
|
||||
syn region pandocGridTable start=/\%#=2\n\@1<=+-/ end=/+\n\n/ containedin=ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
|
||||
syn match pandocGridTableDelims /[\|=]/ contained containedin=pandocGridTable
|
||||
syn match pandocGridTableDelims /\%#=2\([\-+][\-+=]\@=\|[\-+=]\@1<=[\-+]\)/ contained containedin=pandocGridTable
|
||||
syn match pandocGridTableHeader /\%#=2\(^.*\n\)\(+=.*\)\@=/ contained containedin=pandocGridTable
|
||||
" }}}3
|
||||
|
||||
" Pipe: {{{3
|
||||
" with beginning and end pipes
|
||||
syn region pandocPipeTable start=/\%#=2\([+|]\n\)\@<!\n\@1<=|\(.*|\)\@=/ end=/|.*\n\(\n\|{\)/ containedin=ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
|
||||
" without beginning and end pipes
|
||||
syn region pandocPipeTable start=/\%#=2^.*\n-.\{-}|/ end=/|.*\n\n/ keepend
|
||||
syn match pandocPipeTableDelims /[\|\-:+]/ contained containedin=pandocPipeTable
|
||||
syn match pandocPipeTableHeader /\(^.*\n\)\(|-\)\@=/ contained containedin=pandocPipeTable
|
||||
syn match pandocPipeTableHeader /\(^.*\n\)\(-\)\@=/ contained containedin=pandocPipeTable
|
||||
" }}}3
|
||||
|
||||
syn match pandocTableHeaderWord /\<.\{-}\>/ contained containedin=pandocGridTableHeader,pandocPipeTableHeader contains=@Spell
|
||||
" }}}2
|
||||
|
||||
" Delimited Code Blocks: {{{2
|
||||
" this is here because we can override strikeouts and subscripts
|
||||
syn region pandocDelimitedCodeBlock start=/^\(>\s\)\?\z(\([ ]\+\|\t\)\=\~\{3,}\~*\)/ end=/^\z1\~*/ skipnl contains=pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd keepend
|
||||
syn region pandocDelimitedCodeBlock start=/^\(>\s\)\?\z(\([ ]\+\|\t\)\=`\{3,}`*\)/ end=/^\z1`*/ skipnl contains=pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd keepend
|
||||
call s:WithConceal('codeblock_start', 'syn match pandocDelimitedCodeBlockStart /\(\(\_^\n\_^\|\%^\)\(>\s\)\?\( \+\|\t\)\=\)\@<=\(\~\{3,}\~*\|`\{3,}`*\)/ contained containedin=pandocDelimitedCodeBlock nextgroup=pandocDelimitedCodeBlockLanguage', 'conceal cchar='.s:cchars['codelang'])
|
||||
syn match pandocDelimitedCodeBlockLanguage /\(\s\?\)\@<=.\+\(\_$\)\@=/ contained
|
||||
call s:WithConceal('codeblock_delim', 'syn match pandocDelimitedCodeBlockEnd /\(`\{3,}`*\|\~\{3,}\~*\)\(\_$\n\(>\s\)\?\_$\)\@=/ contained containedin=pandocDelimitedCodeBlock', 'conceal cchar='.s:cchars['codeend'])
|
||||
syn match pandocBlockQuoteinDelimitedCodeBlock '^>' contained containedin=pandocDelimitedCodeBlock
|
||||
syn match pandocCodePre /<pre>.\{-}<\/pre>/ skipnl
|
||||
syn match pandocCodePre /<code>.\{-}<\/code>/ skipnl
|
||||
|
||||
" enable highlighting for embedded region in codeblocks if there exists a
|
||||
" g:pandoc#syntax#codeblocks#embeds#langs *list*.
|
||||
"
|
||||
" entries in this list are the language code interpreted by pandoc,
|
||||
" if this differs from the name of the vim syntax file, append =vimname
|
||||
" e.g. let g:pandoc#syntax#codeblocks#embeds#langs = ["haskell", "literatehaskell=lhaskell"]
|
||||
"
|
||||
if g:pandoc#syntax#codeblocks#embeds#use != 0
|
||||
for l in g:pandoc#syntax#codeblocks#embeds#langs
|
||||
call EnableEmbedsforCodeblocksWithLang(l)
|
||||
endfor
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" Abbreviations: {{{2
|
||||
syn region pandocAbbreviationDefinition start=/^\*\[.\{-}\]:\s*/ end='$' contains=pandocNoFormatted,@Spell,pandocAmpersandEscape
|
||||
call s:WithConceal('abbrev', 'syn match pandocAbbreviationSeparator /:/ contained containedin=pandocAbbreviationDefinition', 'conceal cchar='.s:cchars['abbrev'])
|
||||
syn match pandocAbbreviation /\*\[.\{-}\]/ contained containedin=pandocAbbreviationDefinition
|
||||
call s:WithConceal('abbrev', 'syn match pandocAbbreviationHead /\*\[/ contained containedin=pandocAbbreviation', 'conceal')
|
||||
call s:WithConceal('abbrev', 'syn match pandocAbbreviationTail /\]/ contained containedin=pandocAbbreviation', 'conceal')
|
||||
" }}}2
|
||||
|
||||
" Footnotes: {{{2
|
||||
" we put these here not to interfere with superscripts.
|
||||
syn match pandocFootnoteID /\[\^[^\]]\+\]/ nextgroup=pandocFootnoteDef
|
||||
|
||||
" Inline footnotes
|
||||
syn region pandocFootnoteDef start=/\^\[/ skip=/\[.\{-}]/ end=/\]/ contains=pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,pandocCiteKey,pandocStrong,pandocEmphasis,pandocStrongEmphasis,pandocNoFormatted,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocEnDash,pandocEmDash,pandocEllipses,pandocBeginQuote,pandocEndQuote,@Spell,pandocAmpersandEscape skipnl keepend
|
||||
call s:WithConceal('footnote', 'syn match pandocFootnoteDefHead /\^\[/ contained containedin=pandocFootnoteDef', 'conceal cchar='.s:cchars['footnote'])
|
||||
call s:WithConceal('footnote', 'syn match pandocFootnoteDefTail /\]/ contained containedin=pandocFootnoteDef', 'conceal')
|
||||
|
||||
" regular footnotes
|
||||
syn region pandocFootnoteBlock start=/\[\^.\{-}\]:\s*\n*/ end=/^\n^\s\@!/ contains=pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,pandocCiteKey,pandocStrong,pandocEmphasis,pandocNoFormatted,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocEnDash,pandocEmDash,pandocNewLine,pandocStrongEmphasis,pandocEllipses,pandocBeginQuote,pandocEndQuote,pandocLaTeXInlineMath,pandocEscapedDollar,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXRegion,pandocAmpersandEscape,@Spell skipnl
|
||||
syn match pandocFootnoteBlockSeparator /:/ contained containedin=pandocFootnoteBlock
|
||||
syn match pandocFootnoteID /\[\^.\{-}\]/ contained containedin=pandocFootnoteBlock
|
||||
call s:WithConceal('footnote', 'syn match pandocFootnoteIDHead /\[\^/ contained containedin=pandocFootnoteID', 'conceal cchar='.s:cchars['footnote'])
|
||||
call s:WithConceal('footnote', 'syn match pandocFootnoteIDTail /\]/ contained containedin=pandocFootnoteID', 'conceal')
|
||||
" }}}2
|
||||
|
||||
" List Items: {{{2
|
||||
" Unordered lists
|
||||
syn match pandocUListItem /^>\=\s*[*+-]\s\+-\@!.*$/ nextgroup=pandocUListItem,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocDelimitedCodeBlock,pandocListItemContinuation contains=@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocReferenceURL,pandocAutomaticLink,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID,pandocAmpersandEscape skipempty display
|
||||
call s:WithConceal('list', 'syn match pandocUListItemBullet /^>\=\s*\zs[*+-]/ contained containedin=pandocUListItem', 'conceal cchar='.s:cchars['li'])
|
||||
|
||||
" Ordered lists
|
||||
syn match pandocListItem /^\s*(\?\(\d\+\|\l\|\#\|@\)[.)].*$/ nextgroup=pandocListItem,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocDelimitedCodeBlock,pandocListItemContinuation contains=@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocAutomaticLink,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID,pandocAmpersandEscape skipempty display
|
||||
|
||||
" support for roman numerals up to 'c'
|
||||
if g:pandoc#syntax#roman_lists != 0
|
||||
syn match pandocListItem /^\s*(\?x\=l\=\(i\{,3}[vx]\=\)\{,3}c\{,3}[.)].*$/ nextgroup=pandocListItem,pandocMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocAutomaticLink skipempty display
|
||||
endif
|
||||
syn match pandocListItemBullet /^(\?.\{-}[.)]/ contained containedin=pandocListItem
|
||||
syn match pandocListItemBulletId /\(\d\+\|\l\|\#\|@.\{-}\|x\=l\=\(i\{,3}[vx]\=\)\{,3}c\{,3}\)/ contained containedin=pandocListItemBullet
|
||||
|
||||
syn match pandocListItemContinuation /^\s\+\([-+*]\s\+\|(\?.\+[).]\)\@<!\([[:upper:][:lower:]_"[]\|\*\S\)\@=.*$/ nextgroup=pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocListItem contains=@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocReferenceURL,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocAutomaticLink,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID,pandocAmpersandEscape contained skipempty display
|
||||
" }}}2
|
||||
|
||||
" Definitions: {{{2
|
||||
if g:pandoc#syntax#use_definition_lists == 1
|
||||
syn region pandocDefinitionBlock start=/^\%(\_^\s*\([`~]\)\1\{2,}\)\@!.*\n\(^\s*\n\)\=\s\{0,2}\([:~]\)\(\3\{2,}\3*\)\@!/ skip=/\n\n\zs\s/ end=/\n\n/ contains=pandocDefinitionBlockMark,pandocDefinitionBlockTerm,pandocCodeBlockInsideIndent,pandocEmphasis,pandocStrong,pandocStrongEmphasis,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocFootnoteID,pandocReferenceURL,pandocReferenceLabel,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocEscapedDollar,pandocAutomaticLink,pandocEmDash,pandocEnDash,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID
|
||||
syn match pandocDefinitionBlockTerm /^.*\n\(^\s*\n\)\=\(\s*[:~]\)\@=/ contained contains=pandocNoFormatted,pandocEmphasis,pandocStrong,pandocLaTeXInlineMath,pandocEscapedDollar,pandocFootnoteDef,pandocFootnoteBlock,pandocFootnoteID nextgroup=pandocDefinitionBlockMark
|
||||
call s:WithConceal('definition', 'syn match pandocDefinitionBlockMark /^\s*[:~]/ contained', 'conceal cchar='.s:cchars['definition'])
|
||||
endif
|
||||
" }}}2
|
||||
|
||||
" Special: {{{2
|
||||
|
||||
" New_lines: {{{3
|
||||
if g:pandoc#syntax#newlines == 1
|
||||
call s:WithConceal('newline', 'syn match pandocNewLine /\%(\%(\S\)\@<= \{2,}\|\\\)$/ display containedin=pandocEmphasis,pandocStrong,pandocStrongEmphasis,pandocStrongInEmphasis,pandocEmphasisInStrong', 'conceal cchar='.s:cchars['newline'])
|
||||
endif
|
||||
" }}}3
|
||||
|
||||
" Emdashes: {{{3
|
||||
if &encoding ==# 'utf-8'
|
||||
call s:WithConceal('emdashes', 'syn match pandocEllipses /\([^-]\)\@<=---\([^-]\)\@=/ display', 'conceal cchar=—')
|
||||
endif
|
||||
" }}}3
|
||||
|
||||
" Endashes: {{{3
|
||||
if &encoding ==# 'utf-8'
|
||||
call s:WithConceal('endashes', 'syn match pandocEllipses /\([^-]\)\@<=--\([^-]\)\@=/ display', 'conceal cchar=–')
|
||||
endif
|
||||
" }}}3
|
||||
|
||||
" Ellipses: {{{3
|
||||
if &encoding ==# 'utf-8'
|
||||
call s:WithConceal('ellipses', 'syn match pandocEllipses /\.\.\./ display', 'conceal cchar=…')
|
||||
endif
|
||||
" }}}3
|
||||
|
||||
" Quotes: {{{3
|
||||
if &encoding ==# 'utf-8'
|
||||
call s:WithConceal('quotes', 'syn match pandocBeginQuote /"\</ containedin=pandocEmphasis,pandocStrong,pandocListItem,pandocListItemContinuation,pandocUListItem display', 'conceal cchar='.s:cchars['quote_s'])
|
||||
call s:WithConceal('quotes', 'syn match pandocEndQuote /\(\>[[:punct:]]*\)\@<="[[:blank:][:punct:]\n]\@=/ containedin=pandocEmphasis,pandocStrong,pandocUListItem,pandocListItem,pandocListItemContinuation display', 'conceal cchar='.s:cchars['quote_e'])
|
||||
endif
|
||||
" }}}3
|
||||
|
||||
" Hrule: {{{3
|
||||
syn match pandocHRule /^\s*\([*\-_]\)\s*\%(\1\s*\)\{2,}$/ display
|
||||
" }}}3
|
||||
|
||||
" Backslashes: {{{3
|
||||
if g:pandoc#syntax#conceal#backslash == 1
|
||||
syn match pandocBackslash /\v\\@<!\\((re)?newcommand)@!/ containedin=ALLBUT,pandocCodeblock,pandocCodeBlockInsideIndent,pandocNoFormatted,pandocNoFormattedInEmphasis,pandocNoFormattedInStrong,pandocDelimitedCodeBlock,pandocLineBlock,pandocYAMLHeader conceal
|
||||
endif
|
||||
" }}}3
|
||||
|
||||
" &-escaped Special Characters: {{{3
|
||||
syn match pandocAmpersandEscape /\v\&(#\d+|#x\x+|[[:alnum:]]+)\;/ contains=NoSpell
|
||||
" }}}3
|
||||
|
||||
" YAML: {{{2
|
||||
try
|
||||
unlet! b:current_syntax
|
||||
syn include @YAML syntax/yaml.vim
|
||||
catch /E484/
|
||||
endtry
|
||||
syn region pandocYAMLHeader start=/\%(\%^\|\_^\s*\n\)\@<=\_^-\{3}\ze\n.\+/ end=/^\([-.]\)\1\{2}$/ keepend contains=@YAML containedin=TOP
|
||||
" }}}2
|
||||
|
||||
" }}}1
|
||||
|
||||
" Styling: {{{1
|
||||
hi link pandocOperator Operator
|
||||
|
||||
" override this for consistency
|
||||
hi pandocTitleBlock term=italic gui=italic
|
||||
hi link pandocTitleBlockTitle Directory
|
||||
hi link pandocAtxHeader Title
|
||||
hi link pandocAtxStart Operator
|
||||
hi link pandocSetexHeader Title
|
||||
hi link pandocHeaderAttr Comment
|
||||
hi link pandocHeaderID Identifier
|
||||
|
||||
hi link pandocLaTexSectionCmd texSection
|
||||
hi link pandocLaTeXDelimiter texDelimiter
|
||||
|
||||
hi link pandocHTMLComment Comment
|
||||
hi link pandocHTMLCommentStart Delimiter
|
||||
hi link pandocHTMLCommentEnd Delimiter
|
||||
hi link pandocBlockQuote Comment
|
||||
hi link pandocBlockQuoteMark Comment
|
||||
hi link pandocAmpersandEscape Special
|
||||
|
||||
" if the user sets g:pandoc#syntax#codeblocks#ignore to contain
|
||||
" a codeblock type, don't highlight it so that it remains Normal
|
||||
if index(g:pandoc#syntax#codeblocks#ignore, 'definition') == -1
|
||||
hi link pandocCodeBlockInsideIndent String
|
||||
endif
|
||||
|
||||
if index(g:pandoc#syntax#codeblocks#ignore, 'delimited') == -1
|
||||
hi link pandocDelimitedCodeBlock Special
|
||||
endif
|
||||
|
||||
hi link pandocDelimitedCodeBlockStart Delimiter
|
||||
hi link pandocDelimitedCodeBlockEnd Delimiter
|
||||
hi link pandocDelimitedCodeBlockLanguage Comment
|
||||
hi link pandocBlockQuoteinDelimitedCodeBlock pandocBlockQuote
|
||||
hi link pandocCodePre String
|
||||
|
||||
hi link pandocLineBlockDelimiter Delimiter
|
||||
|
||||
hi link pandocListItemBullet Operator
|
||||
hi link pandocUListItemBullet Operator
|
||||
hi link pandocListItemBulletId Identifier
|
||||
|
||||
hi link pandocReferenceLabel Label
|
||||
hi link pandocReferenceURL Underlined
|
||||
hi link pandocLinkTip Identifier
|
||||
hi link pandocImageIcon Operator
|
||||
|
||||
hi link pandocReferenceDefinition Operator
|
||||
hi link pandocReferenceDefinitionLabel Label
|
||||
hi link pandocReferenceDefinitionAddress Underlined
|
||||
hi link pandocReferenceDefinitionTip Identifier
|
||||
|
||||
hi link pandocAutomaticLink Underlined
|
||||
|
||||
hi link pandocDefinitionBlockTerm Identifier
|
||||
hi link pandocDefinitionBlockMark Operator
|
||||
|
||||
hi link pandocSimpleTableDelims Delimiter
|
||||
hi link pandocSimpleTableHeader pandocStrong
|
||||
hi link pandocTableMultilineHeader pandocStrong
|
||||
hi link pandocTableDelims Delimiter
|
||||
hi link pandocGridTableDelims Delimiter
|
||||
hi link pandocGridTableHeader Delimiter
|
||||
hi link pandocPipeTableDelims Delimiter
|
||||
hi link pandocPipeTableHeader Delimiter
|
||||
hi link pandocTableHeaderWord pandocStrong
|
||||
|
||||
hi link pandocAbbreviationHead Type
|
||||
hi link pandocAbbreviation Label
|
||||
hi link pandocAbbreviationTail Type
|
||||
hi link pandocAbbreviationSeparator Identifier
|
||||
hi link pandocAbbreviationDefinition Comment
|
||||
|
||||
hi link pandocFootnoteID Label
|
||||
hi link pandocFootnoteIDHead Type
|
||||
hi link pandocFootnoteIDTail Type
|
||||
hi link pandocFootnoteDef Comment
|
||||
hi link pandocFootnoteDefHead Type
|
||||
hi link pandocFootnoteDefTail Type
|
||||
hi link pandocFootnoteBlock Comment
|
||||
hi link pandocFootnoteBlockSeparator Operator
|
||||
|
||||
hi link pandocPCite Operator
|
||||
hi link pandocICite Operator
|
||||
hi link pandocCiteKey Label
|
||||
hi link pandocCiteAnchor Operator
|
||||
hi link pandocCiteLocator Operator
|
||||
|
||||
if g:pandoc#syntax#style#emphases == 1
|
||||
hi pandocEmphasis gui=italic cterm=italic
|
||||
hi pandocStrong gui=bold cterm=bold
|
||||
hi pandocStrongEmphasis gui=bold,italic cterm=bold,italic
|
||||
hi pandocStrongInEmphasis gui=bold,italic cterm=bold,italic
|
||||
hi pandocEmphasisInStrong gui=bold,italic cterm=bold,italic
|
||||
if !exists('s:hi_tail')
|
||||
let s:fg = '' " Vint can't figure ou these get set dynamically
|
||||
let s:bg = '' " so initialize them manually first
|
||||
for s:i in ['fg', 'bg']
|
||||
let s:tmp_val = synIDattr(synIDtrans(hlID('String')), s:i)
|
||||
let s:tmp_ui = has('gui_running') || (has('termguicolors') && &termguicolors) ? 'gui' : 'cterm'
|
||||
if !empty(s:tmp_val) && s:tmp_val != -1
|
||||
exe 'let s:'.s:i . ' = "'.s:tmp_ui.s:i.'='.s:tmp_val.'"'
|
||||
else
|
||||
exe 'let s:'.s:i . ' = ""'
|
||||
endif
|
||||
endfor
|
||||
let s:hi_tail = ' '.s:fg.' '.s:bg
|
||||
endif
|
||||
exe 'hi pandocNoFormattedInEmphasis gui=italic cterm=italic'.s:hi_tail
|
||||
exe 'hi pandocNoFormattedInStrong gui=bold cterm=bold'.s:hi_tail
|
||||
endif
|
||||
hi link pandocNoFormatted String
|
||||
hi link pandocNoFormattedAttrs Comment
|
||||
hi link pandocSubscriptMark Operator
|
||||
hi link pandocSuperscriptMark Operator
|
||||
hi link pandocStrikeoutMark Operator
|
||||
if g:pandoc#syntax#style#underline_special == 1
|
||||
hi pandocSubscript gui=underline cterm=underline
|
||||
hi pandocSuperscript gui=underline cterm=underline
|
||||
hi pandocStrikeout gui=underline cterm=underline
|
||||
endif
|
||||
hi link pandocNewLine Error
|
||||
hi link pandocHRule Delimiter
|
||||
|
||||
" }}}1
|
||||
|
||||
let b:current_syntax = 'pandoc'
|
||||
|
||||
syntax sync clear
|
||||
syntax sync minlines=1000
|
|
@ -0,0 +1,119 @@
|
|||
# Block spans
|
||||
|
||||
this is a paragraph.
|
||||
|
||||
this is a long paragraph with *italics* and **bold** items.
|
||||
|
||||
this is a long paragraph where *an italicized section ends with a space *.
|
||||
|
||||
this is a *long paragraph that spans
|
||||
two* lines.
|
||||
|
||||
this is a paragraph with *a span that is very very very very very very very very
|
||||
very very very very very very very very very very very very very very very very
|
||||
very very very very very very very* long.
|
||||
|
||||
this is a paragraph where _italics_ and __bold__ are set with underscores.
|
||||
|
||||
***this*** is a paragraph with ***strongly emphasized*** words, such as this
|
||||
___one___.
|
||||
|
||||
# italics *in* titles
|
||||
|
||||
yes, we can.
|
||||
|
||||
# bold **in** titles
|
||||
|
||||
inline `code` in this paragraph. this is a ``test for this`` stuff.
|
||||
|
||||
superscripts ^are\ kinda^ cool (2^12^). subscripts can ~also~ be ~kinda\ lame~
|
||||
(like drinking H~2~O). there's also sections with ~~striked out~~ text.
|
||||
|
||||
this ~= could be a problem if we allowed unscaped spaces.
|
||||
|
||||
a new line can be outputted for lines with a couple
|
||||
of spaces.
|
||||
|
||||
# mix and match
|
||||
|
||||
oh no! mix and match *is **hard** stuff*, real hard.
|
||||
|
||||
mixing is **quite *the* problem**.
|
||||
|
||||
but... we ***kinda tackled it*** ;)
|
||||
|
||||
We once had problems with ***quite* the problem**, but not anymore.
|
||||
|
||||
# blockquotes
|
||||
|
||||
> this is a test block
|
||||
> this is another *test*. block
|
||||
a block
|
||||
> less block
|
||||
aaa block
|
||||
|
||||
no block.
|
||||
|
||||
# code blocks
|
||||
|
||||
def func(a):
|
||||
return 1
|
||||
|
||||
no code
|
||||
|
||||
~~~python
|
||||
def func(a):
|
||||
return 1
|
||||
~~~
|
||||
|
||||
~~~ {.python}
|
||||
print("hi")
|
||||
~~~
|
||||
|
||||
test
|
||||
|
||||
~~~haskell
|
||||
test
|
||||
~~~
|
||||
|
||||
```vim
|
||||
:exe "cmd args"
|
||||
```
|
||||
|
||||
> ``` c
|
||||
> void (*signal(int sig, void (*disp)(int)))(int);
|
||||
> ```
|
||||
>
|
||||
> If `signal()` is used, `disp` is the address of a signal handler, and `sig`
|
||||
> is not `SIGILL`, `SIGTRAP`, or `SIGPWR`, the system first sets the signal's
|
||||
> disposition to `SIG_DFL` before executing the signal handler.
|
||||
|
||||
# definitions
|
||||
|
||||
hello
|
||||
: this is a definition.
|
||||
|
||||
`hello`
|
||||
: this is a definition
|
||||
|
||||
# lists
|
||||
|
||||
* this
|
||||
* this
|
||||
* and this
|
||||
+ and this
|
||||
|
||||
1) a
|
||||
2) b
|
||||
|
||||
# smart punctuation
|
||||
|
||||
ellipses: ....
|
||||
quote "signs". This only works at the beggining and end of words.
|
||||
quote "signs."
|
||||
|
||||
issue #31:
|
||||
|
||||
"Foo"
|
||||
*"Foo"*
|
||||
**"Foo"**
|
|
@ -0,0 +1,5 @@
|
|||
- `blah`. aaaaaa (FIXED)
|
||||
|
||||
[[abc]](xxx) issue #55 vim-pandoc
|
||||
|
||||
[abc](xyz) `123`. (FIXED)
|
|
@ -0,0 +1,37 @@
|
|||
% headings test
|
||||
% vim-pandoc-syntax
|
||||
with multiple lines
|
||||
|
||||
# heading #
|
||||
|
||||
a
|
||||
|
||||
## heading with # in it ##
|
||||
|
||||
a
|
||||
|
||||
### heading
|
||||
|
||||
a
|
||||
|
||||
#### heading
|
||||
|
||||
a
|
||||
|
||||
##### heading
|
||||
|
||||
a
|
||||
|
||||
###### heading
|
||||
|
||||
test
|
||||
|
||||
heading
|
||||
-------
|
||||
|
||||
aaaaa
|
||||
|
||||
heading
|
||||
=======
|
||||
|
||||
aaaaa
|
|
@ -0,0 +1,16 @@
|
|||
CMake works fine with Visual Studio but there are a few things to consider. The
|
||||
property for the working directory in the Debugging section should most likely
|
||||
be set to `$(OutDir)`. Likewise, the start-up project must be set manually as
|
||||
it's set to ALL_BUILD by default. ALL_BUILD is a project that builds all
|
||||
projects and correctly triggers any scripts. ZERO_CHECK is a project that runs
|
||||
and, if any CMake files have been changed, asks to reload Visual Studio.
|
||||
|
||||
Furthermore, if you're making a Windows application, you should add the WIN32
|
||||
parameter to `add_executable` to instruct the compiler to use the `WinMain`
|
||||
[entry-point](http://msdn.microsoft.com/en-us/library/f9t8842e.aspx) and
|
||||
WINDOWS
|
||||
[subsystem](http://msdn.microsoft.com/en-us/library/fcc1zstk%28v=vs.110%29.aspx):
|
||||
|
||||
possible regressions:
|
||||
|
||||
*test* test *test*. _ this
|
|
@ -0,0 +1,33 @@
|
|||
This is a paragraph with $\text{inline} \LaTeX$.
|
||||
This is a paragraph with \(\text{inline} \LaTeX\) using the tex_math_single_backslash extension.
|
||||
LaTeX: \(m\)
|
||||
LaTeX: \(m\)1 (safe for decimal to follow)
|
||||
\[
|
||||
\frac{1}{2}
|
||||
\]
|
||||
|
||||
This \$ is a dollar sign. $ this too. $30000 dollars are mentioned in pandoc's
|
||||
Example. I don't have that amount.
|
||||
|
||||
$$
|
||||
This is \LaTeX too. \sum a b
|
||||
$$
|
||||
|
||||
\LaTeX
|
||||
|
||||
\newcommand{\tuple}[1]{\langle #1 \rangle}
|
||||
|
||||
\begin{tabular}{|l|l|}\hline
|
||||
Age & Frequency \\ \hline
|
||||
18--25 & 15 \\
|
||||
26--35 & 33 \\
|
||||
36--45 & 22 \\ \hline
|
||||
\end{tabular}
|
||||
|
||||
# test
|
||||
|
||||
Unicode!
|
||||
$α^i_i$
|
||||
$a^{i}_i$
|
||||
$a^i_{i}$
|
||||
$a^{i}_{i}$
|
|
@ -0,0 +1,65 @@
|
|||
# this is a test for links, references and footnotes.
|
||||
|
||||
a link to [the example.com website](http://www.example.com "example")
|
||||
|
||||
well, [the example.com website](http://www.example.com)
|
||||
|
||||
testing footnotes[^footnote1]. this is kinda silly.^[another footnote.]
|
||||
^superscrips^ are ok, but be careful to keep spaces between the inline
|
||||
footnotes and the superscripts.^[inline footnotes-- *test*]
|
||||
|
||||
[^footnote1]: this is a footnote --.
|
||||
|
||||
[see @Lovejoy, pp. 12]
|
||||
|
||||
Mister @Lovejoy95, at [-@Lovejoy], cites @Lovejoy [pp. 12-12].
|
||||
|
||||
Some printable characters might not be matched (in @Krämer, `ä` caused
|
||||
issues). @Krámer @Kraßmer @Kràmer
|
||||
|
||||
*[PCL]: P C L
|
||||
|
||||
[hello][welcome] aaaaaa this with [inline link](http://site.com) gets messed up
|
||||
|
||||
[hello][hello]aaaaaa this
|
||||
|
||||
[hello] [hello] this is a test.
|
||||
|
||||
[hello][]
|
||||
|
||||
[hello1]: www.google.com
|
||||
|
||||
[hello2]: www.google.com "pandoc"
|
||||
|
||||
[hello3]: www.google.com
|
||||
"pandoc"
|
||||
this is no longer part of the reference definition
|
||||
|
||||
![test](test.png)
|
||||
|
||||
![testimg][]
|
||||
|
||||
[testimg]: test.png
|
||||
|
||||
What follows are some notes on algorithms I've been reviewing from [Algorithms](http://amzn.com/032157351X) by Robert Sedgewick and Kevin Wayne, [The Algorithm Design Manual](http://amzn.com/1849967202) by Steven S. Skiena, and other sources around the Internet [^mit] [^umd] [^umgd]. I wanted to write some notes on the material so that I could easily look back on it, but mainly so that I could be sure that I understand the material --- since I have to understand it to explain it.
|
||||
|
||||
[Convolution](http://en.wikipedia.org/wiki/Convolution) is a mathematical
|
||||
method of combining two signals to form a third signal. Passing the [Dirac
|
||||
delta function](http://en.wikipedia.org/wiki/Dirac_delta_function) (unit
|
||||
impulse) $\delta[n]$ through a linear system results in the impulse response
|
||||
$h[n]$. The impulse response is simply the signal resulting from passing the
|
||||
unit impulse (Dirac delta function) through a linear system.
|
||||
|
||||
# issue 25
|
||||
|
||||
[[abc]](xxx)
|
||||
|
||||
[[abc]][]
|
||||
|
||||
[[abc]]: x
|
||||
|
||||
# issue 107 (vim-pandoc)
|
||||
|
||||
[`]`](http://foo.com) foo
|
||||
|
||||
[Why isn't `ListT []`{.haskell} a monad](http://blog.sigfpe.com/2006/11/why-isnt-listt-monad.html)
|
|
@ -0,0 +1,46 @@
|
|||
i. a
|
||||
ii. a
|
||||
iii. a
|
||||
iv. a
|
||||
v. a
|
||||
vi. a
|
||||
vii. a
|
||||
viii. a
|
||||
ix. a
|
||||
x. a
|
||||
xi. a
|
||||
xii. a
|
||||
xiii. a
|
||||
xiv. a
|
||||
xv. a
|
||||
xvi. a
|
||||
xvii. a
|
||||
xviii. a
|
||||
xix. a
|
||||
xx. a
|
||||
xxi. a
|
||||
xxii. a
|
||||
xxx. a
|
||||
xl. a
|
||||
xliii. a
|
||||
l. a
|
||||
lx. a
|
||||
lxix. a
|
||||
xc. a
|
||||
c. a
|
||||
|
||||
it breaks down at c, but maybe that's enough...
|
||||
|
||||
ci. a
|
||||
cx. a
|
||||
cxl. a
|
||||
cl. a
|
||||
cxc. a
|
||||
cc. a
|
||||
ccc. a
|
||||
cd. a
|
||||
d. a
|
||||
cm. a
|
||||
m. a
|
||||
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
# Simple tables
|
||||
|
||||
Right Left Center Default
|
||||
------- ------ ---------- -------
|
||||
12 12 12 12
|
||||
123 123 123 123
|
||||
1 1 1 1
|
||||
|
||||
error 2nd-order 10th-order
|
||||
------ ----------- ------------
|
||||
$\insample$ $0.029$ $10^{-5}$
|
||||
$\outsample$ $0.120$ $7680$
|
||||
|
||||
------- ------ ---------- -------
|
||||
12 12 12 12
|
||||
123 123 123 123
|
||||
1 1 1 1
|
||||
------- ------ ---------- -------
|
||||
|
||||
# Mutiline tables
|
||||
|
||||
-------------------------------------------------------------
|
||||
Centered Default Right Left
|
||||
Header Aligned Aligned Aligned
|
||||
----------- ------- --------------- -------------------------
|
||||
First row 12.0 Example of a row that
|
||||
spans multiple lines.
|
||||
|
||||
Second row 5.0 Here's another one. Note
|
||||
the blank line between
|
||||
rows.
|
||||
-------------------------------------------------------------
|
||||
|
||||
----------- ------- --------------- -------------------------
|
||||
First row 12.0 Example of a row that
|
||||
spans multiple lines.
|
||||
|
||||
Second row 5.0 Here's another one. Note
|
||||
the blank line between
|
||||
rows.
|
||||
----------- ------- --------------- -------------------------
|
||||
|
||||
# grid table
|
||||
|
||||
+---------------+---------------+--------------------+
|
||||
| Fruit | Price | Advantages |
|
||||
+===============+===============+====================+
|
||||
| Bananas | $1.34 | - built-in wrapper |
|
||||
| | | - bright color |
|
||||
+---------------+---------------+--------------------+
|
||||
| Oranges | $2.10 | - cures scurvy |
|
||||
| | | - tasty |
|
||||
+---------------+---------------+--------------------+
|
||||
|
||||
+----------------------+------------------+
|
||||
| test | a |
|
||||
+----------------------+------------------+
|
||||
|
||||
# pipe tables
|
||||
|
||||
| Right | Left | Default | Center |
|
||||
|------:|:-----|---------|:------:|
|
||||
| 12 | 12 | 12 | 12 |
|
||||
| 123 | 123 | 123 | 123 |
|
||||
| 1 | 1 | 1 | 1 |
|
||||
|
||||
Right | Left | Default | Center
|
||||
-----:|:-----|---------|:------:
|
||||
12 | 12 | 12 | 12
|
||||
123 | 123 | 123 | 123
|
||||
1 | 1 | 1 | 1
|
||||
|
||||
fruit| price
|
||||
-----|-----:
|
||||
apple|2.05
|
||||
pear|1.37
|
||||
orange|3.09
|
||||
|
||||
| One | Two |
|
||||
|-----+-------|
|
||||
| my | table |
|
||||
| is | nice |
|
After Width: | Height: | Size: 226 B |
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: Scala
|
||||
published: October 12, 2013
|
||||
excerpt: Promising mixture of OO and FP
|
||||
comments: off
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
hello
|
||||
-----
|