dotfiles

My current dotfiles, managed with stow!
Log | Files | Refs

commit d9bf19a6fdcd76bbf39c9a3d730258614853d3b2
Author: benjamin paul <bpaul@bpaul.xyz>
Date:   Wed,  8 Dec 2021 00:03:11 +1000

Initial commit! Dotfile management using stow

Diffstat:
Abin/.local/bin/battery | 2++
Abin/.local/bin/browser | 11+++++++++++
Abin/.local/bin/calculate | 3+++
Abin/.local/bin/colorscheme | 27+++++++++++++++++++++++++++
Abin/.local/bin/curs | 12++++++++++++
Abin/.local/bin/lock | 13+++++++++++++
Abin/.local/bin/scr | 32++++++++++++++++++++++++++++++++
Abin/.local/bin/scratchpad | 6++++++
Abin/.local/bin/toggle-fullscreen | 12++++++++++++
Abin/.local/bin/wp | 18++++++++++++++++++
Abin/.local/bin/youtube | 27+++++++++++++++++++++++++++
Abspwm/.config/bspwm/bspwmrc | 22++++++++++++++++++++++
Anvim/.config/nvim/ftplugin/c.lua | 17+++++++++++++++++
Anvim/.config/nvim/ftplugin/cpp.lua | 14++++++++++++++
Anvim/.config/nvim/ftplugin/lua.lua | 17+++++++++++++++++
Anvim/.config/nvim/ftplugin/tex.lua | 27+++++++++++++++++++++++++++
Anvim/.config/nvim/init.lua | 8++++++++
Anvim/.config/nvim/lua/commands.lua | 1+
Anvim/.config/nvim/lua/map.lua | 28++++++++++++++++++++++++++++
Anvim/.config/nvim/lua/plugins.lua | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anvim/.config/nvim/lua/plugins/compe.lua | 13+++++++++++++
Anvim/.config/nvim/lua/plugins/feline.lua | 3+++
Anvim/.config/nvim/lua/plugins/lsp.lua | 3+++
Anvim/.config/nvim/lua/plugins/luasnip.lua | 33+++++++++++++++++++++++++++++++++
Anvim/.config/nvim/lua/plugins/nvim_colorizer.lua | 2++
Anvim/.config/nvim/lua/plugins/telescope.lua | 44++++++++++++++++++++++++++++++++++++++++++++
Anvim/.config/nvim/lua/plugins/treesitter.lua | 8++++++++
Anvim/.config/nvim/lua/plugins/vimtex.lua | 1+
Anvim/.config/nvim/lua/settings.lua | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Anvim/.config/nvim/plugins/theme/colors/theme.vim | 20++++++++++++++++++++
Anvim/.config/nvim/plugins/theme/lua/lush_theme/theme.lua | 294+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apicom/.config/picom.conf | 6++++++
Asxhkd/.config/sxhkd/sxhkdrc | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athemes/.config/themes/1 | 27+++++++++++++++++++++++++++
Athemes/.config/themes/2 | 35+++++++++++++++++++++++++++++++++++
Atmux/.tmux.conf | 39+++++++++++++++++++++++++++++++++++++++
Axorg/.xinitrc | 7+++++++
Axorg/.xprofile | 12++++++++++++
Azsh/.zprofile | 3+++
Azsh/.zshrc | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
40 files changed, 1096 insertions(+), 0 deletions(-)

diff --git a/bin/.local/bin/battery b/bin/.local/bin/battery @@ -0,0 +1,2 @@ +#!/bin/sh +cat /sys/class/power_supply/BAT0/capacity diff --git a/bin/.local/bin/browser b/bin/.local/bin/browser @@ -0,0 +1,11 @@ +#!/bin/sh + +prompt=$(echo "" | dmenu -c -p "URL:") + +[[ -z $prompt ]] && exit + +if ping $prompt -c 4 > /dev/null 2>&1; then + firefox --new-tab "$prompt" +else + firefox --search "$prompt" +fi diff --git a/bin/.local/bin/calculate b/bin/.local/bin/calculate @@ -0,0 +1,3 @@ +#!/bin/sh + +echo " $(echo '' | dmenu | bc)"; bspc config top_padding 20 && sleep 3 | notify-send - diff --git a/bin/.local/bin/colorscheme b/bin/.local/bin/colorscheme @@ -0,0 +1,27 @@ +#!/bin/bash +# +# This file echoes a bunch of color codes to the +# terminal to demonstrate what's available. Each +# line is the color code of one forground color, +# out of 17 (default + 16 escapes), followed by a +# test use of that color on all nine background +# colors (default + 8 escapes). +# + +T='aaa' # The test text + +echo -e "\n 40m 41m 42m 43m\ + 44m 45m 46m 47m"; + +for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \ + '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \ + ' 36m' '1;36m' ' 37m' '1;37m'; + do FG=${FGs// /} + echo -en " $FGs \033[$FG $T " + for BG in 40m 41m 42m 43m 44m 45m 46m 47m; + do echo -en "$EINS \033[$FG\033[$BG $T \033[0m"; + done + echo; +done +echo + diff --git a/bin/.local/bin/curs b/bin/.local/bin/curs @@ -0,0 +1,12 @@ +#!/bin/sh + +# Hide or show the cursor in the terminal + +case $1 in + h) + echo -ne '\033[?25l' + ;; + s) + echo -ne '\033[?25h' + ;; +esac diff --git a/bin/.local/bin/lock b/bin/.local/bin/lock @@ -0,0 +1,13 @@ +#!/bin/sh + +LOCK_COLOUR="000000" + +#i3lock --nofork --show-failed-attempts --color=$LOCK_COLOUR --pointer=win --clock +i3lock --nofork \ + --show-failed-attempts --blur=1 \ + --pointer=win \ + --clock \ + --indicator \ + --ring-color=ff00ff \ + --time-color=ffffff \ + --date-color=ffffff diff --git a/bin/.local/bin/scr b/bin/.local/bin/scr @@ -0,0 +1,32 @@ +#!/bin/sh + +usage() { + echo "usage: $(basename $0) [-fu]" + echo " -f [FILE] choose file to output the scrot to" + echo " -u screenshot only the focused window" + exit 1 +} + +scrot_args=" " +file="/tmp/scr_$$.png" + +while [ $# -gt 0 ]; do + case $1 in + -u) + scrot_args+="-u " + shift + ;; + -f) + file="$2" + shift + ;; + -*) + usage + ;; + *) + break + esac +done + +scrot $scrot_args $file +curl -s -F"file=@$file" http://0x0.st | xclip -selection c diff --git a/bin/.local/bin/scratchpad b/bin/.local/bin/scratchpad @@ -0,0 +1,6 @@ +#!/bin/sh + +[[ -z $(bspc query -N -n any.sticky) ]] && urxvt -name scratchpad & + +bspc node any.sticky -g hidden +bspc node any.sticky -f diff --git a/bin/.local/bin/toggle-fullscreen b/bin/.local/bin/toggle-fullscreen @@ -0,0 +1,12 @@ +#!/bin/sh +# bspwm full screen mode but it is actually tiling mode and you can still tile stuff there are just no gaps and stuff + +gap=$(bspc config window_gap) + +if [ $gap == 12 ]; then + bspc config window_gap 0 + bspc config top_padding 0 +else + bspc config window_gap 12 + bspc config top_padding 20 +fi diff --git a/bin/.local/bin/wp b/bin/.local/bin/wp @@ -0,0 +1,18 @@ +#!/bin/sh + +bg=$(xrdb -get background) +fg=$(xrdb -get foreground) + +convert -size 50x50 xc: \ + -alpha set \ + -fill "$bg" \ + -draw "color 0,0 reset" \ + -fill "$bg" \ + -draw "line 0,0 50,50" \ + -draw "line 1,0 50,49" \ + -draw "line 0,1 49,50" \ + -draw "point 49,0" \ + -draw "point 0,49" \ + /tmp/wp.png + +hsetroot -tile /tmp/wp.png diff --git a/bin/.local/bin/youtube b/bin/.local/bin/youtube @@ -0,0 +1,27 @@ +#!/bin/sh + +file="$$" +params="$*" + +[[ -z $params ]] && params=$(echo " " | dmenu -c) +[[ -z $params ]] && exit + +#if ! curl $params > /dev/null 2>&1; then + # most of this is from https://github.com/sayan01/scripts/blob/master/yt + params=$(echo $params | sed \ + -e 's|+|%2B|g'\ + -e 's|#|%23|g'\ + -e 's|&|%26|g'\ + -e 's| |+|g') + ids=$(curl -s https://www.youtube.com/results?search_query=$params | \ + grep -oP '"videoRenderer":{"videoId":".{11}".+?"text":".+?[^\\](?=")' | \ + sed 's|\\\"|"|g' | \ + awk -F\" '{print $6 " " $NF}') + + name=$(echo -e "$ids" | awk '{$1="";print $0}' | dmenu -c -l 10) || exit + params=https://youtu.be/$(echo -e "$ids" | grep "$name" | head -1 | cut -s -d ' ' -f 1) +#fi +youtube-dl --no-playlist -f mp4 -o $file $params ||\ + $(rm $file* && exit) +mpv $file +rm $file* diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc @@ -0,0 +1,22 @@ +#!/bin/sh + +pgrep -x sxhkd > /dev/null || sxhkd & + +bspc monitor -d I II III IV V VI VII VIII IX X + +bspc config border_width 2 +bspc config window_gap 12 + +#bspc config top_padding 23 + +bspc config focus_follows_pointer true + +bspc config split_ratio 0.52 +bspc config borderless_monocle true +bspc config gapless_monocle true + +bspc rule -a mpv state=fullscreen +bspc rule -a 'URxvt:scratchpad' state=floating sticky=on +bspc rule -a 'Alacritty:ncmpcpp' state=floating + +#picom -CGB diff --git a/nvim/.config/nvim/ftplugin/c.lua b/nvim/.config/nvim/ftplugin/c.lua @@ -0,0 +1,17 @@ +-- c ftplugin + +-- Use tabs instead of spaces for c files +vim.bo.tabstop = 4 +vim.bo.softtabstop = 0 +vim.bo.shiftwidth = 4 +vim.bo.expandtab = false +vim.bo.autoindent = true +vim.o.tabstop = 4 +vim.o.softtabstop = 0 +vim.o.shiftwidth = 4 +vim.o.expandtab = false +vim.o.autoindent = true +vim.o.smarttab = true + +-- Make the width of a line 79 characters (if you have more it is ugly!) +vim.bo.textwidth = 79 diff --git a/nvim/.config/nvim/ftplugin/cpp.lua b/nvim/.config/nvim/ftplugin/cpp.lua @@ -0,0 +1,14 @@ +-- cpp ftplugin + +-- Use spaces for cpp files +vim.bo.tabstop = 4 +vim.bo.softtabstop = 4 +vim.bo.shiftwidth = 4 +vim.bo.expandtab = true +vim.bo.autoindent = true +vim.o.tabstop = 4 +vim.o.softtabstop = 4 +vim.o.shiftwidth = 4 +vim.o.expandtab = true +vim.o.autoindent = true +vim.o.smarttab = true diff --git a/nvim/.config/nvim/ftplugin/lua.lua b/nvim/.config/nvim/ftplugin/lua.lua @@ -0,0 +1,17 @@ +-- lua ftplugin + +-- Use spaces for lua files +vim.bo.tabstop = 4 +vim.bo.softtabstop = 4 +vim.bo.shiftwidth = 4 +vim.bo.expandtab = true +vim.bo.autoindent = true +vim.o.tabstop = 4 +vim.o.softtabstop = 4 +vim.o.shiftwidth = 4 +vim.o.expandtab = true +vim.o.autoindent = true +vim.o.smarttab = true + +-- Make the width of a line 79 characters (if you have more it is ugly!) +vim.bo.textwidth = 79 diff --git a/nvim/.config/nvim/ftplugin/tex.lua b/nvim/.config/nvim/ftplugin/tex.lua @@ -0,0 +1,27 @@ +-- latex ftplugin + +-- Set the text width to 79 characters +vim.bo.textwidth = 79 + +-- Enable spell checking +vim.wo.spell = true + +-- Bind <leader>+c to ci{ the last {} on the current line +-- e.g. <leader>+c would make \command{ahesifuhisg} \command{} with insert +vim.api.nvim_set_keymap('n', '<leader>c', '$bci{', + { noremap = true, silent = true }) + +-- Bind <leader>+d to duplicate the current line down +vim.api.nvim_set_keymap('n', '<leader>d', 'yyp', + { noremap = true, silent = true }) + +--vim.api.nvim_eval("TexNewMathZone('E','align',1)") +--vim.api.nvim_eval("TexNewMathZone('E','multline',1)") + +-- Vimtex stuff +vim.g.vimtex_format_enabled = 1 +vim.g.vimtex_syntax_nospell_comments = 1 + +-- Get rid of calendar bindings so that <leader>c is usable +vim.api.nvim_del_keymap("n", " cal") +vim.api.nvim_del_keymap("n", " caL") diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua @@ -0,0 +1,8 @@ +require 'plugins' +require 'settings' +require 'map' +require 'commands' + +--if packer_plugins["lush.nvim"] and packer_plugins["lush.nvim"].loaded then + load 'colours' +--end diff --git a/nvim/.config/nvim/lua/commands.lua b/nvim/.config/nvim/lua/commands.lua @@ -0,0 +1 @@ +vim.api.nvim_command('command! W w') diff --git a/nvim/.config/nvim/lua/map.lua b/nvim/.config/nvim/lua/map.lua @@ -0,0 +1,28 @@ +-- Make CTRL-L clear echo and search +vim.api.nvim_set_keymap('n', '<C-L>', ':noh<CR>:mode<CR>', + { noremap = true, silent = true }) + +-- Make leader+a insert one from the end of the line because semicolon +vim.api.nvim_set_keymap('n', '<leader>a', '$i', + { noremap = true, silent = true }) +-- Make leader+x delete char at the end of the line +vim.api.nvim_set_keymap('n', '<leader>x', '$x', + { noremap = true, silent = true }) +-- Make leader+f fix the spelling of the current word +vim.api.nvim_set_keymap('n', '<leader>f', '1z=', + { noremap = true, silent = true }) +-- Make leader+C open the colour scheme menu +vim.api.nvim_set_keymap('n', '<leader>C', ':Telescope colorscheme<CR>', + { noremap = true, silent = true }) +-- Make leader+F fuzzyfind files +vim.api.nvim_set_keymap('n', '<leader>F', ':Telescope find_files<CR>', + { noremap = true, silent = true }) + +-- Make Shift-Delete do nothing (my keyboard is weird so I press it a lot) +vim.api.nvim_set_keymap('i', '<S-Del>', '', { noremap = true, silent = true }) + +-- Tab completion +vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true}) +vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true}) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua @@ -0,0 +1,59 @@ +-- Plugins list + +vim.cmd 'packadd packer.nvim' + +--vim._update_package_paths() + +require 'packer' .startup(function() + use 'wbthomason/packer.nvim' + + use 'gruvbox-community/gruvbox' + + use 'tpope/vim-fugitive' + use 'tpope/vim-surround' + use 'tpope/vim-dispatch' + + use '~/.config/nvim/plugins/theme' + + use { 'norcalli/nvim-colorizer.lua', config = require 'plugins/nvim_colorizer' } + + use 'mhinz/vim-startify' + + use 'mattn/calendar-vim' + + use { 'neovim/nvim-lspconfig', config = require 'plugins/lsp' } + + use { 'hrsh7th/nvim-compe', config = require 'plugins/compe' } + use { 'L3MON4D3/LuaSnip', config = require 'plugins/luasnip' } + + use 'tweekmonster/startuptime.vim' + + use { 'lervag/vimtex', config = require 'plugins/vimtex' } + + use 'fidian/hexmode' + + use 'rktjmp/lush.nvim' + + --use { 'famiu/feline.nvim', config = require 'plugins/feline' } + + use { + 'nvim-treesitter/nvim-treesitter', + run = ':TSUpdate', + config = require 'plugins/treesitter' + } + use 'p00f/nvim-ts-rainbow' + -- https://github.com/nvim-treesitter/nvim-treesitter-refactor ? + + use { + 'nvim-telescope/telescope.nvim', + requires = { {'nvim-lua/plenary.nvim'} }, + config = require 'plugins/telescope' + } + use 'nvim-telescope/telescope-bibtex.nvim' + use 'nvim-telescope/telescope-cheat.nvim' + use 'nvim-telescope/telescope-frecency.nvim' + use 'nvim-telescope/telescope-fzy-native.nvim' + use 'nvim-telescope/telescope-packer.nvim' + use 'nvim-telescope/telescope-snippets.nvim' + use 'nvim-telescope/telescope-symbols.nvim' +end) diff --git a/nvim/.config/nvim/lua/plugins/compe.lua b/nvim/.config/nvim/lua/plugins/compe.lua @@ -0,0 +1,13 @@ +-- switch to nvim-cmp + +require'compe'.setup{ + enabled = true; + autocomplete = true; + preselect = 'enable'; + source = { + buffer = true; + luasnip = true; + nvim_lsp = true; + nvim_lua = true; + }; +} diff --git a/nvim/.config/nvim/lua/plugins/feline.lua b/nvim/.config/nvim/lua/plugins/feline.lua @@ -0,0 +1,3 @@ +require 'feline' .setup({ + preset = 'noicon' +}) diff --git a/nvim/.config/nvim/lua/plugins/lsp.lua b/nvim/.config/nvim/lua/plugins/lsp.lua @@ -0,0 +1,3 @@ +require'lspconfig'.ccls.setup{} +require'lspconfig'.hls.setup{} +require'lspconfig'.texlab.setup{} diff --git a/nvim/.config/nvim/lua/plugins/luasnip.lua b/nvim/.config/nvim/lua/plugins/luasnip.lua @@ -0,0 +1,33 @@ +function t(str) + return vim.api.nvim_replace_termcodes(str, true, true, true) +end + +function check_back_space() + local col = vim.fn.col('.') - 1 + if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then + return true + else + return false + end +end + +_G.tab_complete = function() + if vim.fn.pumvisible() == 1 then + return t "<C-n>" + elseif require'luasnip'.expand_or_jumpable() then + return t "<Plug>luasnip-expand-or-jump" + elseif check_back_space() then + return t "<Tab>" + else + return vim.fn['compe#complete']() + end +end +_G.s_tab_complete = function() + if vim.fn.pumvisible() == 1 then + return t "<C-p>" + elseif require'luasnip'.expand_or_jumpable() then + return t "<Plug>luasnip-expand-or-jump" + else + return t "<S-Tab>" + end +end diff --git a/nvim/.config/nvim/lua/plugins/nvim_colorizer.lua b/nvim/.config/nvim/lua/plugins/nvim_colorizer.lua @@ -0,0 +1,2 @@ +vim.o.termguicolors = true +require'colorizer'.setup() diff --git a/nvim/.config/nvim/lua/plugins/telescope.lua b/nvim/.config/nvim/lua/plugins/telescope.lua @@ -0,0 +1,44 @@ +require'telescope'.setup{ + defaults = { + vimgrep_arguments = { + 'rg', + '--color=never', + '--no-heading', + '--with-filename', + '--line-number', + '--column', + '--smart-case' + }, + prompt_prefix = "> ", + selection_caret = "> ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "descending", + layout_strategy = "horizontal", + layout_config = { + horizontal = { + mirror = false, + }, + vertical = { + mirror = false, + }, + }, + file_sorter = require'telescope.sorters'.get_fuzzy_file, + file_ignore_patterns = {}, + generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, + winblend = 0, + border = {}, + borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' }, + color_devicons = true, + use_less = true, + path_display = {}, + set_env = { ['COLORTERM'] = 'truecolor' }, -- default = nil, + file_previewer = require'telescope.previewers'.vim_buffer_cat.new, + grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, + qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, + + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker + } +} diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,8 @@ +require'nvim-treesitter.configs'.setup { + highlight = { + enable = true + }, + rainbow = { + enable = false + } +} diff --git a/nvim/.config/nvim/lua/plugins/vimtex.lua b/nvim/.config/nvim/lua/plugins/vimtex.lua @@ -0,0 +1 @@ +vim.g.vimtex_view_method = "zathura" diff --git a/nvim/.config/nvim/lua/settings.lua b/nvim/.config/nvim/lua/settings.lua @@ -0,0 +1,49 @@ +vim.o.background = 'dark' +vim.cmd 'colorscheme theme' + +-- Set leader to space +vim.g.mapleader = ' ' + +-- Line numbers +-- See :h number_relativenumber +vim.wo.number = true +vim.wo.relativenumber = true + +-- Tab configuration +-- See :h tabstop for tab configuration stuff +vim.bo.tabstop = 4 +vim.bo.softtabstop = 4 +vim.bo.shiftwidth = 4 +vim.bo.expandtab = true +vim.bo.autoindent = true +vim.o.smarttab = true +vim.o.hidden = true + +-- Use Australian spelling +vim.bo.spelllang = 'en_au' + +-- Use c ftplugin for .h files +vim.g.c_syntax_for_h = 1 + +-- Ruler shows the line and column number at the bottom right +vim.o.ruler = true + +-- Always show the tab bar for consistency +vim.o.showtabline = 2 + +-- Make underscore separated words separate words +--vim.bo.iskeyword = vim.bo.iskeyword:gsub(",_","") +--vim.o.iskeyword = vim.o.iskeyword:gsub(",_","") + +-- Dont wrap long lines +vim.wo.wrap = false + +-- Dont highlight searches +vim.o.hlsearch = false + +-- Always have the sign column so that code doesnt move around on error +vim.wo.signcolumn = "yes" + +-- Colour column shows the text width of a file +vim.wo.colorcolumn = vim.wo.colorcolumn .. '+' .. 1 +for i = 2,255 do vim.wo.colorcolumn = vim.wo.colorcolumn .. ',+' .. i end diff --git a/nvim/.config/nvim/plugins/theme/colors/theme.vim b/nvim/.config/nvim/plugins/theme/colors/theme.vim @@ -0,0 +1,20 @@ +" You probably always want to set this in your vim file +set background=dark +let g:colors_name="theme" + +" By setting our module to nil, we clear lua's cache, +" which means the require ahead will *always* occur. +" +" This isn't strictly required but it can be a useful trick if you are +" incrementally editing your config a lot and want to be sure your themes +" changes are being picked up without restarting neovim. +" +" Note if you're working in on your theme and have :Lushify'd the buffer, +" your changes will be applied with our without the following line. +" +" The performance impact of this call can be measured in the hundreds of +" *nanoseconds* and such could be considered "production safe". +lua package.loaded['lush_theme.theme'] = nil + +" include our theme file and pass it to lush to apply +lua require('lush')(require('lush_theme.theme')) diff --git a/nvim/.config/nvim/plugins/theme/lua/lush_theme/theme.lua b/nvim/.config/nvim/plugins/theme/lua/lush_theme/theme.lua @@ -0,0 +1,294 @@ +-- +-- Built with, +-- +-- ,gggg, +-- d8" "8I ,dPYb, +-- 88 ,dP IP'`Yb +-- 8888888P" I8 8I +-- 88 I8 8' +-- 88 gg gg ,g, I8 dPgg, +-- ,aa,_88 I8 8I ,8'8, I8dP" "8I +-- dP" "88P I8, ,8I ,8' Yb I8P I8 +-- Yb,_,d88b,,_ ,d8b, ,d8b,,8'_ 8) ,d8 I8, +-- "Y8P" "Y888888P'"Y88P"`Y8P' "YY8P8P88P `Y8 +-- + +-- This is a starter colorscheme for use with Lush, +-- for usage guides, see :h lush or :LushRunTutorial + +-- +-- Note: Because this is lua file, vim will append your file to the runtime, +-- which means you can require(...) it in other lua code (this is useful), +-- but you should also take care not to conflict with other libraries. +-- +-- (This is a lua quirk, as it has somewhat poor support for namespacing.) +-- +-- Basically, name your file, +-- +-- "super_theme/lua/lush_theme/super_theme_dark.lua", +-- +-- not, +-- +-- "super_theme/lua/dark.lua". +-- +-- With that caveat out of the way... +-- + +-- Enable lush.ify on this file, run: +-- +-- `:Lushify` +-- +-- or +-- +-- `:lua require('lush').ify()` + +local lush = require('lush') +local hsl = lush.hsl + +local bg = hsl("#141514") +local fg = hsl("#92A599") +local cursorColour = hsl("#92A599") +local col0 = hsl("#0A0A0A") +local col8 = hsl("#232323") +local col1 = hsl("#92140C") +local col9 = hsl("#B3190E") +local col2 = hsl("#20891A") +local col10 = hsl("#29B222") +local col3 = hsl("#DAAF2F") +local col11 = hsl("#DEB744") +local col4 = hsl("#0049F5") +local col12 = hsl("#1E61FF") +local col5 = hsl("#822E81") +local col13 = hsl("#9D379B") +local col6 = hsl("#2C6CB5") +local col14 = hsl("#4788D2") +local col7 = hsl("#B4C4CF") +local col15 = hsl("#C3D0D9") +-- LSP/Linters mistakenly show `undefined global` errors in the spec, they may +-- support an annotation like the following. Consult your server documentation. +---@diagnostic disable: undefined-global +local theme = lush(function() + return { + -- The following are all the Neovim default highlight groups from the docs + -- as of 0.5.0-nightly-446, to aid your theme creation. Your themes should + -- probably style all of these at a bare minimum. + -- + -- Referenced/linked groups must come before being referenced/lined, + -- so the order shown ((mostly) alphabetical) is likely + -- not the order you will end up with. + -- + -- You can uncomment these and leave them empty to disable any + -- styling for that group (meaning they mostly get styled as Normal) + -- or leave them commented to apply vims default colouring or linking. + + Comment { fg = col8.lighten(30) }, -- any comment + ColorColumn { bg = bg.lighten(10) }, -- used for the columns set with 'colorcolumn' + -- Conceal { }, -- placeholder characters substituted for concealed text (see 'conceallevel') + Cursor { bg = cursorColour }, -- character under the cursor + -- lCursor { }, -- the character under the cursor when |language-mapping| is used (see 'guicursor') + -- CursorIM { }, -- like Cursor, but used when in IME mode |CursorIM| + -- CursorColumn { }, -- Screen-column at the cursor, when 'cursorcolumn' is set. + CursorLine { bg = bg.lighten(5) }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set. + Directory { fg = fg }, -- directory names (and other special names in listings) + -- DiffAdd { }, -- diff mode: Added line |diff.txt| + -- DiffChange { }, -- diff mode: Changed line |diff.txt| + -- DiffDelete { }, -- diff mode: Deleted line |diff.txt| + -- DiffText { }, -- diff mode: Changed text within a changed line |diff.txt| + -- EndOfBuffer { }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. + -- TermCursor { }, -- cursor in a focused terminal + -- TermCursorNC { }, -- cursor in an unfocused terminal + ErrorMsg { bg = col9 }, -- error messages on the command line + -- VertSplit { }, -- the column separating vertically split windows + -- Folded { }, -- line used for closed folds + -- FoldColumn { }, -- 'foldcolumn' + SignColumn { bg = bg.lighten(10) }, -- column where |signs| are displayed + -- IncSearch { }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" + -- Substitute { }, -- |:substitute| replacement text highlighting + LineNr { fg = bg.lighten(30) }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. + CursorLineNr { bg = CursorLine.bg, fg = col3 }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. + MatchParen { bg = col7.darken(60) }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| + -- ModeMsg { }, -- 'showmode' message (e.g., "-- INSERT -- ") + -- MsgArea { }, -- Area for messages and cmdline + -- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display' + -- MoreMsg { }, -- |more-prompt| + -- NonText { }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. + Normal { bg = bg, fg = fg }, -- normal text + -- NormalFloat { }, -- Normal text in floating windows. + -- NormalNC { }, -- normal text in non-current windows + Pmenu { bg = bg.lighten(20), fg = fg.darken(20) }, -- Popup menu: normal item. + -- PmenuSel { }, -- Popup menu: selected item. + -- PmenuSbar { }, -- Popup menu: scrollbar. + -- PmenuThumb { }, -- Popup menu: Thumb of the scrollbar. + -- Question { }, -- |hit-enter| prompt and yes/no questions + -- QuickFixLine { }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. + -- Search { }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. + -- SpecialKey { }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace| + -- SpellBad { }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. + -- SpellCap { }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise. + -- SpellLocal { }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise. + -- SpellRare { }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise. + StatusLine { bg = bg.lighten(15) }, -- status line of current window + StatusLineNC { bg = bg.lighten(5) }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. + TabLine { bg = bg.lighten(10) }, -- tab pages line, not active tab page label + TabLineFill { bg = bg.lighten(15) }, -- tab pages line, where there are no labels + TabLineSel { bg = bg.lighten(3) }, -- tab pages line, active tab page label + Title { fg = col13, gui = "bold" }, -- titles for output from ":set all", ":autocmd" etc. + Visual { bg = CursorLine.bg, gui = "inverse" }, -- Visual mode selection + -- VisualNOS { }, -- Visual mode selection when vim is "Not Owning the Selection". + WarningMsg { fg = col9 }, -- warning messages + -- Whitespace { }, -- "nbsp", "space", "tab" and "trail" in 'listchars' + -- WildMenu { }, -- current match in 'wildmenu' completion + + -- These groups are not listed as default vim groups, + -- but they are defacto standard group names for syntax highlighting. + -- commented out groups should chain up to their "preferred" group by + -- default, + -- Uncomment and edit if you want more specific syntax highlighting. + + Constant { fg = col9 }, -- (preferred) any constant + -- String { }, -- a string constant: "this is a string" + -- Character { }, -- a character constant: 'c', '\n' + -- Number { }, -- a number constant: 234, 0xff + -- Boolean { }, -- a boolean constant: TRUE, false + -- Float { }, -- a floating point constant: 2.3e10 + + Identifier { fg = col14 }, -- (preferred) any variable name + -- Function { }, -- function name (also: methods for classes) + + Statement { fg = col11 }, -- (preferred) any statement + -- Conditional { }, -- if, then, else, endif, switch, etc. + -- Repeat { }, -- for, do, while, etc. + -- Label { }, -- case, default, etc. + -- Operator { }, -- "sizeof", "+", "*", etc. + -- Keyword { }, -- any other keyword + -- Exception { }, -- try, catch, throw + + PreProc { fg = col13 }, -- (preferred) generic Preprocessor + -- Include { }, -- preprocessor #include + -- Define { }, -- preprocessor #define + -- Macro { }, -- same as Define + -- PreCondit { }, -- preprocessor #if, #else, #endif, etc. + + Type { fg = col10 }, -- (preferred) int, long, char, etc. + -- StorageClass { }, -- static, register, volatile, etc. + -- Structure { }, -- struct, union, enum, etc. + -- Typedef { }, -- A typedef + + Special { fg = col3 }, -- (preferred) any special symbol + -- SpecialChar { }, -- special character in a constant + -- Tag { }, -- you can use CTRL-] on this + -- Delimiter { }, -- character that needs attention + -- SpecialComment { }, -- special things inside a comment + -- Debug { }, -- debugging statements + + -- Underlined { gui = "underline" }, -- (preferred) text that stands out, HTML links + -- Bold { gui = "bold" }, + -- Italic { gui = "italic" }, + + -- ("Ignore", below, may be invisible...) + -- Ignore { }, -- (preferred) left blank, hidden |hl-Ignore| + + Error { bg = col9, fg = col15 }, -- (preferred) any erroneous construct + + Todo { bg = col3, fg = col12 }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX + + -- These groups are for the native LSP client. Some other LSP clients may + -- use these groups, or use their own. Consult your LSP client's + -- documentation. + + -- LspReferenceText { }, -- used for highlighting "text" references + -- LspReferenceRead { }, -- used for highlighting "read" references + -- LspReferenceWrite { }, -- used for highlighting "write" references + + -- LspDiagnosticsDefaultError { }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + -- LspDiagnosticsDefaultWarning { }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + -- LspDiagnosticsDefaultInformation { }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + -- LspDiagnosticsDefaultHint { }, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + + -- LspDiagnosticsVirtualTextError { }, -- Used for "Error" diagnostic virtual text + -- LspDiagnosticsVirtualTextWarning { }, -- Used for "Warning" diagnostic virtual text + -- LspDiagnosticsVirtualTextInformation { }, -- Used for "Information" diagnostic virtual text + -- LspDiagnosticsVirtualTextHint { }, -- Used for "Hint" diagnostic virtual text + + -- LspDiagnosticsUnderlineError { }, -- Used to underline "Error" diagnostics + -- LspDiagnosticsUnderlineWarning { }, -- Used to underline "Warning" diagnostics + -- LspDiagnosticsUnderlineInformation { }, -- Used to underline "Information" diagnostics + -- LspDiagnosticsUnderlineHint { }, -- Used to underline "Hint" diagnostics + + -- LspDiagnosticsFloatingError { }, -- Used to color "Error" diagnostic messages in diagnostics float + -- LspDiagnosticsFloatingWarning { }, -- Used to color "Warning" diagnostic messages in diagnostics float + -- LspDiagnosticsFloatingInformation { }, -- Used to color "Information" diagnostic messages in diagnostics float + -- LspDiagnosticsFloatingHint { }, -- Used to color "Hint" diagnostic messages in diagnostics float + + -- LspDiagnosticsSignError { }, -- Used for "Error" signs in sign column + -- LspDiagnosticsSignWarning { }, -- Used for "Warning" signs in sign column + -- LspDiagnosticsSignInformation { }, -- Used for "Information" signs in sign column + -- LspDiagnosticsSignHint { }, -- Used for "Hint" signs in sign column + + -- LspCodeLens { }, -- Used to color the virtual text of the codelens + + -- These groups are for the neovim tree-sitter highlights. + -- As of writing, tree-sitter support is a WIP, group names may change. + -- By default, most of these groups link to an appropriate Vim group, + -- TSError -> Error for example, so you do not have to define these unless + -- you explicitly want to support Treesitter's improved syntax awareness. + + -- TSAnnotation { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information. + -- TSAttribute { }; -- (unstable) TODO: docs + -- TSBoolean { }; -- For booleans. + -- TSCharacter { }; -- For characters. + -- TSComment { }; -- For comment blocks. + -- TSConstructor { }; -- For constructor calls and definitions: ` { }` in Lua, and Java constructors. + -- TSConditional { }; -- For keywords related to conditionnals. + -- TSConstant { }; -- For constants + -- TSConstBuiltin { }; -- For constant that are built in the language: `nil` in Lua. + -- TSConstMacro { }; -- For constants that are defined by macros: `NULL` in C. + -- TSError { }; -- For syntax/parser errors. + -- TSException { }; -- For exception related keywords. + -- TSField { }; -- For fields. + -- TSFloat { }; -- For floats. + -- TSFunction { }; -- For function (calls and definitions). + -- TSFuncBuiltin { }; -- For builtin functions: `table.insert` in Lua. + -- TSFuncMacro { }; -- For macro defined fuctions (calls and definitions): each `macro_rules` in Rust. + -- TSInclude { }; -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua. + -- TSKeyword { }; -- For keywords that don't fall in previous categories. + -- TSKeywordFunction { }; -- For keywords used to define a fuction. + -- TSLabel { }; -- For labels: `label:` in C and `:label:` in Lua. + -- TSMethod { }; -- For method calls and definitions. + -- TSNamespace { }; -- For identifiers referring to modules and namespaces. + -- TSNone { }; -- TODO: docs + -- TSNumber { }; -- For all numbers + -- TSOperator { }; -- For any operator: `+`, but also `->` and `*` in C. + -- TSParameter { }; -- For parameters of a function. + -- TSParameterReference { }; -- For references to parameters of a function. + -- TSProperty { }; -- Same as `TSField`. + -- TSPunctDelimiter { }; -- For delimiters ie: `.` + -- TSPunctBracket { }; -- For brackets and parens. + -- TSPunctSpecial { }; -- For special punctutation that does not fall in the catagories before. + -- TSRepeat { }; -- For keywords related to loops. + -- TSString { }; -- For strings. + -- TSStringRegex { }; -- For regexes. + -- TSStringEscape { }; -- For escape characters within a string. + -- TSSymbol { }; -- For identifiers referring to symbols or atoms. + -- TSType { }; -- For types. + -- TSTypeBuiltin { }; -- For builtin types. + -- TSVariable { }; -- Any variable name that does not have another highlight. + -- TSVariableBuiltin { }; -- Variable names that are defined by the languages, like `this` or `self`. + + -- TSTag { }; -- Tags like html tag names. + -- TSTagDelimiter { }; -- Tag delimiter like `<` `>` `/` + -- TSText { }; -- For strings considered text in a markup language. + -- TSEmphasis { }; -- For text to be represented with emphasis. + -- TSUnderline { }; -- For text to be represented with an underline. + -- TSStrike { }; -- For strikethrough text. + -- TSTitle { }; -- Text that is part of a title. + -- TSLiteral { }; -- Literal text. + -- TSURI { }; -- Any URI like a link or email. + + } +end) + +-- return our parsed theme for extension or use else where. +return theme + +-- vi:nowrap diff --git a/picom/.config/picom.conf b/picom/.config/picom.conf @@ -0,0 +1,6 @@ +corner-radius = 25.0; +rounded-corners-exclude = [ + "class_g = 'URxvt'" +]; +round-borders = 1; +round-borders-rule = [ "2:class_g = 'URxvt'" ]; diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc @@ -0,0 +1,78 @@ +# +# wm independent hotkeys +# + +# terminal emulator +super + shift + Return + urxvt + +# program launcher +super + semicolon + dmenu_run + +# make sxhkd reload its configuration files +super + shift + l + pkill -USR1 -x sxhkd + +# quit/restart bspwm +super + alt + {shift + q,q} + bspc {quit,wm -r} + +# close and kill +super + {_,shift +}c + bspc node -{c,k} + +# lock screen +super + x + lock + +# open a browser +super + b + browser + +super + shift + b + firefox + +super + i + scratchpad + +super + ctrl + c + calculate + +super + n + alacritty --class=ncmpcpp -e ncmpcpp + +super + y + youtube + +# +# state/flags +# + +# set the window state +super + {t,shift + t,s,f} + bspc node -t {tiled,pseudo_tiled,floating,fullscreen} + +# a funky fullscreen script thing +super + shift + f + toggle-fullscreen + +# +# focus/swap +# + +# focus or send to the given desktop +super + {_,shift + }{1-9,0} + bspc {desktop -f,node -d} '^{1-9,10}' && pkill lemonbarconfig -SIGTRAP + +super + {_,shift + } + {a,e,o,h} + bspc node {-f,-s} {west,south,north,east} + +super + alt + {a,e,o,h} + bspc node -z {left -5 0, bottom 0 5, top 0 -5, right 5 0} + +super + alt + ctrl + {a,e,o,h} + bspc node -z {right -5 0, top 0 5, bottom 0 -5, left 5 0} + +super + ctrl + {a,e,o,h} + bspc node -v {-5 0, 0 5, 0 -5, 5 0} diff --git a/themes/.config/themes/1 b/themes/.config/themes/1 @@ -0,0 +1,27 @@ +*.foreground: #92A599 +*.background: #141514 +*.cursorColour: #92A599 + +*.color0: #0A0A0A +*.color8: #232323 + +*.color1: #81241D +*.color9: #9E2C24 + +*.color2: #343823 +*.color10: #4D5233 + +*.color3: #C9AC55 +*.color11: #CBF466 + +*.color4: #09253A +*.color12: #0F3D60 + +*.color5: #251528 +*.color13: #422545 + +*.color6: #508696 +*.color14: #5B95A7 + +*.color7: #E8E1D4 +*.color15: #EAE4D8 diff --git a/themes/.config/themes/2 b/themes/.config/themes/2 @@ -0,0 +1,35 @@ +*.foreground: #92A599 +*.background: #141514 +*.cursorColour: #92A599 + +! Black +*.color0: #0A0A0A +*.color8: #232323 + +! Red +*.color1: #92140C +*.color9: #B3190E + +! Green +*.color2: #20891A +*.color10: #29B222 + +! Yellow +*.color3: #DAAF2F +*.color11: #DEB744 + +! Blue +*.color4: #0049F5 +*.color12: #1E61FF + +! Magenta +*.color5: #822E81 +*.color13: #9D379B + +! Cyan +*.color6: #2C6CB5 +*.color14: #4788D2 + +! White +*.color7: #B4C4CF +*.color15: #C3D0D9 diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf @@ -0,0 +1,39 @@ +# _ +# | |_ _ __ ___ _ ___ __ +# | __| '_ ` _ \| | | \ \/ / +# | |_| | | | | | |_| |> < +# \__|_| |_| |_|\__,_/_/\_\ + +# Rebind prefix to C-a +unbind C-b +set -g prefix C-a +bind C-a send-prefix + +# Start window index at 1 +set -g base-index 1 +setw -g pane-base-index 1 + +# Status bar +set -g status-position top +set -g status-interval 1 +set -g status-style bg=0 +set -g status-right-style 'bg=colour240 fg=color16 bold' +set -g status-right ' #(battery)% #[bg=colour7] %H:%M:%S #[bg=colour240] %d-%b-%y ' +set -g status-left ' ' +set -g window-status-format ' #[fg=brightred bold]#I #[default fg=color16 bold]#W ' +set -g window-status-style 'bg=colour240 fg=color16' +set -g window-status-current-format ' #[fg=brightblue bold]#I #[default fg=color16 bold]#W ' +set -g window-status-current-style 'bg=colour240' + +# Reload tmux.conf quickly +bind r source ~/.tmux.conf + +# Split easier +unbind % +unbind \" +unbind s # Note this is normally choose-tree -Zs +bind s split-window -v +bind h split-window -h + +# Don't allow window renaming +set -g allow-rename off diff --git a/xorg/.xinitrc b/xorg/.xinitrc @@ -0,0 +1,7 @@ +default=bspwm + +[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources && xrdb -merge -I$HOME ~/.config/themes/2 + +. ~/.xprofile + +exec ${2:-$default} diff --git a/xorg/.xprofile b/xorg/.xprofile @@ -0,0 +1,12 @@ +lemonbarlaunch & + +xsetroot -cursor_name left_ptr +wp + +xbindkeys + +#systemctl --user start polybar.service +systemctl --user import-environment DISPLAY +systemctl --user start dunst.service + +urxvt & diff --git a/zsh/.zprofile b/zsh/.zprofile @@ -0,0 +1,3 @@ +#!/bin/zsh + +export PATH="$(du $HOME/.local/bin -d2 | cut -f2 | paste -sd ':'):$PATH" diff --git a/zsh/.zshrc b/zsh/.zshrc @@ -0,0 +1,63 @@ +source ./.zprofile + +# Add colour support and set prompt +autoload -U colors && colors +#PS1="%F{green}%n%f@%F{blue}%m%f %F{white}%B%~%b%f $ " +PS1=" %F{yellow}>%f " +RPS1="" + +# Set default editor to neovim +EDITOR="nvim" +VISUAL=$EDITOR +GIT_EDITOR=$EDITOR + +XDG_CONFIG_HOME="$HOME/.config" + +# pfetch settings +export PF_INFO="ascii title os host kernel uptime memory wm shell editor palette" + +# Set default terminal emulator +TERMINAL="urxvt" + +# Add all scripts to the path + +# History support +HISTSIZE=1000 +SAVEHIST=$HISTSIZE +#HISTFILE="$HOME/.config/zsh_history" + +# Tab completion +autoload -Uz compinit +compinit +zstyle ':completion:*' menu select +zstyle 'completion:complete:*' gain-privileges 1 +setopt COMPLETE_ALIASES + +setopt +o nomatch + +# Enable command correction +#setopt correctall + +# Key bindings +bindkey '[1;5D' backward-word +bindkey '[1;5C' forward-word +bindkey '^\b' backward-delete-word +bindkey '[P' delete-char +bindkey -s '[2K' "" +bindkey -s '\e' "" + +# Avoid programs freezing terminals etc +ttyctl -f + +# Aliases +alias ga='git add' +alias gc='git commit' +alias gp='git push' +alias gs='git status' +alias ls='ls --color=auto' +alias la='ls -la' +alias ssh='TERM=xterm-256color ssh' + +alias v=$EDITOR + +alias bat="cat /sys/class/power_supply/BAT0/capacity"