diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-24 17:06:18 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-24 17:06:18 +0200 |
commit | d5a7a2df1fdeb2d82c51a0d78493bfb7241160c2 (patch) | |
tree | 1ac695a756e3570bf06b1a7658d143fc2b264657 /config | |
parent | 1f7e952a75a870b0a4e9900964cae3729c216cc3 (diff) |
checkpoint
Diffstat (limited to 'config')
-rwxr-xr-x | config/X/x11/xinitrc | 18 | ||||
-rw-r--r-- | config/essentials/vis/themes/nord.lua | 156 | ||||
-rw-r--r-- | config/essentials/vis/vis-go.lua | 3 | ||||
-rw-r--r-- | config/essentials/vis/visrc.lua | 49 | ||||
-rw-r--r-- | config/home/.zshenv | 1 |
5 files changed, 117 insertions, 110 deletions
diff --git a/config/X/x11/xinitrc b/config/X/x11/xinitrc index 8b3cf2b..ce4f684 100755 --- a/config/X/x11/xinitrc +++ b/config/X/x11/xinitrc @@ -11,11 +11,11 @@ sysmodmap=/etc/X11/xinit/.Xmodmap [ -f "$userresources" ] && xrdb -merge "$userresources" [ -f "$usermodmap" ] && xmodmap "$usermodmap" -if [ -d /etc/X11/xinit/xinitrc.d ] ; then - for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do - [ -x "$f" ] && . "$f" - done - unset f +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh; do + [ -x "$f" ] && . "$f" + done + unset f fi export MENUCMD="dmenu" @@ -25,6 +25,14 @@ feh --no-fehbg --bg-scale ~/pics/wallpaper setxkbmap colemak -option ctrl:swapcaps,altwin:menu_win # xautolock -locker slock & gammastep -m randr & +which tiramisu >/dev/null 2>&1 && + ( + IFS=',' + tiramisu -o '#summary,#body' | + while read -r summary body; do + herbe "$summary" "$body" + done + ) & # dunst & slstatus & upds & diff --git a/config/essentials/vis/themes/nord.lua b/config/essentials/vis/themes/nord.lua index 71635cf..b43a1d3 100644 --- a/config/essentials/vis/themes/nord.lua +++ b/config/essentials/vis/themes/nord.lua @@ -4,80 +4,80 @@ local lexers = vis.lexers local colors = { - ['bg'] = '#2E3440', - ['black'] = '#3B4252', - ['light_black'] = '#434C5E', - ['dark_gray'] = '#4C566A', - ['gray'] = '#D8DEE9', - ['light_gray'] = '#616E88', - ['fg'] = '#E5E9F0', - ['white'] = '#ECEFF4', - ['turquoise'] = '#8FBCBB', - ['light_cyan'] = '#88C0D0', - ['cyan'] = '#81A1C1', - ['blue'] = '#5E81AC', - ['red'] = '#BF616A', - ['orange'] = '#D08770', - ['yellow'] = '#EBCB8B', - ['green'] = '#A3BE8C', - ['magenta'] = '#B48EAD' + ["bg"] = "#2E3440", + ["black"] = "#3B4252", + ["light_black"] = "#434C5E", + ["dark_gray"] = "#4C566A", + ["gray"] = "#D8DEE9", + ["light_gray"] = "#616E88", + ["fg"] = "#E5E9F0", + ["white"] = "#ECEFF4", + ["turquoise"] = "#8FBCBB", + ["light_cyan"] = "#88C0D0", + ["cyan"] = "#81A1C1", + ["blue"] = "#5E81AC", + ["red"] = "#BF616A", + ["orange"] = "#D08770", + ["yellow"] = "#EBCB8B", + ["green"] = "#A3BE8C", + ["magenta"] = "#B48EAD", } lexers.colors = colors -local fg = 'fore:' .. colors.fg -local bg = 'back:' .. colors.bg +local fg = "fore:" .. colors.fg +local bg = "back:" .. colors.bg -lexers.STYLE_DEFAULT = bg .. ',' .. fg +lexers.STYLE_DEFAULT = bg .. "," .. fg lexers.STYLE_NOTHING = bg -lexers.STYLE_CLASS = 'fore:' .. colors.blue -lexers.STYLE_COMMENT = 'fore:' .. colors.light_gray .. ',italics' -lexers.STYLE_CONSTANT = 'fore:' .. colors.cyan -lexers.STYLE_DEFINITION = 'fore:' .. colors.green -lexers.STYLE_ERROR = 'fore:' .. colors.light_cyan .. ',italics' -lexers.STYLE_FUNCTION = 'fore:' .. colors.light_cyan .. ',bold' -lexers.STYLE_HEADING = 'fore:' .. colors.bg .. ',back:' .. colors.yellow -lexers.STYLE_KEYWORD = 'fore:' .. colors.cyan .. ',bold' -lexers.STYLE_LABEL = 'fore:' .. colors.blue -lexers.STYLE_NUMBER = 'fore:' .. colors.magenta -lexers.STYLE_OPERATOR = 'fore:' .. colors.light_cyan -lexers.STYLE_REGEX = 'fore:' .. colors.orange -lexers.STYLE_STRING = 'fore:' .. colors.green -lexers.STYLE_PREPROCESSOR = 'fore:' .. colors.blue -lexers.STYLE_TAG = 'fore:' .. colors.blue -lexers.STYLE_TYPE = 'fore:' .. colors.cyan -lexers.STYLE_VARIABLE = 'fore:' .. colors.cyan .. ',bold' -lexers.STYLE_WHITESPACE = 'fore:' .. colors.light_black -lexers.STYLE_EMBEDDED = 'fore:' .. colors.magenta -lexers.STYLE_IDENTIFIER = fg .. ',bold' - -lexers.STYLE_LINENUMBER = 'fore:' .. colors.light_black .. ',back:' .. colors.bg -lexers.STYLE_CURSOR = 'fore:' .. colors.bg .. ',back:' .. colors.fg -lexers.STYLE_CURSOR_PRIMARY = 'fore:' .. colors.bg .. ',back:' .. colors.fg -lexers.STYLE_CURSOR_LINE = 'back:' .. colors.black -lexers.STYLE_COLOR_COLUMN = 'back:' .. colors.black -lexers.STYLE_SELECTION = 'back:' .. colors.light_black -lexers.STYLE_STATUS = 'fore:' .. colors.gray .. ',back:' .. colors.black -lexers.STYLE_STATUS_FOCUSED = 'fore:' .. colors.cyan .. ',back:' .. colors.black +lexers.STYLE_CLASS = "fore:" .. colors.blue +lexers.STYLE_COMMENT = "fore:" .. colors.light_gray .. ",italics" +lexers.STYLE_CONSTANT = "fore:" .. colors.cyan +lexers.STYLE_DEFINITION = "fore:" .. colors.green +lexers.STYLE_ERROR = "fore:" .. colors.light_cyan .. ",italics" +lexers.STYLE_FUNCTION = "fore:" .. colors.light_cyan .. ",bold" +lexers.STYLE_HEADING = "fore:" .. colors.bg .. ",back:" .. colors.yellow +lexers.STYLE_KEYWORD = "fore:" .. colors.cyan .. ",bold" +lexers.STYLE_LABEL = "fore:" .. colors.blue +lexers.STYLE_NUMBER = "fore:" .. colors.magenta +lexers.STYLE_OPERATOR = "fore:" .. colors.light_cyan +lexers.STYLE_REGEX = "fore:" .. colors.orange +lexers.STYLE_STRING = "fore:" .. colors.green +lexers.STYLE_PREPROCESSOR = "fore:" .. colors.blue +lexers.STYLE_TAG = "fore:" .. colors.blue +lexers.STYLE_TYPE = "fore:" .. colors.cyan +lexers.STYLE_VARIABLE = "fore:" .. colors.cyan .. ",bold" +lexers.STYLE_WHITESPACE = "fore:" .. colors.light_black +lexers.STYLE_EMBEDDED = "fore:" .. colors.magenta +lexers.STYLE_IDENTIFIER = fg .. ",bold" + +lexers.STYLE_LINENUMBER = "fore:" .. colors.light_black .. ",back:" .. colors.bg +lexers.STYLE_CURSOR = "fore:" .. colors.bg .. ",back:" .. colors.fg +lexers.STYLE_CURSOR_PRIMARY = "fore:" .. colors.bg .. ",back:" .. colors.fg +lexers.STYLE_CURSOR_LINE = "back:" .. colors.black +lexers.STYLE_COLOR_COLUMN = "back:" .. colors.black +lexers.STYLE_SELECTION = "back:" .. colors.light_black +lexers.STYLE_STATUS = "fore:" .. colors.gray .. ",back:" .. colors.black +lexers.STYLE_STATUS_FOCUSED = "fore:" .. colors.cyan .. ",back:" .. colors.black lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT -lexers.STYLE_INFO = 'fore:default,back:default,bold' -lexers.STYLE_EOF = '' +lexers.STYLE_INFO = "fore:default,back:default,bold" +lexers.STYLE_EOF = "" -- lexer specific styles -- Diff -lexers.STYLE_ADDITION = 'back:' .. colors.green .. ',fore:' .. colors.bg -lexers.STYLE_DELETION = 'back:' .. colors.red .. ',fore:' .. colors.bg -lexers.STYLE_CHANGE = 'back:' .. colors.yellow .. ',fore:' .. colors.bg +lexers.STYLE_ADDITION = "back:" .. colors.green .. ",fore:" .. colors.bg +lexers.STYLE_DELETION = "back:" .. colors.red .. ",fore:" .. colors.bg +lexers.STYLE_CHANGE = "back:" .. colors.yellow .. ",fore:" .. colors.bg -- CSS lexers.STYLE_PROPERTY = lexers.STYLE_ATTRIBUTE -lexers.STYLE_PSEUDOCLASS = '' -lexers.STYLE_PSEUDOELEMENT = '' +lexers.STYLE_PSEUDOCLASS = "" +lexers.STYLE_PSEUDOELEMENT = "" -- HTML -lexers.STYLE_TAG_UNKNOWN = lexers.STYLE_TAG .. ',italics' -lexers.STYLE_ATTRIBUTE_UNKNOWN = lexers.STYLE_ATTRIBUTE .. ',italics' +lexers.STYLE_TAG_UNKNOWN = lexers.STYLE_TAG .. ",italics" +lexers.STYLE_ATTRIBUTE_UNKNOWN = lexers.STYLE_ATTRIBUTE .. ",italics" -- Latex, TeX, and Texinfo lexers.STYLE_COMMAND = lexers.STYLE_KEYWORD @@ -86,38 +86,38 @@ lexers.STYLE_ENVIRONMENT = lexers.STYLE_TYPE lexers.STYLE_ENVIRONMENT_MATH = lexers.STYLE_NUMBER -- Makefile -lexers.STYLE_TARGET = '' +lexers.STYLE_TARGET = "" -- Markdown -lexers.STYLE_HR = '' -lexers.STYLE_HEADING_H1 = 'fore:' .. colors.orange .. ',bold' -lexers.STYLE_HEADING_H2 = 'fore:' .. colors.red .. ',bold' +lexers.STYLE_HR = "" +lexers.STYLE_HEADING_H1 = "fore:" .. colors.orange .. ",bold" +lexers.STYLE_HEADING_H2 = "fore:" .. colors.red .. ",bold" for i = 3, 6 do - lexers['STYLE_HEADING_H' .. i] = 'fore:' .. colors.magenta .. ',bold' + lexers["STYLE_HEADING_H" .. i] = "fore:" .. colors.magenta .. ",bold" end -lexers.STYLE_BOLD = 'bold' -lexers.STYLE_ITALIC = 'italics' +lexers.STYLE_BOLD = "bold" +lexers.STYLE_ITALIC = "italics" lexers.STYLE_LIST = lexers.STYLE_KEYWORD -lexers.STYLE_LINK = 'fore:' .. colors.yellow .. ',italics' -lexers.STYLE_REFERENCE = 'fore:' .. colors.blue -lexers.STYLE_CODE = 'back:' .. colors.black .. ',fore:' .. colors.turquoise +lexers.STYLE_LINK = "fore:" .. colors.yellow .. ",italics" +lexers.STYLE_REFERENCE = "fore:" .. colors.blue +lexers.STYLE_CODE = "back:" .. colors.black .. ",fore:" .. colors.turquoise -- Output -lexers.STYE_FILENAME = 'bold' -lexers.STYLE_LINE = 'fore:' .. colors.green -lexers.STYLE_COLUMN = 'underline' -lexers.STYLE_MESSAGE = '' +lexers.STYE_FILENAME = "bold" +lexers.STYLE_LINE = "fore:" .. colors.green +lexers.STYLE_COLUMN = "underline" +lexers.STYLE_MESSAGE = "" -- Python -lexers.STYLE_KEYWORD_SOFT = '' +lexers.STYLE_KEYWORD_SOFT = "" -- YAML -lexers.STYLE_ERROR_INDENT = 'back:' .. colors.red +lexers.STYLE_ERROR_INDENT = "back:" .. colors.red -- GO -lexers.STYLE_CONSTANT_BUILTIN = 'fore:' .. colors.yellow -lexers.STYLE_FUNCTION_METHOD = 'fore:' .. colors.light_cyan -lexers.STYLE_FUNCTION_BUILTIN = 'fore:' .. colors.light_cyan .. ',bold' +lexers.STYLE_CONSTANT_BUILTIN = "fore:" .. colors.cyan +lexers.STYLE_FUNCTION_METHOD = "fore:" .. colors.light_cyan +lexers.STYLE_FUNCTION_BUILTIN = "fore:" .. colors.light_cyan .. ",bold" -- Lua -lexers.STYLE_ATTRIBUTE = 'fore:' .. colors.yellow .. ',bold' +lexers.STYLE_ATTRIBUTE = "fore:" .. colors.yellow .. ",bold" diff --git a/config/essentials/vis/vis-go.lua b/config/essentials/vis/vis-go.lua index 647e003..bb0c7ab 100644 --- a/config/essentials/vis/vis-go.lua +++ b/config/essentials/vis/vis-go.lua @@ -5,6 +5,7 @@ Changes made: - check if line, col in godef() - no formatting because already handled by format.lua - removed the goimports option +- set env variable for godef that fixes "no definition found" --]] local function jump_to(path, line, col) @@ -37,7 +38,7 @@ local function godef() local file = win.file local pos = win.selection.pos - local cmd = string.format("godef -i -o %d", pos) + local cmd = string.format("GO111MODULE=off godef -i -o %d", pos) local status, out, err = vis:pipe(file, { start = 0, finish = file.size }, cmd) if status ~= 0 or not out then if err then diff --git a/config/essentials/vis/visrc.lua b/config/essentials/vis/visrc.lua index 93954ae..78f7cfe 100644 --- a/config/essentials/vis/visrc.lua +++ b/config/essentials/vis/visrc.lua @@ -52,8 +52,8 @@ local function map_cmd(mode, map, command, help) end, help) end --- TOOD: use window selection to restore position -local function wrap_restore(f, ...) +-- Store and pop position with command ran in between +local function wrap_pos_restore(f, ...) local pos = vis.win.selection.pos f(...) vis.win.selection.pos = pos @@ -83,27 +83,27 @@ end, "Remove trailing whitespace") --- MAPPINGS ------------------------------------- -vis:map(m.NORMAL, " pf", function() - vis:command("fzf") -end, "Open file with fzf") -vis:map(m.NORMAL, " pr", function() - vis:command("fzfmru") -end, "Open file with fzf") - -vis:map(m.NORMAL, " r", function() - wrap_restore(vis.command, vis, "e $vis_filepath") -end, "Reload active file") - -vis:map(m.NORMAL, "=", format.apply, "Format active file") - -map_cmd(m.NORMAL, " c", "e ~/.config/vis/visrc.lua", "Edit config file") -map_cmd(m.NORMAL, " q", "q!", "Quit (force)") -map_cmd(m.NORMAL, " s", "!doas vis $vis_filepath", "Edit as superuser") -map_cmd(m.NORMAL, " w", "w", "Write") -map_cmd(m.NORMAL, " x", "!chmod u+x $vis_filepath", "Make active file executable") -map_cmd(m.NORMAL, "!", "!bash", "Run bash") - -map_keys(m.NORMAL, " nl", ":<seq -f '%0.0f. ' 1 ", "Insert numbered list") +vis.events.subscribe(vis.events.WIN_OPEN, function(win) -- luacheck: no unused args + map_cmd(m.NORMAL, " pf", "fzf", "Open file with fzf") + map_cmd(m.NORMAL, " pr", "fzfmru", "Open file with fzf") + + vis:map(m.NORMAL, " r", function() + wrap_pos_restore(vis.command, vis, "e $vis_filepath") + end, "Reload active file") + vis:map(m.NORMAL, "=", format.apply, "Format active file") + map_cmd(m.NORMAL, "<M-m>", "make", "Run 'make'") + map_cmd(m.NORMAL, " c", "e ~/.config/vis/visrc.lua", "Edit config file") + map_cmd(m.NORMAL, " q", "q!", "Quit (force)") + map_cmd(m.NORMAL, " s", "!doas vis $vis_filepath", "Edit as superuser") + map_cmd(m.NORMAL, " w", "w", "Write") + map_cmd(m.NORMAL, " x", "!chmod u+x $vis_filepath", "Make active file executable") + map_cmd(m.NORMAL, "!", "!bash", "Run bash") + map_keys(m.NORMAL, " y", '"+y', "Copy to system clipboard") + map_keys(m.VISUAL, " y", '"+y', "Copy to system clipboard") + map_keys(m.NORMAL, " nl", ":<seq -f '%0.0f. ' 1 ", "Insert numbered list") + map_keys(m.NORMAL, "<M-S-Down>", "ddp", "Move line down") + map_keys(m.NORMAL, "<M-S-Up>", "ddkP", "Move line up") -- Doesn't work at end of file +end) ------------------------------------ --- EVENTS @@ -139,7 +139,7 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win) -- luacheck: no unused a "Print variable" ) map_keys(m.NORMAL, "\\v", 'V:x/^(\\s*)(.+)$/ c/\\1"$(\\2)"/<Enter><Escape>', "Surround in variable") - map_keys(m.NORMAL, ";|", "V:x/\\| / c/|\n\t/<Enter><Escape>", "Wrap one-line multi pipe command") + map_keys(m.NORMAL, "\\|", "V:x/\\| / c/|\n\t/<Enter><Escape>", "Wrap one-line multi pipe command") map_keys( m.NORMAL, "\\e", @@ -163,5 +163,4 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win) -- luacheck: no unused a if win.syntax == "ansi_c" then map_keys(m.NORMAL, "\\a", "f,a <Escape>hdw<S-Tab>i<Tab><Escape>", "Align table") end - end) diff --git a/config/home/.zshenv b/config/home/.zshenv index 6cecf7f..34a7c2f 100644 --- a/config/home/.zshenv +++ b/config/home/.zshenv @@ -21,7 +21,6 @@ export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet export GNUPGHOME="$XDG_CONFIG_HOME"/gnupg export GOMODCACHE="$XDG_CACHE_HOME"/go/mod export GOPATH="$XDG_DATA_HOME"/go -export GO111MODULE="off" # to fix godef export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc-2.0 export MYSQL_HISTFILE="$XDG_DATA_HOME"/mysql_history |