diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/dodo/config.py | 4 | ||||
| -rw-r--r-- | config/guix/channels.scm | 10 | ||||
| -rwxr-xr-x | config/i3/scripts/keyboard_switch | 14 | ||||
| -rwxr-xr-x | config/i3/scripts/pass | 6 | ||||
| -rw-r--r-- | config/nvim/init.vim | 9 | ||||
| -rw-r--r-- | config/nvim/lua/plugins.lua | 53 | ||||
| -rw-r--r-- | config/sway/bindsym-media | 4 | ||||
| -rw-r--r-- | config/sway/bindsym-system | 8 | ||||
| -rw-r--r-- | config/sway/daemons | 2 | ||||
| -rwxr-xr-x | config/sway/scripts/pass | 6 | ||||
| -rwxr-xr-x | config/sway/scripts/screenshot | 19 | ||||
| -rw-r--r-- | config/systemd/user/davmail.service | 5 | ||||
| -rw-r--r-- | config/systemd/user/waybar.service | 8 | ||||
| -rwxr-xr-x | config/waybar/email.sh | 2 |
14 files changed, 74 insertions, 76 deletions
diff --git a/config/dodo/config.py b/config/dodo/config.py index 66e64ac..1347424 100644 --- a/config/dodo/config.py +++ b/config/dodo/config.py @@ -1,14 +1,16 @@ import dodo -dodo.settings.smtp_accounts = ["email", "gmail", "fel"] +dodo.settings.smtp_accounts = ["email", "gmail", "ell", "fel"] dodo.settings.email_address = { "email": "Karel Kočí <cynerd@email.cz>", "gmail": "Karel Kočí <citrisin@gmail.com>", + "ell": "Karel Kočí <kkoci@elektroline.cz>", "fel": "Karel Kočí <kocikare@fel.cvut.cz>", } dodo.settings.sent_dir = { "email": "~/.mail/email/sent/", "gmail": "~/.mail/gmail/Drafts/", + "ell": "~/.mail/ell/Sent/", "fel": "~/.mail/fel/Sent/", } dodo.settings.gnupg_keyid = "2B1F70F95F1B48DA2265A7FAA6BC8B8CEB31659B" diff --git a/config/guix/channels.scm b/config/guix/channels.scm new file mode 100644 index 0000000..a56d8b6 --- /dev/null +++ b/config/guix/channels.scm @@ -0,0 +1,10 @@ +(cons* (channel + (name 'nonguix) + (url "https://gitlab.com/nonguix/nonguix") + ;; Enable signature verification: + (introduction + (make-channel-introduction + "897c1a470da759236cc11798f4e0a5f7d4d59fbc" + (openpgp-fingerprint + "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) + %default-channels) diff --git a/config/i3/scripts/keyboard_switch b/config/i3/scripts/keyboard_switch index 7ba27f8..168d577 100755 --- a/config/i3/scripts/keyboard_switch +++ b/config/i3/scripts/keyboard_switch @@ -1,13 +1,13 @@ #!/bin/bash -active=`~/.config/i3/scripts/keyboard_layout` +active=$(~/.config/i3/scripts/keyboard_layout) case "$active" in - us) - setxkbmap cz_qwerty - ;; - cz_qwerty) - setxkbmap us - ;; +us) + setxkbmap cz_qwerty + ;; +cz_qwerty) + setxkbmap us + ;; esac # Send update to i3blocks diff --git a/config/i3/scripts/pass b/config/i3/scripts/pass index aa2ad96..4777c1c 100755 --- a/config/i3/scripts/pass +++ b/config/i3/scripts/pass @@ -1,6 +1,6 @@ #!/bin/sh -find ~/.password-store -type f -printf '%P\n' | \ - sed 's/\.gpg$//' | dmenu -p 'Pass:' | \ +find ~/.password-store -type f -printf '%P\n' | + sed 's/\.gpg$//' | dmenu -p 'Pass:' | while read -r psw; do pass -c "$psw" -done + done diff --git a/config/nvim/init.vim b/config/nvim/init.vim index b18a009..c269b77 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -99,6 +99,9 @@ nnoremap <c-c><CR> :Explore<cr> nnoremap <c-c>l :bnext<cr> nnoremap <c-c>h :bprev<cr> +" Table mode +let g:table_mode_syntax = 0 + " Format nmap <leader>f :lua require("conform").format()<cr> @@ -108,10 +111,6 @@ highlight GitGutterAdd ctermfg=2 highlight GitGutterChange ctermfg=3 highlight GitGutterDelete ctermfg=1 -" Setup table-mode to markdown compliant -" Note: to start use "\ t m" -let g:table_mode_corner='|' - " Spell checking map <F10> :setlocal spell!<cr> function LangToggle() @@ -138,6 +137,8 @@ let g:UltiSnipsJumpBackwardTrigger='<c-k>' nnoremap <c-c><c-c> :Telescope buffers<cr> nnoremap <c-p> :lua require('mytelescopefiles')()<cr> nnoremap <c-s-p> :Telescope lsp_document_symbols<cr> +nnoremap <c-s-g> :Telescope live_grep<cr> +nnoremap <c-s-8> :Telescope grep_string<cr> nmap <leader>] :Telescope lsp_definitions<cr> nmap <leader><leader>] :Telescope lsp_type_definitions<cr> nmap <leader>[ :Telescope lsp_implementations<cr> diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index f323106..d1a4c55 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -4,47 +4,12 @@ if vim.fn.empty(vim.fn.glob(install_path)) > 0 then vim.cmd([[packadd packer.nvim]]) end -local treesitter_formaters = { - "c", - "lua", - "kconfig", - "make", - "markdown", - "markdown_inline", - "meson", - "ninja", - "ini", - "gitcommit", - "git_rebase", - "git_config", - "nix", - "python", - "toml", - "vim", - "vimdoc", - "yaml", - "xml", -} - require("packer").startup(function(use) use("wbthomason/packer.nvim") -- Visual ------------------------------------------------------------------ use("shaunsingh/nord.nvim") use("MunifTanjim/nui.nvim") use({ - "nvim-treesitter/nvim-treesitter", - run = ":TSUpdate", - config = function() - require("nvim-treesitter.configs").setup({ - ensure_installed = treesitter_formaters, - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - }) - end, - }) - use({ "lukas-reineke/indent-blankline.nvim", config = function() local highlight = { "CursorColumn", "Whitespace" } @@ -162,9 +127,9 @@ require("packer").startup(function(use) -- Additional integrations ------------------------------------------------- use({ "chomosuke/typst-preview.nvim", - tag = "v0.1.*", - run = function() - require("typst-preview").update() + tag = "v1.*", + config = function() + require("typst-preview").setup({}) end, }) -- Movement, format and others --------------------------------------------- @@ -178,10 +143,10 @@ require("packer").startup(function(use) use("aliou/bats.vim") -- LSP --------------------------------------------------------------------- - local lspconfig = require("lspconfig") - lspconfig.bashls.setup({}) - lspconfig.clangd.setup({}) - lspconfig.nil_ls.setup({}) - lspconfig.pylsp.setup({}) - lspconfig.tinymist.setup({}) + vim.lsp.enable("bashls") + vim.lsp.enable("clangd") + vim.lsp.enable("nil_ls") + vim.lsp.enable("pylsp") + vim.lsp.enable("tinymist") + vim.lsp.enable("guile_ls") end) diff --git a/config/sway/bindsym-media b/config/sway/bindsym-media index 13026fc..b1159ef 100644 --- a/config/sway/bindsym-media +++ b/config/sway/bindsym-media @@ -12,8 +12,8 @@ for_window [ title="Pulsemixer" ] move position center # Screen brightness controls -bindsym XF86MonBrightnessUp exec --no-startup-id light -A 10 -bindsym XF86MonBrightnessDown exec --no-startup-id light -U 10 +bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +10% +bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 10%- # Media player controls bindsym XF86AudioPlay exec --no-startup-id mpc toggle && pkill -RTMIN+12 i3blocks diff --git a/config/sway/bindsym-system b/config/sway/bindsym-system index 7afcb4c..79094be 100644 --- a/config/sway/bindsym-system +++ b/config/sway/bindsym-system @@ -13,10 +13,12 @@ mode "$mode_system" { bindsym $mod+Shift+q mode "$mode_system" -set $screenshot Screenshot: (s)elect or (d)desktop +set $screenshot Screenshot: (s)elect or (w)indow or (o)tput or (d)desktop mode "$screenshot" { - bindsym --release d exec --no-startup-id grim, mode "default" - bindsym --release s exec --no-startup-id sh -c "slurp | grim -g -", mode "default" + bindsym --locked s exec --no-startup-id ~/.config/sway/scripts/screenshot select, mode "default" + bindsym --locked w exec --no-startup-id ~/.config/sway/scripts/screenshot window, mode "default" + bindsym --locked o exec --no-startup-id ~/.config/sway/scripts/screenshot output, mode "default" + bindsym --locked d exec --no-startup-id ~/.config/sway/scripts/screenshot desktop, mode "default" bindsym Return mode "default" bindsym Escape mode "default" diff --git a/config/sway/daemons b/config/sway/daemons index 786fa70..a6579da 100644 --- a/config/sway/daemons +++ b/config/sway/daemons @@ -2,8 +2,10 @@ exec --no-startup-id { kanshi swayidle + waybar dunst } for_window [class="Ferdi"] move scratchpad exec ferdium +exec sh -c 'if commad -v openrgb >/dev/null; then exec openrgb --startminimized; fi' diff --git a/config/sway/scripts/pass b/config/sway/scripts/pass index 06383b3..11700e6 100755 --- a/config/sway/scripts/pass +++ b/config/sway/scripts/pass @@ -1,6 +1,6 @@ #!/bin/sh -find ~/.password-store -name .git -prune -o -type f -printf '%P\n' | \ - sed 's/\.gpg$//' | wofi -d -p 'Pass:' | \ +find ~/.password-store -name .git -prune -o -type f -printf '%P\n' | + sed 's/\.gpg$//' | wofi -d -p 'Pass:' | while read -r psw; do pass -c "$psw" -done + done diff --git a/config/sway/scripts/screenshot b/config/sway/scripts/screenshot new file mode 100755 index 0000000..45086f1 --- /dev/null +++ b/config/sway/scripts/screenshot @@ -0,0 +1,19 @@ +#!/bin/sh +case "${1:-}" in +desktop) + exec grim + ;; +output) + exec grim -o "$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name')" + ;; +window) + exec grim -g "$(swaymsg -t get_tree | + jq -j '.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"')" + # TODO the second variant is newer but doesn't work with my version of sway + exec grim -T "$(swaymsg -t get_tree | + jq -j '.. | select(.type?) | select(.focused).foreign_toplevel_identifier')" + ;; +select) + exec grim -g "$(slurp)" + ;; +esac diff --git a/config/systemd/user/davmail.service b/config/systemd/user/davmail.service new file mode 100644 index 0000000..b0f239b --- /dev/null +++ b/config/systemd/user/davmail.service @@ -0,0 +1,5 @@ +[Unit] +Description=DavMail + +[Service] +ExecStart="/run/current-system/sw/bin/davmail" diff --git a/config/systemd/user/waybar.service b/config/systemd/user/waybar.service deleted file mode 100644 index 110ab83..0000000 --- a/config/systemd/user/waybar.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Waybar - -[Service] -ExecStart="/run/current-system/sw/bin/waybar" - -[Install] -WantedBy="graphical-session.target" diff --git a/config/waybar/email.sh b/config/waybar/email.sh index 437566f..16b0d9f 100755 --- a/config/waybar/email.sh +++ b/config/waybar/email.sh @@ -10,7 +10,7 @@ fi part=() for mail in email gmail elektroline fel; do counts="$(notmuch count -- "${filter[@]}" and "tag:$mail")" - [ "$counts" = "0" ] || \ + [ "$counts" = "0" ] || part+=("$mail:$counts") done |
