summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/emacs/modules/mm-editing.el14
-rw-r--r--.config/fuzzel/fuzzel.ini4
-rw-r--r--.config/git/config4
-rw-r--r--.config/htop/htoprc26
-rw-r--r--.config/iosevka-smooth/private-build-plans.toml32
-rw-r--r--.config/niri/config.kdl65
-rw-r--r--.config/niri/dms/alttab.kdl10
-rw-r--r--.config/niri/dms/binds.kdl0
-rw-r--r--.config/niri/dms/colors.kdl39
-rw-r--r--.config/niri/dms/cursor.kdl0
-rw-r--r--.config/niri/dms/layout.kdl22
-rw-r--r--.config/niri/dms/outputs.kdl13
-rw-r--r--.config/niri/dms/windowrules.kdl0
-rw-r--r--.config/niri/dms/wpblur.kdl9
-rw-r--r--.config/nvim/init.lua187
-rw-r--r--.config/nvim/lua/snippets.lua190
-rw-r--r--.config/qalculate/qalculate-gtk.cfg164
-rw-r--r--.config/user-dirs.dirs2
-rw-r--r--.config/zathura/zathurarc1
19 files changed, 271 insertions, 511 deletions
diff --git a/.config/emacs/modules/mm-editing.el b/.config/emacs/modules/mm-editing.el
index 91a290e..e15e739 100644
--- a/.config/emacs/modules/mm-editing.el
+++ b/.config/emacs/modules/mm-editing.el
@@ -388,6 +388,7 @@ is as described by `emmet-expand-line'."
(use-package awk-ts-mode :ensure t)
(use-package cmake-mode :ensure t)
(use-package git-modes :ensure t)
+(use-package kdl-mode :ensure t)
(use-package po-mode :ensure t)
(use-package sed-mode :ensure t)
@@ -432,4 +433,17 @@ is as described by `emmet-expand-line'."
(use-package subword
:hook prog-mode)
+
+;;; Edit Files via Doas/Sudo
+
+(defvar mm-root-editing-program
+ (if (string= (system-name) "mangobox") "doas" "sudo"))
+
+(defun mm-edit-root-protected-file-buffer ()
+ (interactive)
+ (when (and buffer-file-name (not (file-writable-p buffer-file-name)))
+ (find-alternate-file (format "/%s:root@localhost:%s"
+ mm-root-editing-program
+ buffer-file-name))))
+
(provide 'mm-editing)
diff --git a/.config/fuzzel/fuzzel.ini b/.config/fuzzel/fuzzel.ini
index 3084d72..ede6dd7 100644
--- a/.config/fuzzel/fuzzel.ini
+++ b/.config/fuzzel/fuzzel.ini
@@ -1,11 +1,12 @@
[main]
font=SF Compact Text:size=18
+use-bold=no
fuzzy=no
password-character=•
prompt=""
terminal=foot
lines=20
-width=40
+width=80
layer=overlay
line-height=32
inner-pad=8
@@ -15,6 +16,7 @@ dpi-aware=no
background=2B303BE6
border=FAA14FFF
text=C5C8C6FF
+input=C5C8C6FF
selection=414859E6
selection-text=C5C8C6FF
diff --git a/.config/git/config b/.config/git/config
index 0a5fdd1..90734fc 100644
--- a/.config/git/config
+++ b/.config/git/config
@@ -1,7 +1,7 @@
[user]
email = mail@thomasvoss.com
name = Thomas Voss
- signingKey = /home/thomas/.ssh/id_rsa.pub
+ signingKey = /home/thomas/.ssh/id_ed25519.pub
[core]
editor = nvim
@@ -77,4 +77,4 @@
directory = /opt/flutter
[transfer]
- fsckObjects = true \ No newline at end of file
+ fsckObjects = true
diff --git a/.config/htop/htoprc b/.config/htop/htoprc
index 35f4039..94c3d56 100644
--- a/.config/htop/htoprc
+++ b/.config/htop/htoprc
@@ -1,6 +1,6 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
-htop_version=3.3.0
+htop_version=3.4.1-3.4.1
config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1
hide_kernel_threads=1
@@ -9,7 +9,7 @@ hide_running_in_container=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
-highlight_base_name=0
+highlight_base_name=1
highlight_deleted_exe=1
shadow_distribution_path_prefix=0
highlight_megabytes=1
@@ -22,22 +22,26 @@ show_merged_command=1
header_margin=1
screen_tabs=1
detailed_cpu_time=0
-cpu_count_from_one=0
+cpu_count_from_one=1
show_cpu_usage=1
show_cpu_frequency=0
-show_cpu_temperature=0
-degree_fahrenheit=0
+show_cached_memory=1
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
hide_function_bar=0
-header_layout=two_50_50
-column_meters_0=LeftCPUs Memory
-column_meter_modes_0=1 1
-column_meters_1=RightCPUs Battery
-column_meter_modes_1=1 1
+topology_affinity=0
+header_layout=four_25_25_25_25
+column_meters_0=CPU(1) CPU(2) CPU(3) CPU(4) CPU(5) CPU(6) CPU(7) CPU(8) Memory
+column_meter_modes_0=1 1 1 1 1 1 1 1 1
+column_meters_1=CPU(9) CPU(10) CPU(11) CPU(12) CPU(13) CPU(14) CPU(15) CPU(16) Swap
+column_meter_modes_1=1 1 1 1 1 1 1 1 1
+column_meters_2=CPU(17) CPU(18) CPU(19) CPU(20) CPU(21) CPU(22) CPU(23) CPU(24) GPU
+column_meter_modes_2=1 1 1 1 1 1 1 1 2
+column_meters_3=CPU(25) CPU(26) CPU(27) CPU(28) CPU(29) CPU(30) CPU(31) CPU(32) DiskIO NetworkIO
+column_meter_modes_3=1 1 1 1 1 1 1 1 2 2
tree_view=0
sort_key=46
tree_sort_key=0
@@ -53,7 +57,7 @@ screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU P
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0
-screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
+screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE Command
.sort_key=IO_RATE
.tree_sort_key=PID
.tree_view_always_by_pid=0
diff --git a/.config/iosevka-smooth/private-build-plans.toml b/.config/iosevka-smooth/private-build-plans.toml
index 2fca1fc..1ef6be9 100644
--- a/.config/iosevka-smooth/private-build-plans.toml
+++ b/.config/iosevka-smooth/private-build-plans.toml
@@ -2,8 +2,8 @@
family = "Iosevka Smooth"
spacing = "normal"
serifs = "sans"
-no-cv-ss = false
-export-glyph-names = true
+noCvSs = false
+exportGlyphNames = true
[buildPlans.iosevka-smooth.variants.design]
capital-g = "toothless-corner-serifless-hooked"
@@ -13,20 +13,20 @@ a = "double-storey-toothless-corner"
b = "toothless-corner-serifless"
d = "toothless-corner-serifless"
g = "single-storey-earless-corner"
-i = "tailed-serifed"
-l = "tailed-serifed"
+i = "serifed-flat-tailed"
+l = "serifed-flat-tailed"
m = "earless-corner-double-arch-serifless"
n = "earless-corner-straight-serifless"
p = "earless-corner-serifless"
q = "earless-corner-straight-serifless"
u = "toothless-corner-serifless"
long-s = "bent-hook-middle-serifed-xh"
-eszet = "sulzbacher-descending"
+eszet = "sulzbacher-descending-serifless"
lower-delta = "flat-top"
lower-mu = "toothless-corner-serifless"
zero = "tall-slashed"
-two = "straight-neck"
-three = "flat-top"
+two = "straight-neck-serifless"
+three = "flat-top-serifless"
brace = "straight"
ampersand = "et-toothless-corner"
percent = "rings-continuous-slash"
@@ -40,7 +40,7 @@ lig-hyphen-chain = "without-notch"
[buildPlans.iosevka-smooth.variants.italic]
k = "straight-serifless"
long-s = "flat-hook-tailed"
-eszet = "sulzbacher-tailed"
+eszet = "sulzbacher-tailed-serifless"
[buildPlans.iosevka-smooth.ligations]
inherits = "dlig"
@@ -49,8 +49,8 @@ inherits = "dlig"
family = "Iosevka Smooth Term"
spacing = "term"
serifs = "sans"
-no-cv-ss = false
-export-glyph-names = true
+noCvSs = false
+exportGlyphNames = true
[buildPlans.iosevka-smooth-term.variants.design]
capital-g = "toothless-corner-serifless-hooked"
@@ -60,20 +60,20 @@ a = "double-storey-toothless-corner"
b = "toothless-corner-serifless"
d = "toothless-corner-serifless"
g = "single-storey-earless-corner"
-i = "tailed-serifed"
-l = "tailed-serifed"
+i = "serifed-flat-tailed"
+l = "serifed-flat-tailed"
m = "earless-corner-double-arch-serifless"
n = "earless-corner-straight-serifless"
p = "earless-corner-serifless"
q = "earless-corner-straight-serifless"
u = "toothless-corner-serifless"
long-s = "bent-hook-middle-serifed-xh"
-eszet = "sulzbacher-descending"
+eszet = "sulzbacher-descending-serifless"
lower-delta = "flat-top"
lower-mu = "toothless-corner-serifless"
zero = "tall-slashed"
-two = "straight-neck"
-three = "flat-top"
+two = "straight-neck-serifless"
+three = "flat-top-serifless"
brace = "straight"
ampersand = "et-toothless-corner"
percent = "rings-continuous-slash"
@@ -87,7 +87,7 @@ lig-hyphen-chain = "without-notch"
[buildPlans.iosevka-smooth-term.variants.italic]
k = "straight-serifless"
long-s = "flat-hook-tailed"
-eszet = "sulzbacher-tailed"
+eszet = "sulzbacher-tailed-serifless"
[buildPlans.iosevka-smooth-term.ligations]
inherits = "dlig"
diff --git a/.config/niri/config.kdl b/.config/niri/config.kdl
index a8f3d7b..d85892c 100644
--- a/.config/niri/config.kdl
+++ b/.config/niri/config.kdl
@@ -1,10 +1,5 @@
-include "dms/alttab.kdl"
-include "dms/binds.kdl"
-include "dms/cursor.kdl"
-include "dms/layout.kdl"
-include "dms/outputs.kdl"
-include "dms/windowrules.kdl"
-include "dms/wpblur.kdl"
+spawn-at-startup "qs" "-c" "noctalia-shell"
+spawn-at-startup "gentoo-pipewire-launcher"
// https://yalter.github.io/niri/Configuration:-Input
input {
@@ -40,10 +35,32 @@ input {
workspace-auto-back-and-forth
}
+
+output "DP-1" {
+ mode "5120x1440@144.000"
+ scale 1
+ position x=0 y=0
+ focus-at-startup
+}
+
output "DP-2" {
+ mode "5120x1440@144.000"
+ scale 1
+ position x=0 y=0
focus-at-startup
}
+output "eDP-1" {
+ mode "2256x1504@60.000"
+ scale 1
+ position x=1432 y=1440
+}
+
+cursor {
+ xcursor-theme "Adwaita"
+ xcursor-size 24
+}
+
layout {
gaps 12
background-color "#2B303B"
@@ -53,12 +70,12 @@ layout {
preset-column-widths {
proportion 0.33333
- proportion 0.5
+ proportion 0.50000
proportion 0.66667
}
default-column-width {
- proportion 0.5
+ proportion 0.33333
}
focus-ring {
@@ -100,7 +117,7 @@ hotkey-overlay {
prefer-no-csd
-screenshot-path "~/media/gfx/screen/%Y-%m-%d_%H-%M-%S.png"
+screenshot-path "~/media/img/screen/%Y-%m-%d_%H-%M-%S.png"
// Animation settings.
// The wiki explains how to configure individual animations:
@@ -119,13 +136,24 @@ animations {
// Open the Firefox picture-in-picture player as floating by default.
window-rule {
- // This app-id regular expression will work for both:
- // - host Firefox (app-id is "firefox")
- // - Flatpak Firefox (app-id is "org.mozilla.firefox")
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
open-floating true
}
+window-rule {
+ match app-id="scratch-term"
+ open-floating true
+ default-column-width { fixed 1200; }
+ default-window-height { fixed 800; }
+}
+
+window-rule {
+ match app-id="qalculate-(gtk|qt)"
+ open-floating true
+ default-column-width { fixed 800; }
+ default-window-height { fixed 600; }
+}
+
// Example: block out two password managers from screen capture.
// (This example rule is commented out with a "/-" in front.)
/-window-rule {
@@ -138,11 +166,9 @@ window-rule {
// block-out-from "screencast"
}
-// Example: enable rounded corners for all windows.
-// (This example rule is commented out with a "/-" in front.)
-/-window-rule {
- geometry-corner-radius 12
- clip-to-geometry true
+layer-rule {
+ match namespace="^noctalia-overview*"
+ place-within-backdrop true
}
binds {
@@ -165,6 +191,9 @@ binds {
Mod+Return hotkey-overlay-title="Terminal" {
spawn "foot"
}
+ Mod+Ctrl+Return hotkey-overlay-title="Terminal (Scratch)" {
+ spawn "foot" "--app-id" "scratch-term"
+ }
Mod+Space hotkey-overlay-title="App Launcher" {
spawn "fuzzel" "-I" "--log-level=warning" "--show-actions"
}
diff --git a/.config/niri/dms/alttab.kdl b/.config/niri/dms/alttab.kdl
deleted file mode 100644
index 091ea07..0000000
--- a/.config/niri/dms/alttab.kdl
+++ /dev/null
@@ -1,10 +0,0 @@
-// ! DO NOT EDIT !
- // ! AUTO-GENERATED BY DMS !
- // ! CHANGES WILL BE OVERWRITTEN !
- // ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE !
-
- recent-windows {
- highlight {
- corner-radius 12
- }
- }
diff --git a/.config/niri/dms/binds.kdl b/.config/niri/dms/binds.kdl
deleted file mode 100644
index e69de29..0000000
--- a/.config/niri/dms/binds.kdl
+++ /dev/null
diff --git a/.config/niri/dms/colors.kdl b/.config/niri/dms/colors.kdl
deleted file mode 100644
index 7e6101c..0000000
--- a/.config/niri/dms/colors.kdl
+++ /dev/null
@@ -1,39 +0,0 @@
-// ! Auto-generated file. Do not edit directly.
-// Remove `include "dms/colors.kdl"` from your config to override.
-
-layout {
- background-color "transparent"
-
- focus-ring {
- active-color "#42a5f5"
- inactive-color "#8c9199"
- urgent-color "#f2b8b5"
- }
-
- border {
- active-color "#42a5f5"
- inactive-color "#8c9199"
- urgent-color "#f2b8b5"
- }
-
- shadow {
- color "#00000070"
- }
-
- tab-indicator {
- active-color "#42a5f5"
- inactive-color "#8c9199"
- urgent-color "#f2b8b5"
- }
-
- insert-hint {
- color "#42a5f580"
- }
-}
-
-recent-windows {
- highlight {
- active-color "#0d47a1"
- urgent-color "#f2b8b5"
- }
-}
diff --git a/.config/niri/dms/cursor.kdl b/.config/niri/dms/cursor.kdl
deleted file mode 100644
index e69de29..0000000
--- a/.config/niri/dms/cursor.kdl
+++ /dev/null
diff --git a/.config/niri/dms/layout.kdl b/.config/niri/dms/layout.kdl
deleted file mode 100644
index 431afbf..0000000
--- a/.config/niri/dms/layout.kdl
+++ /dev/null
@@ -1,22 +0,0 @@
-// ! DO NOT EDIT !
- // ! AUTO-GENERATED BY DMS !
- // ! CHANGES WILL BE OVERWRITTEN !
- // ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE !
-
- layout {
- gaps 4
-
- border {
- width 2
- }
-
- focus-ring {
- width 2
- }
- }
- window-rule {
- geometry-corner-radius 12
- clip-to-geometry true
- tiled-state true
- draw-border-with-background false
- }
diff --git a/.config/niri/dms/outputs.kdl b/.config/niri/dms/outputs.kdl
deleted file mode 100644
index 8a92851..0000000
--- a/.config/niri/dms/outputs.kdl
+++ /dev/null
@@ -1,13 +0,0 @@
-// Auto-generated by DMS - do not edit manually
-
-output "DP-2" {
- mode "5120x1440@144.000"
- scale 1
- position x=0 y=0
-}
-
-output "eDP-1" {
- mode "2256x1504@60.000"
- scale 1
- position x=1432 y=1440
-}
diff --git a/.config/niri/dms/windowrules.kdl b/.config/niri/dms/windowrules.kdl
deleted file mode 100644
index e69de29..0000000
--- a/.config/niri/dms/windowrules.kdl
+++ /dev/null
diff --git a/.config/niri/dms/wpblur.kdl b/.config/niri/dms/wpblur.kdl
deleted file mode 100644
index 3d58802..0000000
--- a/.config/niri/dms/wpblur.kdl
+++ /dev/null
@@ -1,9 +0,0 @@
-// ! DO NOT EDIT !
-// ! AUTO-GENERATED BY DMS !
-// ! CHANGES WILL BE OVERWRITTEN !
-// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE !
-
-layer-rule {
- match namespace="dms:blurwallpaper"
- place-within-backdrop true
-}
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index 220c341..5a922e3 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -16,16 +16,18 @@ vim.opt.grepprg = 'rg --vimgrep'
vim.opt.hlsearch = true
vim.opt.ignorecase = true
vim.opt.inccommand = 'split'
-vim.opt.list = false
vim.opt.listchars = { tab = '» ', trail = '․', nbsp = '␣' }
+vim.opt.list = false
vim.opt.matchpairs:append('<:>')
+vim.opt.matchpairs:append('»:«')
vim.opt.matchpairs:append('‘:’')
vim.opt.matchpairs:append('“:”')
-vim.opt.matchpairs:append('»:«')
vim.opt.matchpairs:append('›:‹')
vim.opt.mouse = 'a'
vim.opt.number = true
vim.opt.relativenumber = true
+vim.opt.runtimepath:append("/usr/share/vim/vimfiles")
+vim.opt.runtimepath:append("/usr/share/vim/vimfiles/after")
vim.opt.scrolloff = 8
vim.opt.secure = true
vim.opt.shiftwidth = 4
@@ -166,84 +168,24 @@ end
require 'paq' {
'folke/todo-comments.nvim',
'folke/tokyonight.nvim',
- 'hrsh7th/cmp-nvim-lsp',
- 'hrsh7th/cmp-path',
- 'hrsh7th/nvim-cmp',
'kylechui/nvim-surround',
- 'L3MON4D3/LuaSnip',
'luckasRanarison/tree-sitter-hypr',
'Mango0x45/tree-sitter-gsp',
- 'mattn/emmet-vim',
- 'neovim/nvim-lspconfig',
'ngalaiko/tree-sitter-go-template',
'nvim-lua/plenary.nvim',
- 'nvim-telescope/telescope.nvim',
- 'nvim-telescope/telescope-ui-select.nvim',
- { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
+ {
+ 'nvim-treesitter/nvim-treesitter',
+ branch = 'master',
+ build = ':TSUpdate',
+ },
'nvim-treesitter/nvim-treesitter-textobjects',
- 'saadparwaiz1/cmp_luasnip',
'savq/paq-nvim',
'wellle/targets.vim',
}
--- emmet-vim
-vim.g.user_emmet_install = false
-
-- tokyonight.nvim
vim.cmd.colorscheme 'tokyonight-night'
--- telescope.nvim
-local telescope = require 'telescope'
-local tsactions = require 'telescope.actions'
-local tsbuiltin = require 'telescope.builtin'
-local tsthemes = require 'telescope.themes'
-
-telescope.setup {
- defaults = {
- scroll_strategy = 'limit',
- path_display = { 'filename_first' },
- get_status_text = function(_) return '' end,
- mappings = {
- i = {
- ['<Esc>'] = {
- tsactions.close,
- type = 'action',
- opts = { nowait = true, silent = true },
- },
- ['<C-j>'] = {
- tsactions.move_selection_next,
- type = 'action',
- opts = { nowait = true, silent = true },
- },
- ['<C-k>'] = {
- tsactions.move_selection_previous,
- type = 'action',
- opts = { nowait = true, silent = true },
- },
- },
- },
- },
- extensions = {
- ['ui-select'] = { tsthemes.get_dropdown() },
- }
-}
-
-pcall(telescope.load_exetension, 'fzf')
-pcall(telescope.load_exetension, 'ui-select')
-
-vim.keymap.set('n', '<Leader>ff', tsbuiltin.find_files,
- { desc = '[F]ind [F]iles' })
-vim.keymap.set('n', '<Leader>fh', tsbuiltin.help_tags,
- { desc = '[F]ind [H]elp' })
-vim.keymap.set('n', '<Leader>fg', tsbuiltin.live_grep,
- { desc = '[F]ind [G]rep' })
-vim.keymap.set('n', '<Leader>/', function()
- tsbuiltin.current_buffer_fuzzy_find(tsthemes.get_dropdown {
- winblend = 10,
- previewer = false,
- })
-end, { desc = 'Fuzzily search in current buffer' })
-
-- todo-comments.nvim
require('todo-comments').setup {
signs = false,
@@ -400,116 +342,5 @@ require('nvim-surround').setup {
}
}
--- nvim-lspconfig
-local lsp = require 'lspconfig'
-local caps = require('cmp_nvim_lsp').default_capabilities()
-
-lsp.clangd.setup {
- cmd = { 'clangd', '-header-insertion=never' },
- capabilities = caps,
-}
-lsp.gopls.setup {
- capabilities = caps,
-}
-lsp.rust_analyzer.setup {
- capabilities = caps,
-}
-lsp.templ.setup {
- capabilities = caps,
-}
-lsp.ts_ls.setup {
- capabilities = caps,
-}
-lsp.lua_ls.setup {
- settings = {
- Lua = {
- runtime = {
- version = 'LuaJIT',
- },
- diagnostics = {
- globals = {
- 'vim',
- 'require',
- },
- },
- workspace = {
- library = vim.api.nvim_get_runtime_file('', true),
- },
- telemetry = {
- enable = false,
- },
- },
- },
- capabilities = caps,
-}
-
-vim.api.nvim_create_autocmd('LspAttach', {
- group = vim.api.nvim_create_augroup('mango-lsp-config', { clear = true }),
- callback = function(ev)
- vim.diagnostic.disable()
- vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
- vim.keymap.set('n', 'gK', vim.lsp.buf.hover,
- { buffer = ev.buf, desc = 'View symbol hover information' })
- vim.keymap.set('n', 'gd', vim.lsp.buf.definition,
- { buffer = ev.buf, desc = 'Goto [D]efinition' })
- vim.keymap.set('n', 'gi', vim.lsp.buf.implementation,
- { buffer = ev.buf, desc = 'Goto [I]mplementation' })
- vim.keymap.set('n', 'gr', vim.lsp.buf.rename,
- { buffer = ev.buf, desc = '[R]ename symbol' })
- vim.keymap.set('n', 'gt', vim.lsp.buf.type_definition,
- { buffer = ev.buf, desc = 'Goto [T]ype definition' })
- end,
-})
-
--- nvim-cmp & luasnip
-local cmp = require 'cmp'
-local luasnip = require 'luasnip'
-
-luasnip.config.setup {
- history = true,
- updateevents = 'TextChanged,TextChangedI',
-}
-require 'snippets'
-
-cmp.setup {
- snippet = {
- expand = function(args)
- luasnip.lsp_expand(args.body)
- end,
- },
- completion = { completeopt = 'menu,menuone,noinsert' },
- mapping = cmp.mapping.preset.insert {
- ['<CR>'] = cmp.mapping.confirm { select = true },
- ['<C-Space>'] = cmp.mapping.complete(),
- ['<C-p>'] = cmp.mapping.scroll_docs(-1),
- ['<C-n>'] = cmp.mapping.scroll_docs(1),
- ['<C-c>'] = cmp.mapping.abort(),
- ['<C-j>'] = cmp.mapping.select_next_item({
- behaviour = cmp.SelectBehavior.Select,
- }),
- ['<C-k>'] = cmp.mapping.select_prev_item({
- behaviour = cmp.SelectBehavior.Select,
- }),
- ['<C-l>'] = cmp.mapping(function()
- if luasnip.expand_or_locally_jumpable() then
- luasnip.expand_or_jump()
- end
- end, {'i', 's'}),
- ['<C-h>'] = cmp.mapping(function()
- if luasnip.expand_or_locally_jumpable(-1) then
- luasnip.expand_or_jump(-1)
- end
- end, {'i', 's'}),
- },
- sources = {
- { name = 'nvim_lsp' },
- { name = 'luasnip' },
- { name = 'path' },
- },
- experimental = {
- ghost_text = true,
- },
-}
-
-- Pipe
require('pipe')
diff --git a/.config/nvim/lua/snippets.lua b/.config/nvim/lua/snippets.lua
deleted file mode 100644
index 185019c..0000000
--- a/.config/nvim/lua/snippets.lua
+++ /dev/null
@@ -1,190 +0,0 @@
-local ls = require('luasnip')
-local ts_utils = require('nvim-treesitter.ts_utils')
-local ts_locals = require('nvim-treesitter.locals')
-
-local c = ls.choice_node
-local d = ls.dynamic_node
-local f = ls.function_node
-local i = ls.insert_node
-local s = ls.s
-local sn = ls.snippet_node
-local t = ls.text_node
-local fmt = require('luasnip.extras.fmt').fmt
-
-local function same(index)
- return f(function(args)
- return args[1]
- end, { index })
-end
-
-ls.add_snippets('lua', {
- s('req', fmt([[local {} = require('{}')]], {
- f(function(name)
- local xs = vim.split(name[1][1], '.', { plain = true })
- return xs[#xs] or ''
- end, { 1 }),
- i(1),
- })),
-})
-
-local function is_ptr(str)
- return string.find(str, '*', 1, true) ~= nil
-end
-
-local function is_num(str)
- return vim.regex(
- '\\v^('
- .. 'u?int(8|16|32|64)?'
- .. '|byte'
- .. '|complex(64|128)'
- .. '|float(32|64)'
- .. '|rune'
- .. '|uintptr'
- .. ')$'
- ):match_str(str) ~= nil
-end
-
-local transforms = {
- bool = 'false',
- string = '""',
- error = 'err',
- [is_num] = '0',
- [is_ptr] = 'nil',
-}
-
-local transform = function(text)
- local condition_matches = function(condition, ...)
- if type(condition) == 'string' then
- return condition == text
- else
- return condition(...)
- end
- end
-
- for condition, result in pairs(transforms) do
- if condition_matches(condition, text) then
- return t(result)
- end
- end
-
- return t(text .. '{}')
-end
-
-local handlers = {
- parameter_list = function(node)
- local result = {}
-
- local count = node:named_child_count()
- for idx = 0, count - 1 do
- local matching_node = node:named_child(idx)
- local type_node = matching_node:field('type')[1]
- table.insert(result, transform(
- vim.treesitter.get_node_text(type_node, 0)
- ))
- if idx ~= count - 1 then
- table.insert(result, t({ ', ' }))
- end
- end
-
- return result
- end,
-
- type_identifier = function(node)
- local text = vim.treesitter.get_node_text(node, 0)
- return { transform(text) }
- end,
-}
-
-local function_node_types = {
- function_declaration = true,
- method_declaration = true,
- func_literal = true,
-}
-
-local function go_result_type()
- local cursor_node = ts_utils.get_node_at_cursor()
- if cursor_node == nil then
- print('Unable to find position')
- return t('')
- end
- local scope = ts_locals.get_scope_tree(cursor_node, 0)
-
- local function_node
- for _, v in ipairs(scope) do
- if function_node_types[v:type()] then
- function_node = v
- break
- end
- end
-
- if not function_node then
- print('Not inside of a function')
- return t('')
- end
-
- local query = vim.treesitter.query.parse('go', [[
- [
- (method_declaration result: (_) @id)
- (function_declaration result: (_) @id)
- (func_literal result: (_) @id)
- ]
- ]])
- for _, node in query:iter_captures(function_node, 0) do
- if handlers[node:type()] then
- return handlers[node:type()](node)
- end
- end
-end
-
-ls.add_snippets('go', {
- s(
- 'ife',
- fmt(
- [[
- if err != nil {
- return <>
- }
- ]],
- {
- d(1, function()
- return sn(nil, go_result_type())
- end),
- },
- {
- delimiters = '<>',
- }
- )
- ),
-})
-
-
-ls.add_snippets('c', {
- s(
- 'gu',
- fmt(
- [[
- #ifndef {}_H
- #define {}_H
-
- {}
-
- #endif /* !{}_H */
- ]],
- { i(1), same(1), i(0), same(1) }
- )
- ),
-})
-
-ls.add_snippets('tex', {
- s(
- 'scope',
- fmt(
- [[
- \begin{{{}}}
- {}
- \end{{{}}}
- ]],
- { i(1), i(0), same(1) }
- )
- ),
-})
diff --git a/.config/qalculate/qalculate-gtk.cfg b/.config/qalculate/qalculate-gtk.cfg
new file mode 100644
index 0000000..dbaaea7
--- /dev/null
+++ b/.config/qalculate/qalculate-gtk.cfg
@@ -0,0 +1,164 @@
+
+[General]
+version=5.9.0
+allow_multiple_instances=-1
+width=800
+always_on_top=0
+enable_tooltips=1
+error_info_shown=1
+save_mode_on_exit=1
+save_definitions_on_exit=1
+save_history_separately=0
+auto_update_exchange_rates=-1
+clear_history_on_exit=0
+history_expression_type=2
+use_custom_history_font=0
+expression_lines=2
+use_custom_expression_font=0
+replace_expression=0
+enable_completion=1
+enable_completion2=1
+completion_min=1
+completion_min2=1
+completion_delay=0
+use_custom_status_font=0
+general_exact=1
+vertical_button_padding=-1
+horizontal_button_padding=-1
+use_custom_keypad_font=0
+latest_button_currency=GBP
+use_custom_result_font=0
+custom_result_height=1
+continuous_conversion=1
+set_missing_prefixes=0
+show_bases_keypad=1
+keep_function_dialog_open=0
+default_currency=EUR
+ignore_locale=0
+load_global_definitions=1
+local_currency_conversion=1
+use_binary_prefixes=0
+check_version=0
+show_keypad=0
+show_history=1
+history_height=385
+minimal_width=500
+show_stack=1
+show_convert=0
+persistent_keypad=1
+minimal_mode=0
+rpn_keys=1
+expression_pos=0
+display_expression_status=1
+parsed_expression_in_resultview=0
+calculate_as_you_type_history_delay=2000
+use_unicode_signs=1
+lower_case_numbers=1
+duodecimal_symbols=0
+exp_display=3
+imaginary_j=0
+base_display=1
+binary_bits=64
+twos_complement=1
+hexadecimal_twos_complement=0
+twos_complement_input=0
+hexadecimal_twos_complement_input=0
+binary_bits=64
+spell_out_logical_operators=0
+caret_as_xor=0
+close_with_esc=-1
+digit_grouping=2
+copy_ascii=0
+copy_ascii_without_units=0
+decimal_comma=-1
+dot_as_separator=-1
+comma_as_separator=0
+use_custom_application_font=0
+multiplication_sign=2
+division_sign=1
+expression_history=485
+expression_history=5489+528
+expression_history=123552
+expression_history=123,4562
+expression_history=12332154878,321231545231553
+expression_history=123+456
+expression_history=123,45×8
+expression_history=321231,65456
+recent_functions=
+recent_variables=
+recent_units=
+
+[Mode]
+min_deci=0
+use_min_deci=0
+max_deci=2
+use_max_deci=0
+precision=10
+interval_arithmetic=1
+interval_display=0
+min_exp=-1
+negative_exponents=0
+sort_minus_last=1
+number_fraction_format=0
+complex_number_form=0
+use_prefixes=1
+use_prefixes_for_all_units=0
+use_prefixes_for_currencies=0
+abbreviate_names=1
+all_prefixes_enabled=0
+denominator_prefix_enabled=1
+place_units_separately=1
+auto_post_conversion=3
+mixed_units_conversion=3
+number_base=10
+number_base_expression=10
+read_precision=0
+assume_denominators_nonzero=1
+warn_about_denominators_assumed_nonzero=1
+structuring=1
+angle_unit=1
+functions_enabled=1
+variables_enabled=1
+calculate_functions=1
+calculate_variables=1
+variable_units_enabled=1
+sync_units=1
+unknownvariables_enabled=0
+units_enabled=1
+allow_complex=1
+allow_infinite=1
+indicate_infinite_series=-1
+show_ending_zeroes=1
+rounding_mode=0
+approximation=1
+interval_calculation=1
+concise_uncertainty_input=0
+calculate_as_you_type=1
+in_rpn_mode=0
+chain_mode=0
+limit_implicit_multiplication=0
+parsing_mode=0
+simplified_percentage=-1
+spacious=1
+excessive_parenthesis=0
+visible_keypad=5
+short_multiplication=1
+default_assumption_type=4
+default_assumption_sign=0
+
+[Plotting]
+plot_legend_placement=2
+plot_style=0
+plot_smoothing=0
+plot_display_grid=1
+plot_full_border=0
+plot_min=0
+plot_max=10
+plot_step=1
+plot_sampling_rate=1001
+plot_use_sampling_rate=1
+plot_variable=x
+plot_rows=0
+plot_type=0
+plot_color=1
+plot_linewidth=2
diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs
index 94a36e3..3e5d406 100644
--- a/.config/user-dirs.dirs
+++ b/.config/user-dirs.dirs
@@ -11,5 +11,5 @@ XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/doc"
XDG_MUSIC_DIR="$HOME/media/mus"
-XDG_PICTURES_DIR="$HOME/media/gfx"
+XDG_PICTURES_DIR="$HOME/media/img"
XDG_VIDEOS_DIR="$HOME/media/vid"
diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc
index 88637ce..ae6e7c1 100644
--- a/.config/zathura/zathurarc
+++ b/.config/zathura/zathurarc
@@ -1,7 +1,6 @@
set database sqlite
set statusbar-h-padding 0
set statusbar-v-padding 0
-set page-padding 1
map <Space> navigate next
map s snap_to_page
map a adjust_window best-fit