diff --git a/files/.config/lxterminal/lxterminal.conf b/files/.config/lxterminal/lxterminal.conf index ce29f13..78bab38 100644 --- a/files/.config/lxterminal/lxterminal.conf +++ b/files/.config/lxterminal/lxterminal.conf @@ -1,9 +1,9 @@ [general] -fontname=IBM Plex Mono 13 +fontname=Iosevka 13 selchars=-A-Za-z0-9,./?%&#:_ scrollback=1000 -bgcolor=rgba(3,5,3,0.734266) -fgcolor=rgb(222,221,218) +bgcolor=rgb(0,0,0) +fgcolor=rgb(192,191,188) palette_color_0=rgb(0,0,0) palette_color_1=rgb(192,28,40) palette_color_2=rgb(0,170,0) @@ -41,8 +41,8 @@ tabwidth=100 [shortcut] new_window_accel=n -new_tab_accel=t -close_tab_accel=w +new_tab_accel=t +close_tab_accel=w close_window_accel=q copy_accel=c paste_accel=v diff --git a/files/.config/nix/nix.conf b/files/.config/nix/nix.conf deleted file mode 100644 index c7d7291..0000000 --- a/files/.config/nix/nix.conf +++ /dev/null @@ -1 +0,0 @@ -experimental-features = nix-command flakes diff --git a/files/.config/nvim/init.lua b/files/.config/nvim/init.lua deleted file mode 100644 index 81429da..0000000 --- a/files/.config/nvim/init.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("config.options") -for _, file in ipairs(vim.fn.globpath(vim.fn.stdpath("config") .. "/lua/config", "*.lua", false, true)) do - require("config." .. vim.fn.fnamemodify(file, ":t:r")) -end diff --git a/files/.config/nvim/lazy-lock.json b/files/.config/nvim/lazy-lock.json deleted file mode 100644 index 9c17667..0000000 --- a/files/.config/nvim/lazy-lock.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, - "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "fzf.vim": { "branch": "master", "commit": "d2a59a992a2455f609c0fde2ebd84427ea8f919a" }, - "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "nvim-lspconfig": { "branch": "master", "commit": "51dbf5359da86721662c87ca10eb73add973737b" } -} diff --git a/files/.config/nvim/lazyvim.json b/files/.config/nvim/lazyvim.json deleted file mode 100644 index d8bcaf6..0000000 --- a/files/.config/nvim/lazyvim.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extras": [ - - ], - "install_version": 8, - "news": { - "NEWS.md": "11866" - }, - "version": 8 -} \ No newline at end of file diff --git a/files/.config/nvim/lua/config/fzf.lua b/files/.config/nvim/lua/config/fzf.lua deleted file mode 100644 index 9591982..0000000 --- a/files/.config/nvim/lua/config/fzf.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.keymap.set("n", "b", "Buffers") -vim.keymap.set("n", "f", "Files") diff --git a/files/.config/nvim/lua/config/lazy.lua b/files/.config/nvim/lua/config/lazy.lua deleted file mode 100644 index 2145915..0000000 --- a/files/.config/nvim/lua/config/lazy.lua +++ /dev/null @@ -1,32 +0,0 @@ --- https://lazy.folke.io/installation --- Bootstrap lazy.nvim -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - --- Make sure to setup `mapleader` and `maplocalleader` before --- loading lazy.nvim so that mappings are correct. --- This is also a good place to setup other settings (vim.opt) -vim.g.mapleader = " " -vim.g.maplocalleader = "\\" - --- Setup lazy.nvim -require("lazy").setup({ - spec = { - { import = "plugins" }, - }, - -- automatically check for plugin updates - checker = { enabled = true }, -}) diff --git a/files/.config/nvim/lua/config/lsp.lua b/files/.config/nvim/lua/config/lsp.lua deleted file mode 100644 index f504e94..0000000 --- a/files/.config/nvim/lua/config/lsp.lua +++ /dev/null @@ -1,21 +0,0 @@ -vim.lsp.config('chicken', { - cmd = {'chicken-lsp-server'}, - filetypes = {'scheme'}, - root_markers = {'Makefile', 'build.meson', '.git'}, -}) -vim.diagnostic.config({ - virtual_text = true, - signs = true, - underline = true, - severity_sort = true, -}) -vim.lsp.enable('chicken') --- requires clang-tools-extra -vim.lsp.enable('clangd') --- requires lua-language-server -vim.lsp.enable('lua_ls') --- requires rust-analyzer -vim.lsp.enable('rust_analyzer') -vim.keymap.set("n", "l", function() - vim.lsp.buf.format({ async = true }) -end, { desc = "Format buffer" }) diff --git a/files/.config/nvim/lua/config/options.lua b/files/.config/nvim/lua/config/options.lua deleted file mode 100644 index 165fd2c..0000000 --- a/files/.config/nvim/lua/config/options.lua +++ /dev/null @@ -1,7 +0,0 @@ -vim.g.mapleader = " " -vim.g.maplocalleader = "," -vim.opt.smarttab = true -vim.opt.tabstop = 2 -vim.opt.shiftwidth = 2 -vim.opt.expandtab = true -vim.opt.clipboard = "unnamedplus" -- use system clipboard diff --git a/files/.config/nvim/lua/config/theme.lua b/files/.config/nvim/lua/config/theme.lua deleted file mode 100644 index eefe3a9..0000000 --- a/files/.config/nvim/lua/config/theme.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.cmd.colorscheme("lunaperche") -vim.api.nvim_set_hl(0, "Normal", { bg = "NONE" }) diff --git a/files/.config/nvim/lua/plugins/fzf.lua b/files/.config/nvim/lua/plugins/fzf.lua deleted file mode 100644 index 3dfbbf6..0000000 --- a/files/.config/nvim/lua/plugins/fzf.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - { - 'https://github.com/junegunn/fzf.vim' - } -} diff --git a/files/.config/nvim/lua/plugins/lsp.lua b/files/.config/nvim/lua/plugins/lsp.lua deleted file mode 100644 index b26a894..0000000 --- a/files/.config/nvim/lua/plugins/lsp.lua +++ /dev/null @@ -1,27 +0,0 @@ -return { - { - 'neovim/nvim-lspconfig', - event = { "BufReadPost", "BufNewFile" }, - cmd = { "LspInfo", "LspInstall", "LspUninstall" }, - }, - - { - 'saghen/blink.cmp', - dependencies = { 'rafamadriz/friendly-snippets' }, - version = '1.*', - opts = { - keymap = { - preset = 'super-tab', - [''] = { 'scroll_signature_up', 'fallback' }, - [''] = { 'scroll_signature_down', 'fallback' }, - }, - completion = { - documentation = { - auto_show = true, - auto_show_delay_ms = 50, - } - }, - signature = { enabled = true } - }, - } -} diff --git a/files/.config/nvim/nvim-pack-lock.json b/files/.config/nvim/nvim-pack-lock.json deleted file mode 100644 index aa0a3e4..0000000 --- a/files/.config/nvim/nvim-pack-lock.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "plugins": { - "blink.cmp": { - "rev": "0e63407c28bd09ef0d3604478823f7f92dd8d9ec", - "src": "https://github.com/Saghen/blink.cmp" - }, - "fzf.vim": { - "rev": "d2a59a992a2455f609c0fde2ebd84427ea8f919a", - "src": "https://github.com/junegunn/fzf.vim" - }, - "nvim-lspconfig": { - "rev": "d592c1e6ad9a0a01b3d5ed3f0345d68407167181", - "src": "https://github.com/neovim/nvim-lspconfig" - } - } -} diff --git a/files/.config/service/dunst/run b/files/.config/service/dunst/run index b633a41..c580c06 100755 --- a/files/.config/service/dunst/run +++ b/files/.config/service/dunst/run @@ -1,2 +1,2 @@ #!/bin/sh -exec dunst +exec chpst -e "$TURNSTILE_ENV_DIR" dunst diff --git a/files/.config/service/pass-sync/run b/files/.config/service/pass-sync/run index 7052d61..17ea7d6 100755 --- a/files/.config/service/pass-sync/run +++ b/files/.config/service/pass-sync/run @@ -1,2 +1,3 @@ #!/bin/sh -pass-sync && sleep 60 || sleep 360 \ No newline at end of file + +exec chpst -e "$TURNSTILE_ENV_DIR" sh -c "pass-sync && sleep 60 || sleep 360" \ No newline at end of file diff --git a/files/.config/service/pipewire/run b/files/.config/service/pipewire/run index 14abda1..85197ea 100755 --- a/files/.config/service/pipewire/run +++ b/files/.config/service/pipewire/run @@ -1,8 +1,9 @@ #!/bin/sh -exec 2>&1 +rm -rf "/run/user/$(id -u)/pulse" +exec chpst -e "$TURNSTILE_ENV_DIR" sh -c ' test -n "$DBUS_SESSION_BUS_ADDRESS" || { >&2 echo "dbus not running" exit 1 } -rm -rf "/run/user/$(id -u)/pulse" exec pipewire +' diff --git a/files/.config/service/sshfs/run b/files/.config/service/sshfs/run index 9518ea8..0491741 100755 --- a/files/.config/service/sshfs/run +++ b/files/.config/service/sshfs/run @@ -1,4 +1,4 @@ #!/bin/sh -mkdir -p "$HOME/nfs" -exec sshfs -o auto_unmount -o uid=`id -u` -o gid=`id -g` -f kentoj.de:nfs "$HOME/nfs" - +mkdir -p ~/nfs +exec chpst -e "$TURNSTILE_ENV_DIR" \ + sshfs -o auto_unmount -f kentoj.de:nfs ~/nfs diff --git a/files/.config/tanjiro.png b/files/.config/tanjiro.png deleted file mode 100644 index 47cab21..0000000 Binary files a/files/.config/tanjiro.png and /dev/null differ diff --git a/files/.config/vis/plugins/vis-ctags/.github/workflows/default.yml b/files/.config/vis/plugins/vis-ctags/.github/workflows/default.yml new file mode 100644 index 0000000..ab1d527 --- /dev/null +++ b/files/.config/vis/plugins/vis-ctags/.github/workflows/default.yml @@ -0,0 +1,15 @@ +name: default + +on: [push, pull_request] + +jobs: + format: + name: Run StyLua + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: JohnnyMorganz/stylua-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: 0.17.0 + args: --check . diff --git a/files/.config/vis/plugins/vis-ctags/LICENSE b/files/.config/vis/plugins/vis-ctags/LICENSE new file mode 100644 index 0000000..508c149 --- /dev/null +++ b/files/.config/vis/plugins/vis-ctags/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Konstantin Pospelov + +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. diff --git a/files/.config/vis/plugins/vis-ctags/README.md b/files/.config/vis/plugins/vis-ctags/README.md new file mode 100644 index 0000000..2bb0c41 --- /dev/null +++ b/files/.config/vis/plugins/vis-ctags/README.md @@ -0,0 +1,18 @@ +# vis-ctags + +Basic ctags support for the [vis editor](https://github.com/martanne/vis). + +## Usage + +The plugin should first of all be +[enabled](https://github.com/martanne/vis/wiki/Plugins). + +| Action | Shortcut | Command | Exports | +| ---------------- | ---------- | ---------------- | ------------------ | +| Jump to tag | `Ctrl+]` | `tag ` | `actions.tag` | +| List tag matches | `g+Ctrl+]` | `tselect ` | `actions.tselect` | +| Jump back | `Ctrl+T` | `pop` | `actions.pop` | + +There may be some generic or language-specific issues. If you find +one, or you have an idea of how to improve something, feel free to +send a patch or create a pull request. diff --git a/files/.config/vis/plugins/vis-ctags/init.lua b/files/.config/vis/plugins/vis-ctags/init.lua new file mode 100644 index 0000000..3396478 --- /dev/null +++ b/files/.config/vis/plugins/vis-ctags/init.lua @@ -0,0 +1,339 @@ +require('vis') + +local positions = {} +local tags = { 'tags' } +local ctags = { actions = {} } + +local function abs_path(prefix, path) + if string.find(path, '^/') ~= nil then + return path, path + end + + if string.find(path, '^./') ~= nil then + path = path:sub(3) + end + + return prefix .. path, path +end + +local function is_directory(path) + local dir = io.open(path .. '/', 'r') + if dir then + dir:close() + return true + else + return false + end +end + +local function find_tags(path) + for i = #path, 1, -1 do + if path:sub(i, i) == '/' then + local prefix = path:sub(1, i) + for j = 1, #tags do + local tagfile = tags[j] + local filename + if tagfile:sub(1, 1) == '/' then + filename = tagfile + else + filename = prefix .. tagfile + end + if not is_directory(filename) then + local file = io.open(filename, 'r') + + if file ~= nil then + return file, prefix + end + end + end + end + end +end + +local function bsearch(file, word) + local buffer_size = 8096 + local format = '\n(.-)\t(.-)\t(.-);"\t' + + local from = 0 + local to = file:seek('end') + local startpos = nil + + while from <= to do + local mid = from + math.floor((to - from) / 2) + file:seek('set', mid) + + local content = file:read(buffer_size, '*line') + if content ~= nil then + local key, _, _ = string.match(content, format) + if key == nil then + break + end + + if key == word then + startpos = mid + end + + if key >= word then + to = mid - 1 + else + from = mid + 1 + end + else + to = mid - 1 + end + end + + if startpos ~= nil then + file:seek('set', startpos) + + local result = {} + while true do + local content = file:read(buffer_size, '*line') + if content == nil then + break + end + + for key, filename, excmd in string.gmatch(content, format) do + if key == word then + result[#result + 1] = { name = filename, excmd = excmd } + else + return result + end + end + end + + return result + end +end + +local function get_query() + local line = vis.win.selection.line + local pos = vis.win.selection.col + local str = vis.win.file.lines[line] + + local from, to = 0, 0 + while pos > to do + from, to = str:find('[%a_]+[%a%d_]*', to + 1) + if from == nil or from > pos then + return nil + end + end + + return string.sub(str, from, to) +end + +local function get_matches(word, path) + local file, prefix = find_tags(path) + + if file ~= nil then + local results = bsearch(file, word) + file:close() + + if results ~= nil then + local matches = {} + for i = 1, #results do + local result = results[i] + local abspath, name = abs_path(prefix, result.name) + local desc = string.format('%s%s', name, tonumber(result.excmd) and ':' .. result.excmd or '') + + matches[#matches + 1] = { desc = desc, path = abspath, excmd = result.excmd } + end + + return matches + end + end +end + +local function get_match(word, path) + local matches = get_matches(word, path) + if matches ~= nil then + for i = 1, #matches do + if matches[i].path == path then + return matches[i] + end + end + + return matches[1] + end +end + +local function escape(text) + return text:gsub('[][)(}{|+?*.]', '\\%0') + :gsub('%^', '\\^') + :gsub('^/\\%^', '/^') + :gsub('%$', '\\$') + :gsub('\\%$/$', '$/') + :gsub('\\\\%$%$/$', '\\$$') +end + +--[[ +- Can't test vis:command() as it will still return true if the edit command fails. +- Can't test File.modified as the edit command can succeed if the current file is + modified but open in another window and this behavior is useful. +- Instead just check the path again after trying the edit command. +]] +local function goto_pos(pos, force) + if pos.path ~= vis.win.file.path then + vis:command(string.format(force and 'e! "%s"' or 'e "%s"', pos.path)) + if pos.path ~= vis.win.file.path then + return false + end + end + if tonumber(pos.excmd) then + vis.win.selection:to(pos.excmd, pos.col) + else + vis.win.selection:to(1, 1) + vis:command(escape(pos.excmd)) + vis.win.selection.pos = vis.win.selection.range.start + vis.mode = vis.modes.NORMAL + end + return true +end + +local function goto_tag(path, excmd, force) + local old = { + path = vis.win.file.path, + excmd = vis.win.selection.line, + col = vis.win.selection.col, + } + + local last_search = vis.registers['/'] + if goto_pos({ path = path, excmd = excmd, col = 1 }, force) then + positions[#positions + 1] = old + vis.registers['/'] = last_search + end +end + +local function pop_pos(force) + if #positions < 1 then + return + end + if goto_pos(positions[#positions], force) then + table.remove(positions, #positions) + end +end + +local function win_path() + if vis.win.file.path == nil then + return os.getenv('PWD') .. '/' + end + return vis.win.file.path +end + +local function tag_cmd(tag, force) + local match = get_match(tag, win_path()) + if match == nil then + vis:info(string.format('Tag not found: %s', tag)) + else + goto_tag(match.path, match.excmd, force) + end +end + +local function gen_vis_menu(matches) + local width = 0 + for _, match in ipairs(matches) do + width = math.max(width, match.desc:len()) + end + -- limit max width of desc field (filename) in menu + width = math.min(width, 40) + local fmt = '%' .. #tostring(#matches) .. 'd %-' .. width .. 's %s' + + local lines = {} + for i, match in ipairs(matches) do + local desc = match.desc + if desc:len() > width then + desc = '...' .. desc:sub(desc:len() - width + 4) + end + + -- work around bug displaying tabs in vis-menu and + -- provide a clearer context + local excmd = match.excmd:gsub('%s+', ' ') + excmd = excmd:gsub('^/^', '') + excmd = excmd:gsub('$/$', '') + table.insert(lines, fmt:format(i, desc, excmd)) + end + + -- limit vis-menu height to ~1/4 the window height + -- +1 gives an empty line at bottom to signify + -- that there are no more lines to scroll through + local nlines = math.min(math.floor(vis.win.height / 4), #lines) + if nlines == #lines then + nlines = nlines + 1 + end + return 'vis-menu -l ' .. nlines .. " -p 'Choose tag:' << 'EOF'\n" .. table.concat(lines, '\n') .. '\n' .. 'EOF' +end + +local function tselect_cmd(tag, force) + local matches = get_matches(tag, win_path()) + if matches == nil then + vis:info(string.format('Tag not found: %s', tag)) + else + local status, output = vis:pipe(vis.win.file, { start = 0, finish = 0 }, gen_vis_menu(matches)) + + if status ~= 0 then + vis:info('Command failed') + return + end + + local choice = tonumber(string.match(output, '%d+')) + if choice == nil or choice < 1 or choice > #matches then + vis:info('Invalid choice') + return + end + goto_tag(matches[choice].path, matches[choice].excmd, force) + end +end + +vis:command_register('tag', function(argv, force, win, selection, range) + if #argv == 1 then + tag_cmd(argv[1], force) + end +end) + +vis:command_register('tselect', function(argv, force, win, selection, range) + if #argv == 1 then + tselect_cmd(argv[1], force) + end +end) + +vis:command_register('pop', function(argv, force, win, selection, range) + pop_pos(force) +end) + +vis:option_register('tags', 'string', function(value) + tags = {} + for str in value:gmatch('([^%s]+)') do + table.insert(tags, str) + end +end, 'Paths to search for tags (separated by spaces)') + +ctags.actions.tag = function(keys) + local query = get_query() + local force = false + if query ~= nil then + tag_cmd(query, force) + end + return 0 +end + +ctags.actions.tselect = function(keys) + local query = get_query() + local force = false + if query ~= nil then + tselect_cmd(query, force) + end + return 0 +end + +ctags.actions.pop = function(keys) + pop_pos() + return 0 +end + +vis:map(vis.modes.NORMAL, '', ctags.actions.tag) + +vis:map(vis.modes.NORMAL, 'g', ctags.actions.tselect) + +vis:map(vis.modes.NORMAL, '', ctags.actions.pop) + +return ctags diff --git a/files/.config/vis/plugins/vis-ctags/stylua.toml b/files/.config/vis/plugins/vis-ctags/stylua.toml new file mode 100644 index 0000000..599a1d0 --- /dev/null +++ b/files/.config/vis/plugins/vis-ctags/stylua.toml @@ -0,0 +1 @@ +quote_style = "AutoPreferSingle" diff --git a/files/.config/vis/plugins/vis-sneak/.gitignore b/files/.config/vis/plugins/vis-sneak/.gitignore new file mode 100644 index 0000000..600d2d3 --- /dev/null +++ b/files/.config/vis/plugins/vis-sneak/.gitignore @@ -0,0 +1 @@ +.vscode \ No newline at end of file diff --git a/files/.config/vis/plugins/vis-sneak/.luarc.json b/files/.config/vis/plugins/vis-sneak/.luarc.json new file mode 100644 index 0000000..5e46e3f --- /dev/null +++ b/files/.config/vis/plugins/vis-sneak/.luarc.json @@ -0,0 +1,7 @@ +{ + "Lua": { + "diagnostics": { + "globals": ["vis"] + } + } +} \ No newline at end of file diff --git a/files/.config/vis/plugins/vis-sneak/LICENSE b/files/.config/vis/plugins/vis-sneak/LICENSE new file mode 100644 index 0000000..d8d78d6 --- /dev/null +++ b/files/.config/vis/plugins/vis-sneak/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Erlend Lind Madsen + +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. diff --git a/files/.config/vis/plugins/vis-sneak/README.md b/files/.config/vis/plugins/vis-sneak/README.md new file mode 100644 index 0000000..0a6f2a5 --- /dev/null +++ b/files/.config/vis/plugins/vis-sneak/README.md @@ -0,0 +1,20 @@ +# vis-sneak + +Jump to a location specified by two characters. + +A minimal motion [plugin](https://github.com/martanne/vis/wiki/Plugins) for [vis](https://github.com/martanne/vis) inspired by [vim-sneak](https://github.com/justinmk/vim-sneak). + +## Usage + +Type `s{char}{char}` to move to the next char combo. + +Type `S{char}{char}` to move back. + +Matches are highlighted until you move outside the matches. + +Type `n` or `N` to find the next or prev match, or append a number to the motion. + + +## Install + +Download and require manually, or add `erf/vis-sneak` using [vis-plug](https://github.com/erf/vis-plug). diff --git a/files/.config/vis/plugins/vis-sneak/init.lua b/files/.config/vis/plugins/vis-sneak/init.lua new file mode 100644 index 0000000..839bc4a --- /dev/null +++ b/files/.config/vis/plugins/vis-sneak/init.lua @@ -0,0 +1,83 @@ +local pattern = nil +local matches = {} + +-- iterater for doing find in pattern until nil +local pattern_iterator = function(content, pattern) + local offset = 1 + return function() + local starts, ends = string.find(content, pattern, offset) + if starts == nil then return nil end + offset = ends + 1 + return starts, ends + end +end + +-- is cursor pos is in one of the matches? +local cursor_on_match = function(win) + local pos = win.selection.pos + for _, range in ipairs(matches) do + if pos >= range.start and pos <= range.finish then + return true + end + end + return false +end + +-- check if range is in viewport range +local range_in_viewport = function(viewport, range) + return range.start >= viewport.bytes.start and range.finish <= viewport.bytes.finish +end + +-- highlihght current matches +local highlight = function(win) + + -- clear matches if cursor is not on a match + if not cursor_on_match(win) then + matches = {} + return + end + + -- style matches in viewport + for _, range in ipairs(matches) do + if range_in_viewport(win.viewport, range) then + win:style(win.STYLE_CURSOR, range.start, range.finish) + end + end +end + +-- collect matches (ranges) for pattern in file +local collect_matches = function() + local file = vis.win.file + local content = file:content(0, file.size) + matches = {} + for starts, ends in pattern_iterator(content, pattern) do + table.insert(matches, { start = starts - 1, finish = ends - 1 }) + end +end + +-- highlight matches on WIN_HIGHLIGHT +vis.events.subscribe(vis.events.WIN_HIGHLIGHT, function(win) + highlight(win) +end) + +-- create search for two chars and collect matches for highlighting +local sneak = function(keys, search_char) + if #keys < 2 then + pattern = nil + return -1 + end + vis:feedkeys(search_char .. keys .. '') + pattern = keys + collect_matches() + return 2 +end + +-- sneak forward on 's' +vis:map(vis.modes.NORMAL, 's', function(keys) + return sneak(keys, '/') +end) + +-- sneak backwards on 'S' +vis:map(vis.modes.NORMAL, 'S', function(keys) + return sneak(keys, '?') +end) diff --git a/files/.config/vis/themes/kento2.lua b/files/.config/vis/themes/kento2.lua index 9e1093f..31f83f8 100644 --- a/files/.config/vis/themes/kento2.lua +++ b/files/.config/vis/themes/kento2.lua @@ -2,10 +2,8 @@ local lexers = vis.lexers local colors = { - ['bg'] = '#00000000', + ['bg'] = '#010101', ['fg'] = '#aaaaaa', - --['bg'] = '#eeeeee', - --['fg'] = '#010101', ['blk'] = '#333333', ['bblk'] = '#4f4f4f', ['red'] = '#8c4665', @@ -24,8 +22,8 @@ local colors = { ['bwht'] = '#c0c0c0', -- special colors - ['dim1'] = '#555555', - ['dim2'] = '#010101' + ['dim1'] = '#191919', + ['dim2'] = '#262626' } -- general styles @@ -62,7 +60,7 @@ lexers.STYLE_CURSOR_LINE = 'back:'..colors.dim1 -- cursor line lexers.STYLE_COLOR_COLUMN = lexers.STYLE_CURSOR_LINE -- color column lexers.STYLE_SELECTION = 'back:'..colors.ylw -- visual selection lexers.STYLE_STATUS = 'fore:'..colors.bblk..',back:'..colors.dim2 -- inactive statusline -lexers.STYLE_STATUS_FOCUSED = 'fore:'..colors.fg..',back:'..colors.bg -- active statusline +lexers.STYLE_STATUS_FOCUSED = 'fore:'..colors.fg..',back:'..colors.dim2 -- active statusline lexers.STYLE_SEPARATOR = lexers.STYLE_COMMENT -- vertical split color lexers.STYLE_BRACKETS = 'fore:'..colors.red..',bold' -- matched brackets, e.g [__]__ lexers.STYLE_INFO = 'bold' -- messages from `vis:info()` diff --git a/files/.config/vis/themes/minimal-light.lua b/files/.config/vis/themes/minimal-light.lua new file mode 100644 index 0000000..01fb939 --- /dev/null +++ b/files/.config/vis/themes/minimal-light.lua @@ -0,0 +1,49 @@ +-- vis-minimal-theme (https://github.com/erf/vis-minimal-theme) +-- light by Erlend Lind Madsen +-- uses a black background and a white foreground + +local black0 = '#000000' +local black1 = '#383838' +local black2 = '#686868' + +local white0 = '#ffffff' +local white1 = '#c8c8c8' +local white2 = '#989898' + +local lexers = vis.lexers + +lexers.STYLE_DEFAULT ='back:'..white0..',fore:'..black0 +lexers.STYLE_NOTHING = 'back:'..white0 +lexers.STYLE_CLASS = 'fore:'..black0 +lexers.STYLE_COMMENT = 'fore:'..white2 +lexers.STYLE_CONSTANT = 'fore:'..black0 +lexers.STYLE_DEFINITION = 'fore:'..black0 +lexers.STYLE_ERROR = 'fore:'..black0 +lexers.STYLE_FUNCTION = 'fore:'..black0 +lexers.STYLE_KEYWORD = 'fore:'..black2 +lexers.STYLE_LABEL = 'fore:'..black0 +lexers.STYLE_NUMBER = 'fore:'..black1 +lexers.STYLE_OPERATOR = 'fore:'..black0 +lexers.STYLE_REGEX = 'fore:'..black1 +lexers.STYLE_STRING = 'fore:'..black1 +lexers.STYLE_PREPROCESSOR = 'fore:'..black0 +lexers.STYLE_TAG = 'fore:'..black0 +lexers.STYLE_TYPE = 'fore:'..black0 +lexers.STYLE_VARIABLE = 'fore:'..black0 +lexers.STYLE_WHITESPACE = '' +lexers.STYLE_EMBEDDED = 'back:'..white1 +lexers.STYLE_IDENTIFIER = 'fore:'..black0 + +lexers.STYLE_LINENUMBER = 'fore:'..black1 +lexers.STYLE_LINENUMBER_CURSOR = lexers.STYLE_LINENUMBER +lexers.STYLE_CURSOR = 'back:'..white2 +lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:'..black1 +lexers.STYLE_CURSOR_LINE = 'underlined' +lexers.STYLE_COLOR_COLUMN = 'back:'..white1 +lexers.STYLE_SELECTION = 'back:'..white1 +lexers.STYLE_STATUS = 'reverse' +lexers.STYLE_STATUS_FOCUSED = 'back:'..white1..',fore:'..black1 +lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT +lexers.STYLE_INFO = 'fore:default,back:default' +lexers.STYLE_EOF = '' + diff --git a/files/.config/vis/themes/wryan.lua b/files/.config/vis/themes/wryan.lua new file mode 100644 index 0000000..5826e84 --- /dev/null +++ b/files/.config/vis/themes/wryan.lua @@ -0,0 +1,80 @@ +-- wryan.lua + +local lexers = vis.lexers +local colors = { + ['bg'] = '#111111', + ['fg'] = '#999993', + ['blk'] = '#333333', + ['bblk'] = '#3d3d3d', + ['red'] = '#8c4665', + ['bred'] = '#bf4d80', + ['grn'] = '#287373', + ['bgrn'] = '#53a6a6', + ['ylw'] = '#7c7c99', + ['bylw'] = '#9e9ecb', + ['blu'] = '#395573', + ['bblu'] = '#477ab3', + ['mag'] = '#5e468c', + ['bmag'] = '#7e62b3', + ['cyn'] = '#31658c', + ['bcyn'] = '#6096bf', + ['wht'] = '#899ca1', + ['bwht'] = '#c0c0c0', + + -- special colors + ['dim1'] = '#191919', + ['dim2'] = '#262626' +} + +-- general styles +lexers.STYLE_DEFAULT = 'fore:'..colors.fg..',back:'..colors.bg -- default fg / bg +lexers.STYLE_NOTHING = lexers.STYLE_DEFAULT +lexers.STYLE_ATTRIBUTE = 'fore:'..colors.bmag -- attribute names, `` +lexers.STYLE_CLASS = 'fore:'..colors.mag -- classes, `class _MyClass_` +lexers.STYLE_COMMENT = 'fore:'..colors.bblk -- comments, `_/* foo */_` +lexers.STYLE_CONSTANT = lexers.STYLE_DEFAULT -- compiler constants &c, `#define _FOO_ 5` +lexers.STYLE_DEFINITION = 'fore:'..colors.bblu -- definitions, overlaps with other tokens +lexers.STYLE_ERROR = 'fore:'..colors.bg..',back:'..colors.red -- syntax errors +lexers.STYLE_FUNCTION = 'fore:'..colors.bblu -- functions, `void _doBar_()` +lexers.STYLE_HEADING = 'fore:'..colors.bmag..',bold' -- headings, like in markdown +lexers.STYLE_KEYWORD = 'fore:'..colors.bred -- keywords, `_for_ (;;)` +lexers.STYLE_LABEL = 'fore:'..colors.red -- goto &c, `_target_:` +lexers.STYLE_NUMBER = 'fore:'..colors.bcyn -- number constants +lexers.STYLE_OPERATOR = lexers.STYLE_DEFAULT -- operators, `int foo _=_ 0` +lexers.STYLE_REGEX = 'fore:'..colors.red -- regular expressions, `"_^\w*$_"` +lexers.STYLE_STRING = 'fore:'..colors.bgrn -- strings, `char* baz = _"hello!"_` +lexers.STYLE_PREPROCESSOR = 'fore:'..colors.cyn -- preprocessor rules, `_#define_ FOO 5` +lexers.STYLE_TAG = 'fore:'..colors.bblk -- tag names, `<_div_ class="foo">` +lexers.STYLE_TYPE = 'fore:'..colors.bgrn -- types, `_int_ foo = 0` +lexers.STYLE_VARIABLE = lexers.STYLE_DEFAULT -- variable names, `int _foo_ = 0` +lexers.STYLE_WHITESPACE = 'fore:'..colors.blk -- whitespaces +lexers.STYLE_EMBEDDED = 'back:'..colors.dim1 -- embedded code +lexers.STYLE_IDENTIFIER = lexers.STYLE_DEFAULT -- unclassified names + +-- UI styles +lexers.STYLE_LINENUMBER = 'fore:'..colors.blk -- inactive line numbers +lexers.STYLE_LINENUMBER_CURSOR = 'fore:'..colors.bcyn -- active line numbers +lexers.STYLE_CURSOR = 'fore:'..colors.fg..',reverse' -- cursor color +lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR +lexers.STYLE_CURSOR_LINE = 'back:'..colors.dim1 -- cursor line +lexers.STYLE_COLOR_COLUMN = lexers.STYLE_CURSOR_LINE -- color column +lexers.STYLE_SELECTION = lexers.STYLE_CURSOR_LINE -- visual selection +lexers.STYLE_STATUS = 'fore:'..colors.bblk..',back:'..colors.dim2 -- inactive statusline +lexers.STYLE_STATUS_FOCUSED = 'fore:'..colors.fg..',back:'..colors.dim2 -- active statusline +lexers.STYLE_SEPARATOR = lexers.STYLE_COMMENT -- vertical split color +lexers.STYLE_BRACKETS = 'fore:'..colors.red..',bold' -- matched brackets, e.g [__]__ +lexers.STYLE_INFO = 'bold' -- messages from `vis:info()` +lexers.STYLE_EOF = 'fore:'..colors.dim2 -- the tildes at the end of the buffer + +-- lexer-specific +-- TODO add more... + +-- markdown +lexers.STYLE_HR = lexers.STYLE_COMMENT +for i = 1,6 do lexers['STYLE_HEADING_H'..i] = lexers.STYLE_HEADING end +lexers.STYLE_BOLD = 'bold' +lexers.STYLE_ITALIC = 'italics' +lexers.STYLE_LIST = lexers.STYLE_KEYWORD +lexers.STYLE_LINK = lexers.STYLE_KEYWORD +lexers.STYLE_REFERENCE = lexers.STYLE_KEYWORD +lexers.STYLE_CODE = lexers.STYLE_EMBEDDED diff --git a/files/.config/vis/visrc.lua b/files/.config/vis/visrc.lua index b789e51..6b415f4 100644 --- a/files/.config/vis/visrc.lua +++ b/files/.config/vis/visrc.lua @@ -1,26 +1,13 @@ require("vis") - -local plug = (function() if not pcall(require, 'plugins/vis-plug') then - os.execute('git clone --quiet https://github.com/erf/vis-plug ' .. - (os.getenv('XDG_CONFIG_HOME') or os.getenv('HOME') .. '/.config') - .. '/vis/plugins/vis-plug') -end return require('plugins/vis-plug') end)() - -local plugins = { - { 'erf/vis-sneak' }, - { 'kupospelov/vis-ctags' }, - { 'https://codeberg.org/luxanna/vis-autoclose' }, - { 'http://forge.kentoj.de/kento2/vis-lspc.git' } -} -plug.init(plugins, true) +require("plugins/vis-ctags") +require("plugins/vis-sneak") vis.events.subscribe(vis.events.INIT, function() - --vis:command("set theme kento2") - vis:command("set theme plain2") + vis:command("set theme kento2") vis.options.autoindent = true vis.options.breakat = " " - + vis:map(vis.modes.NORMAL, 'h', 'gh') vis:map(vis.modes.NORMAL, 'j', 'gj') vis:map(vis.modes.NORMAL, 'k', 'gk') @@ -35,54 +22,6 @@ vis.events.subscribe(vis.events.INIT, function() vis:map(vis.modes.NORMAL, ' p', '"+p') vis:map(vis.modes.NORMAL, ' d', '"+d') vis:map(vis.modes.NORMAL, ' x', '"+x') - - vis:command_register("grep", function(argv, force, win, selection, range) - local text = argv[1] - if selection.anchored then - text = win.file:content(selection.range) - end - if not text then - return false - end - - local escaped = text:gsub("'","'\\''") - local proc = io.popen("grep -n -I -R -- "..escaped .." | tr '\t' ' ' | fzy") - if not proc then return false end - local sel = proc:read("*a") or "" - proc:close(); - - local path, line = sel:match("^(.-):(%d+):") - if not path or not line then return false end - selection:remove() - selection.anchored = false - vis:command("e "..path) - vis.win.selection:to(tonumber(line), 1) - vis:redraw() - return true - end) - - vis:map(vis.modes.VISUAL, ' g', function() - vis:command("grep") - vis:redraw() - end) - - vis:map(vis.modes.NORMAL, ' f', function() - vis:command("!make; read a") - vis:redraw() - end) - - vis:map(vis.modes.NORMAL, 'mm', function() - vis:command("!make; read a") - vis:redraw() - end) - vis:map(vis.modes.NORMAL, 'mc', function() - vis:command("!make check; read a") - vis:redraw() - end) - vis:map(vis.modes.NORMAL, 'mt', function() - vis:command("!make test; read a") - vis:redraw() - end) end) vis.events.subscribe(vis.events.WIN_OPEN, function(win) diff --git a/files/.cwmrc b/files/.cwmrc index 5730420..e03c0df 100644 --- a/files/.cwmrc +++ b/files/.cwmrc @@ -1,18 +1,15 @@ ## CWM config file - -ignore xclock # Sticky groups: uncomment to enable worskpace-like behavior sticky yes -focusfollowsmouse no # Default font fontname "Iosevka:pixelsize=14:bold" # Appearance -borderwidth 5 -color activeborder "#845c68" -color inactiveborder "#343335" +borderwidth 2 +color activeborder "#ccccff" +color inactiveborder "#565656" color urgencyborder "#cc241d" # Menu colors @@ -23,14 +20,14 @@ color menufg "#5294E2" #Gaps (top, bottom, left, right) #gap 32 8 8 8 -gap 18 8 8 8 +gap 8 8 8 8 # Size of manually tiled Windows in % htile 55 -vtile 55 +vtile 0 # How many pixels a window gets moved by -moveamount 75 +moveamount 50 # Commands command term /usr/bin/lxterminal @@ -97,18 +94,18 @@ bind-key 4C-t window-htile bind-key 4-t window-vtile # Cycle/reverse cycle through windows -bind-key M-Tab window-cycle -bind-key MS-Tab window-rcycle +bind-key 4-j window-cycle +bind-key 4-k window-rcycle # Move windows bind-key 4C-h window-move-left bind-key 4C-j window-move-down bind-key 4C-k window-move-up bind-key 4C-l window-move-right -bind-key 4CS-h window-resize-left-big -bind-key 4CS-j window-resize-down-big -bind-key 4CS-k window-resize-up-big -bind-key 4CS-l window-resize-right-big +bind-key 4CS-h window-resize-left +bind-key 4CS-j window-resize-down +bind-key 4CS-k window-resize-up +bind-key 4CS-l window-resize-right bind-mouse 4-1 window-move bind-mouse 4-3 window-resize @@ -123,9 +120,10 @@ bind-key 4S-Return lxterminal bind-key 4-s screenshot # Open menus -bind-key 4-f menu-window -bind-key 4-d "dmenu_run -nb '#000000' -sb '#353047' -sf '#ffffff'" -bind-key 4-s "kfavmenu" +bind-key 4M-m menu-window +bind-key 4-f menu-group +#bind-key 4-a menu-cmd +bind-key 4-d "dmenu_run -sb '#ccccff' -sf '#000000'" # Volume control @@ -134,7 +132,7 @@ bind-key XF86AudioLowerVolume "vol -" bind-key XF86AudioMute "vol ." bind-key XF86AudioMicMute "vol !" -bind-key 4-y "playerctl -p spotify play-pause 2>/dev/null || playerctl play-pause" +bind-key 4-y "playerctl play-pause" bind-key 4-less "playerctl previous" bind-key 4-greater "playerctl next" diff --git a/files/.exrc b/files/.exrc index 68e621c..5b10fca 100644 --- a/files/.exrc +++ b/files/.exrc @@ -2,6 +2,9 @@ set showmode ruler set filec= set cedit= set ai +set tabstop=2 +set shiftwidth=2 +set number " https://mattwidmann.net/notes/modern-nvi-mappings/ " display man page diff --git a/files/.gitconfig b/files/.gitconfig index 52193aa..c775c20 100644 --- a/files/.gitconfig +++ b/files/.gitconfig @@ -1,6 +1,6 @@ # This is Git's per-user configuration file. [user] name = kento2 - email = kento@placeq.com + email = kento+pub@placeq.com [core] autocrlf = input diff --git a/files/.irssi/default.theme b/files/.irssi/default.theme deleted file mode 100644 index be5b807..0000000 --- a/files/.irssi/default.theme +++ /dev/null @@ -1,352 +0,0 @@ -# marker theme by tenner, www.tenr.de - -# When testing changes, the easiest way to reload the theme is with /RELOAD. -# This reloads the configuration file too, so if you did any changes remember -# to /SAVE it first. Remember also that /SAVE overwrites the theme file with -# old data so keep backups :) - -# TEMPLATES: - -# The real text formats that irssi uses are the ones you can find with -# /FORMAT command. Back in the old days all the colors and texts were mixed -# up in those formats, and it was really hard to change the colors since you -# might have had to change them in tens of different places. So, then came -# this templating system. - -# Now the /FORMATs don't have any colors in them, and they also have very -# little other styling. Most of the stuff you need to change is in this -# theme file. If you can't change something here, you can always go back -# to change the /FORMATs directly, they're also saved in these .theme files. - -# So .. the templates. They're those {blahblah} parts you see all over the -# /FORMATs and here. Their usage is simply {name parameter1 parameter2}. -# When irssi sees this kind of text, it goes to find "name" from abstracts -# block below and sets "parameter1" into $0 and "parameter2" into $1 (you -# can have more parameters of course). Templates can have subtemplates. -# Here's a small example: -# /FORMAT format hello {colorify {underline world}} -# abstracts = { colorify = "%G$0-%n"; underline = "%U$0-%U"; } -# When irssi expands the templates in "format", the final string would be: -# hello %G%Uworld%U%n -# ie. underlined bright green "world" text. -# and why "$0-", why not "$0"? $0 would only mean the first parameter, -# $0- means all the parameters. With {underline hello world} you'd really -# want to underline both of the words, not just the hello (and world would -# actually be removed entirely). - -# COLORS: - -# You can find definitions for the color format codes in docs/formats.txt. - -# There's one difference here though. %n format. Normally it means the -# default color of the terminal (white mostly), but here it means the -# "reset color back to the one it was in higher template". For example -# if there was /FORMAT test %g{foo}bar, and foo = "%Y$0%n", irssi would -# print yellow "foo" (as set with %Y) but "bar" would be green, which was -# set at the beginning before the {foo} template. If there wasn't the %g -# at start, the normal behaviour of %n would occur. If you _really_ want -# to use the terminal's default color, use %N. - -############################################################################# - -# default foreground color (%N) - -1 is the "default terminal color" -default_color = "-1"; - -# print timestamp/servertag at the end of line, not at beginning -info_eol = "false"; - -# these characters are automatically replaced with specified color -# (dark grey by default) -replaces = { "[]=" = "%K$*%n"; }; - -abstracts = { - ## - ## generic - ## - - # text to insert at the beginning of each non-message line - #line_start = "%n"; - line_start = "%K%K"; - # timestamp styling, nothing by default - timestamp = "%K%%H%%M"; - - # any kind of text that needs hilighting, default is to bold - hilight = "%_$0-%_"; - - # any kind of error message, default is bright red - error = "%R$*%n"; - - # channel name is printed - #channel = "%_$*%_"; - channel = "%K$0-"; - - # nick is printed - #nick = "%_$*%_"; - nick = "%_$0-%_"; - - # nick host is printed - #nickhost = "[$*]"; - nickhost = "%K(%K$0-%K)%K"; - - # server name is printed - server = "%_$*%_"; - - # some kind of comment is printed - #comment = "[$*]"; - comment = "%K(%K$0-%K)%n"; - - # reason for something is printed (part, quit, kick, ..) - #reason = "{comment $*}"; - reason = "{comment %K$0-}"; - - # mode change is printed ([+o nick]) - #mode = "{comment $*}"; - mode = "{comment $0-}"; - - ## - ## channel specific messages - ## - - # highlighted nick/host is printed (joins) - channick_hilight = "%K$*%n"; - chanhost_hilight = "{nickhost %K$*%n}"; - - # nick/host is printed (parts, quits, etc.) - channick = "%K$*%n"; - chanhost = "{nickhost $*}"; - - # highlighted channel name is printed - channelhilight = "%K$*%n"; - - # ban/ban exception/invite list mask is printed - ban = "%K$*%n"; - - ## - ## messages - ## - - # the basic styling of how to print message, $0 = nick mode, $1 = nick - msgnick = "%n$0$1-%K>%n %|"; - - # message from you is printed. "msgownnick" specifies the styling of the - # nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the - # whole line. - - # Example1: You want the message text to be green: - # ownmsgnick = "{msgnick $0 $1-}%g"; - # Example2.1: You want < and > chars to be yellow: - # ownmsgnick = "%Y{msgnick $0 $1-%Y}%n"; - # (you'll also have to remove <> from replaces list above) - # Example2.2: But you still want to keep <> grey for other messages: - # pubmsgnick = "%K{msgnick $0 $1-%K}%n"; - # pubmsgmenick = "%K{msgnick $0 $1-%K}%n"; - # pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n"; - # ownprivmsgnick = "%K{msgnick $*%K}%n"; - # privmsgnick = "%K{msgnick %R$*%K}%n"; - - # $0 = nick mode, $1 = nick - ownmsgnick = "{msgnick $0 $1-}"; - ownnick = "%Y$*%n"; - - # public message in channel, $0 = nick mode, $1 = nick - pubmsgnick = "{msgnick $0 $1-}"; - pubnick = "%W$*%n"; - - # public message in channel meant for me, $0 = nick mode, $1 = nick - pubmsgmenick = "{msgnick $0 $1-}%y"; - menick = "%Y$*%y"; - - # public highlighted message in channel - # $0 = highlight color, $1 = nick mode, $2 = nick - pubmsghinick = "{msgnick $1 $0$2-}%y"; - - # channel name is printed with message - msgchannel = "%K:%Y$*%n"; - - # private message, $0 = nick, $1 = host - privmsg = "[%Y$0%K(%r$1-%K)%n] "; - - # private message from you, $0 = "msg", $1 = target nick - ownprivmsg = "[%W$0%K(%R$1-%K)%n] "; - - # own private message in query - ownprivmsgnick = "{msgnick %g$*}"; - ownprivnick = "%Y$*%n"; - - # private message in query - privmsgnick = "{msgnick %W$*%n}"; - - ## - ## Actions (/ME stuff) - ## - - # used internally by this theme - # action_core = "%W$[-9]0- * %w"; - action_core = "%W$0-%w"; - - # generic one that's used by most actions - action = " %G*** %|{action_core %G$*} "; - - # own action, both private/public - ownaction = "{action $*}"; - - # own action with target, both private/public - ownaction_target = "{action_core $0}%K:%c$1%w "; - - # private action sent by others - pvtaction = "%W (*) $*%w "; - pvtaction_query = "{action $*}"; - - # public action sent by others - pubaction = "{action $*}"; - - - ## - ## other IRC events - ## - - # whois - whois = "%# $[8]0 : $1-"; - - # notices - ownnotice = "[%r$0%K(%R$1-%K)]%n "; - notice = "%K-%M$*%K-%n "; - pubnotice_channel = "%K:%m$*"; - pvtnotice_host = "%K(%m$*%K)"; - servernotice = "%g!$*%n "; - - # CTCPs - ownctcp = "[%r$0%K(%R$1-%K)] "; - ctcp = "%g$*%n"; - - # wallops - wallop = "%W$*%n: "; - wallop_nick = "%n$*"; - wallop_action = "%W * $*%n "; - - # netsplits - netsplit = "%r$*%n"; - netjoin = "%g$*%n"; - - # /names list - names_prefix = ""; - names_nick = "[%_$0%_$1-] "; - names_nick_op = "{names_nick $*}"; - names_nick_halfop = "{names_nick $*}"; - names_nick_voice = "{names_nick $*}"; - names_users = "[%g$*%n]"; - names_channel = "%g$*%n"; - - # DCC - dcc = "%g$*%n"; - dccfile = "%_$*%_"; - - # DCC chat, own msg/action - dccownmsg = "[%r$0%K($1-%K)%n] "; - dccownnick = "%R$*%n"; - dccownquerynick = "%W$*%n"; - dccownaction = "{action $*}"; - dccownaction_target = "{action_core $0}%K:%c$1%n "; - - # DCC chat, others - dccmsg = "[%B$1-%K(%b$0%K)%n] "; - dccquerynick = "%G$*%n"; - dccaction = "%W (*dcc*) $*%n %|"; - - ## - ## statusbar - ## - - # default background for all statusbars. You can also give - # the default foreground color for statusbar items. - sb_background = "%N"; - - # default backround for "default" statusbar group - #sb_default_bg = "%4"; - # background for prompt / input line - sb_prompt_bg = "%n"; - # background for info statusbar - sb_info_bg = "%8"; - # background for topicbar (same default) - #sb_topic_bg = "%4"; - - # text at the beginning of statusbars. sb-item already puts - # space there,so we don't use anything by default. - sbstart = ""; - # text at the end of statusbars. Use space so that it's never - # used for anything. - sbend = " "; - - topicsbstart = "{sbstart $*}"; - topicsbend = "{sbend $*}"; - - prompt = "%W$*%n>%n "; - - sb = "%N$*%K%n "; - - #sb = "%c(%n$*%c)%n"; - - sbmode = "%K/%K+%g$* %K%n"; - sbaway = " ****%W$0%n****"; - sbservertag = ":$0"; - sbnickmode = "$0"; - - - # ',' separator - sb_act_sep = "%K$*"; - # normal text - sb_act_text = "%K$*"; - # public message - sb_act_msg = "%W$*"; - # hilight - sb_act_hilight = "%Y$*"; - # hilight with specified color, $0 = color, $1 = text - sb_act_hilight_color = "$0$1-%n"; - - sbmore = "%_+++%_"; - - - - sb_usercount = "{sb %_$0%_ nicks ($1-)}"; - sb_uc_ircops = "%_*%_$*"; - sb_uc_ops = "%_@%_$*"; - sb_uc_halfops = "%_%%%_$*"; - sb_uc_voices = "%_+%_$*"; - sb_uc_normal = "$*"; - sb_uc_space = " "; - -}; - -formats = { - "fe-common/core" = { - daychange = "%Y< %%d %%b %%Y %Y>"; - nick_changed = " %K~:%w$0 %Y>> %W$1"; - join = " %Kj:$0{channick_hilight}:{chanhost_hilight $1}"; - part = " %Kp:$0{channick}%K:{chanhost $1}"; - quit = " %Kq:$0{channick}%K:{chanhost $1}"; - kick = " %rk%K:$0{channick}/%K{channel $1}/%K{nick $2}/%K{reason $3}"; - topic_unset = " %KT:[%G{channel %G$1}%K]/{nick %W$0}: %|%w$2"; - new_topic = " %KT:[%G{channel %G$1}%K]/{nick %W$0}: %|%w$2"; - - }; - "fe-common/irc" = { - chanmode_change = " %Km:%w{%wmode $1}%K/%n{nick $2}"; - whois = "%n·---%nWhois%n---<%n $0 {chanhost_hilight $1@$2}%w%:%n|%n {whois ircname $3}"; - whois_idle = "%n|%n {whois idle %|$1d $2h $3m $4s}"; - whois_idle_signon = "%n|%n {whois idle %|$1d $2h $3m $4s {comment signon: $5}}"; - whois_server = "%n|%n {whois server %|$1 {comment $2}}"; - whois_oper = "%n|%n {whois {hilight $1}}"; - whois_registered = "%n|%n {whois has registered this nick}"; - whois_help = "%n|%n {whois is available for help}"; - whois_modes = "%n|%n {whois modes $1}"; - whois_realhost = "%n|%n {whois hostname $1-}"; - whois_usermode = "%n|%n {whois usermode $1}"; - whois_channels = "%n|%n {whois channels %|$1}"; - whois_away = "%n|%n {whois away %|$1}"; - whois_special = "%n|%n {whois info %|$1}"; - whois_extra = "%n|%n {whois extra %|$1}"; - end_of_whois = "%n`---------------------------------------------------------"; - whois_not_found = "%n>%w>%n>%n There is no such nick $0"; - }; -}; - diff --git a/files/.profile b/files/.profile index 1a6028e..e6cf186 100644 --- a/files/.profile +++ b/files/.profile @@ -1,18 +1,8 @@ -export ENV="$HOME/.kshrc" -export PATH="$HOME/.local/bin":"$PATH":"/usr/lib/jvm/default-jdk/bin":"$HOME/.cargo/bin" -export MANPATH="/usr/local/man":"$MANPATH" +export ENV="$HOME/.shrc" +export PATH="$HOME/.local/bin":"$PATH" export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/lib/pkgconfig export XKB_DEFAULT_LAYOUT=de -export EDITOR=/usr/bin/vis - export XBPS_DISTDIR="$HOME/void-packages" -export CHEZSCHEMELIBDIRS="/usr/local/lib/csv10.3.0/":"$CHEZSCHEMELIBDIRS" -is_login() { - echo "$-" | grep -q l && test "$(tty)" = '/dev/tty1' -} -if is_login; then - cd - echo 'Press return to start gui' - read && exec startx -fi +export EDITOR=/usr/bin/vis +export CHEZSCHEMELIBDIRS="/usr/local/lib/csv10.3.0/":"$CHEZSCHEMELIBDIRS" diff --git a/files/.tmux.conf b/files/.tmux.conf deleted file mode 100644 index 689d6ff..0000000 --- a/files/.tmux.conf +++ /dev/null @@ -1,12 +0,0 @@ -unbind C-b -set -g prefix C-s - -set -ga terminal-overrides ",xterm-256color:Tc" - -bind-key & kill-window -bind-key x kill-pane - -bind "\\" split-window -h -bind - split-window -v - -set -g status-style 'default' \ No newline at end of file diff --git a/files/.xinitrc b/files/.xinitrc index 5e85b5d..83ad219 100644 --- a/files/.xinitrc +++ b/files/.xinitrc @@ -1 +1,4 @@ -exec dbus-run-session svscan "$HOME/.xinit-svc" +setxkbmap de & +xrandr -r 144 & +exec "$(which cwm)" +#exec "$(which sxwm)" diff --git a/files/.zprofile b/files/.zprofile index eca885b..5a9bb92 100644 --- a/files/.zprofile +++ b/files/.zprofile @@ -1,18 +1,15 @@ export ENV="$HOME/.shrc" export PATH="$HOME/.local/bin":"$PATH" -export MANPATH="/usr/local/man":"$MANPATH" export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/lib/pkgconfig export XKB_DEFAULT_LAYOUT=de export XBPS_DISTDIR="$HOME/void-packages" -export GOPHER=/usr/local/bin/sacc export EDITOR=/usr/bin/vis export CHEZSCHEMELIBDIRS="/usr/local/lib/csv10.3.0/":"$CHEZSCHEMELIBDIRS" - if grep -q l <<< "$-" && test "$(tty)" = '/dev/tty1'; then rm -rf "$HOME"/.config/service-env cd echo 'Press return to start gui' - read && exec startx + read && exec dbus-run-session "$HOME/.winit" fi diff --git a/files/.zshrc b/files/.zshrc index 48b8c47..ca41f04 100644 --- a/files/.zshrc +++ b/files/.zshrc @@ -9,14 +9,25 @@ PS1='%B%m%(?.. %??)%(1j. %j&.)%b %2~%B%#%b ' setopt histignoredups histignorespace incappendhistory extendedhistory SAVEHIST=9000 HISTSIZE=9000 HISTFILE=~/.zsh_history # minimal functions, 08sep2017 +leah+ -g() { LC_ALL=C grep --exclude "*~" -r -P ${@:?regexp missing}; } -sprunge() { cat $@ | curl -sF 'sprunge=<-' http://sprunge.us; } +g() { LC_ALL=C grep --exclude "*~" -r -P ${@:?regexp missing} } +sprunge() { cat $@ | curl -sF 'sprunge=<-' http://sprunge.us } # minimal functions, 02mar -mkcd() { mkdir -p "$1"; cd "$1"; } +mkcd() { mkdir -p "$1"; cd "$1" } +ops() { a="$(lr -t 'type=f' -t '!mode|1' -A | fzy)" && "$EDITOR" "$a" } set -o emacs +alias xi='xi -y' +alias vi='vis' +alias nvi='vis' +alias xr='doas xbps-remove -y' +alias pc='pass -c' +alias pe='pass edit' +alias l='ls -l --color' cdpath="$HOME" +alias nman='man -M /usr/local/netbsd-man' + +mktags() { ctags `lr -t 'name=~".c$"'` } # date +hostname+ [battery] printf '%s +%s+ %s\n' \ @@ -24,16 +35,3 @@ printf '%s +%s+ %s\n' \ "$((cat /sys/class/power_supply/BAT0/capacity 2>/dev/null && echo %) | tr -d '\n')" test -d ~/Downloads && rmdir ~/Downloads - -kcdp() { - name="`lr -A -t 'depth > 3 ? prune : print' -t 'type=d' "$HOME/src" -s | fzy`" - test $? -eq 0 && cd "$HOME/src/$name" -} - -kmktags() { ctags `lr -A -t 'name=~".(ch)$"'`; } -alias xi='doas xi -y' -alias vi='vis' -alias xr='doas xbps-remove -y' -alias kpc='pass -c' -alias kp='pass' -alias nman='man -M /usr/local/netbsd-man' diff --git a/pkgs.txt b/pkgs.txt index d303a4d..0625ba0 100644 --- a/pkgs.txt +++ b/pkgs.txt @@ -1,7 +1,6 @@ alsa-pipewire chrony cwm -daemontools dbus dmenu dunst @@ -43,8 +42,4 @@ xorg xtools zathura zathura-pdf-mupdf -zsh -perl-Glib-Object-Introspection -perl-HTML-Parser -libnotify -irssi-perl +zsh \ No newline at end of file diff --git a/ssb.jpg b/ssb.jpg deleted file mode 100644 index 2dc5cf0..0000000 Binary files a/ssb.jpg and /dev/null differ