From 80e0136e8166f9ae0e87309846e90019b3d96b23 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 17 May 2021 06:20:59 -0500 Subject: [PATCH] Adding mail widget in awesome --- awesome/init.fnl | 31 +++++++++++++++++++++++----- awesome/rules.fnl | 11 ++++++++++ qutebrowser/qsettings/QtProject.conf | 2 +- scripts/muunread | 2 ++ scripts/pacprev | 2 +- 5 files changed, 41 insertions(+), 7 deletions(-) create mode 100755 scripts/muunread diff --git a/awesome/init.fnl b/awesome/init.fnl index 5f4436b..793ecb0 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -393,6 +393,26 @@ :fg beautiful.base0A} :widget wibox.container.margin :right (dpi 10)}) + + (set s.mailtext (awful.widget.watch "muunread" 360)) + (set s.mailicon (wibox.widget.textbox " ")) + (set s.mailspace (wibox.widget.textbox " ")) + + (set s.mailwidget { 1 { 1 { 1 (wibox.widget { + 1 s.mailicon + 2 s.mailtext + 3 s.mailspace + :layout wibox.layout.fixed.horizontal + :fg beautiful.base0B + }) + :widget wibox.container.margin + :left (dpi 9)} + :widget wibox.container.background + :shape gears.shape.rounded_bar + :bg beautiful.bg_normal + :fg beautiful.base0C} + :widget wibox.container.margin + :right (dpi 10)}) (set s.mysystray { 1 { 1 { 1 (wibox.widget.systray) :widget wibox.container.margin @@ -410,11 +430,12 @@ (set s.myrightwidgets { 1 { :layout wibox.layout.fixed.horizontal - 1 s.cpuwidget - 2 s.volumewidget - 3 (if laptop s.batterywidget s.myemptywidget) - 4 (if (= s.index 1) s.mysystray) - 5 s.mylayoutbox + 1 s.mailwidget + 2 s.cpuwidget + 3 s.volumewidget + 4 (if laptop s.batterywidget s.myemptywidget) + 5 (if (= s.index 1) s.mysystray) + 6 s.mylayoutbox } :widget wibox.container.background }) diff --git a/awesome/rules.fnl b/awesome/rules.fnl index da71856..298e3c6 100644 --- a/awesome/rules.fnl +++ b/awesome/rules.fnl @@ -57,6 +57,17 @@ :placement (+ awful.placement.no_offscreen awful.placement.centered) } } + ;; Emacs + { + :rule_any { + :instance [ + "emacs" + ] + } + :properties { + :size_hints_honor false + } + } ;; Org-Agenda { :rule_any { diff --git a/qutebrowser/qsettings/QtProject.conf b/qutebrowser/qsettings/QtProject.conf index 10321b5..4db4da3 100644 --- a/qutebrowser/qsettings/QtProject.conf +++ b/qutebrowser/qsettings/QtProject.conf @@ -1,7 +1,7 @@ [FileDialog] ="======" history=file:///home/chris/Pictures, file:///home/chris/Videos, file:///home/chris, file:///home/chris/Downloads, file:///home/chris/Documents/TFC Stuff/newsletterpics -lastVisited=file:///home/chris +lastVisited=file:///home/chris/Downloads qtVersion=5.15.2 shortcuts=file:, file:///home/chris sidebarWidth=116 diff --git a/scripts/muunread b/scripts/muunread new file mode 100755 index 0000000..09a1765 --- /dev/null +++ b/scripts/muunread @@ -0,0 +1,2 @@ +#!/bin/sh +mu find flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\" AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\" | wc -l diff --git a/scripts/pacprev b/scripts/pacprev index 1ada712..55f3973 100755 --- a/scripts/pacprev +++ b/scripts/pacprev @@ -1,2 +1,2 @@ #!/bin/sh -pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)' +pacman -Qq | sk --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'