Cleanup, no longer in use config + scripts.
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
[general]
|
||||
always_show_help.enabled = true
|
||||
collapsed_sections = ["staged_changes"]
|
||||
refresh_on_file_change.enabled = true
|
||||
stash_list_limit = 20
|
||||
recent_commits_limit = 100
|
||||
mouse_support = true
|
||||
mouse_scroll_lines = 3
|
||||
@@ -1,132 +0,0 @@
|
||||
;==========================================================
|
||||
; Polybar config - Qogir themed
|
||||
; Place at ~/.config/polybar/config.ini
|
||||
;==========================================================
|
||||
|
||||
[colors]
|
||||
background = #212121
|
||||
background-alt = #3c3c3c
|
||||
foreground = #d3dae3
|
||||
foreground-alt = #000000
|
||||
accent = #616161
|
||||
accent-alt = #6ba0e8
|
||||
red = #e35b5b
|
||||
green = #98c379
|
||||
yellow = #e5c07b
|
||||
disabled = #707880
|
||||
|
||||
[bar/main]
|
||||
width = 100%
|
||||
height = 35px
|
||||
radius = 0
|
||||
fixed-center = true
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 0px
|
||||
line-color = ${colors.accent}
|
||||
|
||||
border-size = 0px
|
||||
border-color = #00000000
|
||||
|
||||
padding-left = 1
|
||||
padding-right = 1
|
||||
|
||||
module-margin = 1
|
||||
|
||||
separator = "|"
|
||||
separator-foreground = ${colors.disabled}
|
||||
|
||||
font-0 = "JetBrainsMono Nerd Font:size=14;3"
|
||||
font-1 = "JetBrainsMono Nerd Font:size=14;3"
|
||||
|
||||
modules-left = xworkspaces xwindow
|
||||
modules-right = filesystem pulseaudio memory cpu eth date tray
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
enable-ipc = true
|
||||
|
||||
;==========================================================
|
||||
; Workspaces
|
||||
;==========================================================
|
||||
[module/xworkspaces]
|
||||
type = internal/xworkspaces
|
||||
|
||||
label-active = " %name% "
|
||||
label-active-background = ${colors.accent}
|
||||
label-active-foreground = ${colors.background}
|
||||
label-active-underline = ${colors.accent-alt}
|
||||
label-active-padding = 1
|
||||
|
||||
label-occupied = " %name% "
|
||||
label-occupied-foreground = #ffffff
|
||||
label-occupied-padding = 1
|
||||
|
||||
label-urgent = " %name% "
|
||||
label-urgent-background = ${colors.red}
|
||||
label-urgent-foreground = ${colors.background}
|
||||
label-urgent-padding = 1
|
||||
|
||||
label-empty = " %name% "
|
||||
label-empty-foreground = ${colors.disabled}
|
||||
label-empty-padding = 1
|
||||
|
||||
;==========================================================
|
||||
; Focused window title - focus indicator
|
||||
;==========================================================
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title%
|
||||
label-foreground = #ffffff
|
||||
label-padding = 1
|
||||
|
||||
;==========================================================
|
||||
; Date / time
|
||||
;==========================================================
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
|
||||
;date = %Y-%m-%d %H:%M:%S
|
||||
date = %Y-%m-%d %H:%M
|
||||
date-alt = %H:%M
|
||||
|
||||
label = %date%
|
||||
label-foreground = ${colors.foreground}
|
||||
label-padding = 1
|
||||
|
||||
;==========================================================
|
||||
; Pulseaudio
|
||||
;==========================================================
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
format-volume-prefix = "VOL "
|
||||
format-volume-prefix-foreground = ${colors.accent}
|
||||
format-volume = <label-volume>
|
||||
|
||||
label-volume = %percentage%%
|
||||
label-volume-padding = 1
|
||||
|
||||
label-muted = "MUTED"
|
||||
label-muted-foreground = ${colors.disabled}
|
||||
label-muted-padding = 1
|
||||
|
||||
;==========================================================
|
||||
; Pulseaudio
|
||||
;==========================================================
|
||||
[module/tray]
|
||||
type = internal/tray
|
||||
tray-maxsize = 16
|
||||
tray-padding = 4
|
||||
tray-background = ${colors.background}
|
||||
|
||||
;==========================================================
|
||||
; Settings
|
||||
;==========================================================
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
pseudo-transparency = false
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Terminate already running bar instances
|
||||
pkill -x polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
polybar main &
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
/usr/bin/alacritty &
|
||||
sleep 0.1
|
||||
# xdotool windowactivate
|
||||
/home/jason/.local/bin/tile
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
/usr/bin/chromium --password-store=basic &
|
||||
sleep 0.4
|
||||
# xdotool windowactivate
|
||||
/home/jason/.local/bin/tile
|
||||
@@ -1,200 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
# --- CONFIG ---
|
||||
TOP_BAR=36
|
||||
DECOR_H=30
|
||||
DECOR_W=5
|
||||
|
||||
MASTER_RATIO_NUM=1
|
||||
MASTER_RATIO_DEN=2
|
||||
|
||||
OUTER_GAP=8
|
||||
INNER_GAP=8
|
||||
|
||||
# Master selection:
|
||||
# focused = currently focused window
|
||||
# first = first window on desktop
|
||||
# last = last window on desktop
|
||||
MASTER_MODE="focused"
|
||||
|
||||
# ----------------
|
||||
|
||||
# Get current screen resolution
|
||||
read SCREEN_W SCREEN_H <<< $(xrandr | awk '
|
||||
/\*/ {
|
||||
split($1,a,"x")
|
||||
print a[1], a[2]
|
||||
exit
|
||||
}')
|
||||
|
||||
USABLE_H=$((SCREEN_H - TOP_BAR))
|
||||
|
||||
# Work area after outer gaps
|
||||
WORK_X=$OUTER_GAP
|
||||
WORK_Y=$((TOP_BAR + OUTER_GAP))
|
||||
WORK_W=$((SCREEN_W - 2 * OUTER_GAP))
|
||||
WORK_H=$((USABLE_H - 2 * OUTER_GAP))
|
||||
|
||||
# --- focused window ---
|
||||
FOCUSED=$(printf "0x%08x" "$(xdotool getactivewindow)")
|
||||
|
||||
# --- current desktop ---
|
||||
CUR_DESKTOP=$(xdotool get_desktop)
|
||||
|
||||
# --- collect windows on current desktop ---
|
||||
ALL_WINDOWS=$(wmctrl -l -x | awk '$2!="-1" {print $1}')
|
||||
|
||||
WINDOWS=()
|
||||
|
||||
for w in $ALL_WINDOWS; do
|
||||
win_desktop=$(xdotool get_desktop_for_window "$(printf "%d" "$w")" 2>/dev/null) || continue
|
||||
|
||||
if [ "$win_desktop" = "$CUR_DESKTOP" ]; then
|
||||
WINDOWS+=("$w")
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${#WINDOWS[@]} -eq 0 ]; then
|
||||
echo "No windows found on current desktop."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ----------------------------------------------------
|
||||
# Determine master window
|
||||
# ----------------------------------------------------
|
||||
|
||||
case "$MASTER_MODE" in
|
||||
focused)
|
||||
MASTER="$FOCUSED"
|
||||
;;
|
||||
first)
|
||||
MASTER="${WINDOWS[0]}"
|
||||
;;
|
||||
last)
|
||||
MASTER="${WINDOWS[$((${#WINDOWS[@]} - 1))]}"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid MASTER_MODE: $MASTER_MODE"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# --- separate master from stack ---
|
||||
STACK=()
|
||||
|
||||
for w in "${WINDOWS[@]}"; do
|
||||
if [ "$w" != "$MASTER" ]; then
|
||||
STACK+=("$w")
|
||||
fi
|
||||
done
|
||||
|
||||
place() {
|
||||
local id=$1
|
||||
local x=$2
|
||||
local y=$3
|
||||
local raw_w=$4
|
||||
local raw_h=$5
|
||||
local class decor_h decor_w x_offset y_offset
|
||||
x_offset=0
|
||||
y_offset=0
|
||||
|
||||
class=$(xprop -id "$id" WM_CLASS 2>/dev/null | sed -r 's/.*"(.*)"$/\1/')
|
||||
case "$class" in
|
||||
Alacritty)
|
||||
decor_h=42
|
||||
decor_w=8
|
||||
;;
|
||||
Chromium)
|
||||
decor_h=42
|
||||
decor_w=5
|
||||
;;
|
||||
obsidian)
|
||||
decor_h=5
|
||||
decor_w=0
|
||||
x_offset=-0
|
||||
y_offset=-0
|
||||
;;
|
||||
dev.zed.Zed)
|
||||
decor_h=-19
|
||||
decor_w=-23
|
||||
x_offset=-13
|
||||
y_offset=-13
|
||||
;;
|
||||
*)
|
||||
decor_h=$DECOR_H
|
||||
decor_w=$DECOR_W
|
||||
;;
|
||||
esac
|
||||
|
||||
local w=$((raw_w - decor_w))
|
||||
local h=$((raw_h - decor_h))
|
||||
local fx=$((x + x_offset))
|
||||
local fy=$((y + y_offset))
|
||||
wmctrl -i -r "$id" -b remove,maximized_vert,maximized_horz
|
||||
wmctrl -i -r "$id" -e 1,"$fx","$fy","$w","$h"
|
||||
}
|
||||
|
||||
# ----------------------------------------------------
|
||||
# Single window
|
||||
# ----------------------------------------------------
|
||||
|
||||
if [ ${#WINDOWS[@]} -eq 1 ]; then
|
||||
place \
|
||||
"$MASTER" \
|
||||
"$WORK_X" \
|
||||
"$WORK_Y" \
|
||||
"$WORK_W" \
|
||||
"$WORK_H"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# ----------------------------------------------------
|
||||
# Master / Stack layout
|
||||
# ----------------------------------------------------
|
||||
|
||||
MID=$((WORK_W * MASTER_RATIO_NUM / MASTER_RATIO_DEN))
|
||||
|
||||
MASTER_X=$WORK_X
|
||||
MASTER_Y=$WORK_Y
|
||||
|
||||
MASTER_W=$((MID - INNER_GAP / 2))
|
||||
MASTER_H=$WORK_H
|
||||
|
||||
STACK_X=$((WORK_X + MID + INNER_GAP / 2))
|
||||
STACK_Y=$WORK_Y
|
||||
|
||||
STACK_W=$((WORK_W - MID - INNER_GAP / 2))
|
||||
STACK_H=$WORK_H
|
||||
|
||||
# --- place master ---
|
||||
place \
|
||||
"$MASTER" \
|
||||
"$MASTER_X" \
|
||||
"$MASTER_Y" \
|
||||
"$MASTER_W" \
|
||||
"$MASTER_H"
|
||||
|
||||
# --- place stack ---
|
||||
COUNT=${#STACK[@]}
|
||||
|
||||
if [ "$COUNT" -gt 0 ]; then
|
||||
|
||||
SLOT_H=$(((STACK_H - INNER_GAP * (COUNT - 1)) / COUNT))
|
||||
|
||||
i=0
|
||||
|
||||
for w in "${STACK[@]}"; do
|
||||
|
||||
SLOT_Y=$((STACK_Y + i * (SLOT_H + INNER_GAP)))
|
||||
|
||||
place \
|
||||
"$w" \
|
||||
"$STACK_X" \
|
||||
"$SLOT_Y" \
|
||||
"$STACK_W" \
|
||||
"$SLOT_H"
|
||||
|
||||
i=$((i + 1))
|
||||
done
|
||||
fi
|
||||
@@ -1,78 +0,0 @@
|
||||
#!/bin/bash
|
||||
# focus-dir.sh - focus the nearest window in a given direction (h/j/k/l)
|
||||
# Usage: focus-dir.sh h|j|k|l (or left/down/up/right)
|
||||
|
||||
DIR=$1
|
||||
|
||||
if [ -z "$DIR" ]; then
|
||||
echo "Usage: $0 h|j|k|l"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --- get current desktop ---
|
||||
CUR_DESKTOP=$(xdotool get_desktop)
|
||||
|
||||
# --- get focused window geometry ---
|
||||
FOCUSED=$(xdotool getactivewindow)
|
||||
read -r FX FY FW FH < <(xdotool getwindowgeometry --shell "$FOCUSED" | awk -F= '
|
||||
/^X=/ {x=$2} /^Y=/ {y=$2} /^WIDTH=/ {w=$2} /^HEIGHT=/ {h=$2}
|
||||
END {print x, y, w, h}
|
||||
')
|
||||
FCX=$((FX + FW / 2))
|
||||
FCY=$((FY + FH / 2))
|
||||
|
||||
# --- get list of normal windows on current desktop ---
|
||||
ALL_WINDOWS=$(wmctrl -l -x | awk '$2!="-1" {print $1}')
|
||||
|
||||
BEST=""
|
||||
BEST_DIST=""
|
||||
|
||||
for w in $ALL_WINDOWS; do
|
||||
wid=$(printf "%d" "$w")
|
||||
|
||||
[ "$wid" = "$FOCUSED" ] && continue
|
||||
|
||||
win_desktop=$(xdotool get_desktop_for_window "$wid" 2>/dev/null) || continue
|
||||
[ "$win_desktop" = "$CUR_DESKTOP" ] || continue
|
||||
|
||||
read -r WX WY WW WH < <(xdotool getwindowgeometry --shell "$wid" | awk -F= '
|
||||
/^X=/ {x=$2} /^Y=/ {y=$2} /^WIDTH=/ {w=$2} /^HEIGHT=/ {h=$2}
|
||||
END {print x, y, w, h}
|
||||
')
|
||||
WCX=$((WX + WW / 2))
|
||||
WCY=$((WY + WH / 2))
|
||||
|
||||
DX=$((WCX - FCX))
|
||||
DY=$((WCY - FCY))
|
||||
|
||||
case "$DIR" in
|
||||
h|left)
|
||||
[ "$DX" -ge 0 ] && continue
|
||||
;;
|
||||
l|right)
|
||||
[ "$DX" -le 0 ] && continue
|
||||
;;
|
||||
k|up)
|
||||
[ "$DY" -ge 0 ] && continue
|
||||
;;
|
||||
j|down)
|
||||
[ "$DY" -le 0 ] && continue
|
||||
;;
|
||||
*)
|
||||
echo "Invalid direction: $DIR"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Manhattan distance, weighted to prefer windows roughly in line
|
||||
DIST=$(( (DX<0?-DX:DX) + (DY<0?-DY:DY) ))
|
||||
|
||||
if [ -z "$BEST_DIST" ] || [ "$DIST" -lt "$BEST_DIST" ]; then
|
||||
BEST_DIST=$DIST
|
||||
BEST=$wid
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$BEST" ]; then
|
||||
xdotool windowactivate "$BEST"
|
||||
fi
|
||||
Reference in New Issue
Block a user