remove sync, gtk4 bugs

This commit is contained in:
2026-07-29 16:11:06 +07:00
parent 0d6d830c6d
commit e6b357ab21
3 changed files with 47 additions and 46 deletions
+37
View File
@@ -0,0 +1,37 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
HISTFILE=~/.histfile
HISTSIZE=2000
SAVEHIST=2000
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
bindkey "\e[3~" delete-char
autoload -Uz compinit && compinit
zstyle ':completion:*' menu select
# End of lines added by compinstall
source /home/nnduc/git/powerlevel10k/powerlevel10k.zsh-theme
source /home/nnduc/git/zsh-autosuggestions/zsh-autosuggestions.zsh
zshaddhistory() {
whence ${${(z)1}[1]} >/dev/null || return 2
}
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
export EDITOR=nvim
export TERM='xterm-256color'
export PATH="$HOME/.local/bin:$PATH"
alias ls='ls --color=auto'
alias doc='docker-compose'
+2 -42
View File
@@ -1,44 +1,4 @@
#!/bin/bash #!/bin/bash
wall_dir="${1:?wallpaper directory required}" wall_dir="${1:?wallpaper directory required}"
interval="${2:-1800}" img=$(find "$wall_dir" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) | shuf -n1)
[ -n "$img" ] && feh --bg-fill "$img"
pick_wall() {
find "$wall_dir" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) | shuf -n1
}
set_wall() { [ -n "$1" ] && xwallpaper --zoom "$1"; }
has_fullscreen() {
python3 - <<'EOF'
import json, subprocess, sys
def is_fullscreen(node):
if node.get('fullscreen_mode', 0) > 0: return True
return any(is_fullscreen(c) for c in node.get('nodes', []) + node.get('floating_nodes', []))
def find_ws(node, name):
if node.get('type') == 'workspace' and node.get('name') == name: return node
for c in node.get('nodes', []) + node.get('floating_nodes', []):
r = find_ws(c, name)
if r: return r
try:
wss = json.loads(subprocess.check_output(['i3-msg', '-t', 'get_workspaces'], stderr=subprocess.DEVNULL))
tree = json.loads(subprocess.check_output(['i3-msg', '-t', 'get_tree'], stderr=subprocess.DEVNULL))
for ws in wss:
if ws.get('visible'):
node = find_ws(tree, ws['name'])
if node and is_fullscreen(node):
sys.exit(0)
except Exception:
pass
sys.exit(1)
EOF
}
# Initial wallpaper
set_wall "$(pick_wall)"
while sleep "$interval"; do
has_fullscreen || set_wall "$(pick_wall)"
done
+8 -4
View File
@@ -1,10 +1,6 @@
backend = "xrender";
vsync = true; vsync = true;
use-damage = true; use-damage = true;
# games bypass picom entirely when fullscreen
unredir-if-possible = true;
# no effects — featherweight # no effects — featherweight
shadow = false; shadow = false;
fading = false; fading = false;
@@ -13,3 +9,11 @@ corner-radius = 0;
detect-transient = true; detect-transient = true;
detect-client-leader = true; detect-client-leader = true;
unredir-if-possible = true;
# xrender avoids picom creating its own GL context, which conflicts
# with GTK4/WebKitGTK apps (e.g. Stremio) using their own GL context
# on NVIDIA — that conflict was rendering such windows transparent.
backend = "xrender";