From da3b81ab04002bfe35c1ea264ce9401be76eb1cf Mon Sep 17 00:00:00 2001 From: aduhayon Date: Wed, 10 Aug 2022 09:59:38 +0200 Subject: [PATCH 01/11] 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 b64eb3c82d1b2c90103b377ba470da116121c2e0 Mon Sep 17 00:00:00 2001 From: AngeD Date: Fri, 12 Aug 2022 22:20:04 +0200 Subject: [PATCH 02/11] merge: work --- .config/awesome/rc.lua | 1 + .config/nvim/ftplugin/dockerfile.lua | 6 +- .config/nvim/ftplugin/python.lua | 4 +- .config/nvim/ftplugin/sh.lua | 4 +- .config/nvim/ftplugin/yaml.lua | 4 +- .config/nvim/init.lua | 4 +- .../nvim/{lspconfig.lua => lua/lspbinds.lua} | 25 +------- .config/nvim/pack/plugins/opt/black | 2 +- .config/nvim/pack/plugins/opt/nvim-treesitter | 2 +- .config/zsh/.docker_aliases | 39 +++++++----- .config/zsh/ohmyzsh | 2 +- .zshenv | 15 ++--- bin/dkpurge | 63 +++++++++++++++++++ 13 files changed, 114 insertions(+), 57 deletions(-) rename .config/nvim/{lspconfig.lua => lua/lspbinds.lua} (72%) create mode 100755 bin/dkpurge 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 diff --git a/.config/nvim/ftplugin/dockerfile.lua b/.config/nvim/ftplugin/dockerfile.lua index ebc6690..435b148 100644 --- a/.config/nvim/ftplugin/dockerfile.lua +++ b/.config/nvim/ftplugin/dockerfile.lua @@ -1,8 +1,8 @@ -- packages -require'lspconfig'.dockerls.setup {} +require'lspconfig'.dockerls.setup { + on_attach = require'lspbinds', +} -- variables -vim.o.shiftwidth = 2 -vim.o.tabstop = 2 -- keybindings 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 3639483..79953a8 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", "", "") @@ -41,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"] = {} - } -} 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/.docker_aliases b/.config/zsh/.docker_aliases index b53c52f..6b8569f 100644 --- a/.config/zsh/.docker_aliases +++ b/.config/zsh/.docker_aliases @@ -1,31 +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 -it' 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 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' - -function dkpurge() { - PS="$(docker ps -aq)" - - echo "$PS" | xargs docker stop - echo "$PS" | xargs docker rm - docker image prune -f -} +alias dkvrmf='docker volume rm -f' # docker-compose alias dc='docker-compose' diff --git a/.config/zsh/ohmyzsh b/.config/zsh/ohmyzsh index 97134d1..835a0a5 160000 --- a/.config/zsh/ohmyzsh +++ b/.config/zsh/ohmyzsh @@ -1 +1 @@ -Subproject commit 97134d1eed19b72a9c4bf90a2effa847221608bf +Subproject commit 835a0a5d17765243cabee782acb5905a9aab33c3 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' diff --git a/bin/dkpurge b/bin/dkpurge new file mode 100755 index 0000000..15008b3 --- /dev/null +++ b/bin/dkpurge @@ -0,0 +1,63 @@ +#!/bin/bash + +NORMAL='\e[0m' +BOLD='\e[1m' +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 "${BOLD}${RED}CONTAINERS${NORMAL}" + docker ps -a + + $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 "${BOLD}${RED}VOLUMES${NORMAL}" + docker volume ls + + $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 "${BOLD}${RED}IMAGES${NORMAL}" + docker images + + $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 8917a73e9dad1f08b549835b534725833e9a95a1 Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 16 Aug 2022 23:47:49 +0200 Subject: [PATCH 03/11] feat: change volume step is now 5 --- .config/sway/config.d/10-variables.conf | 4 ++-- .config/waybar/config | 4 ++-- .config/zsh/.docker_aliases | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.config/sway/config.d/10-variables.conf b/.config/sway/config.d/10-variables.conf index 7697ae9..d07cc2c 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/.config/waybar/config b/.config/waybar/config index d9616d6..af55e0b 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -54,8 +54,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/.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 6f244dea7f7bc05fbea6784f6a80aa66014368d1 Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 16 Aug 2022 23:48:38 +0200 Subject: [PATCH 04/11] feat: update submdodules --- .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..826c951 160000 --- a/.config/nvim/pack/plugins/opt/nvim-treesitter +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter @@ -1 +1 @@ -Subproject commit 9b3f1275018b7cac15ef07af880e1f010a959963 +Subproject commit 826c951825e94dd57decfbb2dd85781ff4dfc712 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..a8afc61 160000 --- a/.pyenv +++ b/.pyenv @@ -1 +1 @@ -Subproject commit ae22c6950563af3e0ff5405367d42ceed40997d5 +Subproject commit a8afc611467d2a62f8d119205943395c1b5111de From 544258de3408e57950a2bd7730730b23d40ba359 Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 16 Aug 2022 23:53:44 +0200 Subject: [PATCH 05/11] merge: work --- .config/awesome/rc.lua | 20 +- .config/picom.conf | 423 +++++++++++++++++++++++++++++++++++++++++ .xinitrc | 6 + 3 files changed, 447 insertions(+), 2 deletions(-) create mode 100644 .config/picom.conf create mode 100644 .xinitrc diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index d4ad299..b533b7c 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", } 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 82cf039bc1d55f5630c0a0e5715ca2d254e52c02 Mon Sep 17 00:00:00 2001 From: AngeD Date: Wed, 17 Aug 2022 09:58:31 +0200 Subject: [PATCH 06/11] merge: work --- .config/kitty/kitty.conf | 8 ++++++++ .config/nvim/pack/plugins/opt/nvim-treesitter | 2 +- .config/sway/config.d/30-startup.conf | 18 +++++++----------- .config/zsh/.p10k.zsh | 2 +- .xinitrc | 10 +++++++--- bin/set-light | 4 +++- 6 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 .config/kitty/kitty.conf diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf new file mode 100644 index 0000000..d4922b2 --- /dev/null +++ b/.config/kitty/kitty.conf @@ -0,0 +1,8 @@ +update_check_interval 0 + +font_family DejaVuSansMono Nerd Font Mono +font_size 14.0 + +background_opacity 0.8 + +enable_audio_bell no diff --git a/.config/nvim/pack/plugins/opt/nvim-treesitter b/.config/nvim/pack/plugins/opt/nvim-treesitter index 826c951..116c72f 160000 --- a/.config/nvim/pack/plugins/opt/nvim-treesitter +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter @@ -1 +1 @@ -Subproject commit 826c951825e94dd57decfbb2dd85781ff4dfc712 +Subproject commit 116c72f5c2e4e63bbf0b7d698f9d35e36848605a diff --git a/.config/sway/config.d/30-startup.conf b/.config/sway/config.d/30-startup.conf index f2a26bc..2026def 100644 --- a/.config/sway/config.d/30-startup.conf +++ b/.config/sway/config.d/30-startup.conf @@ -1,18 +1,14 @@ # 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 diff --git a/.config/zsh/.p10k.zsh b/.config/zsh/.p10k.zsh index 9ee191a..ab12834 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..4c142e5 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,6 +1,10 @@ #!/bin/sh -xrandr \ - --output HDMI-2 --auto --primary - --output eDP-1 --left-of HDMI-2 +#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 3bd81b34e1ed756b7a1045c87d3f1cc773a073b9 Mon Sep 17 00:00:00 2001 From: AngeD Date: Wed, 17 Aug 2022 09:59:30 +0200 Subject: [PATCH 07/11] fix: remove duplicate swayidle command --- .config/sway/config.d/30-startup.conf | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.config/sway/config.d/30-startup.conf b/.config/sway/config.d/30-startup.conf index 2026def..82b9646 100644 --- a/.config/sway/config.d/30-startup.conf +++ b/.config/sway/config.d/30-startup.conf @@ -13,10 +13,5 @@ exec swayidle -w \ 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 gammastep exec nm-applet --indicator From f04d221b8723bcc5bdb94572106c2999df3bc8dc Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 23 Aug 2022 09:26:55 +0200 Subject: [PATCH 08/11] feat: new alacritty font: dejavu NF --- .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 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/alacritty.yml b/.config/alacritty.yml index 9560c44..84dac53 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 4ebf14d..21218b6 160000 --- a/.config/nvim/pack/plugins/opt/black +++ b/.config/nvim/pack/plugins/opt/black @@ -1 +1 @@ -Subproject commit 4ebf14d17ed544be893be5706c02116fd8b83b4c +Subproject commit 21218b666aeafd1c089cbe998e730f97605d25b2 diff --git a/.config/nvim/pack/plugins/opt/nvim-lspconfig b/.config/nvim/pack/plugins/opt/nvim-lspconfig index da7461b..a33e232 160000 --- a/.config/nvim/pack/plugins/opt/nvim-lspconfig +++ b/.config/nvim/pack/plugins/opt/nvim-lspconfig @@ -1 +1 @@ -Subproject commit da7461b596d70fa47b50bf3a7acfaef94c47727d +Subproject commit a33e2323a7b2ba74cd4cd51ae063d4c1e429cb84 diff --git a/.config/nvim/pack/plugins/opt/nvim-treesitter b/.config/nvim/pack/plugins/opt/nvim-treesitter index 116c72f..a2ee561 160000 --- a/.config/nvim/pack/plugins/opt/nvim-treesitter +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter @@ -1 +1 @@ -Subproject commit 116c72f5c2e4e63bbf0b7d698f9d35e36848605a +Subproject commit a2ee5610ae5986797809358c9ace840eca6fd030 From d47060c71f4a0dce77073d952267ef7cb9ff8f87 Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 23 Aug 2022 09:27:11 +0200 Subject: [PATCH 09/11] feat: non-root mount alias, disable zsh auto updates --- .config/zsh/.zsh_aliases | 21 +++++++++++---------- .config/zsh/.zshrc | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.config/zsh/.zsh_aliases b/.config/zsh/.zsh_aliases index 95f452f..0fc166b 100644 --- a/.config/zsh/.zsh_aliases +++ b/.config/zsh/.zsh_aliases @@ -1,29 +1,30 @@ -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/sway" -alias zshconf="$EDITOR $ZDOTDIR/.zshrc && . $ZDOTDIR/.zshrc" -alias startgui="exec sway 2> $HOME/sway.log" alias minecraft='DRI_PRIME=1 minecraft-launcher' +alias mount='udisksctl mount -b' +alias pls='sudo ' +alias startgui="sway 2> $HOME/sway.log" +alias sudo='sudo ' +alias tmp="cd $(mktemp -d)" alias umnt='sudo umount /mnt -R' alias vi="$EDITOR" -alias tmp="cd $(mktemp -d)" +alias wconfig="$EDITOR $HOME/.config/sway" +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/.config/zsh/.zshrc b/.config/zsh/.zshrc index 0eab4aa..9f9188c 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -28,7 +28,7 @@ CASE_SENSITIVE="true" # HYPHEN_INSENSITIVE="true" # Uncomment one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates +zstyle ':omz:update' mode disabled # disable automatic updates # zstyle ':omz:update' mode auto # update automatically without asking # zstyle ':omz:update' mode reminder # just remind me to update when it's time From 26e020cffa6d891ebac23ebd7b4b4d177a3862ac Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 23 Aug 2022 09:28:05 +0200 Subject: [PATCH 10/11] feat: awesome startup command --- .xinitrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.xinitrc b/.xinitrc index 4c142e5..8db90f7 100644 --- a/.xinitrc +++ b/.xinitrc @@ -7,4 +7,5 @@ ## fix touchscreen #xinput --map-to-output 'Raydium Corporation Raydium Touch System' 'eDP-1' -exec x-window-manager +#exec x-window-manager +exec awesome From 97964ccb590ae2259ee78b130cb03e1a888f1bae Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 23 Aug 2022 09:28:25 +0200 Subject: [PATCH 11/11] feat: red window borders --- .config/sway/config.d/10-variables.conf | 8 +++++--- .config/sway/config.d/20-io.conf | 7 +++---- .config/sway/config.d/30-startup.conf | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.config/sway/config.d/10-variables.conf b/.config/sway/config.d/10-variables.conf index d07cc2c..0b3c453 100644 --- a/.config/sway/config.d/10-variables.conf +++ b/.config/sway/config.d/10-variables.conf @@ -1,8 +1,8 @@ set $mod Mod4 # direction keys -set $left h -set $down k -set $up j +set $left h +set $down k +set $up j set $right l set $menu dmenu_path | dmenu | xargs swaymsg exec -- @@ -28,6 +28,8 @@ set $ws7 7:DOC set $ws8 8:GFX set $ws9 9:ETC +# border background text indicator child_border +client.focused #4c7899 #285577 #ffffff #2e9ef4 #e00000 default_border pixel gaps inner 4 gaps outer 4 diff --git a/.config/sway/config.d/20-io.conf b/.config/sway/config.d/20-io.conf index 2c7e687..fe9f3d4 100644 --- a/.config/sway/config.d/20-io.conf +++ b/.config/sway/config.d/20-io.conf @@ -15,8 +15,7 @@ input type:touchpad { } output { - HDMI-A-1 position 1920,0 - eDP-1 mode --custom 1920x1080@120Hz position 0,0 - * bg $wallpapers/landscape.png fill + HDMI-A-1 position 1920,0 + eDP-1 mode --custom 1920x1080@120Hz position 0,0 + * bg $wallpapers/landscape.png fill } - diff --git a/.config/sway/config.d/30-startup.conf b/.config/sway/config.d/30-startup.conf index 82b9646..f4ee3f4 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