From c4ca1e24f8759c0f18c56aa87cb96c5481b5115e Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Wed, 13 Jan 2021 21:03:10 -0500 Subject: [PATCH] [emacs] Replace polybar with tint2 --- .doom.d/config.org | 159 ++------------------------------------------- recipes/exwm | 3 +- recipes/polybar | 6 -- 3 files changed, 7 insertions(+), 161 deletions(-) delete mode 100644 recipes/polybar diff --git a/.doom.d/config.org b/.doom.d/config.org index f2ff4e1..85296ac 100644 --- a/.doom.d/config.org +++ b/.doom.d/config.org @@ -84,23 +84,9 @@ emacs -mm --debug-init -l ~/.doom.d/exwm.el (defun my/set-desktop-background () (interactive) (start-process-shell-command "feh" nil "feh --bg-scale ~/Pictures/Wallpapers/1520742811045.png")) -(defvar my/polybar-process nil - "Holds the process of the running Polybar instance, if any") -(defun my/kill-panel () - (interactive) - (when my/polybar-process - (ignore-errors - (kill-process my/polybar-process))) - (setq my/polybar-process nil)) -(defun my/start-panel () - (interactive) - (my/kill-panel) - (setq my/polybar-process (start-process-shell-command "polybar" nil "polybar-git -c ~/.doom.d/polybar.conf panel"))) (defun my/exwm-init-hook () - ;; Start on workspace1 - (exwm-workspace-switch-create 1) - ;; Start polybar - (my/start-panel) + ;; Start tint2 bar + (my/run-in-background "tint2") ;; Start system tray applets (my/run-in-background "nm-applet") (my/run-in-background "pasystray") @@ -116,11 +102,12 @@ emacs -mm --debug-init -l ~/.doom.d/exwm.el `(,(kbd (format "s-%d" i)) . (lambda () (interactive) - (exwm-workspace-switch-create ,i)))) - (number-sequence 0 9)) + (exwm-workspace-switch-create ,(- i 1))))) + (number-sequence 1 9)) ([?\s-&] . (lambda (command) (interactive (list (read-shell-command "$ "))) (start-process-shell-command command nil command))))) + (setq exwm-workspace-number 4) (exwm-input-set-key (kbd "s-SPC") #'counsel-linux-app) (add-hook! 'exwm-update-class-hook #'my/exwm-update-class) (add-hook! 'exwm-init-hook #'my/exwm-init-hook) @@ -133,142 +120,6 @@ emacs -mm --debug-init -l ~/.doom.d/exwm.el :config (desktop-environment-mode)) #+end_src -* Polybar -#+begin_src conf :tangle polybar.conf -; Docs: https://github.com/polybar/polybar -;========================================================== - -[settings] -screenchange-reload = true - -[global/wm] -margin-top = 0 -margin-bottom = 0 - -[colors] -background = #f0232635 -background-alt = #576075 -foreground = #A6Accd -foreground-alt = #555 -primary = #ffb52a -secondary = #e60053 -alert = #bd2c40 -underline-1 = #c792ea - -[bar/panel] -width = 100% -height = 20 -offset-x = 0 -offset-y = 0 -fixed-center = true -enable-ipc = true - -background = ${colors.background} -foreground = ${colors.foreground} - -line-size = 2 -line-color = #f00 - -border-size = 0 -border-color = #00000000 - -padding-top = 5 -padding-left = 1 -padding-right = 1 - -module-margin = 1 - -font-0 = "Cantarell:size=12:weight=bold;2" -font-1 = "Font Awesome:size=8;2" -font-2 = "Material Icons:size=14;5" -font-3 = "Fira Mono:size=7;-3" - -modules-right = cpu temperature battery date - -tray-position = right -tray-padding = 2 -tray-maxsize = 28 - -cursor-click = pointer -cursor-scroll = ns-resize - -[module/cpu] -type = internal/cpu -interval = 2 -format = 