GitLab system status is available here and here

Commit 227360e7 authored by Kabir Kwatra's avatar Kabir Kwatra
Browse files

chore: misc updates

parent e509f438
#+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)/
+ [[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
#!/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
......@@ -584,10 +584,3 @@ margin-right = 0
; content-foreground = ${colors.yellow}
; content-padding = 1
; margin-right = 0
[module/checkupdates]
type = custom/script
interval = 900s
exec = ~/.config/polybar/scripts/checkupdates.sh
; format-foreground = ${colors.blue}
format-foreground = ${colors.cyan}
#!/usr/bin/env bash
updates=$(checkupdates)
if [ -z "$updates" ]
then
count=0
else
printf '%s\n' "$updates" > /tmp/bspwm-eos-polybar-updates
count=$(wc -l "/tmp/bspwm-eos-polybar-updates" | awk '{print $1}')
fi
echo "%{T1}%{T-} %{T2}$count%{T-}"
#!/bin/bash
function capslock() {
caps=$(xset -q | grep Caps | awk '{ print $4 }')
if [ $caps == 'off' ]; then
echo "%{T1}%{T-}"
else
echo "%{T1}בּ%{T-}"
fi
}
function numlock {
num=$(xset -q | grep Num | awk '{ print $8 }')
if [ $num == 'off' ]; then
echo "%{T1}%{T-}"
else
echo "%{T1}%{T-}"
fi
}
function scroll() {
scroll=$(xset -q | grep Scroll | awk '{ print $12 }')
if [ $scroll == 'off' ]; then
echo "%{T1}%{T-}"
else
echo "%{T1}%{T-}"
fi
}
main () {
if [ "$1" == "-c" ]; then
capslock
fi
if [ "$1" == "-n" ]; then
numlock
fi
if [ "$1" == "-s" ]; then
scroll
fi
}
main $1
#!/bin/sh
yad --title="EndeavourOS bspwm keybindings:"\
--no-buttons\
--geometry=400x345-15-400\
--list\
--column=key:\
--column=description:\
--column=command:\
"ESC" "close this app" ""\
"=" "modkey" "(set mod Mod4)"\
"+enter" "open a terminal" ""\
"+w" "open Browser" ""\
"+n" "open Filebrowser" ""\
"+d" "app menu" "(rofi)"\
"+Shift+q" "close focused app"\
"(kill)" "Print-key" "screenshot" "(scrot)"\
"+Shift+e" "logout menu" "(rofi)"\
"+F1" "open keybinding helper" "full list"\
"+Alt+r" "reload bspwm" "bpsc restart"\
"+ESC" "reload sxhkd" "pkill -USR1 -x sxhkd"
configuration {
theme: "theme.rasi";
show-icons: true;
modi: "drun";
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
matching: "fuzzy";
}
@theme "theme.rasi"
......@@ -6,6 +6,8 @@ configuration {
sidebar-mode: false;
}
@theme "theme.rasi"
* {
font: "SauceCodePro Nerd Font Semibold 11";
foreground: #f8f8f2;
......
......@@ -6,7 +6,7 @@ rofi_command="rofi -no-config -theme $THEME"
# Options
shutdown=" Shutdown"
reboot=" Restart"
reboot=" Restart"
lock=" Lock"
suspend="鈴 Suspend"
logout=" Logout"
......
configuration {
modi: "drun";
show-icons: true;
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
matching: "fuzzy";
}
* {
font: "SauceCodePro Nerd Font Semibold 11";
foreground: #f8f8f2;
......
#!/bin/bash
# options to be displayed
option0="screen"
option1="area"
option2="window"
# options to be displyed
options="$option0\n$option1\n$option2"
selected="$(echo -e "$options" | rofi -lines 3 -dmenu -p "scrot")"
case $selected in
$option0)
cd ~/Pictures/ && sleep 1 && scrot;;
$option1)
cd ~/Pictures/ && scrot -s;;
$option2)
cd ~/Pictures/ && sleep 1 && scrot -u;;
esac
......@@ -4,25 +4,19 @@
# terminal emulator
super + Return
kitty #xfce4-terminal
kitty
# program launcher
super + r
rofi -modi drun -show drun -line-padding 4 \
-columns 2 -padding 50 -hide-scrollbar -terminal xfce4-terminal \
-show-icons -drun-icon-theme "Arc-X-D" -font "Droid Sans Regular 10"
rofi -modi drun -show drun
# show open window
super + ctrl + d
rofi -modi drun -show window -line-padding 4 \
-columns 2 -padding 50 -hide-scrollbar -terminal xfce4-terminal \
-show-icons -drun-icon-theme "Arc-X-D" -font "Droid Sans Regular 10"
rofi -modi drun -show window
# show ssh sesssions
super + shift + d
rofi -modi drun -show ssh -line-padding 4 \
-columns 2 -padding 50 -hide-scrollbar -terminal xfce4-terminal \
-show-icons -drun-icon-theme "Arc-X-D" -font "Droid Sans Regular 10"
rofi -modi drun -show ssh
# power-menu
super + shift + e
......@@ -30,7 +24,7 @@ super + shift + e
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
pkill -USR1 -x sxhkd
#
# bspwm hotkeys
......@@ -38,23 +32,23 @@ super + Escape
# quit/restart bspwm
super + alt + {q,r}
bspc {quit,wm -r}
bspc {quit,wm -r}
# close and kill
super + {_,shift + }q
bspc node -{c,k}
bspc node -{c,k}
# alternate between the tiled and monocle layout
super + m
bspc desktop -l next
bspc desktop -l next
# send the newest marked node to the newest preselected node
super + y
bspc node newest.marked.local -n newest.!automatic.local
bspc node newest.marked.local -n newest.!automatic.local
# swap the current node and the biggest window
super + g
bspc node -s biggest.local # window
bspc node -s biggest.local # window
#
# state/flags
......@@ -62,11 +56,11 @@ super + g
# set the window state
super + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
bspc node -t {tiled,pseudo_tiled,\~floating,\~fullscreen}
# set the node flags
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}
bspc node -g {marked,locked,sticky,private}
#
# focus/swap
......@@ -74,33 +68,33 @@ super + ctrl + {m,x,y,z}
# focus the node in the given direction
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
bspc node -{f,s} {west,south,north,east}
# focus the node for the given path jump
# super + {p,b,comma,period}
# bspc node -f @{parent,brother,first,second}
# bspc node -f @{parent,brother,first,second}
# focus the next/previous window in the current desktop
super + {_,shift + }c
bspc node -f {next,prev}.local.!hidden.window
bspc node -f {next,prev}.local.!hidden.window
# focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local
bspc desktop -f {prev,next}.local
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
bspc {node,desktop} -f last
# focus the older or newer node in the focus history
super + {o,i}
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
# focus or send to the given desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
bspc {desktop -f,node -d} '^{1-9,10}'
#
# preselect
......@@ -108,27 +102,27 @@ super + {_,shift + }{1-9,0}
# preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
bspc node -p {west,south,north,east}
# preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
bspc node -o 0.{1-9}
# cancel the preselection for the focused node
super + ctrl + space
bspc node -p cancel
bspc node -p cancel
# cancel the preselection for the focused desktop
#super + ctrl + shift + space
# bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
# bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
# select parent, left, or right child of the focused node
super + ctrl + shift + {h,k,l}
bspc node -f @{first,parent,second}
bspc node -f @{first,parent,second}
# rotate focused node
super + ctrl + shift + space
bspc node -R 90
bspc node -R 90
#
# move/resize
......@@ -136,15 +130,15 @@ super + ctrl + shift + space
# expand a window by moving one of its side outward
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
bspc node -v {-20 0,0 20,0 -20,20 0}
#
# Special hotkeys
#
......@@ -182,10 +176,7 @@ XF86KbdBrightnessDown
# Screenshot
Print
flameshot gui #scrot ~/Pictures/Screenshot-$(date +%F_%T).png
super+Print
~/.config/bspwm/scripts/screenshot.sh
flameshot gui
# Shortcuts
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment