config 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  1. ; This is my (demuredemeanor) polybar conf
  2. ; vim:ft=dosini
  3. ; This is a port of my fancy powerline-esk lemonbar to polybar, in hopes of making things simpler :)
  4. ;; TODO: weechat highlight module?
  5. ;; TODO: fix spacing after %{O} format is fixed.
  6. ;;; Colors Block ;;; {{{
  7. ;; NOTE: could use "COLOR = ${xrdb:color#}" to reference from ~/.Xdefaults
  8. [colors]
  9. ;; Main powerline colors
  10. m_fg = #C5C8C6
  11. ;; alias for m_bg_sec1
  12. m_fg_dark = #282A2E
  13. m_bg = #1D1F21
  14. m_bg_edge = #B5BD68
  15. m_bg_wsp = #8C9440
  16. m_bg_sec1 = #282A2E
  17. m_bg_sec2 = #454A4F
  18. m_bg_sec3 = #60676E
  19. m_fg_icon = #979997
  20. ;;;; Palate ;;;; {{{
  21. ;; "base" palate?
  22. foreground = #C5C8C6
  23. background = #1D1F21
  24. black = #282A2E
  25. red = #A54242
  26. green = #8C9440
  27. yellow = #DE935F
  28. blue = #5F819D
  29. magenta = #85678F
  30. cyan = #5E8D87
  31. white = #707880
  32. bblack = #373B41
  33. bred = #CC6666
  34. ;; yellow-green
  35. bgreen = #B5BD68
  36. byellow = #F0C674
  37. bblue = #81A2BE
  38. bmagenta = #B294BB
  39. bcyan = #8ABEB7
  40. bwhite = #C5C8C6
  41. ;;;; End Palete ;;;; }}}
  42. ;;; End Colors Block ;;; }}}
  43. ;;; Bar Section ;;; {{{
  44. ;;;; Main Bar ;;;; {{{
  45. [bar/main]
  46. monitor = ${env:MONITOR:}
  47. width = 100%
  48. height = 14
  49. fixed-center = false
  50. border-color = ${colors.bblack}
  51. ;border-bottom-size = 2
  52. background = ${colors.m_bg}
  53. foreground = ${colors.m_fg}
  54. font-0 = "PragmataPro:size=10;3"
  55. ;; It looks like PragmataPro includes FA now, so FA isn't called
  56. font-1 = "FontAwesome:size=10;2"
  57. ;; Back up font, and japanese support (so I get less error msgs) (window titles)
  58. font-2 = "Noto Sans Mono:size=10;3"
  59. font-3 = "Noto Sans Mono CJK JP:size=10;3"
  60. modules-left = i3 title end_indicator_left
  61. ;modules-center =
  62. modules-right = end_indicator_right mmpd rss mail misc_status local_ip net_use ext_ip tmb cpu memory filesystem temperature volume backlight udate
  63. ;;;; End Main Bar ;;;; }}}
  64. ;;;; Tray Bar ;;;; {{{
  65. [bar/main-tray]
  66. inherit = bar/main
  67. tray-position = right
  68. tray-detached = false
  69. tray-maxsize = 14
  70. ;tray-transparent = false
  71. tray-background = ${colors.m_bg_corner}
  72. tray-offset-x = 0
  73. tray-offset-y = 0
  74. tray-padding = 1
  75. tray-scale = 1.0
  76. ;;;; End Tray Bar ;;;; }}}
  77. ;;; End Bar Section ;;; }}}
  78. ;;; Module Section ;;; {{{
  79. ;;;; Indicator Modules ;;;; {{{
  80. ;; Colors:
  81. ;; Name BG HEX FG HEX
  82. ;; Content m_bg_sec3 #60676E m_bg_wsp #8C9440
  83. [module/end_indicator_left]
  84. type = custom/text
  85. ;; Fancy, with icon
  86. ;; Color sec3 bg sec3 green? bg sec3
  87. ;content = %{B#60676E F#1D1F21}%{B#60676E F#8C9440}%{B#1D1F21 F#60676E}
  88. ;; Plain
  89. ;; Color sec3 bg bg sec3
  90. content = %{B#60676E F#1D1F21}%{B#1D1F21 F#60676E}
  91. ;; Colors:
  92. ;; Name BG HEX FG HEX
  93. ;; Content m_bg_sec3 #60676E m_bg_wsp #8C9440
  94. [module/end_indicator_right]
  95. type = custom/text
  96. ;; Fancy, with icon
  97. ;; Color bg sec3 sec3 green? bg
  98. ;content = %{B#1D1F21 F#60676E}%{B#60676E F#8C9440}%{F#1D1F21}
  99. ;; Plain
  100. ;; Color bg sec3 sec3 sec1
  101. ;content = %{B#1D1F21 F#60676E}%{B#60676E F#282A2E}
  102. ;; Color bg sec3 sec3 sec2
  103. content = %{B#1D1F21 F#60676E}%{B#60676E F#454A4F}
  104. ;;;; End Indicator Modules ;;;; }}}
  105. ;;; Builtins
  106. ;;;; i3 Workspace Module ;;;; {{{
  107. ;; Colors:
  108. ;; Name BG HEX FG HEX
  109. ;; Prefix m_bg_edge #B5BD68 m_fg_dark #282A2E
  110. ;; (Main) Unfocused m_bg_edge #B5BD68 m_fg_dark #282A2E
  111. ;; Focused/Visible m_bg_wsp #8C9440 m_fg_dark #282A2E
  112. ;; Urgent red? m_fg_dark #282A2E
  113. ;; Suffix Smooth out for next section
  114. [module/i3]
  115. type = internal/i3
  116. format = <label-state> <label-mode>
  117. ;index-sort = true
  118. wrapping-scroll = true
  119. strip-wsnumbers = false
  120. ;;;pin-workspaces = true
  121. ;; i3 mode
  122. label-mode = "%{B#A54242 F#B5BD68}%{B#A54242 F#282A2E}%mode%%{B#B5BD68 F#A54242}"
  123. ;; This section is not using label-NAME-(fore|back)ground, and instead is
  124. ;; literally declaring colors. This allows nice powerline transitions.
  125. ;; NOTE: the leading symbol had flip flopped bg/fg on purpose, to mesh nicely.
  126. label-unfocused = "%{B#B5BD68 F#282A2E}%name%%{B#B5BD68 F#B5BD68}"
  127. label-visible = "%{B#8C9440 F#B5BD68}%{B#8C9440 F#282A2E}%name%%{B#B5BD68 F#8C9440}"
  128. label-focused = "%{B#8C9440 F#B5BD68}%{B#8C9440 F#282A2E}%name%%{B#B5BD68 F#8C9440}"
  129. label-urgent = "%{B#A54242 F#B5BD68}%{B#A54242 F#282A2E}%name%%{B#B5BD68 F#A54242}"
  130. format-prefix = "%{B#B5BD68 F#282A2E} %{B#B5BD68 F#B5BD68} "
  131. format-suffix = "%{B#454A4F F#B5BD68}"
  132. ;;;; End i3 Workspace Module ;;;; }}}
  133. ;;;; Title Module ;;;; {{{
  134. ;; Colors:
  135. ;; Name BG HEX FG HEX
  136. ;; Prefix: m_bg_sec2 #454A4F m_bg_edge #B5BD68
  137. ;; Main: m_bg #1D1F21 m_fg #C5C8C6
  138. [module/title]
  139. type = internal/xwindow
  140. format = <label>
  141. ;; prefix is needed as otherwise maxlen would be ate up.
  142. format-prefix = "%{B#454A4F F#B5BD68}  %{B#1D1F21 F#454A4F}"
  143. ;format-suffix = ""
  144. format-background = ${colors.m_bg}
  145. format-foreground = ${colors.m_fg}
  146. label = " %title:0:40:…% "
  147. label-maxlen = 50
  148. label-empty = Empty
  149. label-empty-foreground = #707880
  150. ;;;; End Title Module ;;;; }}}
  151. ;;;; CPU Module ;;;; {{{
  152. [module/cpu]
  153. type = internal/cpu
  154. interval = 1
  155. ;; NOTE: Set up for easy sec1/sec2 toggling
  156. ;; Color sec2 sec1 sec1 icon fg
  157. label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{F#C5C8C6}%percentage:2%%"
  158. ;; Color sec1 sec2 sec2 icon fg
  159. ;label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{F#C5C8C6}%percentage:2%%"
  160. ;;;; End CPU Module ;;;; }}}
  161. ;;;; Memory Module ;;;; {{{
  162. [module/memory]
  163. type = internal/memory
  164. ;interval = 1
  165. interval = 3
  166. ;; NOTE: Set up for easy sec1/sec2 toggling
  167. ;; Color sec2 sec1 sec1 icon fg
  168. ;label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{F#C5C8C6}%percentage_used:2%%"
  169. ;; Color sec1 sec2 sec2 icon fg
  170. label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{F#C5C8C6}%percentage_used:2%%"
  171. ;;;; End Memory Module ;;;; }}}
  172. ;;;; Volume Module ;;;; {{{
  173. [module/volume]
  174. type = internal/pulseaudio
  175. ;interval = 0.1
  176. interval = 3
  177. ;; NOTE: Set up for easy sec1/sec2 toggling
  178. ;; Color sec2 sec1 sec1 icon fg
  179. label-volume = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{F#C5C8C6}%percentage:2%%"
  180. ;; Color sec2 yellow? yellow? icon fg_dark sec1
  181. label-muted = "%{B#454A4F F#DE935F}%{B#DE935F F#282A2E}%{F#282A2E}%percentage:2%%%{F#282A2E}"
  182. ;; Color sec1 sec2 sec2 icon fg
  183. ;label-volume = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{F#C5C8C6}%percentage:2%%"
  184. ;; Color sec1 yellow? yellow? icon fg_dark sec2
  185. ;label-muted = "%{B#282A2EF F#DE935F}%{B#DE935F F#282A2E}%{F#282A2E}%percentage:2%%%{F#454A4F}"
  186. ; Right and Middle click
  187. click-right = pavucontrol
  188. ;;;; End Volume Module ;;;; }}}
  189. ;;;; Temperature Module ;;;; {{{
  190. [module/temperature]
  191. type = internal/temperature
  192. ;; chose your thermal-zone
  193. thermal-zone = 3
  194. warn-temperature = 70
  195. ;; NOTE: Set up for easy sec1/sec2 toggling
  196. ;; Color sec2 sec1 sec1 icon fg
  197. ;format = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}<ramp>%{F#C5C8C6}<label>"
  198. ;; Color sec2 red? red? icon fg_dark sec1
  199. ;format-warn = "%{B#454A4F F#A54242}%{B#A54242 F#282A2E}<ramp>%{F#282A2E}<label-warn>%{F#282A2E}"
  200. ;; Color sec1 sec2 sec2 icon fg
  201. format = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}<ramp>%{F#C5C8C6}<label>"
  202. ;; Color sec1 red? red? icon fg_dark sec2
  203. format-warn = "%{B#282A2E F#A54242}%{B#A54242 F#282A2E}<ramp>%{F#282A2E}<label-warn>%{F#454A4F}"
  204. label = %temperature-c%
  205. label-warn = %temperature-c%
  206. ;; Note: pragmatapro (currently) has 5 icon increments.
  207. ;; Also, I'm reusing icons since the icons are divvied evenly between 0-70C...
  208. ;; and my x270 idles at ~50C. Otherwise the icons would look artificially 'high'
  209. ;; icon 1/5
  210. ramp-0 = ""
  211. ramp-1 = ""
  212. ;; icon 2/5
  213. ramp-2 = ""
  214. ramp-3 = ""
  215. ramp-4 = ""
  216. ;; icon 3/5
  217. ramp-5 = ""
  218. ;; icon 4/5
  219. ramp-6 = ""
  220. ;; icon 5/5
  221. ramp-7 = ""
  222. ;;;; End Temperature Module ;;;; }}}
  223. ;;;; Filesystem Module ;;;; {{{
  224. [module/filesystem]
  225. type = internal/fs
  226. interval = 10
  227. mount-0 = /
  228. ;fixed-values = true
  229. ;; NOTE: Set up for easy sec1/sec2 toggling
  230. ;; Color sec2 sec1 sec1 icon fg
  231. label-mounted = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{F#C5C8C6}%percentage_used:2%%"
  232. ;; Color sec1 sec2 sec2 icon fg
  233. ;label-mounted = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{F#C5C8C6}%percentage_used:2%%"
  234. ;;;; End Filesystem Module ;;;; }}}
  235. ;;;; Backlight Module ;;;; {{{
  236. [module/backlight]
  237. type = internal/backlight
  238. ; NOTE: uses %{A} for redshift toggle
  239. ; Use the following command to list available cards:
  240. ; $ ls -1 /sys/class/backlight/
  241. card = intel_backlight
  242. ;; NOTE: Set up for easy sec1/sec2 toggling
  243. ;; Color sec2 sec1 sec1 icon fg
  244. ;label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{A3:pkill -USR1 redshift:}%{F#C5C8C6}%percentage%%%{A}"
  245. ;; Color sec1 sec2 sec2 icon fg
  246. label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{A3:pkill -USR1 redshift:}%{F#C5C8C6}%percentage%%%{A}"
  247. ;;;; End Backlight Module ;;;; }}}
  248. ;;; Scripts
  249. ;;;; Misc Status Check Script Module ;;;; {{{
  250. [module/misc_status]
  251. type = custom/script
  252. interval = 15
  253. exec = $HOME/.config/polybar/scripts/misc_status_check.sh
  254. ;; NOTE: Set up for easy sec1/sec2 toggling
  255. ;; Color sec2 sec1 sec1 icon fg
  256. ;label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997} %{F#C5C8C6}%output%"
  257. ;; Color sec1 sec2 sec2 icon fg
  258. label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997} %{F#C5C8C6}%output%"
  259. ;;;; End Misc Status Check Script Module ;;;; }}}
  260. ;;;; Mail Check Script Module ;;;; {{{
  261. [module/mail]
  262. type = custom/script
  263. interval = 60
  264. exec = $HOME/.config/polybar/scripts/mail_check.sh
  265. ;; NOTE: Set up for easy sec1/sec2 toggling
  266. ;; NOTE: this script provides its foreground colors
  267. ;; Color sec2 sec1 sec1
  268. label = "%{B#454A4F F#282A2E}%{B#282A2E}%output%"
  269. ;; Color sec1 sec2 sec2
  270. ;label = "%{B#282A2E F#454A4F}%{B#454A4F}%output%"
  271. click-left = $HOME/projects/personal/scripts/offlineimap_neomutt_hook.sh &
  272. ;click-right = $HOME/projects/personal/scripts/offlineimap_neomutt_hook.sh &
  273. ;;;; End Mail Check Script Module ;;;; }}}
  274. ;;;; RSS Check Script Module ;;;; {{{
  275. [module/rss]
  276. type = custom/script
  277. interval = 60
  278. exec = $HOME/.config/polybar/scripts/rss_check.sh
  279. ;; NOTE: Set up for easy sec1/sec2 toggling
  280. ;; Color sec2 sec1 sec1 icon fg
  281. ;label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{F#C5C8C6}%output%"
  282. ;; Color sec1 sec2 sec2 icon fg
  283. label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{F#C5C8C6}%output%"
  284. ;;;; End RSS Check Script Module ;;;; }}}
  285. ;;;; TMB Check Script Module ;;;; {{{
  286. ;; Thinkpad Multi Battery
  287. [module/tmb]
  288. type = custom/script
  289. interval = 60
  290. exec = $HOME/.config/polybar/scripts/tmb_check.sh
  291. ;; NOTE: Colors set in script, toggle section in script.
  292. label = "%output%"
  293. ;;;; End TMB Check Script Module ;;;; }}}
  294. ;;;; UDate Script Module ;;;; {{{
  295. ;; This is a replacement for the builtin date.
  296. ;; This has a UTC toggle, done in a way that also allows for a i3 binding to toggle.
  297. [module/udate]
  298. type = custom/script
  299. ;interval = 1
  300. interval = 5
  301. exec = $HOME/.config/polybar/scripts/udate_check.sh
  302. ;; NOTE: Colors set in script, toggle section in script.
  303. label = "%output%"
  304. ## Toggles. There is also an i3 binding of this.
  305. ## NOTE: Using script as raw awk command was erroring out here.
  306. click-left = $HOME/.config/polybar/scripts/udate_toggle.sh
  307. ;click-right = $HOME/.config/polybar/scripts/udate_toggle.sh
  308. ;;;; End UDate Script Module ;;;; }}}
  309. ;;;; MMPD Check Script Module ;;;; {{{
  310. ;; Multi Music Player Display
  311. ;; The Output has a min 0 max 50 char limit inplace
  312. [module/mmpd]
  313. type = custom/script
  314. interval = 10
  315. exec = $HOME/.config/polybar/scripts/mmpd_check.sh
  316. ;; NOTE: I suggest this one looks best as m_bg_sec1
  317. ;; NOTE: Set up for easy sec1/sec2 toggling
  318. ;; Color sec2 sec1 sec1 icon fg
  319. label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{F#C5C8C6}%output:0:40:…%"
  320. ;; Color sec1 sec2 sec2 icon fg
  321. ;label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{F#C5C8C6}%output:0:40:...%"
  322. ;;;; End MMPD Check Script Module ;;;; }}}
  323. ;;;; Local IP Check Script Module ;;;; {{{
  324. [module/local_ip]
  325. type = custom/script
  326. interval = 15
  327. exec = $HOME/.config/polybar/scripts/local_ip_check.sh
  328. ;; NOTE: Icon colors handled in script
  329. ;; NOTE: Set up for easy sec1/sec2 toggling
  330. ;; Color sec2 sec1 sec1 fg
  331. label = "%{B#454A4F F#282A2E}%{B#282A2E F#C5C8C6}%output%"
  332. ;; Color sec1 sec2 sec2 fg
  333. ;label = "%{B#282A2E F#454A4F}%{B#454A4F F#C5C8C6}%output%"
  334. ## Toggles. There is also an i3 binding of this.
  335. ## NOTE: Using script as raw awk command was erroring out here.
  336. ;click-left = $HOME/.config/polybar/scripts/ipv6_toggle.sh
  337. click-right = $HOME/.config/polybar/scripts/ipv6_toggle.sh
  338. ;;;; End Loca Ip Check Script Module ;;;; }}}
  339. ;;;; Ext IP Check Script Module ;;;; {{{
  340. [module/ext_ip]
  341. type = custom/script
  342. interval = 15
  343. exec = $HOME/.config/polybar/scripts/ext_ip_check.sh
  344. ;; NOTE: Set up for easy sec1/sec2 toggling
  345. ;; Color sec2 sec1 sec1 icon fg
  346. label = "%{B#454A4F F#282A2E}%{B#282A2E F#979997}%{F#C5C8C6}%output%"
  347. ;; Color sec1 sec2 sec2 icon fg
  348. ;label = "%{B#282A2E F#454A4F}%{B#454A4F F#979997}%{F#C5C8C6}%output%"
  349. ## Toggles. There is also an i3 binding of this.
  350. ## NOTE: Using script as raw awk command was erroring out here.
  351. ;click-left = $HOME/.config/polybar/scripts/ip_toggle.sh
  352. click-right = $HOME/.config/polybar/scripts/ip_toggle.sh
  353. ;;;; End Ext Ip Check Script Module ;;;; }}}
  354. ;;;; Net Use Check Script Module ;;;; {{{
  355. [module/net_use]
  356. type = custom/script
  357. exec = $HOME/.config/polybar/scripts/net_use_check.sh
  358. tail = true
  359. ;; NOTE: Icon and highlight colors handled in script
  360. ;; NOTE: Set up for easy sec1/sec2 toggling
  361. ;; Color sec2 sec1 sec1 fg
  362. ;label = "%{B#454A4F F#282A2E}%{B#282A2E F#C5C8C6}%output%"
  363. ;; Color sec1 sec2 sec2 fg
  364. label = "%{B#282A2E F#454A4F}%{B#454A4F F#C5C8C6}%output%"
  365. ;;;; Net Use Check Script Module ;;;; }}}
  366. ;;; End Module Section ;;; }}}
  367. [settings]
  368. screenchange-reload = true
  369. [global/wm]
  370. margin-top = 0
  371. margin-bottom = 0