mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-22 02:50:24 +10:00
Update
This commit is contained in:
@@ -1,72 +0,0 @@
|
||||
# My BSPWM Configuration
|
||||
|
||||

|
||||
|
||||
*bspwm* is a tiling window manager that represents windows as the leaves of a full binary tree.
|
||||
|
||||
It only responds to X events, and the messages it receives on a dedicated socket.
|
||||
|
||||
*bspc* is a program that writes messages on *bspwm*'s socket.
|
||||
|
||||
*bspwm* doesn't handle any keyboard or pointer inputs: a third party program (e.g. *sxhkd*) is needed in order to translate keyboard and pointer events to *bspc* invocations.
|
||||
|
||||
The outlined architecture is the following:
|
||||
|
||||
```
|
||||
PROCESS SOCKET
|
||||
sxhkd --------> bspc <------> bspwm
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
The default configuration file is `$XDG_CONFIG_HOME/bspwm/bspwmrc`: this is simply a shell script that calls *bspc*.
|
||||
|
||||
Keyboard and pointer bindings are defined with [sxhkd](https://github.com/baskerville/sxhkd).
|
||||
|
||||
Example configuration files can be found in the [examples](examples) directory.
|
||||
|
||||
## Monitors, desktops and windows
|
||||
|
||||
*bspwm* holds a list of monitors.
|
||||
|
||||
A monitor is just a rectangle that contains desktops.
|
||||
|
||||
A desktop is just a pointer to a tree.
|
||||
|
||||
Monitors only show the tree of one desktop at a time (their focused desktop).
|
||||
|
||||
The tree is a partition of a monitor's rectangle into smaller rectangular regions.
|
||||
|
||||
Each node in a tree either has zero or two children.
|
||||
|
||||
Each internal node is responsible for splitting a rectangle in half.
|
||||
|
||||
A split is defined by two parameters: the type (horizontal or vertical) and the ratio (a real number *r* such that *0 < r < 1*).
|
||||
|
||||
Each leaf node holds exactly one window.
|
||||
|
||||
# My Keybindings (defined by sxhkd)
|
||||
|
||||
The keybindings for bspwm are controlled by another program called sxhkd. You will find my sxhkdrc here: https://gitlab.com/dwt1/dotfiles/blob/master/.config/sxhkd/sxhkdrc
|
||||
|
||||
The MODKEY is set to the Super key (aka the Windows key).
|
||||
|
||||
| Keybinding | Action |
|
||||
| :--- | :--- |
|
||||
| `ALT + CRTL + Enter` | opens run launcher (dmenu is the run launcher but can be easily changed) |
|
||||
| `MODKEY + Enter` | opens terminal (st is the terminal but can be easily changed) |
|
||||
| `MODKEY + SHIFT + c` | closes window with focus |
|
||||
| `MODKEY + Esc` | reloads the bspwm conifguration file |
|
||||
| `MODKEY + SHIFT + r` | restarts bspwm |
|
||||
| `MODKEY + SHIFT + q` | quits bspwm |
|
||||
| `MODKEY + j` | switches focus between windows in the stack, going down |
|
||||
| `MODKEY + k` | switches focus between windows in the stack, going up |
|
||||
| `MODKEY + SHIFT + j` | rotates the windows in the stack, going down|
|
||||
| `MODKEY + SHIFT + k` | rotates the windows in the stack, going up |
|
||||
| `MODKEY + t` | set window state to tiled |
|
||||
| `MODKEY + s` | set window state to pseudo-tiled |
|
||||
| `MODKEY + f` | set window state to floating |
|
||||
| `MODKEY + 1-9` | switch focus to workspace (1-9) |
|
||||
| `MODKEY + SHIFT + 1-9` | sends focused window to workspace (1-9) |
|
||||
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# ____ _____
|
||||
# | _ \_ _| Derek Taylor (DistroTube)
|
||||
# | | | || | http://www.youtube.com/c/DistroTube
|
||||
# | |_| || | http://www.gitlab.com/dwt1/
|
||||
# |____/ |_|
|
||||
#
|
||||
# A customized bspwmrc for the bspwm window manager.
|
||||
# https://github.com/baskerville/sxhkd
|
||||
# https://github.com/baskerville/bspwm
|
||||
|
||||
#### VARIABLES ####
|
||||
COLORSCHEME="DoomOne"
|
||||
|
||||
#### AUTOSTART ####
|
||||
sxhkd &
|
||||
picom &
|
||||
killall nm-applet && nm-applet &
|
||||
killall volumeicon && volumeicon &
|
||||
/usr/bin/emacs --daemon &
|
||||
killall conky
|
||||
sleep 3 && conky -c "$HOME"/.config/conky/bspwm/"$COLORSCHEME"-01.conkyrc
|
||||
polybar-bspwm &
|
||||
|
||||
### Select only ONE of the following four ways to set the wallpaper.
|
||||
xargs xwallpaper --stretch < ~/.cache/wall &
|
||||
# ~/.fehbg &
|
||||
# feh --randomize --bg-fill /usr/share/backgrounds/dtos-backgrounds/* &
|
||||
# nitrogen --restore &
|
||||
|
||||
#### MONITORS ####
|
||||
for monitor in $(bspc query -M)
|
||||
do
|
||||
# set the workspaces on each monitor to 1-9
|
||||
bspc monitor $monitor -d 1 2 3 4 5 6 7 8 9
|
||||
#polybar hidden when fullscreen for vlc, youtube, mpv ...
|
||||
xdo below -t $(xdo id -n root) $(xdo id -a polybar-main_$monitor)
|
||||
done
|
||||
|
||||
#polybar hidden when fullscreen for vlc, youtube, mpv ...
|
||||
#find out the name of your monitor with xrandr
|
||||
# xdo below -t $(xdo id -n root) $(xdo id -a polybar-main_DisplayPort-0)
|
||||
# xdo below -t $(xdo id -n root) $(xdo id -a polybar-main_DisplayPort-1)
|
||||
# xdo below -t $(xdo id -n root) $(xdo id -a polybar-main_HDMI-A-0)
|
||||
|
||||
#### BSPWM configuration ####
|
||||
#bspc config border_radius 8
|
||||
bspc config border_width 2
|
||||
bspc config window_gap 10
|
||||
bspc config top_padding 20
|
||||
bspc config bottom_padding 0
|
||||
bspc config left_padding 0
|
||||
bspc config right_padding 0
|
||||
bspc config single_monocle false
|
||||
bspc config click_to_focus true
|
||||
bspc config split_ratio 0.50
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
bspc config focus_by_distance true
|
||||
bspc config focus_follows_pointer true
|
||||
bspc config history_aware_focus true
|
||||
bspc config remove_disabled_monitors true
|
||||
bspc config merge_overlapping_monitors true
|
||||
bspc config pointer_modifier mod4
|
||||
bspc config pointer_action1 move
|
||||
bspc config pointer_action2 resize_side
|
||||
bspc config pointer_action3 resize_corner
|
||||
|
||||
#### BSPWM coloring ####
|
||||
bspc config normal_border_color "#4c566a"
|
||||
bspc config active_border_color "#1e1e1e"
|
||||
bspc config focused_border_color "#5e81ac"
|
||||
bspc config presel_feedback_color "#5e81ac"
|
||||
bspc config urgent_border_color "#dd2727"
|
||||
|
||||
|
||||
bspc rule -a Gimp desktop='^8' state=floating follow=on
|
||||
bspc rule -a Chromium desktop='^2'
|
||||
bspc rule -a mplayer2 state=floating
|
||||
bspc rule -a Kupfer.py focus=on
|
||||
bspc rule -a Screenkey manage=off
|
||||
Reference in New Issue
Block a user