summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-09-01 14:48:24 +0200
committersalad <fmoenne-@student.le-101.fr>2020-09-01 14:48:24 +0200
commit0c8f8c2728dfd1b74c616bfb64300b87132e272f (patch)
treee982481861152e3a67d5614d6038c15d19c41791
parentuptodate doomrc (diff)
downloaddotfiles-0c8f8c2728dfd1b74c616bfb64300b87132e272f.tar.gz
dotfiles-0c8f8c2728dfd1b74c616bfb64300b87132e272f.tar.bz2
dotfiles-0c8f8c2728dfd1b74c616bfb64300b87132e272f.tar.xz
dotfiles-0c8f8c2728dfd1b74c616bfb64300b87132e272f.tar.zst
dotfiles-0c8f8c2728dfd1b74c616bfb64300b87132e272f.zip
added papes, emacs theme & polybar colors
-rw-r--r--.doom.d/config.el2
-rwxr-xr-xbspwm/bspswallow53
-rwxr-xr-xbspwm/bspwmrc29
-rw-r--r--bspwm/swallow4
-rw-r--r--bspwm/terminals1
-rw-r--r--papes/night.pngbin0 -> 422422 bytes
-rw-r--r--polybar/config26
7 files changed, 90 insertions, 25 deletions
diff --git a/.doom.d/config.el b/.doom.d/config.el
index 57418fd..3ea0925 100644
--- a/.doom.d/config.el
+++ b/.doom.d/config.el
@@ -24,7 +24,7 @@
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
-(setq doom-theme 'doom-gruvbox)
+(setq doom-theme 'doom-one)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
diff --git a/bspwm/bspswallow b/bspwm/bspswallow
new file mode 100755
index 0000000..832f191
--- /dev/null
+++ b/bspwm/bspswallow
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Get class of a wid
+get_class() {
+ id=$1
+ if [ -z "$id" ]; then
+ echo ""
+ else
+ xprop -id "$id" | sed -n '/WM_CLASS\|WM_COMMAND/s/.*"\(.*\)".*/\1/p'
+ fi
+}
+
+swallow() {
+ addedtodesktop=$2
+ lasttermdesktop=$(bspc query -D -n last)
+
+ swallowerid=$1
+ swallowingid=$(bspc query -N -n last)
+
+ if [ "$addedtodesktop" = "$lasttermdesktop" ]; then
+ grep "^$(get_class "$swallowerid")$" ~/.config/bspwm/swallow || return
+ grep "^$(get_class "$swallowingid")$" ~/.config/bspwm/terminals || return
+ echo "$swallowerid $swallowingid" >> /tmp/swallowids
+ bspc node "$swallowingid" --flag hidden=on
+ fi
+}
+
+spit() {
+ spitterid=$1
+ spitterdesktop=$2
+ grep "^$spitterid" /tmp/swallowids || return
+ spittingid=$(grep "^$spitterid" /tmp/swallowids | head -n1 | awk '{print $2}')
+
+ bspc node "$spittingid" --flag hidden=off
+
+ termdesktop=$(bspc query -D -n "$spittingid")
+ [ "$termdesktop" = "$spitterdesktop" ] || bspc node "$spittingid" -d "$spitterdesktop"
+
+ bspc node "$spittingid" -f
+ sed -i "/^$spitterid/d" /tmp/swallowids
+}
+
+bspc subscribe node_add node_remove | while read -r event
+do
+ case $(echo "$event" | awk '{ print $1 }') in
+ node_add)
+ swallow $(echo "$event" | awk '{print $5 " " $3}')
+ ;;
+ node_remove)
+ spit $(echo "$event" | awk '{print $4 " " $3}')
+ ;;
+ esac
+done
diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc
index 5e142de..7c68fc1 100755
--- a/bspwm/bspwmrc
+++ b/bspwm/bspwmrc
@@ -2,20 +2,27 @@
sxhkd &
-bspc monitor HDMI-0 -d I II III IV
-bspc monitor DVI-I-0 -d V VI VII
+bspc monitor HDMI-0 -d I II III IV V VI VII VIII
bspc config border_width 2
-bspc config window_gap 12
-bash ~/.config/polybar/launch.sh
+bspc config window_gap 16
-bspc config split_ratio 0.52
+bspc config top_padding 20
+bspc config split_ratio 0.50
bspc config borderless_monocle true
bspc config gapless_monocle true
+bspc config active_border_color \#6600cc
+bspc config normal_border_color \#3333aa
-bspc rule -a Gimp desktop='^8' state=floating follow=on
-bspc rule -a Chromium desktop='^2'
+xset r rate 200 100
bspc rule -a Emacs state=tiled
-bspc rule -a Kupfer.py focus=on
-bspc rule -a Screenkey manage=off
-feh --bg-fill Images/wallpapers/wall.png
-compton
+bspc rule -a Zathura state=tiled
+bspc rule -a Firefox desktop='^1'
+bspc rule -a Emacs desktop='^2'
+bspc rule -a Clementine desktop='^3'
+bspc rule -a Steam desktop='^4'
+bspc rule -a Lutris desktop='^5'
+
+feh --bg-fill ~/Images/wallpapers/night.png
+bash ~/.config/polybar/launch.sh
+compton &
+~/.config/bspwm/bspswallow &
diff --git a/bspwm/swallow b/bspwm/swallow
new file mode 100644
index 0000000..13f1cba
--- /dev/null
+++ b/bspwm/swallow
@@ -0,0 +1,4 @@
+mpv
+feh
+Zathura
+sxiv
diff --git a/bspwm/terminals b/bspwm/terminals
new file mode 100644
index 0000000..2f67dc4
--- /dev/null
+++ b/bspwm/terminals
@@ -0,0 +1 @@
+St
diff --git a/papes/night.png b/papes/night.png
new file mode 100644
index 0000000..e1d5143
--- /dev/null
+++ b/papes/night.png
Binary files differ
diff --git a/polybar/config b/polybar/config
index bccee43..8b77ffa 100644
--- a/polybar/config
+++ b/polybar/config
@@ -68,8 +68,8 @@ font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
modules-left = bspwm
-modules-center = mpd
-modules-right = filesystem eth wlan pulseaudio cpu memory temperature battery date
+;modules-center = mpd
+modules-right = filesystem eth wlan pulseaudio cpu memory temperature date
tray-position = right
tray-padding = 2
@@ -109,7 +109,7 @@ type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
-label-focused-underline= #81ae9b
+label-focused-underline= #6600cc
#${colors.primary}
label-focused-padding = 2
@@ -169,7 +169,7 @@ type = internal/cpu
interval = 2
format-prefix = "CPU : "
format-prefix-foreground = ${colors.foreground-alt}
-format-underline = #81ae9b
+format-underline = #6600cc
label = %percentage:2%%
[module/memory]
@@ -177,7 +177,7 @@ type = internal/memory
interval = 2
format-prefix = "MEM : "
format-prefix-foreground = ${colors.foreground-alt}
-format-underline = #81ae9b
+format-underline = #6600cc
label = %percentage_used%%
[module/wlan]
@@ -186,7 +186,7 @@ interface = wlan0
interval = 30.0
format-connected = <ramp-signal> <label-connected>
-format-connected-underline = #81ae9b
+format-connected-underline = #6600cc
label-connected = %essid%
;format-disconnected =
@@ -207,7 +207,7 @@ type = internal/network
interface = enp0s25
interval = 30.0
-format-connected-underline = #81ae9b
+format-connected-underline = #6600cc
format-connected-prefix = "ETH : "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
@@ -229,7 +229,7 @@ time = %H:%M
time-alt = %H:%M:%S
format-prefix-foreground = ${colors.foreground-alt}
-format-underline = #81ae9b
+format-underline = #6600cc
label = %date% %time%
@@ -298,18 +298,18 @@ format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging>
-format-discharging-underline = #81ae9b
+format-discharging-underline = #6600cc
#${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
-format-full-underline = #81ae9b
+format-full-underline = #6600cc
#${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
-ramp-capacity-foreground = #81ae9b
+ramp-capacity-foreground = #6600cc
#${colors.foreground-alt}
animation-charging-0 = 
@@ -321,7 +321,7 @@ animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
-animation-discharging-foreground = #81ae9b
+animation-discharging-foreground = #6600cc
#${colors.foreground-alt}
animation-discharging-framerate = 750
@@ -331,7 +331,7 @@ thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
-format-underline = #81ae9b
+format-underline = #6600cc
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}