GitLab system status is available here and here

Commit 1909898c authored by Git X-Modules's avatar Git X-Modules
Browse files

Pull updates from 3 modules

* Update 'bspwm': branch 'main' is updated to 34914c5 at 'Kab1r/.bspwm'
* Update 'doom': branch 'main' is updated to 3c5b216b at 'Kab1r/.doom.d'
* Update 'fish': branch 'main' is updated to 8c15163 at 'Kab1r/.fish'
Pipeline #249940 failed with stage
in 6 seconds
#+TITLE: BSPWM Configuration
#+AUTHOR: Kabir Kwatra <kabir@kwatra.me>
** Dependencies
+ [[https://github.com/baskerville/bspwm][BSP Window Manager]]
+ [[./bspwmrc][WM Config]]
+ [[https://github.com/baskerville/sxhkd][SX Hotkey Daemon]]
+ [[./sxhkd/sxhkdrc][Keybinds]]
+ [[https://github.com/polybar/polybar][Polybar]]
+ [[./polybar/config.ini][Bar Config]]
+ [[https://github.com/davatorium/rofi][Rofi Application Launcher]]
+ [[./rofi/theme.rasi][Theme]]
+ [[./rofi/config.rasi][Config]]
+ [[https://github.com/kovidgoyal/kitty][Kitty Terminal Emulator]] /(optional)/
+ [[https://github.com/bear24rw/alsa-utils][amixer]] /(optional)/
+ playerctl (optional)
+ [[https://github.com/haikarainen/light][Light Backlight Utility]] /(optional)/
+ [[https://flameshot.org/][Flameshot Screenshot Software]] /(optional)/
** Install
#+begin_src sh
git clone \
https://github.com/Kab1r/.bspwm \
~/.config/bspwm
~/.config/bspwm/install.sh
#+end_src
#!/bin/sh
pgrep -x sxhkd > /dev/null || sxhkd &
bspc monitor -d I II III IV V VI VII VIII IX X
bspc config border_width 2
bspc config window_gap 2
bspc config split_ratio 1.61803398875 #0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config pointer_follows_focus true
bspc config focus_follows_pointer true
# Border
bspc config focused_border_color "#6c71c4"
bspc config normal_border_color "#073642"
bspc config active_border_color "#073642"
# Per Application Default Layout
bspc rule -a Emacs state=tiled
bspc rule -a zoom state=floating center=on follow=on border=off
#
# Autostart
#
# Set display from arandr saved script
sh ~/.screenlayout/monitor.sh &
# Bar
~/.config/polybar/launch.sh &
# Notifications
dunst &
# Polkit
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
# Wallpaper
nitrogen --restore &
# Dex
dex -a -s /etc/xdg/autostart/:~/.config/autostart/
# Picom
picom -CGb &
# Network Applet
nm-applet --indicator &
# Blueman Applet
blueman-applet &
# Cursor
xsetroot -cursor_name left_ptr &
# Low battery notifier
~/.config/bspwm/scripts/low_bat_notifier.sh
#!/usr/bin/env bash
script_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
config_dir="$HOME/.config"
modules=(polybar sxhkd rofi)
for module in $modules; do
rm -ri $script_dir/$module $config_dir/$module
ln -si $script_dir/$module $config_dir/$module
done
[colors]
; fg-blue = #5294e2
; focus-dark = #1b2124
; blue = #73d0ff
; blue-darker = #0771ed
; green = #bae67e
; dark-green = #75c933
; red = #ff3333
; bg = #800A0E14
; fg = #bfbab0
; cyan = #95e6cb
alpha = #00000000
; white = #fff
bg = #282a3614
current-line = #44475a
fg = #f8f8f2
comment = #6272a4
cyan = #8be9fd
green = #50fa7b
orange = #ffb86c
pink = #ff79c6
purple = #bd93f9
red = #ff5555
yellow = #f1fa8c
[bar/top]
;monitor = VGA-1
override-redirect = false
; Put the bar at the bottom of the screen
bottom = false
; Prefer fixed center position for the `modules-center` block
fixed-center = true
width = 100%
height = 29
offset-x =
offset-y =
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
background = ${colors.bg}
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
foreground = ${colors.fg}
line-size = 0
line-color = #fff
; Number of spaces to add at the beginning/end of the bar
; Individual side values can be defined using:
; padding-{left,right}
padding-right = 1
padding-left = 0
; Number of spaces to add before/after each module
; Individual side values can be defined using:
; module-margin-{left,right}
module-margin = 0
font-0 = "Iosevka Term:pixelsize=13;4"
font-1 = "Iosevka Term:pixelsize=6;1"
; Define modules fot the bar
; All modules need not be added here
; modules-left = powermenu bspwm sps keyhint
modules-left = powermenu bspwm
modules-center = title
; modules-right = backlight sps battery sps pulseaudio sps memory sps cpu sps caps sps num sps scroll sps date
modules-right = backlight sps battery sps pulseaudio mpd mpd_control sps memory sps cpu sps netspeed sps date
; Following modules are not enabled by default in Endeavour OS Bspwm Edition
;
; 1. mpd - Shows current playing track info.
; Need to set host and port in module definition.
;
; 2. mpd_control - Shows previous, play/pause, next button to
; control music playback via mpd.
; Need to set host and port in module definition.
;
; 3. netspeed - Displays real time network speed
; Need to set correct interface name in module definition.
; The separator will be inserted between the output of each module
separator =
; This value is used to add extra spacing between elements
; @deprecated: This parameter will be removed in an upcoming version
spacing = 0
; Opacity value between 0.0 and 1.0 used on fade in/out
dim-value = 1.0
wm-name = i3
tray-position = right
; If true, the bar will not shift its
; contents when the tray changes
tray-detached = false
; Tray icon max size
tray-maxsize = 16
tray-background = ${colors.bg}
;offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
tray-offset-x = 0
tray-offset-y = 0
; Pad the sides of each tray icon
tray-padding = 2
; Scale factor for tray clients
tray-scale = 1
wm-restack = bspwm
dpi-x = 133
dpi-y = 133
enable-ipc = false
;border-left-size = 1%
;border-right-size = 1%
;border-top-size = 1%
;border-bottom-size = 25
border-color = ${colors.alpha}
[module/bspwm]
type = internal/bspwm
; Only show workspaces defined on the same output as the bar
; NOTE: The bspwm and XRandR monitor names must match, which they do by default.
; But if you rename your bspwm monitors with bspc -n this option will no longer
; behave correctly.
; Default: true
pin-workspaces = true
; Output mode flags after focused state label
; Default: false
inline-mode = false
; Create click handler used to focus workspace
; Default: true
enable-click = true
; Create scroll handlers used to cycle workspaces
; Default: true
enable-scroll = true
; Set the scroll cycle direction
; Default: true
reverse-scroll = true
; Use fuzzy (partial) matching on labels when assigning
; icons to workspaces
; Example: code;♚ will apply the icon to all workspaces
; containing 'code' in the label
; Default: false
fuzzy-match = true
; ws-icon-[0-9]+ = <label>;<icon>
; Note that the <label> needs to correspond with the bspwm workspace name
; Neither <label> nor <icon> can contain a semicolon (;)
ws-icon-0 = "I;%{T2} 1 %{T-}"
ws-icon-1 = "II;%{T2} 2 %{T-}"
ws-icon-2 = "III;%{T2} 3 %{T-}"
ws-icon-3 = "IV;%{T2} 4 %{T-}"
ws-icon-4 = "V;%{T2} 5 %{T-}"
ws-icon-5 = "VI;%{T2} 6 %{T-}"
ws-icon-6 = "VII;%{T2} 7 %{T-}"
ws-icon-7 = "VIII;%{T2} 8 %{T-}"
ws-icon-8 = "IX;%{T2} 9 %{T-}"
ws-icon-9 = "X;%{T2} 0 %{T-}"
ws-icon-default = %{T2} X %{T-}
; Available tags:
; <label-monitor>
; <label-state> - gets replaced with <label-(focused|urgent|occupied|empty)>
; <label-mode> - gets replaced with <label-(monocle|tiled|fullscreen|floating|locked|sticky|private)>
; Default: <label-state>
format = <label-state> <label-mode>
; Available tokens:
; %name%
; Default: %name%
label-monitor = %name%
; If any values for label-dimmed-N are defined, the workspace/mode
; colors will get overridden with those values if the monitor is out of focus
; To only override workspaces in a specific state, use:
; label-dimmed-focused
; label-dimmed-occupied
; label-dimmed-urgent
; label-dimmed-empty
label-dimmed-foreground = #555
label-dimmed-underline = ${bar/top.background}
label-dimmed-focused-background = #f00
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
label-focused = %icon%
label-focused-foreground = ${colors.purple}
; label-focused-foreground = ${colors.focus-dark}
; label-focused-background = ${colors.fg-blue}
label-focused-underline = #fba922
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
label-occupied = %icon%
label-occupied-padding = 0
; label-occupied-foreground = ${colors.fg-blue}
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
label-urgent = %icon%
label-urgent-foreground = ${colors.red}
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
; Hide empty workspaces
label-empty =
;label-empty = %icon%
label-empty-foreground = #55
label-empty-padding = 0
; Separator in between workspaces
label-separator =
label-separator-padding = 0
label-separator-foreground = #ffb52a
[module/date]
type = internal/date
; Seconds to sleep between updates
interval = 1.0
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
; NOTE: if you want to use syntax tags here you need to use %%{...}
date = %{T1}%{T-}%{T2} %d/%a%{T-}
; Optional time format
time = %{T2} %I:%M%{T-}
; if `date-alt` or `time-alt` is defined, clicking
; the module will toggle between formats
;; date-alt = %{T1}%{T-}%{T2} %a, %d %b %y%{T-}
;; time-alt = %{T2} %H:%M:%S%{T-}
label = %date%%time%
label-font = 0
label-foreground = ${colors.green}
[module/cpu]
type = internal/cpu
; Seconds to sleep between updates
; Default: 1
interval = 0.5
label = %{T1}%{T-}%{T2} %percentage:2%%%{T-}
label-foreground = ${colors.cyan}
[module/memory]
type = internal/memory
; Seconds to sleep between updates
; Default: 1
interval = 0.5
format = <label>
; Available tokens:
; %percentage_used% (default)
; %percentage_free%
; %gb_used%
; %gb_free%
; %gb_total%
; %mb_used%
; %mb_free%
; %mb_total%
; %percentage_swap_used%
; %percentage_swap_free%
; %mb_swap_total%
; %mb_swap_free%
; %mb_swap_used%
; %gb_swap_total%
; %gb_swap_free%
; %gb_swap_used%
label = %{T1}%{T-}%{T2} %gb_used%%{T-}
label-foreground = ${colors.cyan}
[module/mpd]
type = internal/mpd
; host = 0.0.0.0
host = [::]
port = 6600
interval = 2
format-online = <label-song>
format-online-background = ${colors.bg}
format-online-foreground = ${colors.fg-blue}
#format-online-padding = 20
label-song = %{T2}%artist% - %title%%{T-}
label-song-maxlen = 55
label-song-ellipsis = true
label-offline = "MPD is offline"
[module/mpd_control]
type = internal/mpd
interval = 2
format-online = <icon-prev> <toggle> <icon-next>
format-online-background = ${colors.bg}
format-online-foreground = ${colors.fg-blue}
#format-online-padding = 2
label-offline = "MPD is offline"
; Only applies if <icon-X> is used
icon-play = %{T1}奈%{T-}
icon-pause = %{T1}%{T-}
icon-stop = %{T1}%{T-}
icon-prev = %{T1}ﭣ%{T-}
icon-next = %{T1}ﭡ%{T-}
;An empty module used to add 1 unit spacings whenever needed
[module/sps]
type = custom/text
content = " "
content-padding = 0
[module/netspeed]
type = internal/network
; Set correct interface name for the module to work
; Try eth0 for ethernet or wlan0 for wireless
;
; You can also run ifconfig in a terminal
; to know the interace names on your system.
interface = wlan0
interval = 1.0
label-connected = "%{T1}龍%{T-}%{T2} %downspeed% | %upspeed%%{T-}"
label-disconnected = "%{T2}0/0%{T-}"
label-connected-background = ${colors.bg}
label-connected-foreground = ${colors.purple}
label-disconnected-foreground = ${colors.red}
[module/title]
type = internal/xwindow
; Available tags:
; <label> (default)
format = <label>
format-background = ${colors.bg}
format-foreground = ${colors.green}
format-padding = 4
; Available tokens:
; %title%
; Default: %title%
; label = "%{T1}类%{T-}%{T2} %title%%{T-}"
label = "%{T2}%title%%{T-}"
label-maxlen = 65
; Used instead of label when there is no window title
; Available tokens:
; None
; label-empty =%{T2}EndeavourOS Bspwm%{T-}
label-empty =%{T2}Kabir's BSPWM%{T-}
label-empty-foreground = #707880
[module/pulseaudio]
type = internal/pulseaudio
; Sink to be used, if it exists (find using `pacmd list-sinks`, name field)
; If not, uses default sink
; sink = alsa_output.pci-0000_12_00.3.analog-stereo
; sink = alsa_output.pci-0000_00_1b.0.analog-stereo
; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false
; Default: true
use-ui-max = false
; Interval for volume increase/decrease (in percent points)
; Default: 5
interval = 5
; Available tags:
; <label-volume> (default)
; <ramp-volume>
; <bar-volume>
format-volume = <label-volume>
; Available tags:
; <label-muted> (default)
; <ramp-volume>
; <bar-volume>
format-muted = <label-muted>
; Available tokens:
; %percentage% (default)
; %decibels% (unreleased)
label-volume = %{T1}墳%{T-} %{T2}%percentage%%%{T-}
; label-volume-foreground = ${colors.dark-green}
label-volume-foreground = ${colors.green}
; Available tokens:
; %percentage% (default)
; %decibels% (unreleased)
label-muted = %{T1}ﱝ%{T-} %{T2}shhh!%{T-}
label-muted-foreground = ${colors.green}
; Only applies if <ramp-volume> is used
ramp-volume-0 = %{T1}%{T-}
ramp-volume-1 = %{T1}奔%{T-}
ramp-volume-2 = %{T1}墳%{T-}
; Right and Middle click (unreleased)
click-right = pavucontrol &
; click-middle =
[module/backlight]
type = internal/backlight
; Use the following command to list available cards:
; $ ls -1 /sys/class/backlight/
; card = intel_backlight
card = amdgpu_bl0
; Enable changing the backlight with the scroll wheel
; NOTE: This may require additional configuration on some systems. Polybar will
; write to `/sys/class/backlight/${self.card}/brightness` which requires polybar
; to have write access to that file.
; DO NOT RUN POLYBAR AS ROOT.
; The recommended way is to add the user to the
; `video` group and give that group write-privileges for the `brightness` file.
; See the ArchWiki for more information:
; https://wiki.archlinux.org/index.php/Backlight#ACPI
; Default: false
enable-scroll = true
reverse-scroll = true
; Available tags:
; <label> (default)
; <ramp>
; <bar>
format = <label>
; format-foreground = ${colors.blue}
format-foreground = ${colors.yellow}
; Available tokens:
; %percentage% (default)
label = %{T2} %percentage%%%{T-}
[module/battery]
type = internal/battery
; This is useful in case the battery never reports 100% charge
full-at = 99
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0
adapter = ADP1
; If an inotify event haven't been reported in this many
; seconds, manually poll for new values.
;
; Needed as a fallback for systems that don't report events
; on sysfs/procfs.
;
; Disable polling by setting the interval to 0.
;
; Default: 5
poll-interval = 5
; Available tags:
; <label-charging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-charging>
format-charging = <label-charging>
; Available tags:
; <label-discharging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-discharging>
format-discharging = <label-discharging>
; Available tags:
; <label-full> (default)
; <bar-capacity>
; <ramp-capacity>
;format-full = <ramp-capacity> <label-full>
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current charge rate in watts)
label-charging = %{T2}%{T-} %{T2}%percentage%%%{T-}
; label-charging-foreground = ${colors.blue}
label-charging-foreground = ${colors.green}
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current discharge rate in watts)
label-discharging = %{T1}%{T-} %{T2}%percentage%%%{T-}
; label-discharging-foreground = ${colors.blue}
label-discharging-foreground = ${colors.orange}
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
label-full = %{T1}%{T-} %{T2}Full!%{T-}
; label-full-foreground = ${colors.blue}
label-full-foreground = ${colors.cyan}
;[settings]
;pseudo-transparency = true
; [module/caps]
; type = custom/script