diff --git a/dot_config/herbstluftwm/executable_autostart.tmpl b/dot_config/herbstluftwm/executable_autostart.tmpl index 7953d69..11b347f 100644 --- a/dot_config/herbstluftwm/executable_autostart.tmpl +++ b/dot_config/herbstluftwm/executable_autostart.tmpl @@ -32,7 +32,7 @@ hc keybind $Mod-x spawn systemd-run --scope --user rofi -modi drun -show drun hc keybind $Mod-Shift-x spawn systemd-run --scope --user rofi -show fb -modi "fb:${HOME}/.config/herbstluftwm/file-browser" hc keybind $Mod-z spawn systemd-run --scope --user rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}' hc keybind $Mod-c spawn systemd-run --scope --user rofi -lines 0 -show calc -modi calc -no-show-match -no-sort -no-history -calc-command "echo -n '{result}' | xclip" -hc keybind $Mod-a spawn systemd-run --scope --user rofi -show pb -modi "pb:$HOME/.config/herbstluftwm/passmenu2" +hc keybind $Mod-a spawn systemd-run --scope --user zsh -c 'gopass ls -f | rofi -dmenu -p "Select password " | read p ; gopass show --clip $p' hc keybind $Mod-Shift-a spawn systemd-run --scope --user rofi -show pb -modi "pb:$HOME/.config/herbstluftwm/passboltmenu2" hc keybind $Mod-m spawn systemd-run --scope --user ~/.config/herbstluftwm/pmount-dmenu hc keybind $Mod-Escape spawn systemd-run --scope --user dunstctl close @@ -257,5 +257,19 @@ systemctl restart --no-block --user "hlwm.target" xset s off xset -dpms +{{if eq .chezmoi.hostname "archdudr"}} +hc attr tags.0.tiling.root.algorithm max + +hc rule once 'instance~microsoft teams' tag=1 +hc rule once 'class=thunderbird' tag=1 +hc rule once 'class=discord' tag=1 +hc rule once 'class=qutebrowser' tag=2 + +hc spawn systemd-run --scope --user teams +hc spawn systemd-run --scope --user thunderbird +hc spawn systemd-run --scope --user discord +hc spawn systemd-run --scope --user qutebrowser +{{end}} + ### set wallpaper #feh --bg-center ${HOME}/config/wallpaper/RoyalRadish-Wallpaper_practice_12.png diff --git a/dot_config/herbstluftwm/executable_panel-generator b/dot_config/herbstluftwm/executable_panel-generator index 96a4b44..aed54bb 100644 --- a/dot_config/herbstluftwm/executable_panel-generator +++ b/dot_config/herbstluftwm/executable_panel-generator @@ -20,16 +20,19 @@ update() { fi } -( -playerctl metadata --format '{{playerName}}|{{status}}|{{artist}}|{{xesam:comment}}|{{title}}' -a -F | -while IFS='|' read -r player status artist comment title -do - test -n "$status" || status=off - update "$(echo -en "player\t$player")" "$(printf '%s\t%s\t%s\t%s' "$status" "$artist" "$comment" "$title")" -done -notify-send -u critical "Player" "Player monitoring loop failed!" +if type playerctl &>/dev/null +then + ( + playerctl metadata --format '{{playerName}}|{{status}}|{{artist}}|{{xesam:comment}}|{{title}}' -a -F | + while IFS='|' read -r player status artist comment title + do + test -n "$status" || status=off + update "$(echo -en "player\t$player")" "$(printf '%s\t%s\t%s\t%s' "$status" "$artist" "$comment" "$title")" + done + notify-send -u critical "Player" "Player monitoring loop failed!" -) & + ) & +fi #pids="$!" ( diff --git a/dot_config/herbstluftwm/executable_panel-handler b/dot_config/herbstluftwm/executable_panel-handler index c5f8938..83bdbac 100644 --- a/dot_config/herbstluftwm/executable_panel-handler +++ b/dot_config/herbstluftwm/executable_panel-handler @@ -247,7 +247,7 @@ hc --idle | { memory) if (( (cmd[2]*100) / cmd[1] > 50 )) then - memory=" $(LC_ALL=C numfmt --from-unit=Ki --to=iec --format %.2f ${cmd[2]}) $separator" + memory=" $(LC_ALL=C numfmt --from-unit=Ki --to=iec --format %.2f "${cmd[2]}") $separator" else memory="" fi @@ -270,7 +270,7 @@ hc --idle | { _net_status="${cmd[1]}" if [[ "$_net_status" == 'UP' ]] then - network="$(xargs <<<"󰈀 ${cmd[2]}")" + network="󰛳 $(xargs <<<"${cmd[2]}") $separator" else network= fi @@ -292,7 +292,7 @@ hc --idle | { first_loop=0 done -} | lemonbar -f "Hack-10" -f "Symbols Nerd Font Mono-10" -a30 -B "$col_bg" -F "$col_fg" -u 1 | sh +} | lemonbar -f "Hack-10" -f "Symbols Nerd Font Mono-10" -f "Noto Color Emoji-10" -a30 -B "$col_bg" -F "$col_fg" -u 1 | sh #} | lemonbar -f "DejaVu Sans-9" -f "Font Awesome-9" -f "Symbols Nerd Font-9" #} | tee >(lemonbar -f "DejaViu Sans-9" -f "Font Awesome-9" ) diff --git a/dot_config/nvim/lua/configs/packages/lsp.lua b/dot_config/nvim/lua/configs/packages/lsp.lua index c1df8f6..3b0bf24 100644 --- a/dot_config/nvim/lua/configs/packages/lsp.lua +++ b/dot_config/nvim/lua/configs/packages/lsp.lua @@ -68,27 +68,13 @@ local server_configs = function() end) end, }, -- }}} - yamlls = { + yamlls = require('yaml-companion').setup { -- {{{ settings = { yaml = { - format = { enable = true }, - validate = { enable = true }, completion = { enable = true }, - hover = { enable = true }, keyOrdering = false, - schemas = vim.tbl_extend('force', - require('schemastore').yaml.schemas(), - { - kubernetes = { - '**/k8s/**/!(kustomization).yaml', - '**/k8s/**/!(kustomization).yml', - '**/kubernetes/!(kustomization).yaml', - '**/kubernetes/!(kustomization).yml', - '**/kustomize/**/!(kustomization).yaml', - '**/kustomize/**/!(kustomization).yml', - }, - }), + schemas = require('schemastore').yaml.schemas(), }, }, }, -- }}} @@ -397,4 +383,11 @@ return { { 'Hoffs/omnisharp-extended-lsp.nvim', lazy = true }, { 'b0o/schemastore.nvim', lazy = true }, { 'Issafalcon/lsp-overloads.nvim', lazy = true }, + { + 'someone-stole-my-name/yaml-companion.nvim', + dependencies = { + { 'neovim/nvim-lspconfig' }, + { 'nvim-lua/plenary.nvim' }, + }, + }, } diff --git a/dot_config/nvim/lua/configs/packages/treesitter.lua b/dot_config/nvim/lua/configs/packages/treesitter.lua index 45a87e8..bca7448 100644 --- a/dot_config/nvim/lua/configs/packages/treesitter.lua +++ b/dot_config/nvim/lua/configs/packages/treesitter.lua @@ -3,7 +3,7 @@ local M = { dependencies = { 'nvim-treesitter/playground', 'nvim-treesitter/nvim-treesitter-textobjects', - { 'yioneko/nvim-yati', tag = 'legacy' }, + -- { 'yioneko/nvim-yati', tag = 'legacy' }, -- { dir = '/home/sogun/devel/nvim-yati/', } }, event = 'BufRead', @@ -95,7 +95,7 @@ function M.config() disable = { 'help' }, }, playground = { enable = true }, - yati = { enable = true }, + -- yati = { enable = true }, incremental_selection = { enable = true, keymaps = { diff --git a/dot_config/zsh/include/aliases.zsh b/dot_config/zsh/include/aliases.zsh index 4491950..87d138e 100644 --- a/dot_config/zsh/include/aliases.zsh +++ b/dot_config/zsh/include/aliases.zsh @@ -1,4 +1,4 @@ -alias hosts="sudo vim /etc/hosts" +alias hosts="sudo nvim /etc/hosts" alias vi=nvim alias vim=nvim diff --git a/dot_config/zsh/include/env.zsh b/dot_config/zsh/include/env.zsh index 36bdba0..105333f 100644 --- a/dot_config/zsh/include/env.zsh +++ b/dot_config/zsh/include/env.zsh @@ -6,9 +6,14 @@ export STACK_ROOT=${XDG_DATA_HOME:-$HOME/.local/share}/stack export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse -export PATH=~/bin:~/.local/bin:$GOPATH/bin:~/.nix-profile/bin:$PATH +export KREW_NO_UPGRADE_CHECK=1 +export KREW_ROOT=${XDG_DATA_HOME:-$HOME/.local/share/krew} + +export PATH=${KREW_ROOT:-$HOME/.krew}/bin:~/bin:~/.local/bin:$GOPATH/bin:~/.nix-profile/bin:$PATH export EDITOR=nvim +export DOCKER_HOST=unix:///run/user/1000/podman/podman.sock + # make locales work in nix shell export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive diff --git a/dot_config/zsh/include/functions.zsh b/dot_config/zsh/include/functions.zsh index aafe390..be99723 100644 --- a/dot_config/zsh/include/functions.zsh +++ b/dot_config/zsh/include/functions.zsh @@ -36,3 +36,13 @@ man() { return 1 fi } + +inplace() { + local file=$1 + shift + + local tmp=$(mktemp) + + cp $file $tmp + $@ < $tmp > $file +} diff --git a/dot_config/zsh/include/p10k.zsh b/dot_config/zsh/include/p10k.zsh index 52db502..30ff305 100644 --- a/dot_config/zsh/include/p10k.zsh +++ b/dot_config/zsh/include/p10k.zsh @@ -110,7 +110,7 @@ # Blue current directory. typeset -g POWERLEVEL9K_DIR_FOREGROUND=$blue - typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|k9s' + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|k9s|flux' # Context format when root: user@host. The first part white, the rest grey. typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE="%F{$white}%n%f%F{$grey}@%m%f"