From 47fccf586e2c348ede3c9333151c0e928a3c95ec Mon Sep 17 00:00:00 2001 From: aduhayon Date: Wed, 10 Aug 2022 09:56:52 +0200 Subject: [PATCH 01/26] merge: main --- .gitmodules | 2 +- .zshenv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 570624f..f933284 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = https://github.com/lukas-reineke/indent-blankline.nvim.git [submodule ".config/nvim/pack/plugins/opt/nvim-lspconfig"] path = .config/nvim/pack/plugins/opt/nvim-lspconfig - url = https://github.com/neovim/nvim-lspconfig + url = https://github.com/neovim/nvim-lspconfig.git [submodule ".config/nvim/pack/plugins/opt/nvim-treesitter"] path = .config/nvim/pack/plugins/opt/nvim-treesitter url = https://github.com/nvim-treesitter/nvim-treesitter.git diff --git a/.zshenv b/.zshenv index 8a1251f..6809e98 100644 --- a/.zshenv +++ b/.zshenv @@ -1,6 +1,6 @@ export PYENV_ROOT="$HOME/.pyenv" -PATH="$HOME/bin:$HOME/.local/bin:$PYENV_ROOT/bin:$PATH" +path=(~/bin ~/.local/bin "$PYENV_ROOT"/bin "$path") export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" From 601e68092bad8a227b263430697f476eb254d971 Mon Sep 17 00:00:00 2001 From: aduhayon Date: Wed, 10 Aug 2022 09:59:03 +0200 Subject: [PATCH 02/26] fix: path array not expanding properly --- .zshenv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zshenv b/.zshenv index 6809e98..e0d89b8 100644 --- a/.zshenv +++ b/.zshenv @@ -1,6 +1,6 @@ export PYENV_ROOT="$HOME/.pyenv" -path=(~/bin ~/.local/bin "$PYENV_ROOT"/bin "$path") +path=(~/bin ~/.local/bin "$PYENV_ROOT"/bin $path) export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" From a5b4d571c4fc21487a0690d695dad433d633ec85 Mon Sep 17 00:00:00 2001 From: aduhayon Date: Wed, 10 Aug 2022 15:37:04 +0200 Subject: [PATCH 03/26] feat: flameshot autostart --- .config/awesome/rc.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 083878f..d4ad299 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -647,6 +647,7 @@ apps = { "killall cbatticon", "cbatticon BAT0 -i symbolic", "numlockx", + "flameshot", } for _, app in ipairs(apps) do From 73f138bcc9d6fe397bff0c912014764a3ddf84c5 Mon Sep 17 00:00:00 2001 From: aduhayon Date: Wed, 10 Aug 2022 15:37:35 +0200 Subject: [PATCH 04/26] feat: set-vol config for old pactl --- bin/set-vol | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/set-vol b/bin/set-vol index 0fc265c..0a1d88c 100755 --- a/bin/set-vol +++ b/bin/set-vol @@ -2,7 +2,12 @@ set -e SINK='@DEFAULT_SINK@' -CUR="$(pactl get-sink-volume "$SINK" | awk '$1 == "Volume:" {print substr($5, 1, length($5) - 1)}')" +CUR_FILE=/var/tmp/current_volume + +set +e +CUR="$(cat "$CUR_FILE" || echo 50)" +set -e + CUR="$((CUR - CUR % "$1"))" case "${1:0:1}" in @@ -23,4 +28,5 @@ esac pactl set-sink-volume "$SINK" "$NEW%" pactl set-sink-mute "$SINK" 0 +echo "$NEW" > "$CUR_FILE" echo "$NEW" From 4cd15f1681754fdcf172eaa8823b067b222a1386 Mon Sep 17 00:00:00 2001 From: aduhayon Date: Wed, 10 Aug 2022 15:37:57 +0200 Subject: [PATCH 05/26] feat: dockerfile tab size and autoremove trailing spaces --- .config/nvim/ftplugin/dockerfile.lua | 2 -- .config/nvim/init.lua | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/nvim/ftplugin/dockerfile.lua b/.config/nvim/ftplugin/dockerfile.lua index ebc6690..6fc764c 100644 --- a/.config/nvim/ftplugin/dockerfile.lua +++ b/.config/nvim/ftplugin/dockerfile.lua @@ -2,7 +2,5 @@ require'lspconfig'.dockerls.setup {} -- variables -vim.o.shiftwidth = 2 -vim.o.tabstop = 2 -- keybindings diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 3639483..689f596 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -32,6 +32,8 @@ vim.o.foldlevel = 99 vim.o.grepprg = "grep -rn $*" vim.wo.cc = "80" +vim.cmd("au BufWrite * :%s/\\s\\+$//e") + -- keybindings vim.keymap.set("t", "", "") From cb4d42dc442e359e7b7baa063d36755a0deb7c89 Mon Sep 17 00:00:00 2001 From: aduhayon Date: Wed, 10 Aug 2022 15:38:41 +0200 Subject: [PATCH 06/26] feat: update submodule --- .config/zsh/ohmyzsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/zsh/ohmyzsh b/.config/zsh/ohmyzsh index 97134d1..ff2b0e4 160000 --- a/.config/zsh/ohmyzsh +++ b/.config/zsh/ohmyzsh @@ -1 +1 @@ -Subproject commit 97134d1eed19b72a9c4bf90a2effa847221608bf +Subproject commit ff2b0e48aef19655316eb9d52b893bd713eb0759 From 78f6db3126c37a37208abf12e314b2bfc4c88fa4 Mon Sep 17 00:00:00 2001 From: aduhayon Date: Thu, 11 Aug 2022 16:07:32 +0200 Subject: [PATCH 07/26] feat: dkpurge bin instead of function to run it as root --- .config/zsh/.docker_aliases | 8 ----- bin/dkpurge | 60 +++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 8 deletions(-) create mode 100755 bin/dkpurge diff --git a/.config/zsh/.docker_aliases b/.config/zsh/.docker_aliases index b53c52f..c94be82 100644 --- a/.config/zsh/.docker_aliases +++ b/.config/zsh/.docker_aliases @@ -19,14 +19,6 @@ alias dkvc='docker volume create' alias dkvls='docker volume ls' alias dkvrm='docker volume rm' -function dkpurge() { - PS="$(docker ps -aq)" - - echo "$PS" | xargs docker stop - echo "$PS" | xargs docker rm - docker image prune -f -} - # docker-compose alias dc='docker-compose' alias dcd='docker-compose down' diff --git a/bin/dkpurge b/bin/dkpurge new file mode 100755 index 0000000..b7a0dcd --- /dev/null +++ b/bin/dkpurge @@ -0,0 +1,60 @@ +#!/bin/bash + +function read_yn() { + local ANS + + $ECHO -n "$1 [Y/n]" + read -r ANS + + case "$ANS" in + 'y'|'Y'|'Yes'|'') + return 0 + ;; + *) + return 1 + ;; + esac +} + +NORMAL='\e[0m' +RED='\e[31m' + +ECHO='echo -e' + +PS="$(docker ps -aq 2> /dev/null)" + +if [ "$?" ] && [ "$EUID" != 0 ]; then + sudo -- "$0" "$@" + exit +fi + +VOL="$(docker volume ls -q 2> /dev/null)" +IMG="$(docker images -q 2> /dev/null)" + + +if [ -n "$PS" ]; then + $ECHO "${RED}CONTAINERS${NORMAL}" + docker ps -a + + read_yn "Clean Containers?" && \ + echo "$PS" | xargs docker rm -f +fi + +if [ -n "$VOL" ]; then + $ECHO "${RED}VOLUMES${NORMAL}" + docker volume ls + + read_yn "Clean Volumes?" && \ + echo "$VOL" | xargs docker volume rm -f +fi + +if [ -n "$IMG" ]; then + $ECHO "${RED}IMAGES${NORMAL}" + docker images + + if read_yn "Clean Images?"; then + echo "$IMG" | xargs docker image rm -f + elif read_yn "Prune Images?"; then + docker image prune -f + fi +fi From fced53c1351c3d955976712a87d5bc000f050d5b Mon Sep 17 00:00:00 2001 From: aduhayon Date: Thu, 11 Aug 2022 16:09:46 +0200 Subject: [PATCH 08/26] feat: lsp bindings --- .config/nvim/ftplugin/dockerfile.lua | 4 ++- .config/nvim/ftplugin/python.lua | 4 ++- .config/nvim/ftplugin/sh.lua | 4 ++- .config/nvim/ftplugin/yaml.lua | 4 ++- .config/nvim/init.lua | 2 -- .../nvim/{lspconfig.lua => lua/lspbinds.lua} | 25 +------------------ 6 files changed, 13 insertions(+), 30 deletions(-) rename .config/nvim/{lspconfig.lua => lua/lspbinds.lua} (72%) diff --git a/.config/nvim/ftplugin/dockerfile.lua b/.config/nvim/ftplugin/dockerfile.lua index 6fc764c..435b148 100644 --- a/.config/nvim/ftplugin/dockerfile.lua +++ b/.config/nvim/ftplugin/dockerfile.lua @@ -1,5 +1,7 @@ -- packages -require'lspconfig'.dockerls.setup {} +require'lspconfig'.dockerls.setup { + on_attach = require'lspbinds', +} -- variables diff --git a/.config/nvim/ftplugin/python.lua b/.config/nvim/ftplugin/python.lua index 303b8fa..dfc577a 100644 --- a/.config/nvim/ftplugin/python.lua +++ b/.config/nvim/ftplugin/python.lua @@ -1,5 +1,7 @@ -- packages -require'lspconfig'.pyright.setup {} +require'lspconfig'.pyright.setup { + on_attach = require'lspbinds', +} -- variables vim.cmd("let g:black_linelength=79") diff --git a/.config/nvim/ftplugin/sh.lua b/.config/nvim/ftplugin/sh.lua index bd8f24a..966fa33 100644 --- a/.config/nvim/ftplugin/sh.lua +++ b/.config/nvim/ftplugin/sh.lua @@ -1,5 +1,7 @@ -- packages -require'lspconfig'.bashls.setup{} +require'lspconfig'.bashls.setup{ + on_attach = require'lspbinds', +} -- variables diff --git a/.config/nvim/ftplugin/yaml.lua b/.config/nvim/ftplugin/yaml.lua index 55c92e5..1bfc25b 100644 --- a/.config/nvim/ftplugin/yaml.lua +++ b/.config/nvim/ftplugin/yaml.lua @@ -1,5 +1,7 @@ -- packages -require'lspconfig'.yamlls.setup {} +require'lspconfig'.yamlls.setup { + on_attach = require'lspbinds', +} -- variables vim.o.shiftwidth = 2 diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 689f596..79953a8 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -43,5 +43,3 @@ vim.keymap.set("n", "", "k" ) vim.keymap.set("n", "", "l" ) vim.keymap.set("n", "gf", "gF" ) - -vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) diff --git a/.config/nvim/lspconfig.lua b/.config/nvim/lua/lspbinds.lua similarity index 72% rename from .config/nvim/lspconfig.lua rename to .config/nvim/lua/lspbinds.lua index 85c5217..56dfad6 100644 --- a/.config/nvim/lspconfig.lua +++ b/.config/nvim/lua/lspbinds.lua @@ -6,9 +6,7 @@ vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) --- Use an on_attach function to only map the following keys --- after the language server attaches to the current buffer -local on_attach = function(client, bufnr) +return function(client, bufnr) -- Enable completion triggered by vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') @@ -31,24 +29,3 @@ local on_attach = function(client, bufnr) vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) vim.keymap.set('n', 'f', vim.lsp.buf.formatting, bufopts) end - -local lsp_flags = { - -- This is the default in Nvim 0.7+ - debounce_text_changes = 150, -} -require('lspconfig')['pyright'].setup{ - on_attach = on_attach, - flags = lsp_flags, -} -require('lspconfig')['tsserver'].setup{ - on_attach = on_attach, - flags = lsp_flags, -} -require('lspconfig')['rust_analyzer'].setup{ - on_attach = on_attach, - flags = lsp_flags, - -- Server-specific settings... - settings = { - ["rust-analyzer"] = {} - } -} From 4acdf4fc3cbaf33c97ca212416c23c95eaa69613 Mon Sep 17 00:00:00 2001 From: aduhayon Date: Thu, 11 Aug 2022 17:45:22 +0200 Subject: [PATCH 09/26] feat: dkpurge prune / clean choice --- bin/dkpurge | 59 ++++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/bin/dkpurge b/bin/dkpurge index b7a0dcd..15008b3 100755 --- a/bin/dkpurge +++ b/bin/dkpurge @@ -1,22 +1,7 @@ #!/bin/bash -function read_yn() { - local ANS - - $ECHO -n "$1 [Y/n]" - read -r ANS - - case "$ANS" in - 'y'|'Y'|'Yes'|'') - return 0 - ;; - *) - return 1 - ;; - esac -} - NORMAL='\e[0m' +BOLD='\e[1m' RED='\e[31m' ECHO='echo -e' @@ -33,28 +18,46 @@ IMG="$(docker images -q 2> /dev/null)" if [ -n "$PS" ]; then - $ECHO "${RED}CONTAINERS${NORMAL}" + $ECHO "${BOLD}${RED}CONTAINERS${NORMAL}" docker ps -a - read_yn "Clean Containers?" && \ - echo "$PS" | xargs docker rm -f + $ECHO -n "Prune Containers? [Y/n/a] " + read -r ANS + case "${ANS,,}" in + 'y'|'yes'|'') + echo "$PS" | xargs docker rm 2> /dev/null + ;; + 'a'|'all') + echo "$PS" | xargs docker rm -f + ;; + esac fi if [ -n "$VOL" ]; then - $ECHO "${RED}VOLUMES${NORMAL}" + $ECHO "${BOLD}${RED}VOLUMES${NORMAL}" docker volume ls - read_yn "Clean Volumes?" && \ - echo "$VOL" | xargs docker volume rm -f + $ECHO -n "Prune Volumes? [Y/n] " + read -r ANS + case "${ANS,,}" in + 'y'|'yes'|'') + echo "$VOL" | xargs docker volume rm -f 2> /dev/null + ;; + esac fi if [ -n "$IMG" ]; then - $ECHO "${RED}IMAGES${NORMAL}" + $ECHO "${BOLD}${RED}IMAGES${NORMAL}" docker images - if read_yn "Clean Images?"; then - echo "$IMG" | xargs docker image rm -f - elif read_yn "Prune Images?"; then - docker image prune -f - fi + $ECHO -n "Prune Images? [Y/n/a] " + read -r ANS + case "${ANS,,}" in + 'y'|'yes'|'') + docker image prune -f + ;; + 'a'|'all') + echo "$IMG" | xargs docker image rm -f 2> /dev/null + ;; + esac fi From 6a8239a7c68f337f90045d5e87f4eee502b5b797 Mon Sep 17 00:00:00 2001 From: aduhayon Date: Thu, 11 Aug 2022 17:50:11 +0200 Subject: [PATCH 10/26] feat: disable less histfile, cleanup quotes --- .zshenv | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.zshenv b/.zshenv index e0d89b8..92d978e 100644 --- a/.zshenv +++ b/.zshenv @@ -2,16 +2,17 @@ export PYENV_ROOT="$HOME/.pyenv" path=(~/bin ~/.local/bin "$PYENV_ROOT"/bin $path) -export XDG_CACHE_HOME="$HOME/.cache" -export XDG_CONFIG_HOME="$HOME/.config" -export XDG_DATA_HOME="$HOME/.local/share" -export XDG_STATE_HOME="$HOME/.local/state" -export XDG_CONFIG_DIRS="/etc/xdg" -export XDG_DATA_DIRS="/usr/local/share/:/usr/share/" +export XDG_CACHE_HOME="$HOME"/.cache +export XDG_CONFIG_HOME="$HOME"/.config +export XDG_DATA_HOME="$HOME"/.local/share +export XDG_STATE_HOME="$HOME"/.local/state +export XDG_CONFIG_DIRS=/etc/xdg +export XDG_DATA_DIRS='/usr/local/share/:/usr/share/' export ZDOTDIR="$HOME"/.config/zsh export HISTFILE="$XDG_STATE_HOME"/zsh/history export MOZ_ENABLE_WAYLAND=1 +export LESSHISTFILE='-' -export EDITOR="nvim" +export EDITOR='nvim' From c56b1fd4215977b69be8b55641467d50aadc36b2 Mon Sep 17 00:00:00 2001 From: aduhayon Date: Thu, 11 Aug 2022 17:56:59 +0200 Subject: [PATCH 11/26] feat: docker aliases: dkr dk*lsq --- .config/zsh/.docker_aliases | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/zsh/.docker_aliases b/.config/zsh/.docker_aliases index c94be82..1ddd9f4 100644 --- a/.config/zsh/.docker_aliases +++ b/.config/zsh/.docker_aliases @@ -2,21 +2,25 @@ alias dk='docker' alias dkb='docker build .' alias dkc='docker create' -alias dkex='docker exec -it' +alias dkex='docker exec -i -t' alias dki='docker image' alias dkic='docker image create' alias dkils='docker image ls' +alias dkilsq='docker image ls -q' alias dkirm='docker image rm' alias dkl='docker pull' alias dklo='docker logs -f' alias dkp='docker push' alias dkps='docker ps' -alias dkpsa='docker ps -a' +alias dkpsaq='docker ps -a -q' +alias dkpsq='docker ps -q' +alias dkr='docker run -i -t' alias dkrm='docker rm' alias dkt='docker tag' alias dkv='docker volume' alias dkvc='docker volume create' alias dkvls='docker volume ls' +alias dkvlsq='docker volume ls -q' alias dkvrm='docker volume rm' # docker-compose From e07e6f6b6b3db61d16e6ad4a0898af3e39126415 Mon Sep 17 00:00:00 2001 From: aduhayon Date: Fri, 12 Aug 2022 17:20:36 +0200 Subject: [PATCH 12/26] feat: dk*a and dk*aq aliases --- .config/zsh/.docker_aliases | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/zsh/.docker_aliases b/.config/zsh/.docker_aliases index 1ddd9f4..4e608ac 100644 --- a/.config/zsh/.docker_aliases +++ b/.config/zsh/.docker_aliases @@ -6,12 +6,15 @@ alias dkex='docker exec -i -t' alias dki='docker image' alias dkic='docker image create' alias dkils='docker image ls' +alias dkilsa='docker image ls -a' +alias dkilsaq='docker image ls -a -q' alias dkilsq='docker image ls -q' alias dkirm='docker image rm' alias dkl='docker pull' alias dklo='docker logs -f' alias dkp='docker push' alias dkps='docker ps' +alias dkpsa='docker ps -a' alias dkpsaq='docker ps -a -q' alias dkpsq='docker ps -q' alias dkr='docker run -i -t' From 7597f12c93b16e20797158da40e4e0b63c462894 Mon Sep 17 00:00:00 2001 From: aduhayon Date: Fri, 12 Aug 2022 18:03:59 +0200 Subject: [PATCH 13/26] feat: docker inspect aliases + cleanup docker aliases --- .config/zsh/.docker_aliases | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.config/zsh/.docker_aliases b/.config/zsh/.docker_aliases index 4e608ac..6b8569f 100644 --- a/.config/zsh/.docker_aliases +++ b/.config/zsh/.docker_aliases @@ -1,30 +1,40 @@ -# docker alias dk='docker' + +# containers +alias dkca='docker container ls -a' +alias dkcaq='docker container ls -a -q' +alias dkci='docker container inspect' +alias dkcls='docker container ls' +alias dkcq='docker container ls -q' +alias dkcrm='docker container rm' +alias dkcrmf='docker container rm -f' +alias dkex='docker container exec -i -t' +alias dklo='docker container logs -f' +alias dkr='docker container run -i -t' + +# images alias dkb='docker build .' -alias dkc='docker create' -alias dkex='docker exec -i -t' alias dki='docker image' alias dkic='docker image create' +alias dkii='docker image inspect' alias dkils='docker image ls' alias dkilsa='docker image ls -a' alias dkilsaq='docker image ls -a -q' alias dkilsq='docker image ls -q' alias dkirm='docker image rm' +alias dkirmf='docker image rm -f' alias dkl='docker pull' -alias dklo='docker logs -f' alias dkp='docker push' -alias dkps='docker ps' -alias dkpsa='docker ps -a' -alias dkpsaq='docker ps -a -q' -alias dkpsq='docker ps -q' -alias dkr='docker run -i -t' -alias dkrm='docker rm' alias dkt='docker tag' + +# volumes alias dkv='docker volume' alias dkvc='docker volume create' +alias dkvi='docker volume inspect' alias dkvls='docker volume ls' alias dkvlsq='docker volume ls -q' alias dkvrm='docker volume rm' +alias dkvrmf='docker volume rm -f' # docker-compose alias dc='docker-compose' From 2303a281080a860f3cfc846c49ca2f6077d1ef9c Mon Sep 17 00:00:00 2001 From: AngeD Date: Fri, 12 Aug 2022 22:20:34 +0200 Subject: [PATCH 14/26] feat: update submodules --- .config/nvim/pack/plugins/opt/black | 2 +- .config/nvim/pack/plugins/opt/nvim-treesitter | 2 +- .config/zsh/ohmyzsh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/nvim/pack/plugins/opt/black b/.config/nvim/pack/plugins/opt/black index 507234c..6064a43 160000 --- a/.config/nvim/pack/plugins/opt/black +++ b/.config/nvim/pack/plugins/opt/black @@ -1 +1 @@ -Subproject commit 507234c47d39f5b1d8289cdd49994e03dd97bcb4 +Subproject commit 6064a435453cdba47c43d71f3d0ea1aa19a29206 diff --git a/.config/nvim/pack/plugins/opt/nvim-treesitter b/.config/nvim/pack/plugins/opt/nvim-treesitter index e7b5e92..9b3f127 160000 --- a/.config/nvim/pack/plugins/opt/nvim-treesitter +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter @@ -1 +1 @@ -Subproject commit e7b5e92d46355919e96e78f596bd5297c9ef77dd +Subproject commit 9b3f1275018b7cac15ef07af880e1f010a959963 diff --git a/.config/zsh/ohmyzsh b/.config/zsh/ohmyzsh index ff2b0e4..835a0a5 160000 --- a/.config/zsh/ohmyzsh +++ b/.config/zsh/ohmyzsh @@ -1 +1 @@ -Subproject commit ff2b0e48aef19655316eb9d52b893bd713eb0759 +Subproject commit 835a0a5d17765243cabee782acb5905a9aab33c3 From 8882d4f2460ef080c03e4f739379c8966679d46f Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 16 Aug 2022 10:31:41 +0200 Subject: [PATCH 15/26] feat: picom and kitty dotfiles --- .config/awesome/rc.lua | 2 +- .config/kitty/kitty.conf | 6 + .config/picom.conf | 423 +++++++++++++++++++++++++++++++++++++++ .xinitrc | 6 + 4 files changed, 436 insertions(+), 1 deletion(-) create mode 100644 .config/kitty/kitty.conf create mode 100644 .config/picom.conf create mode 100644 .xinitrc diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index d4ad299..80cec39 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -52,7 +52,7 @@ end -- Themes define colours, icons, font and wallpapers. beautiful.init(gears.filesystem.get_configuration_dir() .. "theme.lua") -terminal = "alacritty" +terminal = "kitty" editor = os.getenv("EDITOR") or "nvim" editor_cmd = terminal .. " -e " .. editor diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf new file mode 100644 index 0000000..eac5eae --- /dev/null +++ b/.config/kitty/kitty.conf @@ -0,0 +1,6 @@ +update_check_interval 0 + +font_family DejaVuSansMono Nerd Font Mono +font_size 14.0 + +background_opacity 0.8 diff --git a/.config/picom.conf b/.config/picom.conf new file mode 100644 index 0000000..487007b --- /dev/null +++ b/.config/picom.conf @@ -0,0 +1,423 @@ +################################# +# Shadows # +################################# + + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +# shadow = false +#shadow = true; + +# The blur radius for shadows, in pixels. (defaults to 12) +# shadow-radius = 12 +shadow-radius = 7; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +# shadow-opacity = .75 + +# The left offset for shadows, in pixels. (defaults to -15) +# shadow-offset-x = -15 +shadow-offset-x = -7; + +# The top offset for shadows, in pixels. (defaults to -15) +# shadow-offset-y = -15 +shadow-offset-y = -7; + +# Avoid drawing shadows on dock/panel windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dock-shadow = false + +# Don't draw shadows on drag-and-drop windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dnd-shadow = false + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-blue = 0 + +# Do not paint shadows on shaped windows. Note shaped windows +# here means windows setting its shape through X Shape extension. +# Those using ARGB background is beyond our control. +# Deprecated, use +# shadow-exclude = 'bounding_shaped' +# or +# shadow-exclude = 'bounding_shaped && !rounded_corners' +# instead. +# +# shadow-ignore-shaped = '' + +# Specify a list of conditions of windows that should have no shadow. +# +# examples: +# shadow-exclude = "n:e:Notification"; +# +# shadow-exclude = [] +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "_GTK_FRAME_EXTENTS@:c" +]; + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +# +# shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular Xinerama screen to the screen. +# xinerama-shadow-crop = false + + +################################# +# Fading # +################################# + + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +# fading = false +#fading = true + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +# fade-in-step = 0.028 +fade-in-step = 0.03; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +# fade-out-step = 0.03 +fade-out-step = 0.03; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) +# fade-delta = 10 + +# Specify a list of conditions of windows that should not be faded. +# fade-exclude = [] + +# Do not fade on window open/close. +# no-fading-openclose = false + +# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. +# no-fading-destroyed-argb = false + + +################################# +# Transparency / Opacity # +################################# + + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +# inactive-opacity = 1 +#inactive-opacity = 0.8; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +# frame-opacity = 1.0 +#frame-opacity = 0.7; + +# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) +# menu-opacity = 1.0 + +# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. +# inactive-opacity-override = true +inactive-opacity-override = false; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +# active-opacity = 1.0 + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +# inactive-dim = 0.0 + +# Specify a list of conditions of windows that should always be considered focused. +# focus-exclude = [] +focus-exclude = [ "class_g = 'Cairo-clock'" ]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +# opacity-rule = [] + + +################################# +# Background-Blurring # +################################# + + +# Parameters for background blurring, see the *BLUR* section for more information. +# blur-method = +# blur-size = 12 +# +# blur-deviation = false + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +# blur-background = false + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +# blur-background-frame = false + + +# Use fixed blur strength rather than adjusting according to window opacity. +# blur-background-fixed = false + + +# Specify the blur convolution kernel, with the following format: +# example: +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# +# blur-kern = '' +blur-kern = "3x3box"; + + +# Exclude conditions for background blur. +# blur-background-exclude = [] +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "_GTK_FRAME_EXTENTS@:c" +]; + +################################# +# General Settings # +################################# + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. +# `xrender` is the default one. +# +# backend = 'glx' +backend = "glx"; + +# Enable/disable VSync. +# vsync = false +vsync = true + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +# +# mark-wmwin-focused = false +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +# mark-ovredir-focused = false +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# detect-rounded-corners = false +detect-rounded-corners = true; + +# Detect '_NET_WM_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + +# Specify refresh rate of the screen. If not specified or 0, picom will +# try detecting this with X RandR extension. +# +# refresh-rate = 60 +refresh-rate = 0 + +# Limit picom to repaint at most once every 1 / 'refresh_rate' second to +# boost performance. This should not be used with +# vsync drm/opengl/opengl-oml +# as they essentially does sw-opti's job already, +# unless you wish to specify a lower refresh rate than the actual value. +# +# sw-opti = + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, +# provided that the WM supports it. +# +# use-ewmh-active-win = false + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. +# +# unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +# unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +# unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# detect-transient = false +detect-transient = true + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if +# detect-transient is enabled, too. +# +# detect-client-leader = false +detect-client-leader = true + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +# glx-no-stencil = false + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, +# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). +# Recommended if it works. +# +# glx-no-rebind-pixmap = false + +# Disable the use of damage information. +# This cause the whole screen to be redrawn everytime, instead of the part of the screen +# has actually changed. Potentially degrades the performance, but might fix some artifacts. +# The opposing option is use-damage +# +# no-use-damage = false +use-damage = true + +# Use X Sync fence to sync clients' draw calls, to make sure all draw +# calls are finished before picom starts drawing. Needed on nvidia-drivers +# with GLX backend for some users. +# +# xrender-sync-fence = false + +# GLX backend: Use specified GLSL fragment shader for rendering window contents. +# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` +# in the source tree for examples. +# +# glx-fshader-win = '' + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +# +# force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +# +# no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) +# +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +# +# transparent-clipping = false + +# Set the log level. Possible values are: +# "trace", "debug", "info", "warn", "error" +# in increasing level of importance. Case doesn't matter. +# If using the "TRACE" log level, it's better to log into a file +# using *--log-file*, since it can generate a huge stream of logs. +# +# log-level = "debug" +log-level = "warn"; + +# Set the log file. +# If *--log-file* is never specified, logs will be written to stderr. +# Otherwise, logs will to written to the given file, though some of the early +# logs might still be written to the stderr. +# When setting this option from the config file, it is recommended to use an absolute path. +# +# log-file = '/path/to/your/log/file' + +# Show all X errors (for debugging) +# show-all-xerrors = false + +# Write process ID to a file. +# write-pid-path = '/path/to/your/log/file' + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# +#wintypes: +#{ +# tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; +# dock = { shadow = false; } +# dnd = { shadow = false; } +# popup_menu = { opacity = 0.8; } +# dropdown_menu = { opacity = 0.8; } +#}; diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..c84537f --- /dev/null +++ b/.xinitrc @@ -0,0 +1,6 @@ +#!/bin/sh + +xrandr \ + --output HDMI-2 --auto --primary + --output eDP-1 --left-of HDMI-2 +exec x-window-manager From 1d12ec064ddeaf8860760742fffafdf4b610a3a7 Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 16 Aug 2022 10:31:57 +0200 Subject: [PATCH 16/26] feat: update submodules --- .config/nvim/pack/plugins/opt/black | 2 +- .config/nvim/pack/plugins/opt/nvim-treesitter | 2 +- .config/zsh/ohmyzsh | 2 +- .pyenv | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/nvim/pack/plugins/opt/black b/.config/nvim/pack/plugins/opt/black index 6064a43..4ebf14d 160000 --- a/.config/nvim/pack/plugins/opt/black +++ b/.config/nvim/pack/plugins/opt/black @@ -1 +1 @@ -Subproject commit 6064a435453cdba47c43d71f3d0ea1aa19a29206 +Subproject commit 4ebf14d17ed544be893be5706c02116fd8b83b4c diff --git a/.config/nvim/pack/plugins/opt/nvim-treesitter b/.config/nvim/pack/plugins/opt/nvim-treesitter index 9b3f127..1b99f94 160000 --- a/.config/nvim/pack/plugins/opt/nvim-treesitter +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter @@ -1 +1 @@ -Subproject commit 9b3f1275018b7cac15ef07af880e1f010a959963 +Subproject commit 1b99f94fc254f0f5b1498674f62a8dd2f61c90da diff --git a/.config/zsh/ohmyzsh b/.config/zsh/ohmyzsh index 835a0a5..3668ec2 160000 --- a/.config/zsh/ohmyzsh +++ b/.config/zsh/ohmyzsh @@ -1 +1 @@ -Subproject commit 835a0a5d17765243cabee782acb5905a9aab33c3 +Subproject commit 3668ec2a82250020ca0c285ef8b277f1385a8085 diff --git a/.pyenv b/.pyenv index ae22c69..afeb971 160000 --- a/.pyenv +++ b/.pyenv @@ -1 +1 @@ -Subproject commit ae22c6950563af3e0ff5405367d42ceed40997d5 +Subproject commit afeb971fa25b343760051423149aaa4514f3d41d From f71125b87dd7fdb0d1860f0316df75ddbafb2e0b Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 16 Aug 2022 11:21:26 +0200 Subject: [PATCH 17/26] feat: screenshot keys --- .config/awesome/rc.lua | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 80cec39..1ff9f4b 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -57,7 +57,7 @@ editor = os.getenv("EDITOR") or "nvim" editor_cmd = terminal .. " -e " .. editor browser = "firefox" -files = "thunar" +files = "pcmanfm" lock = "i3lock -ftni" .. gears.filesystem.get_configuration_dir() .. "wallpapers/debian11.png" @@ -375,7 +375,24 @@ globalkeys = gears.table.join( awful.spawn("set-light -10") end, {description = "lower brightness", group = "shortcut"} + ), + awful.key( + {}, + "Print", + function() + awful.spawn("flameshot full -c") + end, + {description = "take a screenshot", group = "shortcut"} + ), + awful.key( + {"Shift"}, + "Print", + function() + awful.spawn("flameshot gui") + end, + {description = "take a rectangular screenshot", group = "shortcut"} ) + ) clientkeys = @@ -646,7 +663,6 @@ apps = { "nm-applet", "killall cbatticon", "cbatticon BAT0 -i symbolic", - "numlockx", "flameshot", } From 36676206b8deaea0205302d5b6238df9633f73bd Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 16 Aug 2022 11:21:43 +0200 Subject: [PATCH 18/26] feat: disable audio bell --- .config/kitty/kitty.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index eac5eae..d4922b2 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -4,3 +4,5 @@ font_family DejaVuSansMono Nerd Font Mono font_size 14.0 background_opacity 0.8 + +enable_audio_bell no From bb1e2f21c1e1bbe08041c2eea65642619d164a0b Mon Sep 17 00:00:00 2001 From: AngeD Date: Wed, 17 Aug 2022 09:51:27 +0200 Subject: [PATCH 19/26] feat: debian specific configuration --- .config/sway/config.d/10-variables.conf | 2 +- .config/sway/config.d/30-startup.conf | 25 ++++++++----------------- .config/waybar/config | 17 +++++++++++------ .config/zsh/.p10k.zsh | 2 +- .xinitrc | 8 ++++++-- bin/set-light | 4 +++- 6 files changed, 30 insertions(+), 28 deletions(-) diff --git a/.config/sway/config.d/10-variables.conf b/.config/sway/config.d/10-variables.conf index 7697ae9..f2d4c4b 100644 --- a/.config/sway/config.d/10-variables.conf +++ b/.config/sway/config.d/10-variables.conf @@ -6,7 +6,7 @@ set $up j set $right l set $menu dmenu_path | dmenu | xargs swaymsg exec -- -set $term alacritty +set $term kitty set $browser firefox set $files pcmanfm set $wallpapers $HOME/.config/wallpapers diff --git a/.config/sway/config.d/30-startup.conf b/.config/sway/config.d/30-startup.conf index f2a26bc..252e0b0 100644 --- a/.config/sway/config.d/30-startup.conf +++ b/.config/sway/config.d/30-startup.conf @@ -1,26 +1,17 @@ # fix slow startup time exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK -# Lock after $screen_timeout -# Turn off screen after $screem_timeout - 10 +# Turn off screen after $screen_timeout +# Lock after $screen_timeout + 10s # Lock if screen off -exec swayidle -w \ - timeout $(($screen_timeout + 10)) "$lock" \ - timeout $screen_timeout 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on"' \ - before-sleep "$lock" - -# GTK theme -exec gsettings set org.gnome.desktop.interface gtk-theme "Materia-dark" -exec gsettings set org.gnome.desktop.interface icon-theme "Papirus-Dark" +exec swayidle -w \ + timeout $(($screen_timeout + 10)) "$lock" \ + timeout $screen_timeout 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + before-sleep "$lock" bar swaybar_command waybar -exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -#exec swayidle -w \ -# timeout $(($screen_timeout + 10)) $lock \ -# timeout $screen_timeout 'swaymsg "output * dpms off"' \ -# resume 'swaymsg "output * dpms on"' \ -# before-sleep $lock +exec /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 exec gammastep exec nm-applet --indicator diff --git a/.config/waybar/config b/.config/waybar/config index d9616d6..10a38ee 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -1,7 +1,8 @@ { "modules-left": ["sway/workspaces"], "modules-center": ["sway/window"], - "modules-right": ["pulseaudio", "cpu", "memory", "temperature", "backlight", "battery", "tray", "clock"], + //"modules-right": ["pulseaudio", "cpu", "memory", "temperature", "backlight", "battery", "tray", "clock"], + "modules-right": ["pulseaudio", "cpu", "memory", "temperature", "backlight", "battery", "tray", "custom/clock"], "backlight": { "format": "{percent}% {icon}", "format-icons": ["", ""], @@ -20,9 +21,13 @@ "format-alt": "{time} {icon}", "format-icons": ["", "", "", "", ""], }, - "clock": { - "format": "{:%a %b %d, %R}", - "tooltip-format": "{calendar}", + //"clock": { + // "format": "{:%a %b %d, %R}", + // "tooltip-format": "{calendar}", + //}, + "custom/clock": { + "exec": "date '+%a %b %d, %R'", + "interval": 5, }, "cpu": { "format": "{usage}% ", @@ -54,8 +59,8 @@ "default": ["", "", ""], }, "on-click": "pavucontrol", - "on-scroll-up": "set-vol +2", - "on-scroll-down": "set-vol -2", + "on-scroll-up": "set-vol +5", + "on-scroll-down": "set-vol -5", "smooth-scrolling-threshold": 1, }, "temperature": { diff --git a/.config/zsh/.p10k.zsh b/.config/zsh/.p10k.zsh index dc15cc7..c49c54f 100644 --- a/.config/zsh/.p10k.zsh +++ b/.config/zsh/.p10k.zsh @@ -985,7 +985,7 @@ typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) # If set to false, hide python version if it's the same as global: # $(pyenv version-name) == $(pyenv global). - typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false + typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=true # If set to false, hide python version if it's equal to "system". typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true diff --git a/.xinitrc b/.xinitrc index c84537f..3d8f6b6 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,6 +1,10 @@ #!/bin/sh -xrandr \ - --output HDMI-2 --auto --primary +xrandr \ + --output HDMI-2 --auto --primary \ --output eDP-1 --left-of HDMI-2 + +# fix touchscreen +xinput --map-to-output 'Raydium Corporation Raydium Touch System' 'eDP-1' + exec x-window-manager diff --git a/bin/set-light b/bin/set-light index d95a265..527c75f 100755 --- a/bin/set-light +++ b/bin/set-light @@ -5,8 +5,10 @@ shopt -s extglob nullglob set_brightness() { MAX="$(cat "$1"/max_brightness)" FILE="$1"/brightness - VAL="$(($2 * MAX / 100))" + VAL="$(($2 * MAX / 100 + 1))" + [ "$VAL" -lt 0 ] && VAL=0 + [ "$VAL" -gt "$MAX" ] && VAL="$MAX" echo "$VAL" > "$FILE" } From 8703c7846e5ca412379c4fdba768d3d6da07073e Mon Sep 17 00:00:00 2001 From: AngeD Date: Wed, 17 Aug 2022 09:54:09 +0200 Subject: [PATCH 20/26] fix: more standard docker aliases --- .config/zsh/.docker_aliases | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/zsh/.docker_aliases b/.config/zsh/.docker_aliases index 6b8569f..c5dae4f 100644 --- a/.config/zsh/.docker_aliases +++ b/.config/zsh/.docker_aliases @@ -1,11 +1,11 @@ alias dk='docker' # containers -alias dkca='docker container ls -a' -alias dkcaq='docker container ls -a -q' alias dkci='docker container inspect' alias dkcls='docker container ls' -alias dkcq='docker container ls -q' +alias dkclsa='docker container ls -a' +alias dkclsaq='docker container ls -a -q' +alias dkclsq='docker container ls -q' alias dkcrm='docker container rm' alias dkcrmf='docker container rm -f' alias dkex='docker container exec -i -t' From d1f9c378b263669ed27e88131610daaff0de89b3 Mon Sep 17 00:00:00 2001 From: AngeD Date: Wed, 17 Aug 2022 09:59:10 +0200 Subject: [PATCH 21/26] merge: main --- .config/nvim/pack/plugins/opt/nvim-treesitter | 2 +- .config/sway/config.d/10-variables.conf | 4 ++-- .pyenv | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/nvim/pack/plugins/opt/nvim-treesitter b/.config/nvim/pack/plugins/opt/nvim-treesitter index 1b99f94..116c72f 160000 --- a/.config/nvim/pack/plugins/opt/nvim-treesitter +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter @@ -1 +1 @@ -Subproject commit 1b99f94fc254f0f5b1498674f62a8dd2f61c90da +Subproject commit 116c72f5c2e4e63bbf0b7d698f9d35e36848605a diff --git a/.config/sway/config.d/10-variables.conf b/.config/sway/config.d/10-variables.conf index f2d4c4b..c80c9ab 100644 --- a/.config/sway/config.d/10-variables.conf +++ b/.config/sway/config.d/10-variables.conf @@ -13,8 +13,8 @@ set $wallpapers $HOME/.config/wallpapers set $lock swaylock -F -f -i $wallpapers/lock.png set $screenshot grim - | wl-copy set $screenshot_rect grim -g "$(slurp)" - | wl-copy -set $raise_volume set-vol +2 -set $lower_volume set-vol -2 +set $raise_volume set-vol +5 +set $lower_volume set-vol -5 set $raise_backlight set-light +10 set $lower_backlight set-light -10 diff --git a/.pyenv b/.pyenv index afeb971..a8afc61 160000 --- a/.pyenv +++ b/.pyenv @@ -1 +1 @@ -Subproject commit afeb971fa25b343760051423149aaa4514f3d41d +Subproject commit a8afc611467d2a62f8d119205943395c1b5111de From 8524a080166d19209c3b714ad6374599d3edacae Mon Sep 17 00:00:00 2001 From: AngeD Date: Fri, 19 Aug 2022 11:06:33 +0200 Subject: [PATCH 22/26] feat: vim-dirdiff plugin --- .config/nvim/init.lua | 2 ++ .config/nvim/pack/plugins/opt/nvim-treesitter | 2 +- .config/nvim/pack/plugins/opt/vim-dirdiff | 1 + .gitmodules | 3 +++ 4 files changed, 7 insertions(+), 1 deletion(-) create mode 160000 .config/nvim/pack/plugins/opt/vim-dirdiff diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 79953a8..c2f0d88 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -14,6 +14,8 @@ require'indent_blankline'.setup { vim.cmd("packadd nvim-lspconfig") +vim.cmd("packadd vim-dirdiff") + -- variables vim.o.path = vim.o.path .. ",**" vim.o.expandtab = true diff --git a/.config/nvim/pack/plugins/opt/nvim-treesitter b/.config/nvim/pack/plugins/opt/nvim-treesitter index 116c72f..d76b0de 160000 --- a/.config/nvim/pack/plugins/opt/nvim-treesitter +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter @@ -1 +1 @@ -Subproject commit 116c72f5c2e4e63bbf0b7d698f9d35e36848605a +Subproject commit d76b0de6536c2461f97cfeca0550f8cb89793935 diff --git a/.config/nvim/pack/plugins/opt/vim-dirdiff b/.config/nvim/pack/plugins/opt/vim-dirdiff new file mode 160000 index 0000000..84bc899 --- /dev/null +++ b/.config/nvim/pack/plugins/opt/vim-dirdiff @@ -0,0 +1 @@ +Subproject commit 84bc8999fde4b3c2d8b228b560278ab30c7ea4c9 diff --git a/.gitmodules b/.gitmodules index f933284..89a85eb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,9 @@ [submodule ".config/nvim/pack/plugins/opt/nvim-treesitter"] path = .config/nvim/pack/plugins/opt/nvim-treesitter url = https://github.com/nvim-treesitter/nvim-treesitter.git +[submodule ".config/nvim/pack/plugins/opt/vim-dirdiff"] + path = .config/nvim/pack/plugins/opt/vim-dirdiff + url = https://github.com/will133/vim-dirdiff.git [submodule ".config/zsh/ohmyzsh"] path = .config/zsh/ohmyzsh url = https://github.com/ohmyzsh/ohmyzsh.git From 331331c62008e98b1c38acafca5888dfafa4eaec Mon Sep 17 00:00:00 2001 From: AngeD Date: Mon, 22 Aug 2022 09:31:27 +0200 Subject: [PATCH 23/26] feat: non-root mount alias --- .config/nvim/pack/plugins/opt/black | 2 +- .config/nvim/pack/plugins/opt/nvim-lspconfig | 2 +- .config/nvim/pack/plugins/opt/nvim-treesitter | 2 +- .config/zsh/.zsh_aliases | 13 +++++++------ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.config/nvim/pack/plugins/opt/black b/.config/nvim/pack/plugins/opt/black index 4ebf14d..6e0ad52 160000 --- a/.config/nvim/pack/plugins/opt/black +++ b/.config/nvim/pack/plugins/opt/black @@ -1 +1 @@ -Subproject commit 4ebf14d17ed544be893be5706c02116fd8b83b4c +Subproject commit 6e0ad52e7a30771d0056fa60bfe5e368f2bc2417 diff --git a/.config/nvim/pack/plugins/opt/nvim-lspconfig b/.config/nvim/pack/plugins/opt/nvim-lspconfig index da7461b..70af1bf 160000 --- a/.config/nvim/pack/plugins/opt/nvim-lspconfig +++ b/.config/nvim/pack/plugins/opt/nvim-lspconfig @@ -1 +1 @@ -Subproject commit da7461b596d70fa47b50bf3a7acfaef94c47727d +Subproject commit 70af1bf414d7f9926fc883a008246db8a544f69c diff --git a/.config/nvim/pack/plugins/opt/nvim-treesitter b/.config/nvim/pack/plugins/opt/nvim-treesitter index d76b0de..09b13e9 160000 --- a/.config/nvim/pack/plugins/opt/nvim-treesitter +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter @@ -1 +1 @@ -Subproject commit d76b0de6536c2461f97cfeca0550f8cb89793935 +Subproject commit 09b13e9edb80d3890aa8f7dbebfdb21e34430212 diff --git a/.config/zsh/.zsh_aliases b/.config/zsh/.zsh_aliases index 3eb7744..b64bdc6 100644 --- a/.config/zsh/.zsh_aliases +++ b/.config/zsh/.zsh_aliases @@ -1,14 +1,15 @@ -alias sudo='sudo ' -alias pls='sudo ' alias cls='clear && l' alias config="git --git-dir=$HOME/.dotfiles --work-tree=$HOME" -alias wconfig="$EDITOR $HOME/.config/awesome" -alias zshconf="$EDITOR $ZDOTDIR/.zshrc && . $ZDOTDIR/.zshrc" -alias startgui='startx' alias minecraft='DRI_PRIME=1 minecraft-launcher' +alias mount='udisksctl mount -b' +alias pls='sudo ' +alias startgui='startx' +alias sudo='sudo ' +alias tmp="cd $(mktemp -d)" alias umnt='sudo umount /mnt -R' alias vi="$EDITOR" -alias tmp="cd $(mktemp -d)" +alias wconf="$EDITOR $HOME/.config/awesome" +alias zshconf="$EDITOR $ZDOTDIR/.zshrc && . $ZDOTDIR/.zshrc" function fnalias() { # alias alias_cmd='cmd' From ce9bf86211fc14424b4f5505e9da19e331478bbc Mon Sep 17 00:00:00 2001 From: AngeD Date: Mon, 22 Aug 2022 17:21:38 +0200 Subject: [PATCH 24/26] feat: nvim-treesitter plugin --- .config/nvim/init.lua | 6 ++++++ .config/nvim/pack/plugins/opt/nvim-treesitter | 2 +- .config/nvim/pack/plugins/opt/nvim-treesitter-context | 1 + .gitmodules | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 160000 .config/nvim/pack/plugins/opt/nvim-treesitter-context diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index c2f0d88..83e3006 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,7 +1,13 @@ -- packages vim.cmd("packadd nvim-treesitter") require'nvim-treesitter.configs'.setup { + auto_install = true, highlight = {enable = true}, + indent = {enable = true}, +} +vim.cmd("packadd nvim-treesitter-context") +require'treesitter-context'.setup { + enable = true, } vim.cmd("packadd black") diff --git a/.config/nvim/pack/plugins/opt/nvim-treesitter b/.config/nvim/pack/plugins/opt/nvim-treesitter index 09b13e9..4b536a9 160000 --- a/.config/nvim/pack/plugins/opt/nvim-treesitter +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter @@ -1 +1 @@ -Subproject commit 09b13e9edb80d3890aa8f7dbebfdb21e34430212 +Subproject commit 4b536a9709fa4cbbc4c9ae8b32e7a32821a7249e diff --git a/.config/nvim/pack/plugins/opt/nvim-treesitter-context b/.config/nvim/pack/plugins/opt/nvim-treesitter-context new file mode 160000 index 0000000..8e88b67 --- /dev/null +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter-context @@ -0,0 +1 @@ +Subproject commit 8e88b67d0dc386d6ba1b3d09c206f19a50bc0625 diff --git a/.gitmodules b/.gitmodules index 89a85eb..c6784a7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule ".pyenv"] path = .pyenv url = https://github.com/pyenv/pyenv.git +[submodule ".config/nvim/pack/plugins/opt/nvim-treesitter-context"] + path = .config/nvim/pack/plugins/opt/nvim-treesitter-context + url = https://github.com/nvim-treesitter/nvim-treesitter-context.git From c099b69d859712f00eb8c05f8a0fbd18e61e6ff3 Mon Sep 17 00:00:00 2001 From: AngeD Date: Mon, 22 Aug 2022 17:23:17 +0200 Subject: [PATCH 25/26] feat: remove too much verbose --- bin/dkpurge | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/bin/dkpurge b/bin/dkpurge index 15008b3..55d5fae 100755 --- a/bin/dkpurge +++ b/bin/dkpurge @@ -1,10 +1,6 @@ #!/bin/bash NORMAL='\e[0m' -BOLD='\e[1m' -RED='\e[31m' - -ECHO='echo -e' PS="$(docker ps -aq 2> /dev/null)" @@ -18,10 +14,9 @@ IMG="$(docker images -q 2> /dev/null)" if [ -n "$PS" ]; then - $ECHO "${BOLD}${RED}CONTAINERS${NORMAL}" docker ps -a - $ECHO -n "Prune Containers? [Y/n/a] " + echo -n "Prune Containers? [Y/n/a] " read -r ANS case "${ANS,,}" in 'y'|'yes'|'') @@ -34,23 +29,23 @@ if [ -n "$PS" ]; then fi if [ -n "$VOL" ]; then - $ECHO "${BOLD}${RED}VOLUMES${NORMAL}" + echo docker volume ls - $ECHO -n "Prune Volumes? [Y/n] " + echo -n "Prune Volumes? [Ya/n] " read -r ANS case "${ANS,,}" in - 'y'|'yes'|'') + 'y'|'yes'|'a'|'all'|'') echo "$VOL" | xargs docker volume rm -f 2> /dev/null ;; esac fi if [ -n "$IMG" ]; then - $ECHO "${BOLD}${RED}IMAGES${NORMAL}" + echo docker images - $ECHO -n "Prune Images? [Y/n/a] " + echo -n "Prune Images? [Y/n/a] " read -r ANS case "${ANS,,}" in 'y'|'yes'|'') From 16131f8dfe4caa7a3902db44d91baefb3b6919fa Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 23 Aug 2022 09:33:56 +0200 Subject: [PATCH 26/26] merge: main --- .config/alacritty.yml | 2 +- .config/nvim/pack/plugins/opt/black | 2 +- .config/nvim/pack/plugins/opt/nvim-lspconfig | 2 +- .config/nvim/pack/plugins/opt/nvim-treesitter | 2 +- .config/sway/config.d/30-startup.conf | 1 + .config/zsh/.zsh_aliases | 8 ++++---- .gitmodules | 6 +++--- bin/dkpurge | 2 -- 8 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.config/alacritty.yml b/.config/alacritty.yml index 0ad6e7e..af2e244 100644 --- a/.config/alacritty.yml +++ b/.config/alacritty.yml @@ -118,7 +118,7 @@ font: # - (macOS) Menlo # - (Linux/BSD) monospace # - (Windows) Consolas - family: MesloLGS NF + family: DejaVuSansMono Nerd Font # The `style` can be specified to pick a specific face. #style: Regular diff --git a/.config/nvim/pack/plugins/opt/black b/.config/nvim/pack/plugins/opt/black index 6e0ad52..21218b6 160000 --- a/.config/nvim/pack/plugins/opt/black +++ b/.config/nvim/pack/plugins/opt/black @@ -1 +1 @@ -Subproject commit 6e0ad52e7a30771d0056fa60bfe5e368f2bc2417 +Subproject commit 21218b666aeafd1c089cbe998e730f97605d25b2 diff --git a/.config/nvim/pack/plugins/opt/nvim-lspconfig b/.config/nvim/pack/plugins/opt/nvim-lspconfig index 70af1bf..c041890 160000 --- a/.config/nvim/pack/plugins/opt/nvim-lspconfig +++ b/.config/nvim/pack/plugins/opt/nvim-lspconfig @@ -1 +1 @@ -Subproject commit 70af1bf414d7f9926fc883a008246db8a544f69c +Subproject commit c04189061a937d5b6bf526c68cd4fbcb1b8cf567 diff --git a/.config/nvim/pack/plugins/opt/nvim-treesitter b/.config/nvim/pack/plugins/opt/nvim-treesitter index 4b536a9..a2ee561 160000 --- a/.config/nvim/pack/plugins/opt/nvim-treesitter +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter @@ -1 +1 @@ -Subproject commit 4b536a9709fa4cbbc4c9ae8b32e7a32821a7249e +Subproject commit a2ee5610ae5986797809358c9ace840eca6fd030 diff --git a/.config/sway/config.d/30-startup.conf b/.config/sway/config.d/30-startup.conf index 252e0b0..6c17751 100644 --- a/.config/sway/config.d/30-startup.conf +++ b/.config/sway/config.d/30-startup.conf @@ -1,5 +1,6 @@ # fix slow startup time exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK +xwayland force # Turn off screen after $screen_timeout # Lock after $screen_timeout + 10s diff --git a/.config/zsh/.zsh_aliases b/.config/zsh/.zsh_aliases index b64bdc6..89d0b41 100644 --- a/.config/zsh/.zsh_aliases +++ b/.config/zsh/.zsh_aliases @@ -13,18 +13,18 @@ alias zshconf="$EDITOR $ZDOTDIR/.zshrc && . $ZDOTDIR/.zshrc" function fnalias() { # alias alias_cmd='cmd' - cmd="$(alias "${2}")" + cmd="$(alias "$2")" - if [ -n "${cmd}" ]; then + if [ -n "$cmd" ]; then # remove everything before and including the first = cmd="${cmd#*=}" # remove first and last char in this case, quotes cmd="${cmd:1:-1}" else - cmd="${2}" + cmd="$2" fi - env "${1}" "${cmd}" "${@:3}" + env "$1" "$cmd" "${@:3}" } alias watch='fnalias watch' diff --git a/.gitmodules b/.gitmodules index c6784a7..000f0f2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,9 @@ [submodule ".config/nvim/pack/plugins/opt/nvim-treesitter"] path = .config/nvim/pack/plugins/opt/nvim-treesitter url = https://github.com/nvim-treesitter/nvim-treesitter.git +[submodule ".config/nvim/pack/plugins/opt/nvim-treesitter-context"] + path = .config/nvim/pack/plugins/opt/nvim-treesitter-context + url = https://github.com/nvim-treesitter/nvim-treesitter-context.git [submodule ".config/nvim/pack/plugins/opt/vim-dirdiff"] path = .config/nvim/pack/plugins/opt/vim-dirdiff url = https://github.com/will133/vim-dirdiff.git @@ -19,6 +22,3 @@ [submodule ".pyenv"] path = .pyenv url = https://github.com/pyenv/pyenv.git -[submodule ".config/nvim/pack/plugins/opt/nvim-treesitter-context"] - path = .config/nvim/pack/plugins/opt/nvim-treesitter-context - url = https://github.com/nvim-treesitter/nvim-treesitter-context.git diff --git a/bin/dkpurge b/bin/dkpurge index 55d5fae..5fc1314 100755 --- a/bin/dkpurge +++ b/bin/dkpurge @@ -1,7 +1,5 @@ #!/bin/bash -NORMAL='\e[0m' - PS="$(docker ps -aq 2> /dev/null)" if [ "$?" ] && [ "$EUID" != 0 ]; then