Advertisement
Guest User

Untitled

a guest
Dec 5th, 2017
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.15 KB | None | 0 0
  1. services.polybar = {
  2. enable = true;
  3. package = pkgs.polybar.override {
  4. #i3GapsSupport = true;
  5. #alsaSupport = true;
  6. #iwSupport = true;
  7. #githubSupport = true;
  8. i3Support = true;
  9. };
  10. script = ''
  11. MONITOR=DP-0 polybar --reload side &
  12. MONITOR=DVI-D-0 polybar --reload main &
  13. MONITOR=DVI-I-1 polybar --reload side &
  14. '';
  15. config = (let cfg = rec {
  16. "bar/main" = cfg."bar/side" //{
  17. tray-position = "right";
  18. tray-padding = "2";
  19. tray-background = "\${colors.background}";
  20.  
  21. };
  22. "bar/side" = {
  23. monitor = "\${env:MONITOR:DP-0}";
  24. top = "true";
  25. width = "100%";
  26. height = "2%";
  27. #height = "20";
  28. radius = 0;
  29. modules-left= "i3";
  30. modules-center = "date";
  31. modules-right = "myVolume s memory cpu temperature s battery";
  32.  
  33. };
  34. # "module/date" = {
  35. # type = "internal/date";
  36. # internal = 5;
  37. # date = "%d.%m.%y";
  38. # time = "%H:%M";
  39. # label = "%time% %date%";
  40. # };
  41. # "module/i3" = {
  42. # type = "internal/i3";
  43. #
  44. # };
  45. # "module/myBattery" = {
  46. # interval = "1";
  47. # type = "custom/script";
  48. # exec = "/home/timon/.config/i3blocks/battery";
  49. # format-underline = "#ffb52a";
  50. # };
  51. #};
  52.  
  53. "colors" = {
  54. background = "#ee2f343f";
  55. background-alt = "#f72f343f";
  56. foreground = "#f3f4f5";
  57. foreground-alt = "#f3f4f5";
  58. foreground-dim = "#676e7d";
  59. primary = "#ffb52a";
  60. secondary = "#e60053";
  61. alert = "#ff6600";
  62.  
  63. high = "#268bd2";
  64. high-alt = "#0c2b41";
  65. };
  66.  
  67. "global/wm" = {
  68. margin-top = "4";
  69. margin-bottom = "0";
  70. };
  71.  
  72. #"bar/main" = {
  73. # monitor = "\${env:MONITOR:DP-0}";
  74. # width = "100%";
  75. # height = "20";
  76. # offset-x = "0";
  77. # offset-y = "0";
  78. #
  79. # #;background = \${xrdb:color9}
  80. # background = "\${colors.background}";
  81. # foreground = "\${colors.foreground}";
  82. #
  83. # overline-size = "2";
  84. # overline-color = "#f00";
  85. # underline-size = "2";
  86. # underline-color = "\${colors.high}";
  87. #
  88. # line-size = "2";
  89. #
  90. # spacing = "1";
  91. # padding-left = "0";
  92. # padding-right = "2";
  93. # module-margin-left = "0";
  94. # module-margin-right = "1";
  95. #
  96. # font-0 = "Roboto:pixelsize=8;0";
  97. # font-1 = "FontAwesome:pixelsize=8 ;-2";
  98. # #;font-2 = unifont:size=6:heavy:fontformat=truetype;-2
  99. # #;font-3 = siji:pixelsize=10;-4
  100. #
  101. #
  102. # modules-left = "i3";
  103. # modules-center = "date";
  104. # #;modules-right = "myVolume s wlan eth s memory cpu myLoad temperature s battery";
  105. # #modules-right = "myVolume s wlan eth s memory cpu temperature s battery";
  106. # modules-right = "myVolume s eth s memory cpu temperature";
  107. # #;systemRoot systemHome s
  108. #
  109. #
  110. # wm-restack = "i3";
  111. #
  112. # #;override-redirect = "true";
  113. #
  114. #
  115. # #;scroll-up = "i3wm-wsnext";
  116. # #;scroll-down = i3wm-wsprev
  117. #};
  118.  
  119. "module/i3" = {
  120. type = "internal/i3";
  121. format = "<label-state> <label-mode>";
  122. index-sort = "true";
  123.  
  124. label-mode = "%mode%";
  125. label-mode-padding = "2";
  126. label-mode-foreground = "#000";
  127. label-mode-background = "\${colors.primary}";
  128.  
  129. label-focused = "%index%";
  130. label-focused-background = "\${colors.background-alt}";
  131. label-focused-underline = "\${colors.high}";
  132. label-focused-padding = "4";
  133.  
  134. label-unfocused = "%index%";
  135. label-unfocused-foreground = "\${colors.foreground-dim}";
  136. label-unfocused-padding = "4";
  137.  
  138. label-urgent = "%index%";
  139. label-urgent-background = "\${colors.alert}";
  140. label-urgent-padding = "4";
  141.  
  142. label-visible = "%index%";
  143. label-visible-foreground = "2";
  144. label-visible-padding = "2";
  145. };
  146.  
  147. "module/theme" = {
  148. format-background = "\${colors.background}";
  149. format-padding = "2";
  150. format-foreground = "\${self.format-underline}";
  151.  
  152. format-connected-background = "\${module/theme.format-background}";
  153. format-unconnected-background = "\${module/theme.format-background}";
  154. format-mounted-background = "\${module/theme.format-background}";
  155. format-unmounted-background = "\${module/theme.format-background}";
  156. format-charging-background = "\${module/theme.format-background}";
  157. format-discharging-background = "\${module/theme.format-background}";
  158.  
  159. format-connected-padding = "\${module/theme.format-padding}";
  160. format-unconnected-padding = "\${module/theme.format-padding}";
  161. format-mounted-padding = "\${module/theme.format-padding}";
  162. format-unmounted-padding = "\${module/theme.format-padding}";
  163. format-charging-padding = "\${module/theme.format-padding}";
  164. format-discharging-padding = "\${module/theme.format-padding}";
  165.  
  166. format-mounted-foreground = "\${self.format-mounted-underline}";
  167. format-unmounted-foreground = "\${self.format-unmounted-underline}";
  168. };
  169.  
  170. "module/mpd" = {
  171. type = "internal/mpd";
  172.  
  173. "inherit" = "module/theme";
  174.  
  175. format-online = "<toggle> <label-song> [ <label-time> ]";
  176.  
  177. label-song = "%title% - %artist%";
  178. label-song-maxlen = "25";
  179. label-song-ellipsis = "true";
  180.  
  181. icon-prev = "";
  182. icon-seekb = "";
  183. icon-stop = "";
  184. icon-play = "";
  185. icon-pause = "";
  186. icon-next = "";
  187. icon-seekf = "";
  188.  
  189. icon-random = "";
  190. icon-repeat = "";
  191.  
  192. #;toggle-on-foreground = "\${colors.primary}";
  193. #;toggle-off-foreground = "#66";
  194.  
  195. #;format-online-prefix = " ";
  196. format-online-underline = "#20dfdf";
  197. format-online-background = "#0d5959";
  198. format-online-padding = "4";
  199. };
  200.  
  201. "module/myBattery" = {
  202. interval="1";
  203. type = "custom/script";
  204. exec = "/home/timon/.config/i3blocks/battery";
  205. format-underline = "#ffb52a";
  206. };
  207.  
  208. "module/mySpotify" = {
  209. "inherit" = "module/theme";
  210. interval = "1";
  211. type = "custom/script";
  212. exec = "/home/timon/.config/i3blocks/mediaplayer";
  213. click-left = "i3-msg workspace number 9";
  214. label = "%output:0:30:...%";
  215. format-prefix = " ";
  216. format-underline = "#20dfdf";
  217. format-foreground = "\${colors.foreground}";
  218. format-background = "#0d5959";
  219. };
  220.  
  221. "module/myVolume" = {
  222. "inherit" = "module/theme";
  223. interval = "0.5";
  224. type = "custom/script";
  225. exec = "/home/timon/.config/i3blocks/volume";
  226. scroll-up = "pactl set-sink-volume 1 +1%";
  227. scroll-down = "pactl set-sink-volume 1 -1%";
  228. click-left = "urxvt -name float -e ncmpcpp &";
  229. click-right = "pavucontrol &";
  230. format-prefix = "";
  231. format-underline = "#20dfdf";
  232. };
  233.  
  234. "module/myLoad" = {
  235. "inherit" = "module/theme";
  236. interval = "1";
  237. type = "custom/script";
  238. exec = "/home/timon/.config/i3blocks/load_average";
  239. click-left = "urxvt -name float -e htop &";
  240. format-underline = "#d33636";
  241. };
  242.  
  243. "module/systemRoot" = {
  244. "inherit" = "module/theme";
  245. type = "internal/fs";
  246. interval = "20";
  247. mount-0 = "/";
  248. label-mounted = " %free%";
  249. label-unmounted = " ??";
  250. format-mounted-underline = "#39c639";
  251. format-unmounted-underline = "#39c639";
  252. };
  253.  
  254. "module/systemHome" = {
  255. "inherit" = "module/theme";
  256. type = "internal/fs";
  257. interval = "20";
  258. format-prefix = "";
  259. mount-0 = "/home";
  260. label-mounted = " %free%";
  261. label-unmounted = " ??";
  262. format-mounted-underline = "#39c639";
  263. format-unmounted-underline = "#39c639";
  264. };
  265.  
  266. "module/backlight" = {
  267. type = "internal/xbacklight";
  268.  
  269. format = "<label> <bar>";
  270. label = "BL";
  271.  
  272. bar-width = "10";
  273. bar-indicator = "│";
  274. bar-indicator-foreground = "#ff";
  275. bar-indicator-font = "2";
  276. bar-fill = "─";
  277. bar-fill-font = "2";
  278. bar-fill-foreground = "#9f78e1";
  279. bar-empty = "─";
  280. bar-empty-font = "2";
  281. bar-empty-foreground = "\${colors.foreground-alt}";
  282. };
  283.  
  284. "module/cpu" = {
  285. "inherit" = "module/theme";
  286. type = "internal/cpu";
  287. interval = "2";
  288. format-prefix = " ";
  289. format-underline = "#d33636";
  290. label = "%percentage%";
  291. };
  292.  
  293. "module/memory" = {
  294. "inherit" = "module/theme";
  295. type = "internal/memory";
  296. interval = "2";
  297. format-prefix = " ";
  298. format-underline = "#999999";
  299. label = "%gb_used%";
  300. };
  301.  
  302. "module/wlan" = {
  303. "inherit" = "module/theme";
  304. type = "internal/network";
  305. interface = "wlo1";
  306. interval = "1";
  307.  
  308. format-connected = "<label-connected>";
  309. format-connected-underline = "#268bd2";
  310. format-disconnected-underline = "\${colors.alert}";
  311.  
  312. #;label-connected = " %local_ip% %signal% %downspeed% %upspeed%";
  313. label-connected = " %signal% [  %downspeed% ] [  %upspeed% ]";
  314. label-disconnected = "OFFLINE";
  315. label-connected-foreground = "\${colors.high}";
  316. label-disconnected-foreground = "\${colors.alert}";
  317.  
  318. ramp-signal-0 = "";
  319. ramp-signal-1 = "";
  320. ramp-signal-2 = "";
  321. ramp-signal-3 = "";
  322. ramp-signal-4 = "";
  323. ramp-signal-foreground = "\${colors.foreground-alt}";
  324. };
  325.  
  326. "module/eth" = {
  327. "inherit" = "module/theme";
  328. type = "internal/network";
  329. #;interface = "eth0";
  330. interface = "eno1";
  331. interval = "3.0";
  332.  
  333. format-connected-underline = "#55aa55";
  334. format-connected-prefix = " ";
  335. format-connected-foreground-foreground = "\${colors.foreground-alt}";
  336. label-connected = "%local_ip%";
  337.  
  338. format-disconnected-underline = "\${self.format-connected-underline}";
  339. label-disconnected = "%ifname% disconnected";
  340. label-disconnected-foreground = "\${colors.foreground-alt}";
  341. };
  342.  
  343. "module/date" = {
  344. "inherit" = "module/theme";
  345. type = "internal/date";
  346. interval = "1";
  347.  
  348. time = "%Y - %m - %d %a %H : %M : %S";
  349. time-alt = "%Y-%m-%d %a %H:%M:%S";
  350.  
  351. format-prefix = "  ";
  352. format-underline = "\${colors.foreground}";
  353.  
  354. label = "%date% %time%";
  355. };
  356.  
  357. "module/volume" = {
  358. "inherit" = "module/theme";
  359. type = "internal/volume";
  360.  
  361. format-volume = "<label-volume> <bar-volume>";
  362. label-volume = "VOL";
  363. label-volume-foreground = "\${root.foreground}";
  364.  
  365. format-muted-prefix = " ";
  366. format-muted-foreground = "\${colors.foreground-alt}";
  367. label-muted = "sound muted";
  368.  
  369. bar-volume-width = "10";
  370. bar-volume-foreground-0 = "#55aa55";
  371. bar-volume-foreground-1 = "#55aa55";
  372. bar-volume-foreground-2 = "#55aa55";
  373. bar-volume-foreground-3 = "#55aa55";
  374. bar-volume-foreground-4 = "#55aa55";
  375. bar-volume-foreground-5 = "#f5a70a";
  376. bar-volume-foreground-6 = "#ff5555";
  377. bar-volume-gradient = "false";
  378. bar-volume-indicator = "│";
  379. bar-volume-indicator-font = "2";
  380. bar-volume-indicator-foreground = "#ff";
  381. bar-volume-fill = "─";
  382. bar-volume-fill-font = "2";
  383. bar-volume-empty = "─";
  384. bar-volume-empty-font = "2";
  385. bar-volume-empty-foreground = "\${colors.foreground-alt}";
  386. };
  387.  
  388. "module/battery" = {
  389. "inherit" = "module/theme";
  390. type = "internal/battery";
  391. battery = "BAT0";
  392. adapter = "ADP1";
  393. full-at = "98";
  394.  
  395. label-charging = " %percentage% [%time%]";
  396. format-charging = "<animation-charging> <label-charging>";
  397. format-charging-underline = "#ffb52a";
  398.  
  399. label-discharging = "%percentage% [%time%]";
  400. format-discharging = "<ramp-capacity> <label-discharging>";
  401. format-discharging-underline = "\${self.format-charging-underline}";
  402.  
  403. label-charging-foreground = "\${self.format-charging-underline}";
  404. label-discharging-foreground = "\${self.format-charging-underline}";
  405.  
  406. format-full-prefix = " ";
  407. format-full-prefix-foreground = "\${colors.foreground-alt}";
  408. format-full-underline = "\${self.format-charging-underline}";
  409.  
  410. ramp-capacity-0 = "";
  411. ramp-capacity-1 = "";
  412. ramp-capacity-2 = "";
  413. ramp-capacity-3 = "";
  414. ramp-capacity-4 = "";
  415. ramp-capacity-foreground = "\${self.format-charging-underline}";
  416. ramp-capacity-0-foreground = "\${colors.foreground}";
  417. ramp-capacity-0-background = "\${colors.alert}";
  418.  
  419. animation-charging-0 = "";
  420. animation-charging-1 = "";
  421. animation-charging-foreground = "\${self.format-charging-underline}";
  422. animation-charging-framerate = "750";
  423. };
  424.  
  425. "module/temperature" = {
  426. "inherit" = "module/theme";
  427. type = "internal/temperature";
  428. thermal-zone = "0";
  429. warn-temperature = "65";
  430.  
  431. format = "<label>";
  432. format-underline = "#d33636";
  433. format-warn = "<label-warn>";
  434. format-warn-underline = "\${self.format-underline}";
  435.  
  436. label = "%temperature%";
  437. label-warn = "%temperature%";
  438. format-warn-foreground = "\${colors.foreground}";
  439. format-warn-background = "\${colors.alert}";
  440. format-warn-padding = "\${self.format-padding}";
  441.  
  442. ramp-0 = "";
  443. ramp-1 = "";
  444. ramp-2 = "";
  445. ramp-foreground = "\${colors.foreground-alt}";
  446. };
  447.  
  448. "module/powermenu" = {
  449. type = "custom/menu";
  450.  
  451. label-open = " power";
  452. label-open-foreground = "\${colors.secondary}";
  453. label-close = " cancel";
  454. label-close-foreground = "\${colors.secondary}";
  455. label-separator = "|";
  456. label-separator-foreground = "\${colors.foreground-alt}";
  457.  
  458. menu-0-0 = "reboot";
  459. menu-0-0-exec = "menu-open-1";
  460. menu-0-1 = "power off";
  461. menu-0-1-exec = "menu-open-2";
  462.  
  463. menu-1-0 = "cancel";
  464. menu-1-0-exec = "menu-open-0";
  465. menu-1-1 = "reboot";
  466. menu-1-1-exec = "sudo reboot";
  467.  
  468. menu-2-0 = "power off";
  469. menu-2-0-exec = "sudo poweroff";
  470. menu-2-1 = "cancel";
  471. menu-2-1-exec = "menu-open-0";
  472.  
  473. #; vim:ft=d"osini";
  474. };
  475.  
  476. "module/s" = {
  477. type = "custom/text";
  478. content = " ";
  479. };
  480.  
  481. }; in cfg);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement