diff options
Diffstat (limited to '.config')
33 files changed, 472 insertions, 822 deletions
diff --git a/.config/i3/config b/.config/i3/config new file mode 100644 index 0000000..b67d6a0 --- /dev/null +++ b/.config/i3/config @@ -0,0 +1,165 @@ +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:Iosevka Term Custom 10 + +for_window [class="floating"] floating enable + +# no_focus [all] +# focus_on_window_activation none + +# focus_follows_mouse no + +# Use wpctl to adjust volume in Pipewire. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id wpctl set-volume @DEFAULT_SINK@ 5%+ && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id wpctl set-volume @DEFAULT_SINK@ 5%- && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id wpctl set-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id wpctl set-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status +bindsym XF86AudioNext exec --no-startup-id mpc next +bindsym XF86AudioPrev exec --no-startup-id mpc prev +bindsym XF86AudioPlay exec --no-startup-id mpc toggle + +# # Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# # move tiling windows via drag & drop by left-clicking into the title bar, +# # or left-clicking anywhere into the window while holding the floating modifier. +tiling_drag modifier titlebar + +# start a terminal +bindsym $mod+Return exec urxvtc + +# start dmenu +bindsym $mod+p exec --no-startup-id dmenu_run -fn "Hack Nerd Font:size=11" -nb "#222222" -nf "#bbbbbb" -sb "#005577" -sf "#eeeeee" + +# kill focused window +bindsym $mod+Shift+C kill + +# application launchers +bindsym $mod+Shift+F exec firefox -P default-release +bindsym $mod+Shift+B exec firefox -P less-strict +bindsym $mod+Shift+E exec emacsclient -c -a "emacs" +bindsym $mod+z exec boomer +bindsym $mod+c exec mpdmenu +bindsym $mod+Shift+M exec mpdinfo +bindsym $mod+b exec bm +bindsym --release Print exec scrot -u -e 'mv $f ~/pics/' +bindsym --release $mod+Print exec scrot -s -e 'mv $f ~/pics/' + +# change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# # alternatively, you can use the cursor keys: +# bindsym $mod+Left focus left +# bindsym $mod+Down focus down +# bindsym $mod+Up focus up +# bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+H move left +bindsym $mod+Shift+J move down +bindsym $mod+Shift+K move up +bindsym $mod+Shift+L move right + +# # alternatively, you can use the cursor keys: +# bindsym $mod+Shift+Left move left +# bindsym $mod+Shift+Down move down +# bindsym $mod+Shift+Up move up +# bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+s split v + +# split in vertical orientation +bindsym $mod+v split h + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+comma layout stacking +bindsym $mod+t layout tabbed +bindsym $mod+period layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" + +# switch to workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 + +# reload the configuration file +bindsym $mod+Shift+O reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+R restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+Control+Q exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + + # # same bindings, but for the arrow keys + # bindsym Left resize shrink width 10 px or 10 ppt + # bindsym Down resize grow height 10 px or 10 ppt + # bindsym Up resize shrink height 10 px or 10 ppt + # bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + font pango:Hack Nerd Font 9 + position top + tray_output primary + status_command i3status +} diff --git a/.config/i3status/config b/.config/i3status/config new file mode 100644 index 0000000..903d43d --- /dev/null +++ b/.config/i3status/config @@ -0,0 +1,60 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + colors = true + interval = 5 +} + +order += "ethernet br0" +order += "ethernet tun0" +order += "cpu_temperature 0" +order += "disk /" +order += "load" +order += "memory" +order += "volume master" +order += "tztime local" + +ethernet br0 { + format_up = "E: %ip" + format_down = "E: down" +} + +ethernet tun0 { + format_up = "VPN: %ip" + format_down = "VPN: down" +} + +cpu_temperature 0 { + format = "CPU Temp: %degrees °C" + path = "/sys/devices/platform/nct6775.2592/hwmon/hwmon3/temp1_input" +} + +disk "/" { + format = "Porn Folder: %used" +} + +load { + format = "Load: %1min" +} + +memory { + format = "Memory: %used/%total" + threshold_degraded = "3GB" + format_degraded = "MEMORY < %available" +} + +volume master { + format = "♪: %volume" + format_muted = "♪: muted (%volume)" + device = "default" +} + +tztime local { + format = "%A, %Y-%m-%d %H:%M " +} diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf index 2ebf6b5..ff72d84 100755 --- a/.config/mpd/mpd.conf +++ b/.config/mpd/mpd.conf @@ -1,8 +1,8 @@ bind_to_address "0.0.0.0" -#bind_to_address "/run/mpd/socket" +# bind_to_address "/run/mpd/socket" music_directory "/media/hdd/music" -playlist_directory "~/.config/mpd/playlists" +playlist_directory "~/.config/mpd/playlists" db_file "~/.config/mpd/database" log_file "~/.config/mpd/log" pid_file "~/.config/mpd/pid" @@ -10,15 +10,15 @@ state_file "~/.config/mpd/mpdstate" # default local output audio_output { - type "pipewire" + type "pulse" name "Default" } # http streaming audio_output { type "httpd" - name "My HTTP Stream" - encoder "vorbis" # optional, vorbis or lame + name "HTTP Stream" + encoder "lame" # optional, vorbis or lame port "8001" quality "8.0" # do not define if bitrate is defined # bitrate "256" # do not define if quality is defined diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index e467c61..8dcfc78 100644 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -1,13 +1,22 @@ -profile=gpu-hq -#scale=ewa_lanczossharp -#cscale=ewa_lanczossharp +profile=high-quality -vo=gpu +vo=gpu-next +gpu-api=vulkan +hwdec=vdpau +scale=ewa_lanczossharp +cscale=ewa_lanczossharp +dscale=ewa_lanczossharp + +ao=pipewire +pipewire-buffer=16 +audio-swresample-o=resampler=soxr,precision=28 +audio-samplerate=192000 +audio-format=float keep-open=yes -stop-screensaver border=no no-border +scale-antiring=0.7 msg-color=yes term-osd-bar=yes @@ -20,6 +29,6 @@ screenshot-template="%F - [%P]v%#01n" [extension.webm] loop-file=inf + [extension.gif] loop-file=inf - diff --git a/.config/mpv/script-opts/encode_webm.conf b/.config/mpv/script-opts/encode_webm.conf index 93dbb74..f6d661c 100644 --- a/.config/mpv/script-opts/encode_webm.conf +++ b/.config/mpv/script-opts/encode_webm.conf @@ -13,7 +13,7 @@ preserve_filters=yes append_filter= # additional parameters passed to ffmpeg -codec=-c:v libvpx-vp9 -b:v 800k -c:a libvorbis +codec=-c:v libvpx-vp9 -crf 1 -b:v 1M -c:a libvorbis # format of the output filename # Does basic interpolation on the following variables: $f, $x, $t, $s, $e, $d, $p, $n which respectively represent diff --git a/.config/neofetch/config.conf b/.config/neofetch/config.conf index 149ab2e..b1c0964 100644 --- a/.config/neofetch/config.conf +++ b/.config/neofetch/config.conf @@ -1,31 +1,47 @@ # See this wiki page for more info # https://github.com/dylanaraps/neofetch/wiki/Customizing-Info + print_info() { info title - # prin "\n \n " "$(curl wttr.in/?0?q?T | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}')" - prin "${cl9}┌────────────────────────────────────────────────────┐" - info "\n \n " distro - info "\n \n " model - info "\n \n " kernel - info "\n \n " uptime - info "\n \n " packages - info "\n \n " shell - info "\n \n " resolution - info "\n \n " wm - info "\n \n " term - info "\n \n " cpu - info "\n \n " gpu - info "\n \n " memory - info "\n \n " disk - prin "${cl9}└─────────────────────────────────── $(color 1) $(color 2) $(color 3) $(color 4) $(color 5) $(color 6) $(color 7) $(color 8) ${cl9}┘" - prin "\n" + prin "$(color 12)╭──────────── $(color 10)Software$(color 12) ────────────────────" + info "$(color 12)│ $(color 14)OS" distro + info "$(color 12)│ $(color 14)Kernel" kernel + info "$(color 12)│ $(color 14)Packages" packages + info "$(color 12)│ $(color 14)Shell" shell + info "$(color 12)│ $(color 14)WM" wm + info "$(color 12)│ $(color 14)Terminal" term + prin "$(color 12)├──────────── $(color 10)Hardware$(color 12) ────────────────────" + info "$(color 12)│ $(color 14)CPU" cpu + info "$(color 12)│ $(color 14)GPU" gpu + info "$(color 12)│ $(color 14)Memory" memory + info "$(color 12)│ $(color 14)Disk" disk + prin "$(color 12)├───────────── $(color 10)Uptime$(color 12) ─────────────────────" + info "$(color 12)│" uptime + prin "$(color 12)╰──────────────────────────────────────────" + + info cols } reset="\033[0m" - +gray="\033[1;90m" +red="\033[1;31m" +green="\033[1;32m" +yellow="\033[1;33m" +blue="\033[1;34m" +magenta="\033[1;35m" +cyan="\033[1;36m" +white="\033[1;37m" + +cl0="${gray}" +cl1="${red}" +cl2="${green}" +cl3="${yellow}" +cl4="${blue}" +cl5="${magenta}" +cl6="${cyan}" +cl7="${white}" cl9="${reset}" - # Title @@ -364,7 +380,7 @@ gtk3="off" # disk_show=('/'): # 'Disk (/): 74G / 118G (66%)' # -disk_show=('/' '/home' '/dev/sda2' '/dev/sdb1') +disk_show=('/' '/dev/sda1' '/dev/sdb1') # Disk subtitle. # What to append to the Disk subtitle. @@ -388,7 +404,7 @@ disk_show=('/' '/home' '/dev/sda2' '/dev/sdb1') # none: 'Disk: 74G / 118G (66%)' # 'Disk: 74G / 118G (66%)' # 'Disk: 74G / 118G (66%)' -disk_subtitle="none" +disk_subtitle="dir" # Disk percent. # Show/Hide disk percent. @@ -500,7 +516,7 @@ mpc_args=() # Example: # colors=(distro) - Text is colored based on Distro colors. # colors=(4 6 1 8 8 6) - Text is colored in the order above. -colors=(201 51 93 5 7 7) +colors=(distro) # Text Options @@ -745,7 +761,7 @@ ascii_distro="auto" # Example: # ascii_colors=(distro) - Ascii is colored based on Distro colors. # ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors. -ascii_colors=(88 88 88 88 88 88) +ascii_colors=(distro) # Bold ascii logo # Whether or not to bold the ascii logo. diff --git a/.config/nnn/nnn.bash b/.config/nnn/nnn.bash index 92a10dd..966ba30 100644..100755 --- a/.config/nnn/nnn.bash +++ b/.config/nnn/nnn.bash @@ -1,4 +1,4 @@ # NNN -export NNN_PLUG='t:preview-tabbed;' +export NNN_PLUG='t:preview-tui;b:preview-tabbed' export NNN_FIFO="/tmp/nnn.fifo" diff --git a/.config/nvim/ftplugin/javascript.vim b/.config/nvim/ftplugin/javascript.vim deleted file mode 100644 index 4ffe06d..0000000 --- a/.config/nvim/ftplugin/javascript.vim +++ /dev/null @@ -1,9 +0,0 @@ -setl nospell -setl nowrap -setl tabstop=2 -setl shiftwidth=2 -setl expandtab -let b:vcm_tab_complete = 'javascript' -let b:javascript_fold = 1 -let g:javascript_plugin_jsdoc = 1 -let g:jsx_ext_required = 0 diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index f71bdb7..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1,14 +0,0 @@ --- __ _ _ --- ___ __ _ / _| ___ | |__ __ _| |__ ___ --- / __| / _' | |_ / _ \| _ \ / _' | _ \ / _ \ --- | |__ / (_| | _| __/| |_) / (_| | |_) | __/ --- \___|\___._/_| \___||____/\___._/____/ \___/ --- --- Personal vim configuration of cafebabe - -require('user.options') -require('user.plugins') -require('user.keymaps') -require('user.misc') - ---vim: nospell diff --git a/.config/nvim/lua/lib/utils.lua b/.config/nvim/lua/lib/utils.lua deleted file mode 100644 index 8abbabd..0000000 --- a/.config/nvim/lua/lib/utils.lua +++ /dev/null @@ -1,22 +0,0 @@ -local M = {} - -M.keymap = function(mode, lhs, rhs, opts) - vim.api.nvim_set_keymap( - mode, - lhs, - rhs, - vim.tbl_extend('keep', opts or {}, { noremap = true, silent = true }) - ) -end - -M.buf_keymap = function(bufnr, mode, lhs, rhs, opts) - vim.api.nvim_buf_set_keymap( - bufnr, - mode, - lhs, - rhs, - vim.tbl_extend('keep', opts or {}, { noremap = true, silent = true }) - ) -end - -return M diff --git a/.config/nvim/lua/user/keymaps.lua b/.config/nvim/lua/user/keymaps.lua deleted file mode 100644 index 59c323c..0000000 --- a/.config/nvim/lua/user/keymaps.lua +++ /dev/null @@ -1,31 +0,0 @@ -local keymap = require 'lib.utils'.keymap - -vim.g.mapleader = ' ' -vim.g.maplocalleader = ' ' - -keymap('n', '<leader>Q', ':bufdo bdelete<CR>') - --- Allow gf to open non-existant files -keymap('n', 'gf', ':edit <cfile><CR>') - --- Quick navigation between splits -keymap('n', '<c-h>', '<c-w>h') -keymap('n', '<c-j>', '<c-w>j') -keymap('n', '<c-k>', '<c-w>k') -keymap('n', '<c-l>', '<c-w>l') - --- Open the current file in the default program -keymap('n', '<leader>x', ':!xdg-open %<CR><CR>') - --- Resize with arrows -keymap('n', '<C-Up>', ':resize +2<CR>') -keymap('n', '<C-Down>', ':resize -2<CR>') -keymap('n', '<C-Left>', ':vertical resize -2<CR>') -keymap('n', '<C-Right>', ':vertical resize +2<CR>') - --- Quickly escape to normal mode -keymap('i', 'jj', '<Esc>') - -keymap('n', '<leader>cd', ':cd %:p:h<CR>:pwd<CR>') - -keymap('n', '<leader>E', ':EslintFixAll<CR>') diff --git a/.config/nvim/lua/user/misc.lua b/.config/nvim/lua/user/misc.lua deleted file mode 100644 index 88d47cf..0000000 --- a/.config/nvim/lua/user/misc.lua +++ /dev/null @@ -1,6 +0,0 @@ -vim.cmd [[ - augroup Indentation - autocmd! - autocmd FileType html set inde= - augroup END -]] diff --git a/.config/nvim/lua/user/options.lua b/.config/nvim/lua/user/options.lua deleted file mode 100644 index 0c35dfc..0000000 --- a/.config/nvim/lua/user/options.lua +++ /dev/null @@ -1,24 +0,0 @@ -vim.o.guicursor = 'a:block' -vim.o.expandtab = true -vim.o.shiftwidth = 4 -vim.o.tabstop = 4 -vim.o.signcolumn = 'yes:2' -vim.o.relativenumber = true -vim.o.number = true -vim.o.termguicolors = true -vim.o.ignorecase = true -vim.o.smartcase = true -vim.o.wildmode = 'longest:full,full' -vim.o.wrap = false -vim.o.scrolloff = 8 -vim.o.sidescrolloff = 8 -vim.o.cursorline = 1 -vim.o.splitright = 1 -vim.o.splitbelow = 1 -vim.o.clipboard = 'unnamedplus' -- Use Linux system clipboard -vim.o.updatetime = 250 -- Decrease CursorHold delay -vim.o.redrawtime = 10000 -- Allow more time for loading syntax on large files -vim.o.foldmethod = "expr" -vim.o.foldlevelstart = 10 -vim.o.foldexpr = "nvim_treesitter#foldexpr()" -vim.o.hlsearch = 0 diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua deleted file mode 100644 index 755f0e9..0000000 --- a/.config/nvim/lua/user/plugins.lua +++ /dev/null @@ -1,101 +0,0 @@ -require('packer').startup(function() - use { 'wbthomason/packer.nvim' } -- Let packer manage itself - use { 'tpope/vim-commentary' } - use { 'tpope/vim-surround' } - use { 'tpope/vim-eunuch' } - use { 'tpope/vim-sleuth' } - - use { - 'dracula/vim', - as = 'dracula', - config = function() - require('user.plugins.dracula') - end - } - use { - 'windwp/nvim-autopairs', - config = function() - require('nvim-autopairs').setup() - end - } - - use { - 'windwp/nvim-ts-autotag', - config = function() - require('nvim-ts-autotag').setup() - end - } - - use { - 'kyazdani42/nvim-tree.lua', - requires = 'kyazdani42/nvim-web-devicons', - config = function() - require('user.plugins.nvim-tree') - end - } - use { - 'nvim-treesitter/nvim-treesitter', - run = ':TSUpdate', - requires = { - 'nvim-treesitter/playground', - 'nvim-treesitter/nvim-treesitter-textobjects', - 'lewis6991/spellsitter.nvim', - 'JoosepAlviste/nvim-ts-context-commentstring', - }, - config = function() - require('spellsitter').setup() - require('user.plugins.treesitter') - end - } - - use { - 'neovim/nvim-lspconfig', - requires = { - 'b0o/schemastore.nvim', - 'folke/lsp-colors.nvim', - 'weilbith/nvim-code-action-menu', - }, - config = function() - require('user.plugins.lspconfig') - end - } - use { - 'hrsh7th/nvim-cmp', - requires = { - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-buffer', - 'jessarcher/cmp-path', - 'hrsh7th/cmp-nvim-lua', - 'L3MON4D3/LuaSnip', - 'onsails/lspkind-nvim', - 'hrsh7th/cmp-nvim-lsp-signature-help', - }, - config = function() - require('user.plugins.cmp') - end - } - use { - 'nvim-telescope/telescope.nvim', - requires = { - 'nvim-lua/popup.nvim', - 'nvim-lua/plenary.nvim', - 'kyazdani42/nvim/nvim-web-devicons', - }, - config = function() - require('user.plugins.telescope') - end - } - use { - 'nvim-lualine/lualine.nvim', - requires = 'kyazdani42/nvim-web-devicons', - config = function() - require('user.plugins.lualine') - end - } - use { - 'L3MON4D3/LuaSnip', - config = function() - require('user.plugins.luasnip') - end - } -end) diff --git a/.config/nvim/lua/user/plugins/cmp.lua b/.config/nvim/lua/user/plugins/cmp.lua deleted file mode 100644 index 81cd2ee..0000000 --- a/.config/nvim/lua/user/plugins/cmp.lua +++ /dev/null @@ -1,73 +0,0 @@ -local has_words_before = function() - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match '%s' == nil -end - -local luasnip = require 'luasnip' -local cmp = require 'cmp' -local lspkind = require 'lspkind' - --- Set completeopt to have a better completion experience -vim.o.completeopt = 'menuone,longest,preview' - -cmp.setup({ - experimental = { - ghost_text = true, - }, - formatting = { - format = lspkind.cmp_format { - mode = 'symbol', - menu = { - nvim_lsp = '[LSP]', - nvim_lua = '[Lua]', - buffer = '[BUF]', - }, - }, - }, - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) - end, - }, - mapping = { - ['<C-p>'] = cmp.mapping.select_prev_item(), - ['<C-n>'] = cmp.mapping.select_next_item(), - ['<C-d>'] = cmp.mapping.scroll_docs(-4), - ['<C-r>'] = cmp.mapping.scroll_docs(4), - ['<C-Space>'] = cmp.mapping.complete(), - ['<C-e>'] = cmp.mapping.close(), - ['<CR>'] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.replace, - select = false, - }, - ['<Tab>'] = cmp.mapping(function(fallback) - if luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - elseif cmp.visible() then - cmp.select_next_item() - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, { 'i', 's' }), - ['<S-Tab>'] = cmp.mapping(function(fallback) - if luasnip.jumpable(-1) then - luasnip.jump(-1) - elseif cmp.visible() then - cmp.select_prev_item() - else - fallback() - end - - end, { 'i', 's' }), - }, - sources = { - { name = 'nvim_lsp' }, - { name = 'nvim_lsp_signature_help' }, - { name = 'nvim_lua' }, - { name = 'luasnip' }, - { name = 'path' }, - { name = 'buffer' }, - }, -}) diff --git a/.config/nvim/lua/user/plugins/dracula.lua b/.config/nvim/lua/user/plugins/dracula.lua deleted file mode 100644 index 77926a0..0000000 --- a/.config/nvim/lua/user/plugins/dracula.lua +++ /dev/null @@ -1,13 +0,0 @@ -vim.cmd([[ - augroup DraculaOverrides - autocmd! - autocmd ColorScheme dracula highlight! link Pmenu DraculaBg - autocmd ColorScheme dracula highlight link NormalFloat DraculaBgLight - autocmd ColorScheme dracula highlight FloatBorder guifg=none guibg=none - autocmd ColorScheme dracula highlight DraculaBoundary guibg=none - autocmd ColorScheme dracula highlight DraculaDiffDelete ctermbg=none guibg=none - autocmd ColorScheme dracula highlight DraculaComment cterm=italic gui=italic - autocmd ColorScheme dracula highlight Normal guibg=none - augroup end - colorscheme dracula -]]) diff --git a/.config/nvim/lua/user/plugins/lspconfig.lua b/.config/nvim/lua/user/plugins/lspconfig.lua deleted file mode 100644 index 1351959..0000000 --- a/.config/nvim/lua/user/plugins/lspconfig.lua +++ /dev/null @@ -1,139 +0,0 @@ -local buf_option = vim.api.nvim_buf_set_option -local buf_keymap = require 'lib.utils'.buf_keymap - -vim.diagnostic.config { - virtual_text = false, - severity_sort = true, - float = { - source = true, - focus = false, - format = function(diagnostic) - if diagnostic.user_data ~= nil and diagnostic.user_data.lsp.code ~= nil then - return string.format("%s: %s", diagnostic.user_data.lsp.code, diagnostic.message) - end - return diagnostic.message - end, - } -} - -local on_attach = function(_, bufnr) - buf_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') - - buf_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>') - buf_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>') - buf_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>') - buf_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>') - buf_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>') - buf_keymap(bufnr, 'n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>') - buf_keymap(bufnr, 'n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>') - buf_keymap(bufnr, 'n', 'gr', ':Telescope lsp_references<CR>') - - buf_keymap(bufnr, 'n', '<leader>ca', ':CodeActionMenu<CR>') - buf_keymap(bufnr, 'v', '<leader>ca', ':CodeActionMenu<CR>') - - buf_keymap(bufnr, 'n', '<leader>d', '<cmd>lua vim.diagnostic.open_float()<CR>') - buf_keymap(bufnr, 'n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>') - buf_keymap(bufnr, 'n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>') - buf_keymap(bufnr, 'n', '<leader>F', '<cmd>lua vim.lsp.buf.format { async = true }<CR>') - - -- Autoformat on save doesn't work with server_capabilities, even - -- though it's the replacement for the deprecated resolved_capabilities. - - -- if _.server_capabilities.document_formatting then - -- vim.api.nvim_command [[augroup Format]] - -- vim.api.nvim_command [[autocmd! * <buffer>]] - -- vim.api.nvim_command [[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_seq_sync()]] - -- vim.api.nvim_command [[augroup END]] - -- end -end - --- provide additional completion capabilities -local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) - -require 'lspconfig'.emmet_ls.setup { - on_attach = on_attach, - capabilities = capabilities, - flags = { - debounce_text_changes = 150, - }, - filetypes = { 'html', 'javascript', 'typescript', 'javascriptreact', 'typescriptreact', 'eruby' } -} - -local runtime_path = vim.split(package.path, ';') -table.insert(runtime_path, "lua/?.lua") -table.insert(runtime_path, "lua/?/init.lua") -require 'lspconfig'.lua_ls.setup { - on_attach = on_attach, - capabilities = capabilities, - flags = { - debounce_text_changes = 150, - }, - cmd = { "/home/cafebabe/.local/src/lua-language-server/bin/lua-language-server", "-E", "/home/cafebabe/.local/src/lua-language-server/bin/main.lua" }; - settings = { - Lua = { - runtime = { - -- Tell language server which version of lua is used. - version = 'LuaJIT', - -- Setup lua path - path = runtime_path, - }, - diagnostics = { - -- Recognize globals - globals = { 'vim', 'use', 'parse' }, - }, - workspace = { - -- Make server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file("", true), - }, - -- Do not send telemetry data - telemetry = { - enable = false, - }, - }, - }, -} - -require 'lspconfig'.bashls.setup { - on_attach = on_attach, - capabilities = capabilities, - flags = { - debounce_text_changes = 150, - }, -} - -require 'lspconfig'.pylsp.setup { - on_attach = on_attach, - capabilities = capabilities, - flags = { - debounce_text_changes = 150, - }, -} - -require 'lspconfig'.clangd.setup { - on_attach = on_attach, - capabilities = capabilities, - flags = { - debounce_text_changes = 150, - }, - cmd = { "/usr/bin/clangd-13" }; -} - -require 'lspconfig'.solargraph.setup { - on_attach = on_attach, - capabilities = capabilities, - flags = { - debounce_text_changes = 150, - } -} - --- suppress error messages from lang servers -vim.notify = function(msg, log_level, _) - if msg:match 'exit code' then - return - end - if log_level == vim.log.levels.ERROR then - vim.api.nvim_err_writeln(msg) - else - vim.api.nvim_echo({ { msg } }, true, {}) - end -end diff --git a/.config/nvim/lua/user/plugins/lualine.lua b/.config/nvim/lua/user/plugins/lualine.lua deleted file mode 100644 index 6ac5cee..0000000 --- a/.config/nvim/lua/user/plugins/lualine.lua +++ /dev/null @@ -1,64 +0,0 @@ --- local tabLineHl = vim.api.nvim_get_hl_by_name('TabLine', true) --- local bg = '#' .. bit.tohex(tabLineHl.background, 6) --- local fg = '#' .. bit.tohex(tabLineHl.foreground, 6) -local fg = '#F8F8F2' -- DraculaFg -local bg = '#21222C' -- DraculaBgDark -local separator = '#424450' -- DraculaSubtle --- local fg = '#' .. bit.tohex(vim.api.nvim_get_hl_by_name('DraculaFg', true).foreground, 6) --- local bg = '#' .. bit.tohex(vim.api.nvim_get_hl_by_name('DraculaBgDark', true).background, 6) --- local separator = '#' .. bit.tohex(vim.api.nvim_get_hl_by_name('DraculaSubtle', true).foreground, 6) - -require('lualine').setup { - options = { - component_separators = '', - section_separators = '▕', - theme = { - normal = { - a = { fg = fg, bg = bg }, - b = { fg = fg, bg = bg }, - c = { fg = fg, bg = bg }, - x = { fg = fg, bg = bg }, - y = { fg = fg, bg = bg }, - z = { fg = fg, bg = bg }, - }, - inactive = { c = { fg = fg, bg = bg } }, - }, - }, - sections = { - lualine_a = { - 'mode', - { '"▏"', color = { fg = separator } }, - }, - lualine_b = { - 'branch', - 'diff', - { '"▕"', color = { fg = separator } }, - '"🖧 " .. tostring(#vim.tbl_keys(vim.lsp.buf_get_clients()))', - { 'diagnostics', sources = { 'nvim_diagnostic' } }, - { '"▏"', color = { fg = separator } }, - }, - lualine_c = { 'filename' }, - lualine_x = { - 'filetype', - 'encoding', - 'fileformat', - }, - lualine_y = { - { '"▕"', color = { fg = separator } }, - '(vim.bo.expandtab and "␠ " or "⇥ ") .. " " .. vim.bo.shiftwidth', - { '"▏"', color = { fg = separator } }, - }, - lualine_z = { - 'location', - 'progress', - }, - }, - -- tabline = { - -- lualine_a = { - -- {'buffers'} - -- }, - -- lualine_z = { - -- {'tabs'} - -- } - -- } -} diff --git a/.config/nvim/lua/user/plugins/luasnip.lua b/.config/nvim/lua/user/plugins/luasnip.lua deleted file mode 100644 index 2e7462a..0000000 --- a/.config/nvim/lua/user/plugins/luasnip.lua +++ /dev/null @@ -1,9 +0,0 @@ -local ls = require "luasnip" -require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" }) - -ls.config.set_config { - history = true, - updateevents = 'TextChanged,TextChangedI', - enable_autosnippets = true, -} - diff --git a/.config/nvim/lua/user/plugins/nvim-tree.lua b/.config/nvim/lua/user/plugins/nvim-tree.lua deleted file mode 100644 index 3c425c5..0000000 --- a/.config/nvim/lua/user/plugins/nvim-tree.lua +++ /dev/null @@ -1,13 +0,0 @@ -require('nvim-tree').setup { - renderer = { - highlight_opened_files = "all", - group_empty = true, - }, - git = { - ignore = false, - }, -} - -vim.cmd [[highlight NvimTreeIndentMarker guifg=#30323E]] - -vim.api.nvim_set_keymap('n', '<leader>n', ':NvimTreeFindFileToggle<CR>', { silent = true, noremap = true }) diff --git a/.config/nvim/lua/user/plugins/telescope.lua b/.config/nvim/lua/user/plugins/telescope.lua deleted file mode 100644 index b1d1136..0000000 --- a/.config/nvim/lua/user/plugins/telescope.lua +++ /dev/null @@ -1,25 +0,0 @@ -local telescope = require 'telescope' -local actions = require 'telescope.actions' -local keymap = require 'lib.utils'.keymap - -keymap('n', ';f', [[<cmd>lua require('telescope.builtin').find_files()<CR>]]) -keymap('n', ';r', [[<cmd>lua require('telescope.builtin').live_grep()<CR>]]) -keymap('n', ';\\', [[<cmd>lua require('telescope.builtin').buffers()<CR>]]) - -require('telescope').setup { - defaults = { - sorting_strategy = 'ascending', - mappings = { - i = { - ["<Esc>"] = actions.close, - ['<C-Down>'] = actions.cycle_history_next, - ['<C-Up>'] = actions.cycle_history_prev, - }, - }, - file_ignore_patterns = { - '.git/', - 'node_modules/', - 'android/', - }, - } -} diff --git a/.config/nvim/lua/user/plugins/treesitter.lua b/.config/nvim/lua/user/plugins/treesitter.lua deleted file mode 100644 index 32c74ee..0000000 --- a/.config/nvim/lua/user/plugins/treesitter.lua +++ /dev/null @@ -1,31 +0,0 @@ -require('nvim-treesitter.configs').setup { - indent = { - enable = true, - disable = { 'html' }, - }, - highlight = { - enable = true, - disable = { 'NvimTree' }, - additional_vim_regex_highlighting = true, - }, - textobjects = { - select = { - enable = true, - lookahead = true, - keymaps = { - ['ia'] = '@parameter.inner', - -- ['aa'] = { - -- php = "" '@parameter.outer', - - -- python = "(function_definition) @function", - -- cpp = "(function_definition) @function", - -- c = "(function_definition) @function", - -- java = "(method_declaration) @function", - -- }, - }, - }, - }, - context_commentstring = { - enable = true, - }, -} diff --git a/.config/nvim/snippets/all.lua b/.config/nvim/snippets/all.lua deleted file mode 100644 index 78c33db..0000000 --- a/.config/nvim/snippets/all.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - parse('sktn', '<!DOCTYPE html>\ -<html lang="en-US">\ -\ -<head>\ - <title>Website Title</title>\ - <meta charset="UTF-8">\ - <meta name="viewport" content="width=devide-width,initial-scale=1">\ - <link rel="stylesheet" href="">\ -</head>\ -\ -<body>\ - <header>\ - <h1>Header Text</h1>\ - </header>\ - <main>\ - <p>Lorem ipsum bla, bla, bla...</p>\ - </main>\ -</body>\ -<script src=""></script>\ -\ -</html>'), -} diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf index a095613..2fdb8f4 100644 --- a/.config/picom/picom.conf +++ b/.config/picom/picom.conf @@ -1,13 +1 @@ -# just very slightly rounded corners -# empty file, just so transparency works on st - -opacity-rule = [ - "98:class_g = 'SchildiChat' && focused", - "98:class_g = 'SchildiChat' && !focused" -] - -# corner-radius = 6 - -# rounded-corners-exclude = [ -# "class_g = 'dwm'" -# ]; +# empty file, just so transparency works. diff --git a/.config/pipewire/pipewire.conf b/.config/pipewire/pipewire.conf index af1ff82..7073ff8 100644 --- a/.config/pipewire/pipewire.conf +++ b/.config/pipewire/pipewire.conf @@ -26,10 +26,10 @@ context.properties = { core.name = pipewire-0 # core name and socket name ## Properties for the DSP configuration. - #default.clock.rate = 48000 + default.clock.rate = 48000 #default.clock.allowed-rates = [ 48000 ] - #default.clock.quantum = 1024 - default.clock.min-quantum = 16 + default.clock.quantum = 192 + default.clock.min-quantum = 192 #default.clock.max-quantum = 2048 #default.clock.quantum-limit = 8192 #default.video.width = 640 diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 5d21bf7..1385f11 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -1,88 +1,71 @@ ## MISCELLANEOUS # various shortcuts -alias reboot='sudo reboot' -alias poweroff='sudo poweroff' -alias pms='sudo pm-suspend' -alias refresh='source $ZDOTDIR/.zshrc' -alias fuck='sudo $(fc -Lln -1)' -alias open='xdg-open' -alias mutt='pushd ~/.mutt/attachments; mutt; popd' +alias reboot='doas reboot' +alias poweroff='doas poweroff' +alias refresh='. $ZDOTDIR/.zshrc' +alias mutt='cd ~/.mutt/attachments; mutt; cd -' alias jpwine='LANG=ja_JP.UTF-8 WINEDEBUG=-all wine' -alias vi="$EDITOR" -alias em='emacsclient -c -a "emacs" &' -alias emacsd='/usr/local/bin/emacs --daemon &' +alias emd='/usr/bin/emacs --daemon &' +alias emc='emacsclient -c -a "emacs"' alias z='zathura' -alias cn='clear;neofetch' alias nnn='nnn -Hde' -alias ea='vi ~/.config/shell/aliasrc' -alias setkeys='xset r rate 250 30 && setxkbmap -option "ctrl:nocaps"' +alias cn='clear;neofetch' +alias ea='$EDITOR ~/.config/shell/aliasrc' +alias ez='$EDITOR ~/.config/zsh/.zshrc' +alias ep='$EDITOR ~/.config/shell/profile' +alias lr='su - root' alias cam='mpv --profile=low-latency --untimed /dev/video0' -alias freyr='sudo docker run -it --rm -v /media/hdd/music:/data freyrcli/freyrjs' -alias ofn='/usr/bin/ls | cat -n | while read n f; do rename "s/${f%.*}/$(printf "%04d" "$n")/" "$f"; done' +alias df='df -h' +alias tma='tmux a -t' +alias tmn='tmux new-session -s' + +# compiler +alias clang='clang -march=native -O3 -flto=thin' + +# rename files in pwd in their current order to 4-digit numbers +alias ofn='/bin/ls | cat -n | while read n f; do rename "s/${f%.*}/$(printf "%04d" "$n")/" "$f"; done' + +# start freyr docker image to download music from spotify +# alias freyr='docker run -it -v /media/hdd/music:/data freyr-dev' + +# set my preferred keyboard options +alias setkeys='xset r rate 250 30 && setxkbmap -option "ctrl:nocaps"' +alias setus='setxkbmap -layout us -option "ctrl:nocaps"' -# setting custom ascii +# pad numbers in filenames with zeros +alias padz='perl-rename "s/\d+/sprintf(\"%02d\",$&)/e"' + +# set custom ascii # alias neofetch='neofetch --source ~/docs/ascii/lain' # cp mv and rm always verbose +# alias cp='cp -iv' +# alias mv='mv -iv' alias cp='cp -iv' alias mv='mv -iv' alias rm='rm -Iv' alias mkd='mkdir -pv' -# Colorize grep output +# colorize grep output alias grep='grep --color=auto -i' # ls shortcuts -alias ls='ls -hl --color=always --group-directories-first' -alias la='ls -a' - -ld() { - if [ "$1" = "" ]; then - ls -d */; - else - ls -d $1/*/ | sed "s|$1/||"; - fi -} +alias ls='ls --color=always --group-directories-first' +alias ll='ls -lh' +alias la='ll -A' +alias lc='ls | wc -l' -# Control Audio +# control audio alias headset="wpctl set-default $(wpctl status | grep 'Headphones' | cut -b11-12)" alias speakers="wpctl set-default $(wpctl status | grep 'Speakers' | cut -b11-12)" -alias setvol='pactl set-sink-volume @DEFAULT_SINK@' - -# Monitor / Resolution settings, mainly for playing old-ass games -alias setrmon-lowres='xrandr --auto --output HDMI-A-0 --mode 640x480 --primary' -alias setrmon-midres='xrandr --auto --output HDMI-A-0 --mode 800x600 --primary' -alias setrmon-default='xrandr --auto --output HDMI-A-0 --mode 1920x1080 --primary' -alias setlmon-lowres='xrandr --auto --output DisplayPort-2 --mode 640x480 --left-of HDMI-A-0' -alias setlmon-midres='xrandr --auto --output DisplayPort-2 --mode 800x600 --left-of HDMI-A-0' -alias setlmon-default='xrandr --auto --output DisplayPort-2 --mode 1600x900 --left-of HDMI-A-0' - -# function for timer and stopwatch -timer() { - date1=$((`date +%s` + $1)); - while [ "$date1" -ge `date +%s` ]; do - echo -ne "$(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S)\r"; - sleep 0.1 - done - notify-send "Time Up"; pw-play "/usr/share/sounds/freedesktop/stereo/complete.oga" -} - -stopwatch() { - date1=`date +%s`; - while true; do - echo -ne "$(date -u --date @$((`date +%s` - $date1)) +%H:%M:%S)\r"; - sleep 0.1 - done -} - ## FUNCTIONS FOR CONVERTING DATE TO ISO 8601 # convert date from YYYYMMDD to YYYY-MM-DD date-convert() { for i in *; do - mv "${i}" "$(echo "${i}" | + /bin/mv "${i}" "$(echo "${i}" | sed 's/\([0-9][0-9][0-9][0-9]\)\([0-9][0-9]\)\([0-9][0-9]\)/\1-\2-\3/')" done; } @@ -90,7 +73,7 @@ date-convert() { # reverse date from DD-MM-YYYY to YYYY-MM-DD date-reverse() { for i in *; do - mv "${i}" "$(echo "${i}" | + /bin/mv "${i}" "$(echo "${i}" | sed 's/\([0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9][0-9][0-9]\)/\3-\1-\2/')" done; } @@ -99,12 +82,17 @@ date-reverse() { # convert video files to webm mkwebm() { - ffmpeg -i "${1}" -c:v libvpx-vp9 -crf 1 -b:v 1M -c:a libvorbis "${1%.*}".webm + ffmpeg -i "${1}" -c:v libvpx-vp9 -crf 12 -b:v 1M -c:a libvorbis "${1%.*}".webm +} + +mkmp4() { + ffmpeg -i "${1}" -c:v libx264 -crf 32 -b:v 1M -c:a aac "${1%.*}".mp4 } ## GIT # general shortcuts +alias status='git status' alias commit='git commit -m' alias fetch='git fetch' alias upstream='git push --set-upstream origin' @@ -117,14 +105,19 @@ alias dfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME' alias dcomm='dfiles commit -m' alias dpush='dfiles push origin' -## PACKAGE MANAGER - -alias aptin='sudo apt install' -alias aptup='sudo apt update && sudo apt upgrade' -alias aptupd='sudo apt update' -alias aptupg='sudo apt upgrade' -alias aptrm='sudo apt remove' -alias aptsr='sudo apt search' -alias aptsh='sudo apt show' -alias listup='sudo apt list --upgradeable' -alias listin='sudo apt list --installed' +# package management +alias qu='equery u' +alias qd='equery d' +alias qg='equery g' +alias qf='equery f' +alias qb='equery b' +alias qy='equery y' +alias eli='eix -c --installed' +alias els='eix -c --selected' +alias pemup='emerge -pvuND @world' +alias emup='doas emerge -vuND @world' +alias pemin='emerge -pv' +alias emin='doas emerge -v' +alias pemrm='emerge -pvc' +alias emrm='doas emerge -vc' +alias emsr='emerge -s' diff --git a/.config/shell/profile b/.config/shell/profile index 0093eed..7b86bda 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -1,8 +1,8 @@ umask 0077 export _JAVA_AWT_WM_NONREPARENTING=1 -export EDITOR="nvim" -export TERMINAL="st" +export EDITOR="vim" +export TERMINAL="urxvt" export BROWSER="firefox" export XDG_CONFIG_HOME="$HOME/.config" @@ -12,8 +12,6 @@ export XDG_CACHE_HOME="$HOME/.cache" export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc" export ZDOTDIR="$XDG_CONFIG_HOME/zsh" -export LC_ALL=en_US.UTF-8 - export MAIL=~/.mutt/Maildir export NO_AT_BRIDGE=1 @@ -21,10 +19,16 @@ export GTK_IM_MODULE='ibus' export QT_IM_MODULE='ibus' export XMODIFIERS='@im=ibus' export XDG_SESSION_TYPE='x11' +export XDG_CURRENT_DESKTOP='i3' -export NVM_DIR="$HOME/.config/nvm" - -export PATH="$PATH:$HOME/.local/bin:$HOME/.fzf/bin:$HOME/.cargo/bin:/sbin:/usr/sbin:$HOME/.rvm/bin" +export VDPAU_DRIVER=radeonsi +export EIX_LIMIT=0 +export EIX_LIMIT_COMPACT=0 +export LC_ALL=en_US.utf8 +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64" +export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig" +export MANPATH="$MANPATH:/usr/local/man" +export PATH="$PATH:$HOME/.local/bin:$HOME/.fzf/bin:$HOME/.npm/bin:/sbin:/usr/sbin" diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler deleted file mode 100755 index 981eb8e..0000000 --- a/.config/sxiv/exec/key-handler +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -while read -r file -do - case "$1" in - "C-d") rm "$file" ;; - "C-c") cat "$file" | xclip -sel c -t image/png ;; - "C-w") xwallpaper --maximize "$file" ;; - "C-z") mv "$file" /media/hdd/pics/wallpaper/ - esac -done diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 1db3b54..389f1ff 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -1,5 +1,7 @@ +set -g default-command "${SHELL}" + # Status-bar settings -set -g status-right "%H:%M" +set -g status-right "%A, %F - %H:%M" set -g window-status-current-style "underscore" set -g message-command-style 'fg=#000000,bg=#FFFF00' set -g message-style 'fg=#000000, bg=#FFFF00' @@ -7,6 +9,7 @@ set -g status-bg '#333333' set -g status-fg '#FFFFFF' set -g set-titles on set -g set-titles-string "#T" +set -g automatic-rename off # Enable RGB colour if running in xterm(1) set-option -sa terminal-overrides ",xterm*:Tc" @@ -17,23 +20,60 @@ set -g default-terminal "tmux-256color" # Set history-limit set -g history-limit 30000 +# enable emacs mode-keys +set -g mode-keys emacs + +# various window option +set -g base-index 1 +set -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on +setw -g aggressive-resize on + ## KEYBINDS # Change the prefix key to C-a -set -g prefix C-a +set -g prefix C-Space unbind C-b -bind C-a send-prefix - -bind C-v split-window -v # split vertically -bind C-h split-window -h # split horizontally -bind C-w killp # kill pane -bind C-q killw # kill window -bind -n M-h select-pane -L -bind -n M-l select-pane -R -bind -n M-k select-pane -U -bind -n M-j select-pane -D - -# Turn the mouse on, but without copy mode dragging +bind C-Space send-prefix + +bind C-s split-window -v -c "#{pane_current_path}" +bind C-v split-window -h -c "#{pane_current_path}" +bind C-w killp +bind C-q killw +bind C-p previous-window +bind C-n next-window +bind -n M-n swap-window -t +1\; select-window -t +1 +bind -n M-p swap-window -t -1\; select-window -t -1 +bind -n M-h resize-pane -L 5 +bind -n M-j resize-pane -D 5 +bind -n M-k resize-pane -U 5 +bind -n M-l resize-pane -R 5 + +# Smart pane switching with awareness of Vim splits. +# See: https://github.com/christoomey/vim-tmux-navigator +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?)(diff)?$'" +bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' +bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' +bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' +bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' +tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' +if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" +if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" + +bind-key -T copy-mode-vi 'C-H' select-pane -L +bind-key -T copy-mode-vi 'C-J' select-pane -D +bind-key -T copy-mode-vi 'C-K' select-pane -U +bind-key -T copy-mode-vi 'C-L' select-pane -R +bind-key -T copy-mode-vi 'C-\' select-pane -l + +bind C-l send-keys 'C-l' +bind C-k send-keys 'C-k' + +# Turn the mouse off set -g mouse off # Keys to toggle monitoring activity in a window and the synchronize-panes option diff --git a/.config/x11/xinitrc b/.config/x11/xinitrc index 76a3ff5..091a42d 100644 --- a/.config/x11/xinitrc +++ b/.config/x11/xinitrc @@ -1,31 +1,29 @@ #!/bin/sh -if [ -d "/etc/X11/Xsession.d" ]; then - for f in /etc/X11/Xsession.d/*; do - [ -x "$f" ] && . "$f" - done - unset f +if command -v dbus-launch > /dev/null && test -z "${DBUS_SESSION_BUS_ADDRESS}"; then + eval $(dbus-launch --sh-syntax --exit-with-session) fi -rfkill block all - -eval "$(gpg-agent --daemon --allow-preset-passphrase --write-env-file "$envfile")" +eval "$(gpg-agent --daemon --allow-preset-passphrase)" eval "$(ssh-agent)" +xrandr --addmode HDMI-A-0 1280x960 +xrandr --output HDMI-A-0 --mode 1280x960 --primary +xrandr --output DisplayPort-1 --mode 1920x1080 --right-of HDMI-A-0 +xrandr --output DisplayPort-2 --mode 1600x900 --left-of HDMI-A-0 + xset r rate 250 30 xset s off -dpms setxkbmap -option "ctrl:nocaps" +xrdb -merge ~/.Xresources -xrandr --auto --output HDMI-A-0 --mode 1920x1080 --primary -xrandr --auto --output DisplayPort-2 --mode 1600x900 --left-of HDMI-A-0 +~/.local/bin/set-wallpaper & +/usr/bin/emacs --daemon & -ibus-daemon -dxrR -/usr/local/bin/emacs --daemon & -statusbar & +urxvtd -q -o -f & +ibus-daemon -d -r -x pipewire & -mpd & picom & -set-wallpaper & - -exec dwm +mpd & +exec i3 diff --git a/.config/yt-dlp/config b/.config/yt-dlp/config index aeb3bda..aeb3bda 100755..100644 --- a/.config/yt-dlp/config +++ b/.config/yt-dlp/config diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc index 452e116..fac9838 100644 --- a/.config/zathura/zathurarc +++ b/.config/zathura/zathurarc @@ -3,13 +3,27 @@ set statusbar-h-padding 0 set statusbar-v-padding 0 set page-padding 1 set selection-clipboard clipboard + map u scroll half-up map d scroll half-down +map n scroll full-down +map p scroll full-up +map [fullscreen] u scroll half-up +map [fullscreen] d scroll half-down +map [fullscreen] n scroll full-down +map [fullscreen] p scroll full-up map D toggle_page_mode map r reload map R rotate -map K zoom in -map J zoom out map i recolor -map p print +map ^p print map g goto top + +#stop at page boundries +set scroll-page-aware true +set scroll-full-overlap 0.01 +set scroll-step 100 + +unmap f +map f toggle_fullscreen +map [fullscreen] f toggle_fullscreen diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index e94a036..6a5661f 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -4,58 +4,28 @@ stty stop undef setopt no_nomatch autoload -U compinit +autoload -U edit-command-line +autoload -Uz vcs_info +precmd() { vcs_info } zstyle ':completion:*' menu select +zstyle ':vcs_info:git:*' formats ' (on %b)' zmodload zsh/complist compinit _comp_options+=(globdots) -# vi mode +zle -N edit-command-line + setopt PROMPT_SUBST -THEME_VI_INS_MODE_SYMBOL=${THEME_VI_INS_MODE_SYMBOL:-'λ'} -THEME_VI_CMD_MODE_SYMBOL=${THEME_VI_CMD_MODE_SYMBOL:-'ᐅ'} - -THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}" - -bindkey -v -export KEYTIMEOUT=1 - -# Use vim keys in tab complete menu: -bindkey -M menuselect 'h' vi-backward-char -bindkey -M menuselect 'k' vi-up-line-or-history -bindkey -M menuselect 'l' vi-forward-char -bindkey -M menuselect 'j' vi-down-line-or-history -bindkey -v '^?' backward-delete-char - -bindkey '^a' vi-beginning-of-line -bindkey '^e' vi-end-of-line - -zle-keymap-select() { - if [ "${KEYMAP}" = 'vicmd' ]; then - THEME_VI_MODE_SYMBOL="${THEME_VI_CMD_MODE_SYMBOL}" - else - THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}" - fi - zle reset-prompt -} -zle -N zle-keymap-select - -# reset to default mode at the end of line input reading -zle-line-finish() { - THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}" -} -zle -N zle-line-finish - -# Fix a bug when you C-c in CMD mode, you'd be prompted with CMD mode indicator -# while in fact you would be in INS mode. -# Fixed by catching SIGINT (C-c), set mode to INS and repropagate the SIGINT, -# so if anything else depends on it, we will not break it. -TRAPINT() { - THEME_VI_MODE_SYMBOL="${THEME_VI_INS_MODE_SYMBOL}" - return $(( 128 + $1 )) -} - -PROMPT='%B%{$fg[red]%}[%{$fg[magenta]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[yellow]%}%~%{$fg[red]%}]%b%(?.%F{green}$THEME_VI_MODE_SYMBOL.%F{red}$THEME_VI_MODE_SYMBOL)%{$reset_color%} ' +# use emacs keybindings +bindkey -e + +# fix del key just inserting a tilde +bindkey "^[[3~" delete-char + +bindkey '^x^e' edit-command-line + +PROMPT='%B%{$fg[red]%}[%{$fg[magenta]%}%n%{$fg[green]%}@%{$fg[blue]%}%m%{$fg[white]%}${vcs_info_msg_0_}:%{$fg[yellow]%}%15<..<%~%<<]%{$reset_color%}%b ' setopt extendedGlob @@ -78,8 +48,8 @@ setopt pushd_ignore_dups setopt pushd_minus -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion +#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +#[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion if [ -f $XDG_CONFIG_HOME/.dircolors ]; then eval "$(dircolors -b $XDG_CONFIG_HOME/.dircolors)" @@ -91,7 +61,7 @@ fi # FZF Section export FZF_DEFAULT_OPS="--extended" -export FZF_DEFAULT_COMMAND="fdfind --type f" +export FZF_DEFAULT_COMMAND="find -type f" export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" if [ -f $HOME/.fzf/fzf.zsh ]; then @@ -103,12 +73,13 @@ if [ -f $XDG_CONFIG_HOME/nnn/nnn.bash ]; then . $XDG_CONFIG_HOME/nnn/nnn.bash fi -neofetch - # Add RVM to PATH for scripting. Make sure this is the last PATH variable change. -[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* +#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* if [ -f $XDG_DATA_HOME/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then . $XDG_DATA_HOME/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh fi +if [ -f $XDG_DATA_HOME/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then + . $XDG_DATA_HOME/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh +fi |
