From 757b759b4ad355b567309cb77786931ec2913bc8 Mon Sep 17 00:00:00 2001 From: ange Date: Tue, 1 Oct 2024 13:47:31 +0700 Subject: [PATCH] feat: huge update --- .bash_logout | 0 .bash_profile | 20 ++-- .bashrc | 7 +- .config/alacritty/alacritty.toml | 2 - .config/autorandr/agn/config | 7 -- .config/autorandr/agn/setup | 1 - .config/bash/10-aliases.bash | 6 +- .config/bash/11-docker.bash | 107 ++++++++++-------- .config/bash/11-git.bash | 28 ----- .config/bash/11-k8s.bash | 4 +- .config/bash/20-theme.bash | 5 +- .config/fastfetch/config.jsonc | 6 +- .config/git/config | 28 +++++ .config/newsraft/config | 3 +- .config/newsraft/feeds | 1 - .config/nvim/ftplugin/dockerfile.lua | 3 - .config/nvim/ftplugin/gitcommit.lua | 3 - .config/nvim/ftplugin/groovy.lua | 5 - .config/nvim/ftplugin/html.lua | 6 +- .config/nvim/ftplugin/javascript.lua | 6 +- .config/nvim/ftplugin/json.lua | 3 - .config/nvim/ftplugin/python.lua | 3 - .config/nvim/ftplugin/tex.lua | 3 - .config/nvim/ftplugin/yaml.lua | 6 +- .config/nvim/init.lua | 32 ------ .config/nvim/lua/pack-dirdiff.lua | 1 - .config/nvim/pack/plugins/opt/onedark | 2 +- .config/nvim/pack/plugins/opt/plenary | 2 +- .config/nvim/pack/plugins/opt/telescope | 2 +- .config/nvim/pack/plugins/opt/treesitter | 2 +- .config/suckless/dwm-6.5/config.h | 22 ++-- .../{warpcursor.diff => wrapcursor.diff} | 0 .config/suckless/{update.sh => install.sh} | 0 .config/zathura/zathurarc | 1 + .inputrc | 8 +- .local/bin/crypto | 4 +- .local/bin/epitest | 27 ----- .local/bin/ffreduce | 19 ++++ .local/bin/gradle | 9 -- .local/bin/light | 5 - .local/bin/sbar | 49 ++++---- .local/bin/steam | 3 - .local/bin/vol | 44 ++++--- .local/bin/wlp | 3 +- .local/share/flatpak/overrides/global | 2 +- .../firefox/ange/chrome/userChrome.css | 4 + .../.mozilla/firefox/ange/user.js | 3 +- 47 files changed, 221 insertions(+), 286 deletions(-) create mode 100644 .bash_logout delete mode 100644 .config/autorandr/agn/config delete mode 100644 .config/autorandr/agn/setup delete mode 100644 .config/nvim/ftplugin/groovy.lua mode change 100644 => 120000 .config/nvim/ftplugin/html.lua mode change 100644 => 120000 .config/nvim/ftplugin/javascript.lua mode change 100644 => 120000 .config/nvim/ftplugin/yaml.lua delete mode 100644 .config/nvim/lua/pack-dirdiff.lua rename .config/suckless/dwm-6.5/patches/{warpcursor.diff => wrapcursor.diff} (100%) rename .config/suckless/{update.sh => install.sh} (100%) create mode 100644 .config/zathura/zathurarc delete mode 100755 .local/bin/epitest create mode 100755 .local/bin/ffreduce delete mode 100755 .local/bin/gradle delete mode 100755 .local/bin/steam diff --git a/.bash_logout b/.bash_logout new file mode 100644 index 0000000..e69de29 diff --git a/.bash_profile b/.bash_profile index f837915..e5bfb29 100644 --- a/.bash_profile +++ b/.bash_profile @@ -5,11 +5,11 @@ export XDG_STATE_HOME="$HOME/.local/state" export XDG_CONFIG_DIRS=/etc/xdg export XDG_DATA_DIRS="$XDG_DATA_HOME/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share" -export HISTCONTROL=ignoreboth -export HISTSIZE=65536 -export SAVEHIST=8192 +HISTFILE="$XDG_STATE_HOME/bash_history" +HISTCONTROL=ignoreboth +HISTSIZE=65536 +SAVEHIST=8192 -export HISTFILE="$XDG_STATE_HOME/bash_history" export LESSHISTFILE='-' export KUBECONFIG="$XDG_CONFIG_HOME/kube" @@ -20,7 +20,7 @@ export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/python" export W3M_DIR="$XDG_STATE_HOME/w3m" -PATH="$HOME/.local/bin:$XDG_DATA_HOME/flatpak/exports/bin:/var/lib/flatpak/exports/bin:$PATH" +export PATH="$HOME/.local/bin:$XDG_DATA_HOME/flatpak/exports/bin:/var/lib/flatpak/exports/bin:$PATH" export BROWSER=org.mozilla.firefox export EDITOR=nvim @@ -29,6 +29,7 @@ export PAGER=less export MAKEFLAGS='-j' +export DOCKER_BUILDKIT=0 # i/o timeout export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock" export SSH_AUTH_SOCK; SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" @@ -42,11 +43,4 @@ export SSH_AUTH_SOCK; SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" exec startx &> "$GUILOG" } -[ -z "$DISPLAY" ] && [ "$XDG_VTNR" = 1 ] && { - GUILOG="$HOME/.local/state/gui.log" - - mv -f "$GUILOG" "$GUILOG.old" || true - - #export WLR_DRM_NO_MODIFIERS=1 - exec river &> "$GUILOG" -} +. "$HOME/.bashrc" diff --git a/.bashrc b/.bashrc index ad292bf..0af3dfb 100644 --- a/.bashrc +++ b/.bashrc @@ -2,15 +2,14 @@ set -o vi -FZF_ALT_C_OPTS=--walker=dir,follow +FZF_ALT_C_OPTS=--walker=dir . /usr/share/fzf/key-bindings.bash shopt -s autocd -for f in "$HOME/.config/bash/"*.bash; do +for f in "$XDG_CONFIG_HOME/bash"/*.bash; do # shellcheck disable=SC1090 . "$f" -done -unset f +done; unset f stty werase undef diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index 617e9c3..0acab1a 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -2,8 +2,6 @@ background = "#101010" [font] -#size = 19 -#size = 14 size = 9 [window] diff --git a/.config/autorandr/agn/config b/.config/autorandr/agn/config deleted file mode 100644 index 7e94d03..0000000 --- a/.config/autorandr/agn/config +++ /dev/null @@ -1,7 +0,0 @@ -output eDP -off -output HDMI-A-0 -mode 3840x2160 -pos 0x0 -primary -rate 60.00 diff --git a/.config/autorandr/agn/setup b/.config/autorandr/agn/setup deleted file mode 100644 index 035b4ec..0000000 --- a/.config/autorandr/agn/setup +++ /dev/null @@ -1 +0,0 @@ -HDMI-A-0 00ffffffffffff0020a33000010000000c1d0103807341780acf74a3574cb02309484c21080081c0814081800101010101010101010108e80030f2705a80b0588a00ba882100001e023a801871382d40582c4500501d7400001e000000fc00484953454e53450a2020202020000000fd00184b0f883c000a202020202020012c020370705e615e5f605d6a6b01020405101113141f20212212036566626364282e3f40320907071507505704013d07c06706035f7e0183010000e200f9e305ff016e030c002000383c200080010203046ad85dc40178800702303ceb0146d000481f2a90506d84e3060d01e40f6900600000000000000000000000000000000c diff --git a/.config/bash/10-aliases.bash b/.config/bash/10-aliases.bash index 1be84a4..54b9512 100644 --- a/.config/bash/10-aliases.bash +++ b/.config/bash/10-aliases.bash @@ -1,7 +1,7 @@ function update() { $TERM --hold -e "$SHELL" -ic "pac -Syu && echo -e '\e[32mDONE'" & $TERM --hold -e "$SHELL" -ic "flatpak update && echo -e '\e[32mDONE'" & - $TERM --hold -e "$SHELL" -ic "config submodule update --remote --recursive && echo -e '\e[32mDONE'" & + $TERM --hold -e "$SHELL" -ic "cd && c submodule update --remote --recursive && echo -e '\e[32mDONE'" & } function tmp() { @@ -28,14 +28,14 @@ alias ...='../..' \ diff='diff --color' \ grep='grep --color --exclude-dir={.cache,.git,.idea,.venv,.vscode,node_modules}' \ pac='sudo pacman' \ + g=git \ neofetch=fastfetch \ mail=aerc \ rss=newsraft \ vi='$EDITOR' \ qcp='qcp -o tabsize=4' \ qmv='qmv -o tabsize=4' \ - config='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' \ - viconf='(cd "$XDG_CONFIG_HOME/nvim" && $EDITOR .)' \ + c='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' \ ssh='TERM=xterm-256color ssh' \ sudo='sudo ' \ watch='watch -c ' \ diff --git a/.config/bash/11-docker.bash b/.config/bash/11-docker.bash index 753bd6b..d713029 100644 --- a/.config/bash/11-docker.bash +++ b/.config/bash/11-docker.bash @@ -1,51 +1,50 @@ -alias dk='docker' \ - dkb='docker build . -t' \ - dkc='docker container' \ - dkcc='docker container create' \ - dkci='docker container inspect' \ - dkcls='docker container ls' \ - dkclsa='docker container ls -a' \ - dkclsaq='docker container ls -a -q' \ - dkclsq='docker container ls -q' \ - dkcrm!='docker container rm -f' \ - dkcrm='docker container rm' \ - dkcsp='docker container stop' \ - dkcst='docker container restart' \ - dkex='docker container exec -i -t' \ - dki='docker image' \ - dkic='docker image create' \ - dkii='docker image inspect' \ - dkil='docker pull' \ - dkils='docker image ls' \ - dkilsa='docker image ls -a' \ - dkilsaq='docker image ls -a -q' \ - dkilsq='docker image ls -q' \ - dkip='docker image push' \ - dkirm!='docker image rm -f' \ - dkirm='docker image rm' \ - dkis='docker image save' \ - dkit='docker image tag' \ - dklo='docker logs -f' \ - dkn='docker network' \ - dknc='docker network create' \ - dkni='docker network inspect' \ - dknls='docker network ls' \ - dknlsq='docker network ls -q' \ - dknrm!='docker network rm -f' \ - dknrm='docker network rm' \ - dkr='docker run -i -t' \ - dksys='docker system' \ - dksysdf='docker system df' \ - dksysp!='docker system prune -f' \ - dksysp='docker system prune' \ - dktop='docker top' \ - dkv='docker volume' \ - dkvc='docker volume create' \ - dkvi='docker volume inspect' \ - dkvls='docker volume ls' \ - dkvlsq='docker volume ls -q' \ - dkvrm!='docker volume rm -f' \ - dkvrm='docker volume rm' +. /usr/share/bash-completion/completions/podman +compalias dk='podman' \ + dkc='podman container' \ + dkcc='podman container create' \ + dkci='podman container inspect' \ + dkcls='podman container ls' \ + dkclsa='podman container ls -a' \ + dkclsaq='podman container ls -a -q' \ + dkclsq='podman container ls -q' \ + dkcrm!='podman container rm -f' \ + dkcrm='podman container rm' \ + dkcsp='podman container stop' \ + dkcst='podman container restart' \ + dkex='podman container exec -i -t' \ + dki='podman image' \ + dkic='podman image create' \ + dkii='podman image inspect' \ + dkil='podman pull' \ + dkils='podman image ls' \ + dkilsa='podman image ls -a' \ + dkilsaq='podman image ls -a -q' \ + dkilsq='podman image ls -q' \ + dkip='podman image push' \ + dkirm!='podman image rm -f' \ + dkirm='podman image rm' \ + dkis='podman image save' \ + dkit='podman image tag' \ + dklo='podman logs -f' \ + dkn='podman network' \ + dknc='podman network create' \ + dkni='podman network inspect' \ + dknls='podman network ls' \ + dknlsq='podman network ls -q' \ + dknrm!='podman network rm -f' \ + dknrm='podman network rm' \ + dksys='podman system' \ + dksysdf='podman system df' \ + dksysp!='podman system prune -f' \ + dksysp='podman system prune' \ + dktop='podman top' \ + dkv='podman volume' \ + dkvc='podman volume create' \ + dkvi='podman volume inspect' \ + dkvls='podman volume ls' \ + dkvlsq='podman volume ls -q' \ + dkvrm!='podman volume rm -f' \ + dkvrm='podman volume rm' alias dc='docker-compose' \ dcb!='docker-compose build --no-cache' \ @@ -67,3 +66,15 @@ alias dc='docker-compose' \ dcupb='docker-compose up --build' \ dcupd='docker-compose up -d' \ dcupdb='docker-compose up -d --build' + +function dkb() { + local name="${1:-${PWD##*/}}"; shift + + docker build . -t "$name" "$@" +} + +function dkr() { + [ -z "$1" ] && set -- "${PWD##*/}" + + docker run -i -t "$@" +} diff --git a/.config/bash/11-git.bash b/.config/bash/11-git.bash index f58992a..3139cd5 100644 --- a/.config/bash/11-git.bash +++ b/.config/bash/11-git.bash @@ -3,31 +3,3 @@ function gi() { curl -fL "https://www.toptal.com/developers/gitignore/api/$*" } - -. /usr/share/bash-completion/completions/git -compalias g='git' \ - ga='git add' \ - gaa='git add --all' \ - gap='git apply' \ - gb='git branch' \ - gbl='git blame -w' \ - gbs='git bisect' \ - gc='git commit --verbose' \ - gca='git commit --verbose --all' \ - gcl='git clone' \ - gco='git checkout' \ - gcp='git cherry-pick' \ - gd='git diff' \ - gdup='git diff @{upstream}' \ - gf='git fetch' \ - gl='git pull' \ - glo='git log --oneline --decorate' \ - gmr='git merge' \ - gp='git push' \ - gr='git remote' \ - grb='git rebase' \ - grev='git revert' \ - grh='git reset' \ - grs='git restore' \ - gst='git status' \ - gsta='git stash' diff --git a/.config/bash/11-k8s.bash b/.config/bash/11-k8s.bash index 235990a..af931a4 100644 --- a/.config/bash/11-k8s.bash +++ b/.config/bash/11-k8s.bash @@ -1,5 +1,5 @@ function kns() { - local cache="$HOME/.local/state/${FUNCNAME[0]}" + local cache="$XDG_CACHE_HOME/${FUNCNAME[0]}" if [ -n "$1" ]; then if ! kubectl get namespace -o name | grep -q "^namespace/$1\$"; then @@ -19,7 +19,7 @@ function kns() { } function kctx() { - local cache="$HOME/.local/state/${FUNCNAME[0]}" + local cache="$XDG_CACHE_HOME/${FUNCNAME[0]}" if [ -n "$1" ]; then kubectl config use-context "$1" > /dev/null || return diff --git a/.config/bash/20-theme.bash b/.config/bash/20-theme.bash index 10746cb..62dc67b 100644 --- a/.config/bash/20-theme.bash +++ b/.config/bash/20-theme.bash @@ -17,10 +17,11 @@ GIT_PS1_SHOWCOLORHINTS=1 #shellcheck disable=SC2034 VIRTUAL_ENV_DISABLE_PROMPT=1 +PROMPT_COMMAND=precmd function precmd() { local ctx err="${PIPESTATUS[*]}" - ctx="$(kctx 2> /dev/null)" + ctx="$(kctx)" # shellcheck disable=SC2086 unset ${!PROMPT_P*} @@ -28,6 +29,4 @@ function precmd() { [ -n "$ctx" ] && PROMPT_PK8S="$ctx/$(kns) " [[ "$err" =~ [1-9] ]] && PROMPT_PERR="${err// /|} " } - -PROMPT_COMMAND=precmd PS1='\[\e[00;38;5;37m\]$PROMPT_PVENV\[\e[38;5;134m\]$PROMPT_PK8S\[\e[00m\]$(__git_ps1 "%s ")\[\e[01;38;5;32m\]\w\[\e[00m\] \[\e[38;5;160m\]$PROMPT_PERR${_[\j<1]+\[\e[38;5;71m\]\j }\[\e[00m\]' diff --git a/.config/fastfetch/config.jsonc b/.config/fastfetch/config.jsonc index 6c707ee..95eb4e3 100644 --- a/.config/fastfetch/config.jsonc +++ b/.config/fastfetch/config.jsonc @@ -1,5 +1,4 @@ { - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", "modules": [ "title", "separator", @@ -9,10 +8,7 @@ "uptime", "packages", "shell", - { - "type": "display", - "compactType": "original", - }, + { "type": "display", "compactType": "original" }, "de", "wm", "theme", diff --git a/.config/git/config b/.config/git/config index b8de9e7..ce5a598 100644 --- a/.config/git/config +++ b/.config/git/config @@ -9,3 +9,31 @@ cmd = nvim -d -c \"wincmd l\" \"$LOCAL\" \"$REMOTE\" [init] defaultBranch = main +[alias] +a = add +aa = add --all +ap = apply +b = branch +bl = blame -w +bs = bisect +c = commit --verbose +ca = commit --verbose --all +cl = clone +co = checkout +cp = cherry-pick +d = diff +dup = diff @{upstream} +f = fetch +l = pull +lo = log --oneline --decorate +ls = ls-files +m = merge +p = push +r = remote +rb = rebase +rev = revert +rh = reset +rs = restore +st = status +sta = stash +vi = difftool diff --git a/.config/newsraft/config b/.config/newsraft/config index a66d03c..0e29aa0 100644 --- a/.config/newsraft/config +++ b/.config/newsraft/config @@ -1,6 +1,7 @@ set menu-feed-sorting unread-desc set menu-item-sorting unread-desc +set notification-command '' bind v exec mpv "%l" -bind V exec mpv --speed=1.5 "%l" bind q quit-hard +unbind ^D diff --git a/.config/newsraft/feeds b/.config/newsraft/feeds index b2fc27a..5389f56 100644 --- a/.config/newsraft/feeds +++ b/.config/newsraft/feeds @@ -2,7 +2,6 @@ @ Entertainment https://www.youtube.com/feeds/videos.xml?channel_id=UCI4W-ck8ZLA_YljxMhlpg2g "Chess Simp" -https://www.youtube.com/feeds/videos.xml?channel_id=UCto7D1L-MiRoOziCXK9uT5Q "Let's Game It Out" https://www.youtube.com/feeds/videos.xml?channel_id=UCf-vV5woXPFpkvZKwooWoyw "WirtualTV" @ News diff --git a/.config/nvim/ftplugin/dockerfile.lua b/.config/nvim/ftplugin/dockerfile.lua index 72196f5..da31014 100644 --- a/.config/nvim/ftplugin/dockerfile.lua +++ b/.config/nvim/ftplugin/dockerfile.lua @@ -1,4 +1 @@ --- variables vim.opt_local.wrap = false - --- keybindings diff --git a/.config/nvim/ftplugin/gitcommit.lua b/.config/nvim/ftplugin/gitcommit.lua index 211859c..09cd539 100644 --- a/.config/nvim/ftplugin/gitcommit.lua +++ b/.config/nvim/ftplugin/gitcommit.lua @@ -1,4 +1 @@ --- variables vim.opt_local.colorcolumn = "50" - --- keybindings diff --git a/.config/nvim/ftplugin/groovy.lua b/.config/nvim/ftplugin/groovy.lua deleted file mode 100644 index c6ba91d..0000000 --- a/.config/nvim/ftplugin/groovy.lua +++ /dev/null @@ -1,5 +0,0 @@ --- variables -vim.opt_local.shiftwidth = 2 -vim.opt_local.tabstop = 2 - --- keybindings diff --git a/.config/nvim/ftplugin/html.lua b/.config/nvim/ftplugin/html.lua deleted file mode 100644 index c6ba91d..0000000 --- a/.config/nvim/ftplugin/html.lua +++ /dev/null @@ -1,5 +0,0 @@ --- variables -vim.opt_local.shiftwidth = 2 -vim.opt_local.tabstop = 2 - --- keybindings diff --git a/.config/nvim/ftplugin/html.lua b/.config/nvim/ftplugin/html.lua new file mode 120000 index 0000000..551c0bf --- /dev/null +++ b/.config/nvim/ftplugin/html.lua @@ -0,0 +1 @@ +json.lua \ No newline at end of file diff --git a/.config/nvim/ftplugin/javascript.lua b/.config/nvim/ftplugin/javascript.lua deleted file mode 100644 index c6ba91d..0000000 --- a/.config/nvim/ftplugin/javascript.lua +++ /dev/null @@ -1,5 +0,0 @@ --- variables -vim.opt_local.shiftwidth = 2 -vim.opt_local.tabstop = 2 - --- keybindings diff --git a/.config/nvim/ftplugin/javascript.lua b/.config/nvim/ftplugin/javascript.lua new file mode 120000 index 0000000..551c0bf --- /dev/null +++ b/.config/nvim/ftplugin/javascript.lua @@ -0,0 +1 @@ +json.lua \ No newline at end of file diff --git a/.config/nvim/ftplugin/json.lua b/.config/nvim/ftplugin/json.lua index c6ba91d..413a354 100644 --- a/.config/nvim/ftplugin/json.lua +++ b/.config/nvim/ftplugin/json.lua @@ -1,5 +1,2 @@ --- variables vim.opt_local.shiftwidth = 2 vim.opt_local.tabstop = 2 - --- keybindings diff --git a/.config/nvim/ftplugin/python.lua b/.config/nvim/ftplugin/python.lua index e437f58..efc9590 100644 --- a/.config/nvim/ftplugin/python.lua +++ b/.config/nvim/ftplugin/python.lua @@ -1,4 +1 @@ --- variables - --- keybindings vim.keymap.set("n", "f", "Black", {buffer=true}) diff --git a/.config/nvim/ftplugin/tex.lua b/.config/nvim/ftplugin/tex.lua index 01b02d1..3beef62 100644 --- a/.config/nvim/ftplugin/tex.lua +++ b/.config/nvim/ftplugin/tex.lua @@ -1,9 +1,6 @@ --- variables vim.opt_local.shiftwidth = 2 vim.opt_local.tabstop = 2 vim.opt_local.spell = true vim.opt_local.textwidth = 79 - --- keybindings diff --git a/.config/nvim/ftplugin/yaml.lua b/.config/nvim/ftplugin/yaml.lua deleted file mode 100644 index c6ba91d..0000000 --- a/.config/nvim/ftplugin/yaml.lua +++ /dev/null @@ -1,5 +0,0 @@ --- variables -vim.opt_local.shiftwidth = 2 -vim.opt_local.tabstop = 2 - --- keybindings diff --git a/.config/nvim/ftplugin/yaml.lua b/.config/nvim/ftplugin/yaml.lua new file mode 120000 index 0000000..551c0bf --- /dev/null +++ b/.config/nvim/ftplugin/yaml.lua @@ -0,0 +1 @@ +json.lua \ No newline at end of file diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 6b0a2f5..06b4723 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,74 +1,42 @@ ---------------------- ------ variables ----- ---------------------- - vim.g.mapleader = " " - vim.opt.expandtab = true vim.opt.smartindent = true vim.opt.shiftwidth = 4 vim.opt.tabstop = 4 vim.opt.cino = "(s" vim.g.python_indent = { open_paren = "shiftwidth()" } - vim.opt.list = true vim.opt.listchars = { tab = "> ", trail = "-", nbsp = "+", } - vim.opt.number = true vim.opt.relativenumber = true vim.opt.laststatus = 3 - -vim.opt.ignorecase = true -vim.opt.smartcase = true - vim.opt.guicursor = "" vim.opt.mousemodel = extend - vim.opt.path = vim.o.path .. ",**" vim.opt.suffixes = vim.o.suffixes .. ",.pyc,.hi" - vim.opt.foldmethod = "indent" vim.opt.foldlevel = 99 - vim.opt.scrolloff = 2 vim.opt.colorcolumn = "80" - vim.g.netrw_banner = 0 vim.g.netrw_list_hide = "\\.o$,\\.d$,\\.gc..$" - vim.opt.lazyredraw = true - vim.opt.complete = vim.o.complete .. ",i" --------------------- ------ packages ----- --------------------- - vim.loader.enable() - vim.cmd("packadd plenary") - require"theme" - require"pack-lspconfig" require"pack-telescope" require"pack-treesitter" ------------------------ ------ keybindings ----- ------------------------ - vim.keymap.set("n", "e", ".w !$SHELL") vim.keymap.set("n", "f", "%s/\\s\\+$//e") ------------------------- ------ autocommands ----- ------------------------- - vim.api.nvim_create_autocmd({ "BufWinEnter" }, { callback = function() vim.opt_local.listchars = vim.o.listchars .. ",leadmultispace:│" .. string.rep(" ", vim.o.shiftwidth - 1) diff --git a/.config/nvim/lua/pack-dirdiff.lua b/.config/nvim/lua/pack-dirdiff.lua deleted file mode 100644 index 9314e4f..0000000 --- a/.config/nvim/lua/pack-dirdiff.lua +++ /dev/null @@ -1 +0,0 @@ -vim.cmd("packadd dirdiff") diff --git a/.config/nvim/pack/plugins/opt/onedark b/.config/nvim/pack/plugins/opt/onedark index 8e4b79b..fae34f7 160000 --- a/.config/nvim/pack/plugins/opt/onedark +++ b/.config/nvim/pack/plugins/opt/onedark @@ -1 +1 @@ -Subproject commit 8e4b79b0e6495ddf29552178eceba1e147e6cecf +Subproject commit fae34f7c635797f4bf62fb00e7d0516efa8abe37 diff --git a/.config/nvim/pack/plugins/opt/plenary b/.config/nvim/pack/plugins/opt/plenary index a3e3bc8..2d9b061 160000 --- a/.config/nvim/pack/plugins/opt/plenary +++ b/.config/nvim/pack/plugins/opt/plenary @@ -1 +1 @@ -Subproject commit a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683 +Subproject commit 2d9b06177a975543726ce5c73fca176cedbffe9d diff --git a/.config/nvim/pack/plugins/opt/telescope b/.config/nvim/pack/plugins/opt/telescope index bfcc7d5..eae0d8f 160000 --- a/.config/nvim/pack/plugins/opt/telescope +++ b/.config/nvim/pack/plugins/opt/telescope @@ -1 +1 @@ -Subproject commit bfcc7d5c6f12209139f175e6123a7b7de6d9c18a +Subproject commit eae0d8fbde590b0eaa2f9481948cd6fd7dd21656 diff --git a/.config/nvim/pack/plugins/opt/treesitter b/.config/nvim/pack/plugins/opt/treesitter index acc1708..d1e1f17 160000 --- a/.config/nvim/pack/plugins/opt/treesitter +++ b/.config/nvim/pack/plugins/opt/treesitter @@ -1 +1 @@ -Subproject commit acc1708b962e12cc1d671cd530782727801804c3 +Subproject commit d1e1f17cea23f14cbe230635b9bb654a835f02d7 diff --git a/.config/suckless/dwm-6.5/config.h b/.config/suckless/dwm-6.5/config.h index 73a2192..e2e05de 100644 --- a/.config/suckless/dwm-6.5/config.h +++ b/.config/suckless/dwm-6.5/config.h @@ -13,10 +13,11 @@ static const char col_gray2[] = "#444444"; static const char col_gray3[] = "#bbbbbb"; static const char col_gray4[] = "#eeeeee"; static const char col_cyan[] = "#005577"; +static const char col_red[] = "#ff0000"; static const char *colors[][3] = { /* fg bg border */ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, - [SchemeSel] = { col_gray4, col_cyan, col_cyan }, + [SchemeSel] = { col_gray4, col_cyan, col_red }, }; /* tagging */ @@ -64,10 +65,12 @@ static const char *pwwwcmd[] = { "org.mozilla.firefox", "--private-window" static const char *calccmd[] = { "alacritty", "-epython", NULL }; static const char *fmcmd[] = { "pcmanfm", NULL }; static const char *prtsccmd[] = { "sh", "-c", "gm import png:- | xclip -sel c -t image/png && xclip -sel c -o | feh -", NULL }; -static const char *lvolcmd[] = { "vol", "-5", NULL }; -static const char *rvolcmd[] = { "vol", "+5", NULL }; -static const char *mutecmd[] = { "vol", "m", NULL }; -static const char *micmutecmd[] = { "wpctl", "set-mute", "@DEFAULT_SOURCE@", "toggle", NULL }; +static const char *lvolcmd[] = { "vol", "s", "-5", NULL }; +static const char *rvolcmd[] = { "vol", "s", "+5", NULL }; +static const char *mutecmd[] = { "vol", "s", "m", NULL }; +static const char *miclvolcmd[] = { "vol", "m", "-5", NULL }; +static const char *micrvolcmd[] = { "vol", "m", "+5", NULL }; +static const char *micmutecmd[] = { "vol", "m", "m", NULL }; static const char *pausecmd[] = { "playerctl", "play-pause", NULL }; static const char *prevcmd[] = { "playerctl", "previous", NULL }; static const char *nextcmd[] = { "playerctl", "next", NULL }; @@ -85,7 +88,7 @@ static const Key keys[] = { /* modifier key function argument */ { MODKEY, XK_r, spawn, {.v = dmenucmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } }, - { MODKEY, XK_l, spawn, {.v = lockcmd } }, + { MODKEY, XK_x, spawn, {.v = lockcmd } }, { MODKEY, XK_b, spawn, {.v = wwwcmd } }, { MODKEY|ShiftMask, XK_b, spawn, {.v = pwwwcmd } }, { 0, XF86XK_Calculator, spawn, {.v = calccmd } }, @@ -94,8 +97,10 @@ static const Key keys[] = { { 0, XF86XK_AudioLowerVolume, spawn, {.v = lvolcmd } }, { 0, XF86XK_AudioRaiseVolume, spawn, {.v = rvolcmd } }, { 0, XF86XK_AudioMute, spawn, {.v = mutecmd } }, - { 0, XF86XK_AudioMicMute, spawn, {.v = micmutecmd } }, + { ShiftMask, XF86XK_AudioLowerVolume, spawn, {.v = miclvolcmd } }, + { ShiftMask, XF86XK_AudioRaiseVolume, spawn, {.v = micrvolcmd } }, { ShiftMask, XF86XK_AudioMute, spawn, {.v = micmutecmd } }, + { 0, XF86XK_AudioMicMute, spawn, {.v = micmutecmd } }, { 0, XF86XK_AudioPlay, spawn, {.v = pausecmd } }, { 0, XF86XK_AudioPrev, spawn, {.v = prevcmd } }, { 0, XF86XK_AudioNext, spawn, {.v = nextcmd } }, @@ -109,6 +114,9 @@ static const Key keys[] = { { MODKEY, XK_o, spawn, {.v = passotpcmd } }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, + { MODKEY, XK_h, setmfact, {.f = -0.05 } }, + { MODKEY, XK_l, setmfact, {.f = +0.05 } }, + { MODKEY, XK_equal, setmfact, {.f = 1.5 } }, { MODKEY|ShiftMask, XK_z, zoom, {0} }, { MODKEY|ShiftMask, XK_c, killclient, {0} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0] } }, diff --git a/.config/suckless/dwm-6.5/patches/warpcursor.diff b/.config/suckless/dwm-6.5/patches/wrapcursor.diff similarity index 100% rename from .config/suckless/dwm-6.5/patches/warpcursor.diff rename to .config/suckless/dwm-6.5/patches/wrapcursor.diff diff --git a/.config/suckless/update.sh b/.config/suckless/install.sh similarity index 100% rename from .config/suckless/update.sh rename to .config/suckless/install.sh diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc new file mode 100644 index 0000000..0ea13be --- /dev/null +++ b/.config/zathura/zathurarc @@ -0,0 +1 @@ +set database null diff --git a/.inputrc b/.inputrc index 20fbac8..2fc9f21 100644 --- a/.inputrc +++ b/.inputrc @@ -5,12 +5,12 @@ set menu-complete-display-prefix on set page-completions off set show-all-if-ambiguous on -"\e[A":history-search-backward -"\e[B":history-search-forward +"\e[A": history-search-backward +"\e[B": history-search-forward "\C-l": clear-screen "\C-w": backward-kill-word -TAB:menu-complete -"\e[Z":menu-complete-backward +TAB: menu-complete +"\e[Z": menu-complete-backward diff --git a/.local/bin/crypto b/.local/bin/crypto index da9d6c6..6e8d0dc 100755 --- a/.local/bin/crypto +++ b/.local/bin/crypto @@ -17,7 +17,7 @@ def get_btc_fees() -> str: url = "mempool.space" path = "/api/v1/fees/mempool-blocks" - client = http.HTTPSConnection(url) + client = http.HTTPSConnection(url, timeout=10) client.request("GET", path) # https://mempool.space/docs/api/rest#get-mempool-blocks-fees @@ -30,7 +30,7 @@ def get_coins_values() -> str: url = "api.coingecko.com" path = f"/api/v3/simple/price?ids={ids}&vs_currencies={CURRENCY}" - client = http.HTTPSConnection(url) + client = http.HTTPSConnection(url, timeout=10) client.request("GET", path) # https://www.coingecko.com/api/documentation diff --git a/.local/bin/epitest b/.local/bin/epitest deleted file mode 100755 index 0659bd3..0000000 --- a/.local/bin/epitest +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -e - -OPT=() -if [ -z "$WAYLAND_DISPLAY" ]; then - OPT+=( - --network=host - -e XAUTHORITY=/app/.Xauthority - -v "$XAUTHORITY:/app/.Xauthority:ro" - ) -fi - -podman run --rm -it --name epitest \ - "${OPT[@]}" \ - --ipc=host \ - --device /dev/dri/ \ - -e DISPLAY \ - -e XDG_RUNTIME_DIR \ - -e MAKEFLAGS \ - -e CFLAGS=-g3 \ - -e CXXFLAGS=-g3 \ - -v /tmp/.X11-unix/:/tmp/.X11-unix/ \ - -v "$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR" \ - -v /usr/share/fonts/:/usr/share/fonts/:ro \ - -v "$PWD:$PWD" \ - -w "$PWD" \ - docker.io/epitechcontent/epitest-docker:latest \ - "$@" diff --git a/.local/bin/ffreduce b/.local/bin/ffreduce new file mode 100755 index 0000000..e8e645c --- /dev/null +++ b/.local/bin/ffreduce @@ -0,0 +1,19 @@ +#!/bin/bash -e + +in="$1"; shift +out="$1"; shift +smalside="${1:-480}"; shift || true + +if ! [ -r "$in" ]; then + echo "error: can't read '$in'" >&2 + exit 1 +fi + +if [ -z "$out" ]; then + echo "error: output file name can't be empty" >&2 + exit 1 +fi + +set -x +#ffmpeg -i "$in" -r 24 -vcodec libx265 -vf "scale=-2:$smalside,setpts=0.5*PTS" "$@" "$out" +ffmpeg -i "$in" -r 24 -vcodec libx265 -vf "scale=-2:$smalside" "$@" "$out" diff --git a/.local/bin/gradle b/.local/bin/gradle deleted file mode 100755 index bf4a1a8..0000000 --- a/.local/bin/gradle +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -e - -if ! [ -f /tmp/gradle ]; then - podman run -d --rm --name gradle -v "$HOME:$HOME" -w "$PWD" \ - docker.io/gradle:8 sleep infinity - touch /tmp/gradle -fi - -podman exec -it gradle gradle "$@" diff --git a/.local/bin/light b/.local/bin/light index 82639d9..4d04b97 100755 --- a/.local/bin/light +++ b/.local/bin/light @@ -17,8 +17,6 @@ function set_light() { DIRS=(/sys/class/backlight/*) CUR="$(get_current "${DIRS[0]}")" -echo "$CUR" -echo "\$(($CUR + $1 - $CUR % $1 + $CUR % $1 / $1 * $1))" case "${1:0:1}" in '') echo "$CUR"; exit ;; '+'|'-') CUR="$(($CUR + $1 - $CUR % $1 + $CUR % $1 * 10 / $1 / 5 * $1))" ;; @@ -32,6 +30,3 @@ echo "$CUR" for d in "${DIRS[@]}"; do set_light "$d" done - -notify-send -t 1000 -u low -i display-brightness-symbolic \ - -h string:synchronous:light -h int:value:"$CUR" "$CUR%" diff --git a/.local/bin/sbar b/.local/bin/sbar index 6da83f0..0f43b18 100755 --- a/.local/bin/sbar +++ b/.local/bin/sbar @@ -52,20 +52,28 @@ function update_source_vol() { source_vol=" $(awk '{printf "%.0f", $2 * 100}' <<< "$source")" } -function update_wlp() { - local sig ssid dev=wlan0 +function update_net() { + local dev j ssid sig - sig="$(awk "/$dev/{printf \"%.0f\", \$3}" /proc/net/wireless)" - if [ -z "$sig" ]; then - wlp='⚠' - return - fi - ssid="$(networkctl status "$dev" --json=short | jq -r .SSID)" - { [ "$sig" -gt 56 ] && wlp="▂▄▆█ $ssid"; } || - { [ "$sig" -gt 38 ] && wlp="▂▄▆_ $ssid"; } || - { [ "$sig" -gt 21 ] && wlp="▂▄__ $ssid"; } || - { [ "$sig" -gt 3 ] && wlp="▂___ $ssid"; } || - { wlp="____ $ssid"; } + dev="$(ip route show default | sed -n 's/.*dev\s\+\(\w\+\).*/\1/p;q')" + j="$(networkctl status "$dev" --json=short)" + case "$(jq -r .Type <<< "$j")" in + ether) + net="🌐 $dev" + ;; + wlan) + ssid="$(jq -r .SSID <<< "$j")" + sig="$(awk "/$dev/{printf \"%.0f\", \$3}" /proc/net/wireless)" + { [ "$sig" -gt 56 ] && net="▂▄▆█ $ssid"; } || + { [ "$sig" -gt 38 ] && net="▂▄▆_ $ssid"; } || + { [ "$sig" -gt 21 ] && net="▂▄__ $ssid"; } || + { [ "$sig" -gt 3 ] && net="▂___ $ssid"; } || + { net="____ $ssid"; } + ;; + *) + net='⚠' + ;; + esac } function update_time() { @@ -77,7 +85,7 @@ function reload() { } function display() { - "${DISPLAYCMD[@]}" "$crypto | $cpu | $memory | $sink_vol $source_vol | $wlp | $bat | $time" + "${DISPLAYCMD[@]}" "$crypto | $cpu | $memory | $sink_vol $source_vol | $net | $bat | $time" } if [ "$XDG_SESSION_TYPE" = wayland ]; then @@ -87,10 +95,11 @@ else fi # SIGNALING -# trap ';display;wait' 'RTMIN+n' -trap 'reload' 'RTMIN' -trap 'update_sink_vol;display;wait' 'RTMIN+1' -trap 'update_wlp;display;wait' 'RTMIN+2' +# trap ';display;wait' 'RTMIN+n' +trap 'reload' 'RTMIN' +trap 'update_sink_vol;display;wait' 'RTMIN+1' +trap 'update_source_vol;display;wait' 'RTMIN+2' +trap 'update_net;display;wait' 'RTMIN+3' # to update it from external commands ## kill -m "$(cat ~/.cache/pidofbar)" # where m = 34 + n @@ -105,12 +114,12 @@ while true; do update_memory update_sink_vol update_source_vol - update_wlp + update_net update_bat update_time display } - sec="$((sec + 10))" + ((sec += 10)) awk "@load \"time\"; BEGIN {d=10; s=$(date '+%S.%N'); sleep(d - s % d)}" & wait done diff --git a/.local/bin/steam b/.local/bin/steam deleted file mode 100755 index 7c4c821..0000000 --- a/.local/bin/steam +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -com.valvesoftware.Steam --nobrowser diff --git a/.local/bin/vol b/.local/bin/vol index b2a21d9..0a2eb60 100755 --- a/.local/bin/vol +++ b/.local/bin/vol @@ -1,34 +1,46 @@ #!/bin/bash -e -SINK='@DEFAULT_AUDIO_SINK@' -NOTIFY=(notify-send -t 1000 -u low) +case "$1" in + s) + DEV='@DEFAULT_AUDIO_SINK@' + SIG=35 + ;; + m) + DEV='@DEFAULT_AUDIO_SOURCE@' + SIG=36 + ;; + *) + exit 1 + ;; +esac +shift function update_vol() { - if [[ "$1" =~ ^(-|\+)* ]]; then - CUR="$(($CUR + $1 - $CUR % $1 + $CUR % $1 * 10 / $1 / 5 * $1))" - [ "$CUR" -lt 0 ] && CUR=0 - [ "$CUR" -gt 150 ] && CUR=150 - else - CUR="$1" - fi - wpctl set-volume "$SINK" "$CUR%" + case "$1" in + +*|-*) + CUR="$(($CUR + $1 - $CUR % $1 + $CUR % $1 * 10 / $1 / 5 * $1))" + [ "$CUR" -lt 0 ] && CUR=0 + [ "$CUR" -gt 200 ] && CUR=200 + ;; + *) + CUR="$1" + esac + wpctl set-volume "$DEV" "$CUR%" } -read -r _ CUR MUTE < <(wpctl get-volume "$SINK") +read -r _ CUR MUTE < <(wpctl get-volume "$DEV") CUR="$(("10#${CUR/./}"))" if [ -z "$1" ]; then echo "$CUR" exit elif [ "$1" == 'm' ] && [ -z "$MUTE" ]; then - wpctl set-mute "$SINK" 1 - "${NOTIFY[@]}" -i audio-volume-muted-symbolic -h string:synchronous:vol "Mute" + wpctl set-mute "$DEV" 1 else if [[ "$1" =~ [0-9] ]]; then update_vol "$1" fi - [ -n "$MUTE" ] && wpctl set-mute "$SINK" 0 - "${NOTIFY[@]}" -i audio-volume-high-symbolic -h string:synchronous:vol -h int:value:"$CUR" "$CUR%" + [ -n "$MUTE" ] && wpctl set-mute "$DEV" 0 fi -kill -35 "$(cat "$HOME/.cache/pidofbar")" +kill "-$SIG" "$(cat "$HOME/.cache/pidofbar")" diff --git a/.local/bin/wlp b/.local/bin/wlp index fb85874..fc94117 100755 --- a/.local/bin/wlp +++ b/.local/bin/wlp @@ -2,11 +2,12 @@ iwctl=(iwctl station wlan0) +rfkill unblock wlan "${iwctl[@]}" show | grep -q 'Scanning\s\+yes' || "${iwctl[@]}" scan for _ in {0..29}; do if "${iwctl[@]}" show | grep -q '\s*State\s\+connected\s*$'; then - kill -36 "$(cat "$HOME/.cache/pidofbar")" + kill -37 "$(cat "$HOME/.cache/pidofbar")" exit 0 fi sleep 1 diff --git a/.local/share/flatpak/overrides/global b/.local/share/flatpak/overrides/global index 0e8b54a..59ca5d3 100644 --- a/.local/share/flatpak/overrides/global +++ b/.local/share/flatpak/overrides/global @@ -1,2 +1,2 @@ [Context] -filesystems=xdg-config/gtk-3.0:ro; +filesystems=xdg-config/gtk-3.0:ro;xdg-config/gtk-4.0:ro diff --git a/.var/app/org.mozilla.firefox/.mozilla/firefox/ange/chrome/userChrome.css b/.var/app/org.mozilla.firefox/.mozilla/firefox/ange/chrome/userChrome.css index 3027253..1370693 100644 --- a/.var/app/org.mozilla.firefox/.mozilla/firefox/ange/chrome/userChrome.css +++ b/.var/app/org.mozilla.firefox/.mozilla/firefox/ange/chrome/userChrome.css @@ -2,3 +2,7 @@ width: 0px !important; padding: 0px !important; } + +.tabbrowser-tab .tab-close-button { + visibility: collapse !important; +} diff --git a/.var/app/org.mozilla.firefox/.mozilla/firefox/ange/user.js b/.var/app/org.mozilla.firefox/.mozilla/firefox/ange/user.js index 0b9f4e8..d287637 100644 --- a/.var/app/org.mozilla.firefox/.mozilla/firefox/ange/user.js +++ b/.var/app/org.mozilla.firefox/.mozilla/firefox/ange/user.js @@ -14,6 +14,7 @@ user_pref("browser.topsites.contile.cachedTiles", ""); user_pref("browser.urlbar.update2.engineAliasRefresh", true); user_pref("datareporting.healthreport.uploadEnabled", false); user_pref("datareporting.policy.dataSubmissionEnabled", false); +user_pref("dom.private-attribution.submission.enabled", false); user_pref("dom.security.https_only_mode", true); user_pref("extensions.formautofill.addresses.enabled", false); user_pref("extensions.formautofill.creditCards.enabled", false); @@ -35,7 +36,7 @@ user_pref("browser.startup.homepage", "chrome://browser/content/blanktab.html"); user_pref("browser.startup.page", 3); user_pref("browser.tabs.inTitlebar", 0); user_pref("browser.toolbars.bookmarks.visibility", "newtab"); -user_pref("browser.translations.enable", false); +//user_pref("browser.translations.enable", false); user_pref("browser.uiCustomization.state", "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"downloads-button\",\"fxa-toolbar-menu-button\",\"unified-extensions-button\",\"ublock0_raymondhill_net-browser-action\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"alltabs-button\"],\"PersonalToolbar\":[\"personal-bookmarks\"]},\"currentVersion\":20,\"newElementCount\":3}"); user_pref("browser.zoom.siteSpecific", false); user_pref("media.autoplay.blocking_policy", 2);