Prep for a battery widget

This commit is contained in:
Chris Cochrun 2020-10-21 06:23:59 -05:00
parent 84957355a4
commit 08c840c47f
2 changed files with 12 additions and 0 deletions

View file

@ -51,6 +51,8 @@
(var editor (or (os.getenv "EDITOR") "emacsclient"))
(var editor_cmd (.. terminal " -e " editor))
;; (lambda battery-capacity (awful.spawn.easy_async "cat /sys/class/power_supply/BAT*/capacity"))
;; Default modkey.
;; Usually, Mod4 is the key with a logo between Control and Alt.
;; If you do not like this or do not have such a key,
@ -117,6 +119,7 @@
(awful.button [] 4 (fn [t] (awful.tag.viewnext t.screen)))
(awful.button [] 5 (fn [t] (awful.tag.viewprev t.screen)))))
(local tasklist_buttons
(gears.table.join
(awful.button [] 1 (fn [c]
@ -262,6 +265,13 @@
:valign ""
:widget wibox.widget.textbox}))
;; (set batterywidget (wibox.widget {
;; :text battery1-capacity
;; :align ""
;; :valign ""
;; :widget wibox.widget.textbox
;; }))
(set s.myrightwidgets {
1 {
:layout wibox.layout.fixed.horizontal

View file

@ -97,6 +97,8 @@
;; Programs
(awful.key [ modkey ] "d" (fn [] (awful.spawn "emacsclient -c -e '(dired-jump)'"))
{:description "launch dired in new emacs frame" :group "apps" })
(awful.key [ modkey ] "i" (fn [] (awful.spawn "emacsclient -c -e '(mu4e)'"))
{:description "launch mu4e in new emacs frame" :group "apps" })
;; rofi
(awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.dotfiles/rofi/launchers-git/launcher.sh"))
{:description "launch rofi" :group "launcher"})