diff --git a/README.md b/README.md index cdfdf70..1f8d1ff 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ Below is a brief description of some of the tools that I use in the hope that so bspwm ----- -This is a fantastic tiling window manager that represents windows as the leaves of a full binary tree. My scripts for bspwm supports single to multiple monitors, adjusting the workspaces depending on the amount of monitors that is detected during startup. These scripts for bspwm depends on the following applications. +This is a fantastic tiling window manager that represents windows as the leaves of a full binary tree. My scripts for bspwm supports single to dual monitors, adjusting the workspaces depending on the amount of monitors that is detected during startup. These scripts for bspwm depends on the following applications. -* nitrogen (is a fast and lightweight desktop background browser and setter for X windows) +* nitrogen (is a fast and lightweight desktop wallpaper setter for X windows) * conky (is a extremely configurable system monitor) * sxhkd (is a simple X hotkey daemon with a powerful and compact configuration syntax) * dunst (is a minimalistic notification daemon that can listen to notifications from libnotify) diff --git a/Xresources b/Xresources index 4dbe7cc..7376255 100644 --- a/Xresources +++ b/Xresources @@ -1,48 +1,41 @@ -!URxvt.depth: 32 -!URxvt*background: [80]#000000 -URxvt.background: #000000 -URxvt.foreground: #DEDEDE +Xft.dpi: 108 +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintslight +Xft.hinting: 1 +Xft.antialias: 1 +Xft.rgba: rgb + +URxvt.depth: 32 +URxvt*background: [97]#2E3440 URxvt.scrollBar: false URxvt.geometry: 90x30 -!URxvt.font: xft:Menlo for Powerline:size=10 URxvt.font: -misc-tamlin-medium-r-normal--16-116-100-100-c-80-iso10646-1 -!URxvt.letterSpace: -1 URxvt.colorMode: on URxvt.cursorBlink: true URxvt.cursorUnderline: false URxvt.buffered: true URxvt.borderless: true -URxvt.urlLauncher: /usr/bin/opera +URxvt.urlLauncher: /usr/bin/firefox URxvt.underlineURLs: false -!Xft.dpi: 96 -!Xft.autohint: false -!Xft.hinting: true -!Xft.hintstyle: hintfull -Xft.antialias: true -Xft.rgba: rgb -Xft.lcdfilter: lcddefault -! black -*color0 : #2E3436 -*color8 : #555753 -! red -*color1 : #CC0000 -*color9 : #EF2929 -! green -*color2 : #4E9A06 -*color10 : #8AE234 -! yellow -*color3 : #C4A000 -*color11 : #FCE94F -! blue -*color4 : #3465A4 -*color12 : #729FCF -! magenta -*color5 : #75507B -*color13 : #AD7FA8 -! cyan -*color6 : #06989A -*color14 : #34E2E2 -! white -*color7 : #D3D7CF -*color15 : #EEEEEC +*.foreground: #D8DEE9 +*.background: #2E3440 +*.cursorColor: #D8DEE9 + +*.color0: #3B4252 +*.color1: #BF616A +*.color2: #A3BE8C +*.color3: #EBCB8B +*.color4: #81A1C1 +*.color5: #B48EAD +*.color6: #88C0D0 +*.color7: #E5E9F0 +*.color8: #4C566A +*.color9: #BF616A +*.color10: #A3BE8C +*.color11: #EBCB8B +*.color12: #81A1C1 +*.color13: #B48EAD +*.color14: #8FBCBB +*.color15: #ECEFF4 diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc index b9931ba..3554dcb 100755 --- a/bspwm/bspwmrc +++ b/bspwm/bspwmrc @@ -1,4 +1,4 @@ -#! /usr/bin/bash +#!/usr/bin/bash # bspwm config bspc config border_width 2 @@ -26,19 +26,22 @@ else fi # application rules -bspc rule -a Chromium desktop=web +bspc rule -a Firefox desktop=web bspc rule -a Steam follow=off state=floating desktop=games bspc rule -a Galculator state=floating -bspc rule -a RocketLeague border=off bspc rule -a Nvidia-settings state=floating bspc rule -a obs state=floating bspc rule -a Pavucontrol state=floating bspc rule -a "TeamSpeak 3" state=floating bspc rule -a Nitrogen state=floating +bspc rule -a Vividhue state=floating # compositor compton -b +# set cursor to expected left-pointer +xsetroot -cursor_name left_ptr + # restore wallpaper nitrogen --restore @@ -50,3 +53,6 @@ sxhkd & # desktop notifications dunst & + +# hide mouse when idle +unclutter & diff --git a/bspwm/conky.conf b/bspwm/conky.conf index c2a14c1..42db372 100644 --- a/bspwm/conky.conf +++ b/bspwm/conky.conf @@ -11,9 +11,9 @@ conky.config = { conky.text = [[ S\ %{c}\ -%{F\#a7a5a5}%{B\#000000}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${upspeedf br0}K \ -%{F\#a7a5a5}%{B\#504e4e}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${downspeedf br0}K \ -%{F\#a7a5a5}%{B\#504e4e}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${hwmon 0 temp 1}°\ +%{F\#a7a5a5}%{B\#000000}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${upspeedf enp2s0}K \ +%{F\#a7a5a5}%{B\#504e4e}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${downspeedf enp2s0}K \ +%{F\#a7a5a5}%{B\#504e4e}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${exec cat /sys/class/hwmon/hwmon0/temp1_input | cut -c-2 }°\ %{F\#504e4e}%{B\#a7a5a5}%{F\#a7a5a5}%{B\#504e4e}%{F\#d6d3d2}%{B\#504e4e}  ${cpu cpu0}%\ %{F\#504e4e}%{B\#a7a5a5}%{F\#a7a5a5}%{B\#504e4e}%{F\#d6d3d2}%{B\#504e4e}  ${mem}\ %{F\#504e4e}%{B\#a7a5a5}%{F\#a7a5a5}%{B\#000000}\ @@ -21,7 +21,7 @@ S\ %{F\#a7a5a5}%{B\#000000}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} \ ${exec pamixer --get-volume}% \ %{F\#a7a5a5}%{B\#504e4e}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} \ -${texeci 60 mosquitto_sub -C 1 -t "study/sensor/temperature"}° \ +${texeci 24 ~/.config/bspwm/localtemp} \ %{F\#a7a5a5}%{B\#504e4e}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${time %a %b %d, %T} \ %{F\#a7a5a5}%{B\#504e4e}%{B\#000000}\ ]] diff --git a/bspwm/panel b/bspwm/panel index fe53958..654de39 100755 --- a/bspwm/panel +++ b/bspwm/panel @@ -1,4 +1,4 @@ -#! /usr/bin/bash +#!/usr/bin/bash PANEL_FIFO=/tmp/panel-fifo PANEL_HEIGHT=16 PANEL_FONT="-misc-tamlin-medium-r-normal--16-116-100-100-c-80-iso10646-1" @@ -10,8 +10,8 @@ COLOR_GREY2="#a7a5a5" COLOR_GREY3="#504e4e" if xdo id -a "$PANEL_WM_NAME" > /dev/null ; then - printf "%s\n" "The panel is already running." >&2 - exit 1 + printf "%s\n" "The panel is already running." >&2 + exit 1 fi trap 'trap - TERM; kill 0' INT TERM QUIT EXIT @@ -26,70 +26,71 @@ bspc config top_padding $PANEL_HEIGHT bspc subscribe report > "$PANEL_FIFO" & while read -r line ; do - case $line in - S*) - # conky output - sys="${line#?}" - ;; - W*) - # bspwm's state - wm="" - IFS=':' - mon=0 - set -- ${line#?} - while [ $# -gt 0 ] ; do - item=$1 - name=${item#?} - case $item in - [mM]*) - if [ $num_mon -ge 2 ]; then - mon=$((mon+1)) - if [ $mon -gt 1 ]; then - wm="${wm}%{F${COLOR_GREY2}}%{B${COLOR_BLACK}};" - fi - fi - ;; - [fFoOuU]*) - case $item in - f*) - # free desktop - FG=$COLOR_GREY2 - BG=$COLOR_BLACK - ;; - F*) - # focused free desktop - FG=$COLOR_GREY1 - BG=$COLOR_GREY3 - ;; - o*) - # occupied desktop - FG=$COLOR_GREY2 - BG=$COLOR_BLACK - ;; - O*) - # focused occupied desktop - FG=$COLOR_GREY1 - BG=$COLOR_GREY3 - ;; - esac - wm="${wm}%{F${COLOR_GREY2}}%{B${BG}}%{F${FG}}%{A:bspc desktop -f ${name}:} ${name}%{A}%{F${BG}}%{B${COLOR_GREY2}}" - ;; - esac - shift - done - ;; - esac - - while IFS=';' read -ra array; do - bar="" - for item in "${!array[@]}"; do - bar=${bar}"%{l}${array[${item}]}" - if [ ${item} -lt $((${#array[@]} - 1)) ]; then - bar=${bar}"${sys}%{S+}" + case $line in + S*) + # conky output + sys="${line#?}" + ;; + W*) + # bspwm's state + wm="" + IFS=':' + mon=0 + set -- ${line#?} + while [ $# -gt 0 ] ; do + item=$1 + name=${item#?} + case $item in + [mM]*) + if [ $num_mon -ge 2 ]; then + mon=$((mon+1)) + if [ $mon -gt 1 ]; then + wm="${wm}%{F${COLOR_GREY2}}%{B${COLOR_BLACK}};" + fi fi - done - done <<< ${wm} + ;; + [fFoOuU]*) + case $item in + f*) + # free desktop + FG=$COLOR_GREY2 + BG=$COLOR_BLACK + ;; + F*) + # focused free desktop + FG=$COLOR_GREY1 + BG=$COLOR_GREY3 + ;; + o*) + # occupied desktop + FG=$COLOR_GREY2 + BG=$COLOR_BLACK + ;; + O*) + # focused occupied desktop + FG=$COLOR_GREY1 + BG=$COLOR_GREY3 + ;; + esac - printf "%s\n" "${bar}%{F${COLOR_GREY2}}%{B${COLOR_BLACK}}${sys}" + wm="${wm}%{F${COLOR_GREY2}}%{B${BG}}%{F${FG}}%{A:bspc desktop -f ${name}:} ${name}%{A}%{F${BG}}%{B${COLOR_GREY2}}" + ;; + esac + shift + done + ;; + esac -done < "$PANEL_FIFO" | lemonbar -a 10 -n "$PANEL_WM_NAME" -g x$PANEL_HEIGHT -f "$PANEL_FONT" -F "$COLOR_GREY2" -B "$COLOR_BLACK" | /usr/bin/dash + while IFS=';' read -ra array; do + bar="" + for item in "${!array[@]}"; do + bar=${bar}"%{l}${array[${item}]}" + if [ ${item} -lt $((${#array[@]} - 1)) ]; then + bar=${bar}"${sys}%{S+}" + fi + done + done <<< ${wm} + + printf "%s\n" "${bar}%{F${COLOR_GREY2}}%{B${COLOR_BLACK}}${sys}" + +done < "$PANEL_FIFO" | lemonbar -a 10 -n "$PANEL_WM_NAME" -g x$PANEL_HEIGHT -f "$PANEL_FONT" -F "$COLOR_GREY2" -B "$COLOR_BLACK" | bash diff --git a/compton.conf b/compton.conf index fc9ffcb..28540c7 100644 --- a/compton.conf +++ b/compton.conf @@ -1,9 +1,41 @@ +# Backend backend = "glx"; -glx-no-rebind-pixmap = true; -glx-swap-method = "3"; -opacity-rule = ["65:class_g = 'Bspwm' && class_i = 'presel_feedback'", "90:class_g = 'URxvt' && name != 'ranger'"]; +paint-on-overlay = true; +glx-no-stencil = true; +unredir-if-possible = true; + +# Fading fading = true; -fade-delta = 8; +fade-delta = 10; fade-in-step = 0.05; fade-out-step = 0.05; -fade-exclude = [ ]; + +# Shadow +shadow = true; +no-dock-shadow = false; +no-dnd-shadow = true; +clear-shadow = true; # Zero the part of the shadow's mask behind the window (experimental). +shadow-radius = 7; +shadow-offset-x = -7; +shadow-offset-y = -7; +shadow-exclude = [ "n:e:Notification" ]; + +# Opacity +detect-client-opacity = true; +menu-opacity = 1.00; +opacity-rule = [ "65:class_g = 'Bspwm' && class_i = 'presel_feedback'" ]; + +# Blur +#blur-background = true; +#blur-background-fixed = true; +#blur-kern = "3,3,0.1,1,1,1,1,1,1,1"; + +# Window type settings +wintypes: +{ + tooltip = { fade = true; shadow = false; }; + menu = { shadow = false; }; + dropdown_menu = { shadow = false; }; + popup_menu = { shadow = false; }; + utility = { shadow = false; }; +}; diff --git a/xprofile b/xprofile index c04cc57..1b13501 100644 --- a/xprofile +++ b/xprofile @@ -5,10 +5,6 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then unset f fi -# Export variables -export EDITOR=vim -export BROWSER=opera - # Start the gpg-agent if not already running if ! pgrep -x -u "${USER}" gpg-agent &> /dev/null; then eval $(gpg-agent --homedir "${HOME}/.gnupg" --daemon) @@ -20,14 +16,9 @@ xrdb -merge ~/.Xresources # Disable monitor blanking xset s off -dpms -# Set cursor to expected left-pointer -xsetroot -cursor_name left_ptr - -# Hide mouse when idle -unclutter & - # Run urxvt daemon urxvtd -q -o -f -# Start mpd -mpd +# Export variables +export EDITOR=vim +export BROWSER=firefox