From 5b971198b214323e971c6766f26a7b41d29128b8 Mon Sep 17 00:00:00 2001 From: artemis Date: Mon, 8 Sep 2025 19:40:23 +0530 Subject: [PATCH] Added bspwm config files --- .gitignore | 51 ++++++++++++++++++++++++++++++++++++ README.org | 19 ++++++++++++++ minconf/bspwm/bspwmrc | 25 ++++++++++++++++++ minconf/bspwm/sxhkdrc | 61 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 156 insertions(+) create mode 100644 .gitignore create mode 100644 README.org create mode 100755 minconf/bspwm/bspwmrc create mode 100644 minconf/bspwm/sxhkdrc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..489b892 --- /dev/null +++ b/.gitignore @@ -0,0 +1,51 @@ +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + +# undo-tree +*.~undo-tree~ diff --git a/README.org b/README.org new file mode 100644 index 0000000..03be3b4 --- /dev/null +++ b/README.org @@ -0,0 +1,19 @@ +#+STARTUP:indent + +* Config files + +Adding in config files that I will use for a minimal and a styled config. This will be always updated to my server online. + +** Minimal config (minconf) + +- [2/2] Window Managers + - [X] BSPWM + - bspwmrc + - sxhkdrc + + - [X] Sway + - swayrc + +** Styled Config (styconf) + + diff --git a/minconf/bspwm/bspwmrc b/minconf/bspwm/bspwmrc new file mode 100755 index 0000000..65fcf87 --- /dev/null +++ b/minconf/bspwm/bspwmrc @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# ---- basics ---- +bspc monitor -d 1 2 3 4 5 6 7 8 9 + +# focus under mouse; mouse follows focus +bspc config focus_follows_pointer true +bspc config pointer_follows_focus true + +# use Super as the mouse modifier; set mouse actions +bspc config pointer_modifier mod4 +bspc config pointer_action1 move # Super + Left drag = move +bspc config pointer_action2 resize_side # Super + Middle drag = resize side +bspc config pointer_action3 resize_corner # Super + Right drag = resize corner + +# simple borders & gaps (tweak to taste) +bspc config border_width 2 +bspc config window_gap 8 +bspc config focused_border_color "#88c0d0" +bspc config normal_border_color "#3b4252" + +# optional: set a solid background (no compositor/wallpaper setter needed) +xsetroot -solid '#2e3440' + +# start keybinder +pgrep -x sxhkd >/dev/null || sxhkd & diff --git a/minconf/bspwm/sxhkdrc b/minconf/bspwm/sxhkdrc new file mode 100644 index 0000000..c6aa7ac --- /dev/null +++ b/minconf/bspwm/sxhkdrc @@ -0,0 +1,61 @@ +# --- global dunst state --- +: "${XDG_RUNTIME_DIR:=$HOME/.cache}" # fallback if XDG_RUNTIME_DIR not set +export DUNST_STATE_FILE="$XDG_RUNTIME_DIR/dunst.paused" +printf "false" > "$DUNST_STATE_FILE" # initialize false + +# Toggle Dunst (reads/writes global state + shows result) +super + shift + n + sh -c 'S="${DUNST_STATE_FILE:-$HOME/.cache/dunst.paused}"; P="$(cat "$S" 2>/dev/null || echo false)"; if [ "$P" = true ]; then dunstctl set-paused false && echo false >"$S" && notify-send -u low "🔔 Dunst active"; else dunstctl set-paused true && echo true >"$S" && notify-send -u low "🔕 Dunst muted"; fi' + +# Check Dunst status (no toggle) +super + n + sh -c 'S="${DUNST_STATE_FILE:-$HOME/.cache/dunst.paused}"; P="$(cat "$S" 2>/dev/null || echo false)"; [ "$P" = true ] && notify-send -u low "🔕 Dunst muted" || notify-send -u low "🔔 Dunst active"' + +# Super key = Mod4 +# Launch terminal +super + Return + xterm +super + shift + Return + alacritty + +# Close / kill +super + q + bspc node -c +super + shift + q + bspc node -k +super + Escape + sxhd-reload-safe + +# --- quit / restart bspwm (works reliably) --- +super + alt + q + bspc quit +super + alt + r + bspc wm -r + +# temporarily release all key grabs (useful for games/VMs); press again to re-grab +super + shift + Escape + pkill -USR2 -x sxhkd + +# Focus movement +super + {h,j,k,l} + bspc node -f {west,south,north,east} + +# Move node +super + shift + {h,j,k,l} + bspc node -s {west,south,north,east} + +# Split / rotate +super + b + bspc node -p cancel; bspc node -B east +super + r + bspc node @/ -R 90 + +# Monocle / tiled toggle +super + m + bspc node -t {tiled,fullscreen,monocle} + +# Move to desktop 1..9 / focus desktops +super + {1-9} + bspc desktop -f '^{1-9}' +super + shift + {1-9} + bspc node -d '^{1-9}'