summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2024-10-17 22:46:39 -0500
committerTim Keller <tjk@tjkeller.xyz>2024-10-17 22:46:39 -0500
commit78d5e2082554d370f43216406f84872eaa2a4e5b (patch)
treefc354e842111062c057484cbb319e02037404975
parent75793a911de3648963385c70237fc737f1967e9d (diff)
downloaddotconfig-78d5e2082554d370f43216406f84872eaa2a4e5b.tar.xz
dotconfig-78d5e2082554d370f43216406f84872eaa2a4e5b.zip
remove zsh and nvim configs from this repo and move to another
-rw-r--r--.gitignore2
-rw-r--r--nvim/init.lua4
-rw-r--r--nvim/lua/tjk/keybindings.lua46
-rw-r--r--nvim/lua/tjk/lazy.lua39
-rw-r--r--nvim/lua/tjk/misc.lua75
-rw-r--r--nvim/lua/tjk/options.lua38
-rw-r--r--nvim/lua/tjk/plugins/autoclose.lua9
-rw-r--r--nvim/lua/tjk/plugins/cmp.lua26
-rw-r--r--nvim/lua/tjk/plugins/colorizer.lua12
-rw-r--r--nvim/lua/tjk/plugins/colorscheme.lua81
-rw-r--r--nvim/lua/tjk/plugins/manageself.lua3
-rw-r--r--nvim/lua/tjk/plugins/treesitter.lua32
l---------zsh/.zshrc1
-rwxr-xr-xzsh/profiles/zprofile.libreX604
-rwxr-xr-xzsh/profiles/zprofile.voidx2503
-rw-r--r--zsh/zplugs1
-rwxr-xr-xzsh/zprofile55
-rwxr-xr-xzsh/zscripts/!rootcolors.zsh3
-rwxr-xr-xzsh/zscripts/.lfub.zsh27
-rwxr-xr-xzsh/zscripts/aliasrc.zsh64
-rwxr-xr-xzsh/zscripts/hosts/aliasrc.G3N2.zsh6
l---------zsh/zscripts/hosts/aliasrc.T495.zsh1
-rwxr-xr-xzsh/zscripts/hosts/aliasrc.desktop.zsh12
-rwxr-xr-xzsh/zscripts/hosts/aliasrc.libreX60.zsh11
-rwxr-xr-xzsh/zscripts/hosts/aliasrc.voidx250.zsh8
-rwxr-xr-xzsh/zscripts/hosts/colors.desktop.zsh9
-rwxr-xr-xzsh/zscripts/hosts/colors.voidx250.zsh9
-rwxr-xr-xzsh/zscripts/keybindrc.zsh24
-rwxr-xr-xzsh/zscripts/nicegit.zsh31
-rwxr-xr-xzsh/zscripts/shortcuts.zsh12
-rwxr-xr-xzsh/zscripts/terminalname.zsh8
-rwxr-xr-xzsh/zscripts/termuxprompt.zsh8
-rwxr-xr-xzsh/zscripts/vicursor.zsh21
-rwxr-xr-xzsh/zscripts/zplug.zsh136
-rwxr-xr-xzsh/zscripts/zshcompmenu.zsh18
-rwxr-xr-xzsh/zshrc32
36 files changed, 0 insertions, 871 deletions
diff --git a/.gitignore b/.gitignore
index ff8e0a4..d4a5ab2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,10 +6,8 @@
!launch
!mimewiz
!npm
-!nvim
!redshift
!x11
-!zsh
nvim/lazy-lock.json
nvim/.netrwhist
diff --git a/nvim/init.lua b/nvim/init.lua
deleted file mode 100644
index 64a2c57..0000000
--- a/nvim/init.lua
+++ /dev/null
@@ -1,4 +0,0 @@
-require("tjk.options")
-require("tjk.keybindings")
-require("tjk.misc")
-require("tjk.lazy") -- plugin manager
diff --git a/nvim/lua/tjk/keybindings.lua b/nvim/lua/tjk/keybindings.lua
deleted file mode 100644
index 563d843..0000000
--- a/nvim/lua/tjk/keybindings.lua
+++ /dev/null
@@ -1,46 +0,0 @@
-local key = vim.keymap.set
-
-vim.g.mapleader = ","
-
--- toggle spellcheck
-key("n", "<leader>l", [[:setlocal spell! spelllang=en_us<CR>]])
--- toggle cursorcolumn
-key("n", "<leader>c", [[:set cursorcolumn!<CR>]])
-
--- scroll doc with ctrl+[jk]
-key({ "n", "v" }, "<C-j>", "<C-e>")
-key({ "n", "v" }, "<C-k>", "<C-y>")
--- go to begining or end of line with ctrl+[hl]
-key({ "n", "v" }, "<C-h>", "zh")
-key({ "n", "v" }, "<C-l>", "zl")
-
--- split navigation with ctrl+shift+[hjkl]
-key("n", "<C-S-h>", "<C-w>h")
-key("n", "<C-S-j>", "<C-w>j")
-key("n", "<C-S-k>", "<C-w>k")
-key("n", "<C-S-l>", "<C-w>l")
-
--- browser like tab shortcuts
-key("n", "<C-Tab>", "gt")
-key("n", "<C-S-Tab>", "gT")
---key("n", "<C-t>", [[:tabe<CR>]])
---key("n", "<C-w>", [[:tabclose<CR>]]) -- <C-w> is already used lol
--- additional tab shortcuts
-key("n", "<C-t>", "gt")
-key("n", "<C-T>", "gT")
-
-
--- copy text to x11 buffer
-key("", "<C-c>", [["+y]])
-key("", "<C-x>", [["+x]])
-key("", "<C-S-c>", [["+y]])
-key("", "<C-S-x>", [["+x]])
-
--- unmap ex mode
-key("", "Q", "<NOP>")
-
--- repeat commands with visual blocks using period
-key("v", ".", [[:normal .<CR>]])
-
--- save files with root permissions with command `w!!`
-key("c", "w!!", [[execute 'silent! write !doas tee % >/dev/null' <bar> edit!]])
diff --git a/nvim/lua/tjk/lazy.lua b/nvim/lua/tjk/lazy.lua
deleted file mode 100644
index 164d968..0000000
--- a/nvim/lua/tjk/lazy.lua
+++ /dev/null
@@ -1,39 +0,0 @@
--- install lazy.nvim via instructions from github
-local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-if not (vim.uv or vim.loop).fs_stat(lazypath) then
- vim.fn.system({
- "git",
- "clone",
- "--filter=blob:none",
- "https://github.com/folke/lazy.nvim.git",
- "--branch=stable", -- latest stable release
- lazypath,
- })
-end
-vim.opt.rtp:prepend(lazypath)
-
--- require lazy module with safety check
-local success, lazy = pcall(require, "lazy")
-
-if not success then
- vim.notify("Failed to load lazy.nvim plugin manager")
- return
-end
-
--- setup lazy & enable plugins
-return lazy.setup(
- {
- { import = "tjk.plugins" }
- },
- {
- -- auto update plugins
- checker = {
- enabled = true,
- notify = false
- },
- -- disable change notification
- change_detection = {
- notify = false
- },
- }
-)
diff --git a/nvim/lua/tjk/misc.lua b/nvim/lua/tjk/misc.lua
deleted file mode 100644
index 14c5bd8..0000000
--- a/nvim/lua/tjk/misc.lua
+++ /dev/null
@@ -1,75 +0,0 @@
--- Use tabs instead of spaces for certain filetypes
-local tabs_instead_of_spaces_filetypes = {
- "sass",
- "scss",
-}
-
-local tabs_instead_of_spaces = function(args)
- local o = vim.opt_local
- o.expandtab = false
- --o.cinoptions = true
- o.preserveindent = true
- o.softtabstop = 0
- o.shiftwidth = 4
- o.tabstop = 4
-end
-vim.api.nvim_create_autocmd("FileType", { pattern = tabs_instead_of_spaces_filetypes, callback = tabs_instead_of_spaces })
-
-
-vim.cmd [[
- "" Extra functionality
-
- "" Functions for changing the terminal emulator's class name to 'Vim'
- "function GetTermPID(temu)
- " let pinfo = ['', getpid(), '']
- " while !(pinfo[2] =~ a:temu || pinfo[1] == '0')
- " let pinfo = split(system('ps h -o pid,ppid,command= -p' . pinfo[1]))
- " endwhile
- " return pinfo[0]
- "endfunction
-
- "function SetTermClassName(termpid, name)
- " " Command chaining in xdotool doesn't work here for some reason
- " silent exec "!xdotool set_window --class " . a:name . " $(xdotool search --pid " . a:termpid . ")"
- "endfunction
-
- "" Behaviors exclusive to either a tty or a graphical terminal emulator
- "if empty($DISPLAY)
- " " Clear the tty screen after exiting vim
- " autocmd VimLeave * :clear
- "else
- " " Highlight current line
- " set cursorline
- " " Change window title
- " autocmd BufEnter * :set title
- " let &titleold="st"
- " " Change class name
- " let temu = "st"
- " let temupid = GetTermPID(temu)
- " if (temupid != 1)
- " autocmd VimEnter * call SetTermClassName(temupid, "Vim")
- " autocmd VimLeave * call SetTermClassName(temupid, temu)
- " endif
- "endif
-
- " Automatically deletes all trailing whitespace on save
- function DelWS()
- let l:save_view = winsaveview()
- :%s/\s*$//e
- call winrestview(l:save_view)
- endfunction
- autocmd BufWritePre * call DelWS()
-
-
- " vim -b : edit binary using xxd-format!
- augroup Binary
- au!
- au BufReadPre *.bin let &bin=1
- au BufReadPost *.bin if &bin | %!xxd
- au BufReadPost *.bin set ft=xxd | endif
- au BufWritePre *.bin if &bin | %!xxd -r
- au BufWritePre *.bin endif
- au BufWritePost *.bin if &bin | %!xxd
- au BufWritePost *.bin set nomod | endif
- augroup END
-]]
diff --git a/nvim/lua/tjk/options.lua b/nvim/lua/tjk/options.lua
deleted file mode 100644
index 989c6c7..0000000
--- a/nvim/lua/tjk/options.lua
+++ /dev/null
@@ -1,38 +0,0 @@
-local opt = vim.opt
-local api = vim.api
-
--- misc
-opt.autochdir = true -- stay in current directory when opening a file
-opt.splitright = true -- open splits on right instead of left
-opt.splitbelow = true -- open splits on bottom instead of top
-opt.termguicolors = true -- truecolor in terminal, will be disabled in tty
-opt.wrap = false -- disable word wrapping
-opt.cursorline = true -- highlight current line
-
--- line numbers
-opt.number = true -- enable line numbers
-opt.relativenumber = true -- enable relative line numbers
-
--- show whitespace characters
-opt.list = true -- show whitespace characters defined in listchars
-opt.listchars = "tab:▏ ,space:·" -- highlight tabs and spaces
-
--- tabbing
-opt.tabstop = 4 -- set tabwidth to 4 instead of 8
-opt.shiftwidth = 4 -- tab key will only insert one tab
-
--- search
-opt.ignorecase = true -- case-insensitive search...
-opt.smartcase = true -- ...unless the search term is capital
-
--- experimental
-opt.smartindent = true
-opt.wildmode = "longest:list:full" -- Better auto-complete
-
--- dont continue comments on to new lines (:help fo-table)
-api.nvim_create_autocmd("FileType", { pattern = "*", callback = function()
- opt.formatoptions:remove { "c", "r", "o" }
-end})
-
--- ignore __pycache__ directories in file listings
-opt.wildignore = "__pycache__/,*/__pycache__/"
diff --git a/nvim/lua/tjk/plugins/autoclose.lua b/nvim/lua/tjk/plugins/autoclose.lua
deleted file mode 100644
index 32afa9f..0000000
--- a/nvim/lua/tjk/plugins/autoclose.lua
+++ /dev/null
@@ -1,9 +0,0 @@
-return {
- "m4xshen/autoclose.nvim", -- autoclose parenthesis
- opts = {
- options = {
- pair_spaces = true,
- },
- },
- config = true,
-}
diff --git a/nvim/lua/tjk/plugins/cmp.lua b/nvim/lua/tjk/plugins/cmp.lua
deleted file mode 100644
index 1a3cf2f..0000000
--- a/nvim/lua/tjk/plugins/cmp.lua
+++ /dev/null
@@ -1,26 +0,0 @@
-return {
- "hrsh7th/nvim-cmp",
- dependencies = {
- "hrsh7th/cmp-path",
- "hrsh7th/cmp-buffer",
- "ray-x/cmp-treesitter",
- },
- config = function()
- local cmp = require("cmp")
- cmp.setup {
- sources = {
- { name = "path" },
- { name = "buffer" },
- { name = "treesitter" },
- },
- mapping = cmp.mapping.preset.insert {
- --['<C-b>'] = cmp.mapping.scroll_docs(-4),
- --['<C-f>'] = cmp.mapping.scroll_docs(4),
- --['<C-Space>'] = cmp.mapping.complete(),
- --['<C-e>'] = cmp.mapping.abort(),
- --['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
- ['<Tab>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
- },
- }
- end
-}
diff --git a/nvim/lua/tjk/plugins/colorizer.lua b/nvim/lua/tjk/plugins/colorizer.lua
deleted file mode 100644
index 0d41dbc..0000000
--- a/nvim/lua/tjk/plugins/colorizer.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-return {
- "norcalli/nvim-colorizer.lua", -- css color highlighter
- config = function()
- local colorizer = require("colorizer")
- colorizer.setup {
- "css",
- "sass",
- "javascript",
- "html",
- }
- end
-}
diff --git a/nvim/lua/tjk/plugins/colorscheme.lua b/nvim/lua/tjk/plugins/colorscheme.lua
deleted file mode 100644
index 2307097..0000000
--- a/nvim/lua/tjk/plugins/colorscheme.lua
+++ /dev/null
@@ -1,81 +0,0 @@
-local root_mode = os.getenv "USER" == "root"
-local tty_mode = os.getenv "DISPLAY" == nil
-
--- load condition
-local enable_gruvbox = not root_mode and not tty_mode
-
--- use another colorscheme if running as root
-if root_mode then
- vim.cmd.colorscheme "koehler"
-end
-
--- disable termguicolors when in a tty
-if tty_mode then
- vim.opt.termguicolors = false
-end
-
-return {
- "ellisonleao/gruvbox.nvim",
- cond = enable_gruvbox,
- priority = 9001,
- config = function()
- vim.o.background = "dark"
-
- local gruvbox = require("gruvbox")
- local colors = gruvbox.palette
-
- gruvbox.setup({
- italic = {
- strings = false,
- emphasis = true,
- comments = false,
- operators = false,
- folds = true,
- },
- invert_selection = true,
- contrast = "hard",
- palette_overrides = {
- light0 = "#ffffff", -- use white instead of the default off-white for text
- light1 = "#ffffff",
- dark2 = "#363636", -- darker whitespace characters
- },
- overrides = {
- CursorLine = { bg = "#282828" }, -- dark0 (non hard)
- Directory = { link = "GruvboxGreenBold" },
- -- treesitter overrides (more similar to builtin python syntax highlighting)
- -- treesitter selectors can be overridden per language using @selector.language
- ["@variable"] = { link = "GruvboxFg0" },
- ["@punctuation.bracket"] = { link = "GruvboxFg0" },
- ["@punctuation.delimiter"] = { link = "GruvboxFg0" },
- ["@keyword.import"] = { link = "GruvboxBlue" },
- ["@function"] = { link = "GruvboxAqua" },
- ["@function.method"] = { link = "GruvboxAqua" },
- ["@function.method"] = { link = "GruvboxAqua" },
- ["@attribute.builtin"] = { link = "GruvboxGreenBold" },
- ["@attribute"] = { link = "GruvboxGreenBold" },
- ["@operator"] = { link = "GruvboxRed" },
- ["@variable.member"] = { link = "GruvboxFg0" },
- ["@variable.parameter"] = { link = "GruvboxFg0" },
- ["@function.call"] = { link = "GruvboxPurple" },
- ["@function.method.call"] = { link = "GruvboxPurple" },
- -- rainbow delimiters colors
- RainbowDelimiterRed = { fg = "#ff4433" },
- RainbowDelimiterYellow = { fg = "#ffff22" },
- RainbowDelimiterBlue = { fg = "#66f3ff" },
- RainbowDelimiterOrange = { fg = "#ffaa00" },
- RainbowDelimiterGreen = { fg = "#99ff44" },
- RainbowDelimiterViolet = { fg = "#aa00ff" },
- RainbowDelimiterCyan = { fg = "#22ddff" },
- -- TODO italic string start / end
- --["@string_start"] = { italic = true },
- --["@string_end"] = { italic = true },
- },
- })
-
- -- set colorscheme
- vim.cmd.colorscheme "gruvbox"
-
- -- fix todo comment highlighting (here instead of theme overrides since this replaces the bg w/ default)
- vim.api.nvim_set_hl(0, "Todo", { fg = "#ffffff", bold = true })
- end,
-}
diff --git a/nvim/lua/tjk/plugins/manageself.lua b/nvim/lua/tjk/plugins/manageself.lua
deleted file mode 100644
index 098c300..0000000
--- a/nvim/lua/tjk/plugins/manageself.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-return {
- "folke/lazy.nvim", -- so lazy can manage itself
-}
diff --git a/nvim/lua/tjk/plugins/treesitter.lua b/nvim/lua/tjk/plugins/treesitter.lua
deleted file mode 100644
index 925fb13..0000000
--- a/nvim/lua/tjk/plugins/treesitter.lua
+++ /dev/null
@@ -1,32 +0,0 @@
-return {
- "nvim-treesitter/nvim-treesitter",
- build = ":TSUpdate",
- dependencies = {
- --{
- -- "nvim-treesitter/playground", -- inspect treesitter structure
- -- cmd = "TSPlaygroundToggle"
- --},
- "HiPhish/rainbow-delimiters.nvim", -- colored delimiters per scope level
- {
- "windwp/nvim-ts-autotag", -- close tags in html/xml type languages
- opts = {
- per_filetype = {
- ["html"] = {
- enable_close = true
- }
- }
- }
- },
- },
- config = function()
- local configs = require("nvim-treesitter.configs")
- configs.setup({
- ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "comment",
- "javascript", "html", "css", "scss", "python", "php" },
- auto_install = true, -- install available parsers when entering new buffers
- highlight = { enable = true, disable = { "yaml", "bash", "latex" } },
- indent = { enable = true, disable = { "yaml" } },
- --playground = { enable = true }, -- treesitter debug
- })
- end
-}
diff --git a/zsh/.zshrc b/zsh/.zshrc
deleted file mode 120000
index c8b42f4..0000000
--- a/zsh/.zshrc
+++ /dev/null
@@ -1 +0,0 @@
-zshrc \ No newline at end of file
diff --git a/zsh/profiles/zprofile.libreX60 b/zsh/profiles/zprofile.libreX60
deleted file mode 100755
index d4f4e9c..0000000
--- a/zsh/profiles/zprofile.libreX60
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env zsh
-
-export WM="awesome"
-export TERMINAL="st"
diff --git a/zsh/profiles/zprofile.voidx250 b/zsh/profiles/zprofile.voidx250
deleted file mode 100755
index 61eb34e..0000000
--- a/zsh/profiles/zprofile.voidx250
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env zsh
-
-export XDG_DATA_DIRS="/var/lib/flatpak/exports/share:$XDG_DATA_DIRS" # .desktop files
diff --git a/zsh/zplugs b/zsh/zplugs
deleted file mode 100644
index 845f5c6..0000000
--- a/zsh/zplugs
+++ /dev/null
@@ -1 +0,0 @@
-https://github.com/zdharma-continuum/fast-syntax-highlighting
diff --git a/zsh/zprofile b/zsh/zprofile
deleted file mode 100755
index f7b2549..0000000
--- a/zsh/zprofile
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env zsh
-
-# Default programs
-export EDITOR='nvim'
-export TERMINAL='alacritty'
-export BROWSER='launch firefox'
-export SUDO='doas'
-
-# Use sudo=${SUDO-sudo}
-[ $EUID = 0 ] && export SUDO='' # When running as root, don't use sudo
-
-# Make programs follow the XDG base directory specification
-export XDG_CACHE_HOME="$HOME/.cache"
-export ANSIBLE_GALAXY_CACHE_DIR="${XDG_CACHE_HOME}/ansible/galaxy_cache"
-export DOCKER_CONFIG="$XDG_CACHE_HOME/docker"
-export XAUTHORITY="$XDG_CACHE_HOME/Xauthority"
-
-export XDG_CONFIG_HOME="$HOME/.config"
-export ANSIBLE_HOME="${XDG_CONFIG_HOME}/ansible"
-export ANSIBLE_CONFIG="${XDG_CONFIG_HOME}/ansible/ansible.cfg"
-export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"
-export MBSYNCRC="$XDG_CONFIG_HOME/mbsync/config"
-export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config"
-export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
-export X11CONFIG="$XDG_CONFIG_HOME/x11" # Used for X11 scripts
-export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
-
-export XDG_DATA_HOME="$HOME/.local/share"
-export CARGO_HOME="$XDG_DATA_HOME/cargo"
-export GNUPGHOME="$XDG_DATA_HOME/gnupg"
-export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
-export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"
-export PYTHONUSERBASE="$XDG_DATA_HOME/python"
-export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=$XDG_DATA_HOME/java"
-
-export XDG_STATE_HOME="$HOME/.local/state"
-export LESSHISTFILE='-' # Disable this, but it would be considered a state file
-export ZHISTFILE="$XDG_STATE_HOME/zsh/zhistory" # Used to set HISTFILE in zshrc without exporting since HISTFILE is generic to most shells, and desired behavior is for zsh to have its own history file
-
-# Path
-setopt nullglob # Set in case .local/bin doesn't exist
-for lbin in "$HOME/.local/bin"{/,/*/}; do export PATH="${lbin%/}:$PATH"; done 2>/dev/null # Add ~/.local/bin and all sub dirs
-export PATH="$HOME/.local/opt:$PATH"
-export PATH="$CARGO_HOME/bin:$PATH"
-export PATH="$PYTHONUSERBASE/bin:$PATH"
-
-# Theming
-export QT_QPA_PLATFORMTHEME='gtk2'
-
-# Misc Zsh setup
-mkdir -p "$(dirname "$ZHISTFILE")"
-source "$ZDOTDIR/profiles/zprofile.$HOST" 2>/dev/null # Source additional host-specific profiles
-
-# Autostart X after login
-[ -z $DISPLAY ] && [[ $UID != 0 ]] && [[ $TTY =~ /dev/tty(1|C0) ]] && startx "$X11CONFIG/xinitrc"
diff --git a/zsh/zscripts/!rootcolors.zsh b/zsh/zscripts/!rootcolors.zsh
deleted file mode 100755
index d146aa5..0000000
--- a/zsh/zscripts/!rootcolors.zsh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env zsh
-
-[ $EUID = 0 ] && declare col{br,name,at,host,dir}=red && clear # Clear to get rid of last login message
diff --git a/zsh/zscripts/.lfub.zsh b/zsh/zscripts/.lfub.zsh
deleted file mode 100755
index 2e1f7f4..0000000
--- a/zsh/zscripts/.lfub.zsh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# This is a wrapper script for lf that allows it to create image previews with
-# ueberzug. This works in concert with the lf configuration file and the
-# lf-cleaner script.
-
-cleanuplf() {
- exec 3>&-
- \rm "$FIFO_UEBERZUG"
-}
-
-lfub() {
- dircache=/tmp/$USER-lflastdir
- lfopt="--last-dir-path=$dircache"
- if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
- lf "$lfopt" "$@"
- else
- export FIFO_UEBERZUG="/tmp/ueberzug-$$"
- mkfifo "$FIFO_UEBERZUG"
- ueberzug layer -s <"$FIFO_UEBERZUG" -p json &
- exec 3>"$FIFO_UEBERZUG"
- trap cleanuplf HUP INT QUIT TERM PWR EXIT
- lf "$lfopt" "$@" 3>&-
- fi
- [ -f "$dircache" ] && dir="$(cat "$dircache")" && [ -d "$dir" ] && cd "$dir"
-}
-
-alias lf="lfub"
diff --git a/zsh/zscripts/aliasrc.zsh b/zsh/zscripts/aliasrc.zsh
deleted file mode 100755
index f4e5035..0000000
--- a/zsh/zscripts/aliasrc.zsh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env zsh
-
-# Replacement programs
-typeset -A repaliases=(
- #alias replacement
- htop htim
- mutt neomutt
- vim nvim
- sudo "${SUDO:- }"
- neofetch fastfetch
-)
-for alias rep in ${(kv)repaliases}; do
- command -v $rep >/dev/null && alias $alias=$rep
-done # Tests if replacement exists before creating alias
-
-
-# Shorten program names
-alias \
- open="xdg-open" \
- smci="sudo make clean install" \
- smi="sudo make install" \
- su="sudo su -l" \
-
-# Power scripts
-alias \
- halt="launch shutdown" \
- off="launch shutdown" \
- reboot="launch reboot" \
- zzz="launch suspend" \
-
-# Colorize command output
-alias \
- bat="bat --theme='Monokai Extended'" \
- diff="diff --color=auto" \
- exa="exa --icons -a --group-directories-first" \
- grep="grep --color=auto -I --ignore-case --line-number" \
- ip="ip --color=auto" \
- ls="ls -vAhN --color=auto --group-directories-first" \
-
-# (Non)-Verbosity
-alias \
- cp="cp -iv" \
- dd="sudo dd status=progress bs=4M"
- ffmpeg="ffmpeg -hide_banner" \
- ffprobe="ffprobe -hide_banner" \
- mkd="mkdir -p" \
- mv="mv -iv" \
- rm="rm -v" \
-
-# Miscellaneous
-alias \
- yt-dlp-album="yt-dlp -x -o '%(uploader)s (%(upload_date>%Y)s) - %(playlist_title)s%%%(playlist_index)s - %(title)s.%(ext)s'" \
- yt-dlp="yt-dlp -o '%(uploader)s - %(title)s.%(ext)s'" \
-
-# Clean home directory
-alias \
- mbsync="mbsync --config $MBSYNCRC" \
- startx="startx $X11CONFIG/xinitrc" \
-
-# Copy-pasting from internet
-alias \
- \$="" \
- \#="${SUDO-sudo}" \
-
diff --git a/zsh/zscripts/hosts/aliasrc.G3N2.zsh b/zsh/zscripts/hosts/aliasrc.G3N2.zsh
deleted file mode 100755
index 8e8d2a5..0000000
--- a/zsh/zscripts/hosts/aliasrc.G3N2.zsh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# Package Management
-alias \
- e="sudo emerge" \
-
diff --git a/zsh/zscripts/hosts/aliasrc.T495.zsh b/zsh/zscripts/hosts/aliasrc.T495.zsh
deleted file mode 120000
index 6c84487..0000000
--- a/zsh/zscripts/hosts/aliasrc.T495.zsh
+++ /dev/null
@@ -1 +0,0 @@
-aliasrc.desktop.zsh \ No newline at end of file
diff --git a/zsh/zscripts/hosts/aliasrc.desktop.zsh b/zsh/zscripts/hosts/aliasrc.desktop.zsh
deleted file mode 100755
index 141212f..0000000
--- a/zsh/zscripts/hosts/aliasrc.desktop.zsh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# Package Management
-alias \
- d="sudo dnf" \
- dnf="sudo dnf" \
-
-# Shorten program names
-alias \
- systemctl="sudo systemctl" \
- sd="systemctl" \
-
diff --git a/zsh/zscripts/hosts/aliasrc.libreX60.zsh b/zsh/zscripts/hosts/aliasrc.libreX60.zsh
deleted file mode 100755
index 1180171..0000000
--- a/zsh/zscripts/hosts/aliasrc.libreX60.zsh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-# Package Management
-alias \
- apt="sudo apt" \
-
-# Shorten program names
-alias \
- systemctl="sudo systemctl" \
- sd="systemctl" \
-
diff --git a/zsh/zscripts/hosts/aliasrc.voidx250.zsh b/zsh/zscripts/hosts/aliasrc.voidx250.zsh
deleted file mode 100755
index 4bb85ea..0000000
--- a/zsh/zscripts/hosts/aliasrc.voidx250.zsh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# Package Management
-alias \
- xi="sudo xbps-install" \
- xq="xbps-query -R --search" \
- xr="sudo xbps-remove" \
-
diff --git a/zsh/zscripts/hosts/colors.desktop.zsh b/zsh/zscripts/hosts/colors.desktop.zsh
deleted file mode 100755
index dee7ed3..0000000
--- a/zsh/zscripts/hosts/colors.desktop.zsh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env zsh
-
-if [ -n "$DISPLAY" ]; then
- declare col{br,at}=57
- declare col{name,host}=13
- coldir=129
-else
- declare col{br,name,at,host,dir}=magenta
-fi
diff --git a/zsh/zscripts/hosts/colors.voidx250.zsh b/zsh/zscripts/hosts/colors.voidx250.zsh
deleted file mode 100755
index 910f1f9..0000000
--- a/zsh/zscripts/hosts/colors.voidx250.zsh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env zsh
-
-if [ -n "$DISPLAY" ]; then
- declare col{br,at}=green
- declare col{name,host}=76
- coldir=40
-else
- declare col{br,name,at,host,dir}=green
-fi
diff --git a/zsh/zscripts/keybindrc.zsh b/zsh/zscripts/keybindrc.zsh
deleted file mode 100755
index 2f2e664..0000000
--- a/zsh/zscripts/keybindrc.zsh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env zsh
-
-# Vi mode + requirements for ALL keybindings to work correctly
-bindkey -v # Select viins keymap
-KEYTIMEOUT=1
-
-# Keybindings
-autoload edit-command-line; zle -N edit-command-line # Edit line in Vim buffer
-bindkey '^E' edit-command-line # Ctrl-e - edit line in Vim buffer
-
-bindkey '^[[P' delete-char # Delete Key
-bindkey '^[[F' end-of-line # End Key
-bindkey '^[[H' beginning-of-line # Home Key
-bindkey '^[[2~' overwrite-mode # Insert Key
-bindkey '^D' kill-whole-line # Ctrl-d - delete line
-bindkey '^X' clear-screen # Ctrl-x - clear screen
-bindkey '^H' backward-delete-word # Ctrl-Backspace - delete entire word behind cursor
-bindkey '^[[3;5~' delete-word # Ctrl-Delete - delete currect word in front of the cursor
-# History completion
-bindkey '\e[A' history-search-backward # Up arrow - seach history backwards
-bindkey '\e[B' history-search-forward # Down arrow - seach history forwards
-
-# Ignore ctrl-d to exit shell
-setopt IGNORE_EOF
diff --git a/zsh/zscripts/nicegit.zsh b/zsh/zscripts/nicegit.zsh
deleted file mode 100755
index 276d98e..0000000
--- a/zsh/zscripts/nicegit.zsh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env zsh
-
-alias \
- ga="git add" \
- gpl="git pull" \
- gph="git push" \
- gl="git log" \
- gldaily='git log --pretty="format:- %s" --after="00:00" --before="24:00"' \
-
-
-function gc() {
- if ! __is_diff; then
- echo "Nothing to commit, working tree clean"
- return
- fi
-
- if [[ "$@" != "" ]]; then
- commit="$@"
- else
- echo "Enter commit message:" && read commit
- fi
- git commit -m "$commit"
-}
-
-function __is_diff() {
- ! git diff --quiet HEAD $REF -- $DIR
-}
-
-function gdf() {
- __is_diff && git diff HEAD $RED -- $DIR || echo "Repo is unchanged"
-}
diff --git a/zsh/zscripts/shortcuts.zsh b/zsh/zscripts/shortcuts.zsh
deleted file mode 100755
index 214b7f7..0000000
--- a/zsh/zscripts/shortcuts.zsh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env zsh
-
-# TODO make this script more comprehensive to allow real aliases for directories
-# Quick navigate to directories / open specific files
-alias \
- cdc="cd ~/docs/src/programs" \
- cds="cd ~/docs/src/scripts" \
- cdw="cd ~/docs/src/sites" \
- vrc="vim ~/.config/nvim/init.vim" \
- xrc="cd ~/.config/x11" \
- zrc="cd ~/.config/zsh" \
-
diff --git a/zsh/zscripts/terminalname.zsh b/zsh/zscripts/terminalname.zsh
deleted file mode 100755
index 6e55d22..0000000
--- a/zsh/zscripts/terminalname.zsh
+++ /dev/null
@@ -1,8 +0,0 @@
-function xtitle () {
- builtin print -n -- "\e]0;$@\a"
-}
-
-# Updates the window title whenever a command is run
-function precmd () {
- xtitle "$(print -P ${USER}@${HOST} %~)"
-}
diff --git a/zsh/zscripts/termuxprompt.zsh b/zsh/zscripts/termuxprompt.zsh
deleted file mode 100755
index 1442cc8..0000000
--- a/zsh/zscripts/termuxprompt.zsh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env zsh
-
-if [ -n "$TERMUX_VERSION" ]; then
- PS1="%B%F{green}[%F{blue}%U%~%u%F{green}]%f%b%(!.#.$) "
- PS1OVERRIDE=1
- export ZPLUGINSDIR=~/.local/share/zsh/zplugins
- export ZPLUGNOROOT=1
-fi
diff --git a/zsh/zscripts/vicursor.zsh b/zsh/zscripts/vicursor.zsh
deleted file mode 100755
index 3e4320d..0000000
--- a/zsh/zscripts/vicursor.zsh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env zsh
-
-# Change cursor shape for different vi modes
-# Copied from LARBS
-if [ -n "$DISPLAY" ]; then
- function zle-keymap-select () {
- case $KEYMAP in
- vicmd) echo -n '\e[1 q';; # block
- viins|main) echo -n '\e[5 q';; # beam
- esac
- }
- zle -N zle-keymap-select
- zle-line-init() {
- #zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
- echo -n "\e[5 q"
- }
- zle -N zle-line-init
- echo -n '\e[5 q' # Use beam shape cursor on startup
- preexec() { echo -n '\e[5 q' ;} # Use beam shape cursor for each new prompt
-fi
-
diff --git a/zsh/zscripts/zplug.zsh b/zsh/zscripts/zplug.zsh
deleted file mode 100755
index 27dc70f..0000000
--- a/zsh/zscripts/zplug.zsh
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/env zsh
-
-local home=~
-local zplugs="${ZDOTDIR:-$home/.}${ZDOTDIR:+/}zplugs" # Declare all variables using `local` to keep them away from the interactive shell
-local zplugins="${ZPLUGINSDIR:-$home/.local/share/zsh/zplugins}"
-#[[ $EUID != 0 ]] && [ -z "$ZPLUGNOROOT" ] && local sudo=${SUDO-sudo}
-
-function __zplugInstall() {
- touch "$zplugs"
- local pluglist=( `\grep -v '#' "$zplugs"` )
- local confirm plug
- shift
- for plug in "$@"; do; pluglist+=(${plug}); done
-
- $sudo mkdir -p "$zplugins"
-
- for plug in ${pluglist[@]}; do
- [ -d "$zplugins/$(basename -s'.git' "$plug")" ] && continue
- if ! `$sudo git -C "$zplugins" clone "$plug" "$(basename -s'.git' "$plug")"`; then
- # Runs if git has an error
- printf "Remove \"$plug\"? [y|n]: "
- read confirm
- case $confirm in
- y|yes) pluglist=(${pluglist#$plug}) && echo "Repo Deleted" ;;
- *) echo "Repo Kept" ;;
- esac
- fi
- echo
- done
- for plug in ${pluglist[@]}; do echo "$plug"; done | sort -u > "$zplugs"
- echo "All plugins installed and saved to $zplugs!\nDone"
-}
-
-function __zplugUninstall() {
- local pluglist=( `cat "$zplugs"` ) pluglistbn=()
- local confirm i plug plugids plugig
-
- [ -z "$pluglist" ] && echo "No packages are installed!" && return
-
- $sudo mkdir -p "$zplugins"
- echo "Listing all packages in $zplugins ..."
- for i in {1..${#pluglist[@]}}; do
- pluglistbn[$i]="$(basename -s'.git' "${pluglist[$i]}")"
- printf '%3d) %s\n' $i "${pluglistbn[$i]}"
- done
-
- echo
- printf "Choose zsh plugin(s) to remove: "
- read plugids
- [ -z "$plugids" ] && echo "No plugins selected\nAborting" && return
-
- echo "\nListing selected plugins:"
- for plugid in $=plugids; do
- if [ -z ${pluglist[$plugid]} ]; then
- echo "Error: input \"$plugid\" is not a valid plugin identifier"
- return
- fi
- echo "\t${pluglistbn[$plugid]}"
- done
-
- printf "\nReally remove all of these plugins? [y|n]: "
- read confirm
- case $confirm in
- y|yes) ;;
- n|no) echo "Aborted" && return ;;
- *) echo "Input not understood\nAborted" && return ;;
- esac
- for plugid in $=plugids; do
- printf '\t'
- $sudo rm -vrf "$zplugins/${pluglistbn[$plugid]}"
- pluglist[$plugid]=""
- done
- for plug in ${pluglist[@]}; do echo "$plug"; done | sort -u > "$zplugs"
- echo "\nDone"
-}
-
-function __zplugUpgrade() {
- local plugdir
- $sudo mkdir -p "$zplugins"
- echo "Upgrading all packages...\n"
- for plugdir in "$zplugins"/*; do;
- basename "$plugdir"
- $sudo git -C "$plugdir" pull;
- echo
- done
- echo "Done"
-}
-
-function __zplugList() {
- mkdir -p "$zplugins"
- echo "Listing all packages...\n"
- ls "$zplugins" | nl -s') ' -w3
- echo "\nDone"
-}
-
-function __zplugHelp() {
- echo "Usage: zplug [install/add/i|uninstall/remove/r|upgrade/update/u|list/l|help/h]
- install, add, i [packages] : Install plugins from config file & add any new plugins
- uninstall, remove, r : Interactively remove plugins
- upgrade, update, u : Update all installed plugins
- list, l : List all installed plugins
- help, h : Show this help menu
-
- All plugins are listed in $zplugs
- All plugins are installed in $zplugins
-
- To install a plugin, just put it in the zplug file and run \"zplug install\"
- or just run \"zplug install [plugin]\" where [plugin] is a link to download the
- plugin using git
-
- For instance, \"https://github.com/zdharma-continuum/fast-syntax-highlighting\" is
- a valid plugin link for the fast-syntax-highlighting plugin.
-
- To use your plugins, just put \"zplugInitialize\" as the last line of your zshrc!"
-}
-
-function zplug() {
- local cmd=${1:-h}
- case $cmd in
- install|add|i) __zplugInstall $@ ;;
- uninstall|remove|r) __zplugUninstall ;;
- upgrade|update|u) __zplugUpgrade ;;
- list|l) __zplugList ;;
- help|h) __zplugHelp ;;
- *) echo "zplug: input \"$1\" not recognized!" && __zplugHelp ;;
- esac
-}
-
-function zplugInitialize() {
- local plugin
- if ! [ -d "$zplugins" ] && [ -f "$zplugs" ]; then
- echo "zplug installing plugins..."
- __zplugInstall 0 # Put in some value since there is a shift
- fi
- for plugin in "$zplugins"/*/*.zsh; do source "$plugin"; done 2>/dev/null
-}
diff --git a/zsh/zscripts/zshcompmenu.zsh b/zsh/zscripts/zshcompmenu.zsh
deleted file mode 100755
index 0d471a5..0000000
--- a/zsh/zscripts/zshcompmenu.zsh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env zsh
-
-# Basic auto/tab complete
-autoload -U compinit
-zstyle ':completion:*' menu select
-zmodload zsh/complist
-compinit -d "${XDG_CACHE_HOME:-$HOME/.config}/zcompdump" # Change where .zcompdump is stored
-_comp_options+=(globdots) # Include hidden files.
-
-# Use ctrl-vi keys in tab complete menu
-bindkey -M menuselect '^h' vi-backward-char
-bindkey -M menuselect '^j' vi-down-line-or-history
-bindkey -M menuselect '^k' vi-up-line-or-history
-bindkey -M menuselect '^l' vi-forward-char
-bindkey -v '^?' backward-delete-char
-
-# Options
-setopt MENU_COMPLETE # Immediately insert first option from completion menu
diff --git a/zsh/zshrc b/zsh/zshrc
deleted file mode 100755
index 532c795..0000000
--- a/zsh/zshrc
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env zsh
-
-setopt +o NOMATCH # Non-existant wildcard matches won't produce an error
-
-# Zsh scripts (load general scripts, then host specific scripts, then scripts with ! prefix) (loaded later = higher priority)
-for zscript in "$XDG_CONFIG_HOME/zsh/zscripts"{/[^\!]*.zsh,/hosts/*.$HOST.zsh,/!*.zsh}; do source "$zscript"; done 2>/dev/null
-
-# Colors! + Prompt
-autoload -U colors && colors
-[ -z "$PS1OVERRIDE" ] && PS1="%B%F{${colbr:-red}}[%F{${colname:-yellow}}%n%F{${colat:-green}}@%F{${colhost:-blue}}%m %F{${coldir:-magenta}}%U%~%u%F{${colbr:-red}}]%f%b%(!.#.$) "
-
-# Cd settings
-setopt AUTO_CD # `cd` is implied when path is entered
-
-# History settings
-HISTFILE="${ZHISTFILE:-$HOME/.zhistory}"
-HISTSIZE=500 # Max lines of history loaded into memory for each zsh session
-SAVEHIST=10000000 # Max lines of history saved to HISTFILE before overwriting
-setopt EXTENDED_HISTORY # Save superfluous info with command to reduce disk writes when using INC_APPEND_HISTORY or SHARE_HISTORY
-setopt HIST_IGNORE_DUPS # Successive duplicate entries ignored
-setopt HIST_IGNORE_SPACE # Entries with leading space aren't stored in histfile
-setopt HIST_REDUCE_BLANKS # Remove superfluous blank characters before saving
-setopt INC_APPEND_HISTORY # Create entries after each command, not after zsh exits
-setopt SHARE_HISTORY # Share history between zsh sessions
-
-# Input/output settings
-setopt INTERACTIVE_COMMENTS # Comments won't be interpreted in an interactive shell
-
-# Disable bell
-unsetopt BEEP
-
-zplugInitialize # Load zsh plugins using zplug; goes last