commit 5421fce8e67080b63bfa122addae4571106141c7
parent ac6df41a7f76248a26727d35bccb12879b32e266
Author: jacobsGit <JacobDoesLinux@protonmail.com>
Date: Thu, 16 Jan 2020 18:27:02 -0800
query script
load xresources, start conky, tweaks
Diffstat:
3 files changed, 65 insertions(+), 10 deletions(-)
diff --git a/bspwm/.config/bspwm/bspwm-etc/bspwm-query b/bspwm/.config/bspwm/bspwm-etc/bspwm-query
@@ -0,0 +1,48 @@
+#!/bin/dash
+# Jacob Edwards, 2020
+# script to query things from bspwm
+
+
+delay=$1
+
+
+# set delay
+if [ -z $1 ]; then
+ delay=0.35
+fi
+
+
+# files to read and write from
+desktop="/tmp/query-bspwm-desktop"
+node="/tmp/query-bspwm-node"
+pipe='/tmp/bspwm.info'
+
+
+
+# syntax: query [SEARCH] [FILE] [INSERTED] [APPENDED]
+query(){
+ query="$query$3$(grep "$1" "$2" | awk -F ':' '{print $2}')$4"
+}
+
+
+
+while true; do
+ # get data
+ bspc query --tree --desktop | sed 's/,/\n/g' > "$desktop"
+ bspc query --tree --node | sed 's/,/\n/g' > "$node"
+
+
+ query=''
+
+ # querys
+ query layout "$desktop" 'layout ' '\n'
+ query name "$desktop" 'workspace ' '\n'
+ query instanceName "$node" 'window ' '\n'
+ query windowGap "$desktop" 'gap ' '\n'
+ query borderWidth "$node" 'border '
+
+
+ # print cleaned query into file
+ printf "$query\n" | sed 's/"//g' > "$pipe"
+ sleep $delay
+done
diff --git a/bspwm/.config/bspwm/bspwm-etc/conky-bspwm b/bspwm/.config/bspwm/bspwm-etc/conky-bspwm
@@ -0,0 +1,4 @@
+#!/bin/dash
+
+bspwm-query &
+conky -c $HOME/.config/conky/conky-bspwm.conf
diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc
@@ -1,17 +1,21 @@
-#! /bin/sh
+#! /bin/dash
# Jacob Edwards, 2020
# bspwmrc
# init proccesses
-killall bspc-subscribe-desktop
-bspc-subscribe-desktop 0.1 &
+xrdb -load ~/.Xresources
+killall conky
+conky &
+killall bspwm-query
+exec ~/.config/bspwm/bspwm-etc/bspwm-query &
+conky -c ~/.config/conky/conky-bspwm.conf &
# init workspaces
-bspc monitor -d I II III IV V VI
+bspc monitor -d coding browsing writing extra video music
@@ -24,23 +28,22 @@ bspc config window_gap 8
-# colors
-bspc config focused_border_color '#fff000'
-bspc config focused_border_color '#ff0fff'
+# borders
+bspc config border_width 2
+bspc config focused_border_color '#ab0000'
bspc config normal_border_color '#000000'
# random values
bspc config split_ratio 0.5
-bspc config border_width 4
# monocle settings
bspc config single_monocle false
-bspc config borderless_monocle true
-bspc config gapless_monocle true
+bspc config borderless_monocle false
+bspc config gapless_monocle false