making more widgets and better spacing

This commit is contained in:
Chris Cochrun 2021-08-18 17:05:04 -05:00
parent ea0f4fd844
commit c27a826eb0
10 changed files with 139 additions and 83 deletions

View file

@ -28,8 +28,8 @@
;; another config (This code will only ever execute for the fallback config)
(when awesome.startup_errors
(naughty.notify {:preset naughty.config.presets.critical
:title "Oops, there were errors during startup!"
:text awesome.startup_errors}))
:title "Oops, there were errors during startup!"
:text awesome.startup_errors}))
;; Handle runtime errors after startup
(do
@ -83,9 +83,9 @@
;; Table of layouts to cover with awful.layout.inc, order matters.
(set awful.layout.layouts [
bling.layout.mstab
awful.layout.suit.tile
;;bling.layout.centered
bling.layout.mstab
bling.layout.centered
awful.layout.suit.floating
;; awful.layout.suit.tile.left
;; awful.layout.suit.tile.bottom
@ -354,13 +354,13 @@
:layout wibox.layout.fixed.horizontal
})
:widget wibox.container.margin
:left (dpi 10)}
:left (dpi 5)}
:widget wibox.container.background
:shape gears.shape.rounded_bar
:bg beautiful.bg_normal
:fg beautiful.base09}
:widget wibox.container.margin
:right (dpi 10)})
:right (dpi 5)})
(set s.batterytext (awful.widget.watch "cat /sys/class/power_supply/BAT1/capacity" 30))
(set s.batterytext2 (awful.widget.watch "cat /sys/class/power_supply/BAT2/capacity" 30))
@ -376,16 +376,16 @@
6 s.batteryspace
:layout wibox.layout.fixed.horizontal})
:widget wibox.container.margin
:left (dpi 10)}
:left (dpi 5)}
:widget wibox.container.background
:shape gears.shape.rounded_bar
:bg beautiful.bg_normal
:fg beautiful.base0C}
:widget wibox.container.margin
:right (dpi 10)})
:right (dpi 5)})
(set s.cputext (awful.widget.watch "cpu" 5))
(set s.cpuicon (wibox.widget.textbox " "))
(set s.cpuicon (wibox.widget.textbox " "))
(set s.cpuspace (wibox.widget.textbox " "))
(set s.cpuwidget { 1 { 1 { 1 (wibox.widget {
@ -395,13 +395,51 @@
:layout wibox.layout.fixed.horizontal
})
:widget wibox.container.margin
:left (dpi 9)}
:left (dpi 5)}
:widget wibox.container.background
:shape gears.shape.rounded_bar
:bg beautiful.bg_normal
:fg beautiful.base0A}
:widget wibox.container.margin
:right (dpi 10)})
:right (dpi 5)})
(set s.memtext (awful.widget.watch "mem" 2))
(set s.memicon (wibox.widget.textbox " "))
(set s.memspace (wibox.widget.textbox " "))
(set s.memwidget { 1 { 1 { 1 (wibox.widget {
1 s.memicon
2 s.memtext
3 s.memspace
:layout wibox.layout.fixed.horizontal
})
:widget wibox.container.margin
:left (dpi 5)}
:widget wibox.container.background
:shape gears.shape.rounded_bar
:bg beautiful.bg_normal
:fg beautiful.base0E}
:widget wibox.container.margin
:right (dpi 5)})
(set s.nettext (awful.widget.watch "netwidget" 10))
(set s.neticon (wibox.widget.textbox " "))
(set s.netspace (wibox.widget.textbox " "))
(set s.netwidget { 1 { 1 { 1 (wibox.widget {
;; 1 s.neticon
2 s.nettext
3 s.netspace
:layout wibox.layout.fixed.horizontal
})
:widget wibox.container.margin
:left (dpi 5)}
:widget wibox.container.background
:shape gears.shape.rounded_bar
:bg beautiful.bg_normal
:fg beautiful.base08}
:widget wibox.container.margin
:right (dpi 5)})
(set s.mailtext (awful.widget.watch "muunread" 360))
(set s.mailicon (wibox.widget.textbox " "))
@ -414,13 +452,13 @@
:layout wibox.layout.fixed.horizontal
})
:widget wibox.container.margin
:left (dpi 9)}
:left (dpi 5)}
:widget wibox.container.background
:shape gears.shape.rounded_bar
:bg beautiful.bg_normal
:fg beautiful.base0C}
:fg beautiful.base0D}
:widget wibox.container.margin
:right (dpi 10)})
:right (dpi 5)})
(set s.wttrtext (awful.widget.watch "wttr" 1200))
(set s.wttrspace (wibox.widget.textbox " "))
@ -442,10 +480,10 @@
(set s.mysystray { 1 { 1 { 1 (wibox.widget.systray)
:widget wibox.container.margin
:right (dpi 10)
:right (dpi 2)
:top (dpi 2)
:bottom (dpi 2)
:left (dpi 10)}
:left (dpi 2)}
:widget wibox.container.background
:shape gears.shape.rounded_bar
:bg beautiful.bg_normal
@ -456,13 +494,14 @@
(set s.myrightwidgets {
1 {
:layout wibox.layout.fixed.horizontal
;; 1 s.wttrwidget
1 s.netwidget
2 s.mailwidget
3 s.cpuwidget
4 s.volumewidget
5 (if laptop s.batterywidget s.myemptywidget)
6 (if (= s.index 1) s.mysystray)
7 s.mylayoutbox
3 s.memwidget
4 s.cpuwidget
5 s.volumewidget
6 (if laptop s.batterywidget s.myemptywidget)
7 (if (= s.index 1) s.mysystray)
8 s.mylayoutbox
}
:widget wibox.container.background
})
@ -486,7 +525,7 @@
:opacity 0.95
:screen s }))
(: s.mywibox :struts { :bottom (dpi 45) })
(: s.mywibox :struts { :bottom (dpi 40) })
;; Add widgets to the wibox
(: s.mywibox :setup {
@ -575,10 +614,19 @@
;; Rules
(ruled.client.append_rules clientrules)
(ruled.notification.connect_signal
"request::rules"
(fn []
(ruled.notification.append_rules notifications)))
(ruled.notification.append_rules notifications
;; {
;; :rule { }
;; :properties {
;; :border-width 0
;; :border_color "#000000"
;; :opacity 0.9
;; :shape gears.shape.rounded_rect}}
)))
;; Signals
;; Signal function to execute when a new client appears.
@ -595,21 +643,25 @@
;; Prevent clients from being unreachable after screen count changes.
(awful.placement.no_offscreen c))
;; MPV wasn't centering right
(when (= c.class "mpv") (awful.placement.centered c))
;; (when (= c.class "mpv") (awful.placement.centered c))
(awful.client.focus.byidx 1)
(: c :activate [])))
(client.connect_signal "property::fullscreen"
(fn [c]
(set c.shape (fn [cr w h]
(gears.shape.rectangle cr w h)))))
(client.connect_signal "manage"
(fn [c]
;; Rounded windows done right
(when (not c.fullscreen)
(set c.shape (fn [cr w h]
(gears.shape.rounded_rect cr w h (dpi 15)))))))
(fn [c]
;; Rounded windows done right
(when (not c.fullscreen)
(set c.shape (fn [cr w h]
(gears.shape.rounded_rect cr w h (dpi 15)))))))
(client.connect_signal "focus" (fn [c] (set c.border_color beautiful.border_focus)))
(client.connect_signal "unfocus" (fn [c] (set c.border_color beautiful.border_normal)))
(client.connect_signal "request::manage" (fn [c] (if c.floating (set c.placement awful.placement.centered))))
(client.connect_signal "request::manage" (fn [c] (if c.floating (set c.placement (+ awful.placement.centered awful.placement.no_offscreen)))))
(awful.screen.focus 1)
@ -620,5 +672,5 @@
(awful.spawn "libinput-gestures-setup start")
(awful.spawn "bluetoothctl power on")
(awful.spawn "nextcloud --background")
(awful.spawn "rbw-agent")
;; (awful.spawn "rbw-agent")
(awful.spawn "xset r rate 220 90")