Working on xmobar prior to DTOS launch.
This commit is contained in:
parent
1da2e72ee4
commit
3dbfb0bbbb
|
@ -1,14 +1,14 @@
|
|||
[xin_1]
|
||||
file=/home/dt/wallpapers/youtube-header-01.png
|
||||
[xin_0]
|
||||
file=/home/dt/wallpapers/0103.jpg
|
||||
mode=0
|
||||
bgcolor=#000000
|
||||
|
||||
[xin_0]
|
||||
file=/home/dt/wallpapers/youtube-header-01.png
|
||||
[xin_1]
|
||||
file=/home/dt/wallpapers/0103.jpg
|
||||
mode=0
|
||||
bgcolor=#000000
|
||||
|
||||
[xin_2]
|
||||
file=/home/dt/wallpapers/youtube-header-01.png
|
||||
file=/home/dt/wallpapers/0103.jpg
|
||||
mode=0
|
||||
bgcolor=#000000
|
||||
|
|
|
@ -10,12 +10,35 @@
|
|||
|
||||
(in-package :stumpwm)
|
||||
|
||||
;; load Stump contrib modules
|
||||
;;(mapc #'load-module '("ttf-fonts"
|
||||
;; "swm-gaps"))
|
||||
|
||||
;;; Startup Programs
|
||||
;;; Set Background
|
||||
(run-shell-command "nitrogen --restore")
|
||||
(run-shell-command "picom")
|
||||
(run-shell-command "xmodmap ~/.Xmodmap")
|
||||
(run-shell-command "./.config/herbstluftwm/panel.sh")
|
||||
;; I change the prefix key to something else besides a keychord.
|
||||
;; The following three lines are a dirty hack to make SUPER the prefix key.
|
||||
;; This was originally (set-prefix-key (kbd "C-t"))
|
||||
(run-shell-command "xmodmap -e 'clear mod4'" t)
|
||||
(run-shell-command "xmodmap -e \'keycode 133 = F20\'" t)
|
||||
(set-prefix-key (kbd "F20"))
|
||||
|
||||
(ql:quickload "clx-truetype")
|
||||
(load-module "ttf-fonts")
|
||||
(xft:cache-fonts) ;; Tell clx-truetype about the fonts you have installed. You really only need to do this once, but putting it here means you will not forget in the future.
|
||||
;; font settings
|
||||
(set-font (list (make-instance 'xft:font
|
||||
:family "Ubuntu"
|
||||
:subfamily "Bold"
|
||||
:size 11)
|
||||
(make-instance 'xft:font
|
||||
:family "FontAwesome"
|
||||
:subfamily "Regular"
|
||||
12)))
|
||||
;; (set-font "-*-fixed-medium-r-normal-*-*-140-*-*-*-*-*-*")
|
||||
;;(set-font "-xos4-terminus-medium-r-normal--13-140-72-72-c-80-iso8859-14")
|
||||
|
||||
(defvar color1 "#ff92d0")
|
||||
(defvar color2 "#282a36")
|
||||
|
@ -43,7 +66,7 @@
|
|||
stumpwm:*mode-line-foreground-color* color1
|
||||
stumpwm:*mode-line-border-color* "#333333"
|
||||
stumpwm:*screen-mode-line-format* (list " ")
|
||||
;; stumpwm:*screen-mode-line-format* (list "%g | %v ^>^7 | " '(:eval (show-hostname)) "| " '(:eval (show-kernel)) "| " '(:eval (show-package-count)) "packages | %d ")
|
||||
stumpwm:*screen-mode-line-format* (list "%g | %v ^>^7 | " '(:eval (show-hostname)) "| " '(:eval (show-kernel)) "| " '(:eval (show-package-count)) "packages | %d ")
|
||||
stumpwm:*mode-line-border-width* 1
|
||||
stumpwm:*mode-line-pad-x* 6
|
||||
stumpwm:*mode-line-pad-y* 2
|
||||
|
@ -64,13 +87,6 @@
|
|||
(stumpwm:gnewbg "Nine")
|
||||
(stumpwm:toggle-mode-line (stumpwm:current-screen) (stumpwm:current-head))
|
||||
|
||||
;; I change the prefix key to something else besides a keychord.
|
||||
;; The following three lines are a dirty hack to make SUPER the prefix key.
|
||||
;; This was originally (set-prefix-key (kbd "C-t"))
|
||||
(run-shell-command "xmodmap -e 'clear mod4'" t)
|
||||
(run-shell-command "xmodmap -e \'keycode 133 = F20\'" t)
|
||||
(set-prefix-key (kbd "F20"))
|
||||
|
||||
;; prompt the user for an interactive command. The first arg is an
|
||||
;; optional initial contents.
|
||||
(defcommand colon1 (&optional (initial "")) (:rest)
|
||||
|
@ -102,7 +118,6 @@
|
|||
(define-key *top-map* (kbd "C-\\") "imove-window")
|
||||
|
||||
(define-key *root-map* (kbd "C-m") "mode-line")
|
||||
;; Launch My Terminal (st)
|
||||
(define-key *root-map* (kbd "RET") "exec alacritty -e fish")
|
||||
(define-key *root-map* (kbd "C-c") "exec st")
|
||||
;; Launch Emacs
|
||||
|
@ -136,14 +151,6 @@
|
|||
(define-key *root-map* (kbd "M-s") "google")
|
||||
(define-key *root-map* (kbd "i") "imdb")
|
||||
|
||||
;; Message window font;
|
||||
; (ql:quickload 'clx-truetype)
|
||||
; (load-module "ttf-fonts")
|
||||
; (xft:cache-fonts)
|
||||
; (set-font (make-instance 'xft:font :family "Iosevka Nerd Font" :subfamily "Bold" :size 7 :antialias t))
|
||||
; (set-font "-*-fixed-medium-r-normal-*-*-140-*-*-*-*-*-*")
|
||||
(set-font "-xos4-terminus-medium-r-normal--13-140-72-72-c-80-iso8859-14")
|
||||
|
||||
;;; Define window placement policy...
|
||||
;; Clear rules
|
||||
(clear-window-placement-rules)
|
||||
|
|
|
@ -1,45 +1,54 @@
|
|||
-- http://projects.haskell.org/xmobar/
|
||||
-- I use Font Awesome 5 fonts in this config for unicode "icons". On Arch Linux,
|
||||
-- install this package from the AUR to get these fonts: otf-font-awesome-5-free
|
||||
-- Xmobar (http://projects.haskell.org/xmobar/)
|
||||
-- This is the default xmobar configuration for DTOS.
|
||||
-- This config is packaged in the DTOS repo as dtos-xmobar
|
||||
-- Dependencies: otf-font-awesome ttf-mononoki ttf-ubuntu-font-family trayer
|
||||
-- Also depends on scripts from dtos-local-bin from the dtos-core-repo.
|
||||
|
||||
Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=true"
|
||||
Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=true"
|
||||
, additionalFonts = [ "xft:Mononoki:pixelsize=11:antialias=true:hinting=true"
|
||||
, "xft:Font Awesome 5 Free Solid:pixelsize=12"
|
||||
, "xft:Font Awesome 5 Brands:pixelsize=12"
|
||||
]
|
||||
, bgColor = "#282c34"
|
||||
, fgColor = "#ff6c6b"
|
||||
, position = Static { xpos = 1920 , ypos = 0, width = 1920, height = 24 }
|
||||
, bgColor = "#282c34"
|
||||
, fgColor = "#ff6c6b"
|
||||
-- Position TopSize and BottomSize take 3 arguments:
|
||||
-- an alignment parameter (L/R/C) for Left, Right or Center.
|
||||
-- an integer for the percentage width, so 100 would be 100%.
|
||||
-- an integer for the minimum pixel height for xmobar, so 24 would force a height of at least 24 pixels.
|
||||
-- NOTE: The height should be the same as the trayer (system tray) height.
|
||||
, position = TopSize L 100 24
|
||||
, lowerOnStart = True
|
||||
, hideOnStart = False
|
||||
, allDesktops = True
|
||||
, persistent = True
|
||||
, iconRoot = "/home/dt/.xmonad/xpm/" -- default: "."
|
||||
, hideOnStart = False
|
||||
, allDesktops = True
|
||||
, persistent = True
|
||||
, iconRoot = ".xmonad/xpm/" -- default: "."
|
||||
, commands = [
|
||||
-- Time and date
|
||||
Run Date "<fn=2>\xf017</fn> %b %d %Y - (%H:%M) " "date" 50
|
||||
-- Network up and down
|
||||
, Run Network "enp6s0" ["-t", "<fn=2>\xf0ab</fn> <rx>kb <fn=2>\xf0aa</fn> <tx>kb"] 20
|
||||
-- Cpu usage in percent
|
||||
-- Echos a "penguin" icon in front of the kernel output.
|
||||
Run Com "echo" ["<fn=3>\xf17c</fn>"] "penguin" 3600
|
||||
-- Get kernel version (script found in .local/bin)
|
||||
, Run Com ".local/bin/kernel" [] "kernel" 36000
|
||||
-- Cpu usage in percent
|
||||
, Run Cpu ["-t", "<fn=2>\xf108</fn> cpu: (<total>%)","-H","50","--high","red"] 20
|
||||
-- Ram used number and percent
|
||||
-- Ram used number and percent
|
||||
, Run Memory ["-t", "<fn=2>\xf233</fn> mem: <used>M (<usedratio>%)"] 20
|
||||
-- Disk space free
|
||||
-- Disk space free
|
||||
, Run DiskU [("/", "<fn=2>\xf0c7</fn> hdd: <free> free")] [] 60
|
||||
-- Echos a "bell" icon in front of the pacman updates.
|
||||
, Run Com "echo" ["<fn=2>\xf0f3</fn>"] "echo" 3600
|
||||
-- Runs custom script to check for pacman updates.
|
||||
-- This script is in my dotfiles repo in .local/bin.
|
||||
, Run Com "/home/dt/.local/bin/pacupdate" [] "pacupdate" 36000
|
||||
-- Runs a standard shell command 'uname -r' to get kernel version
|
||||
, Run Uptime ["-t", "<fn=3>\xf17c</fn> uptime: <days>d <hours>h"] 360
|
||||
-- Script that dynamically adjusts xmobar padding depending on number of trayer icons.
|
||||
-- Echos an "up arrow" icon in front of the uptime output.
|
||||
, Run Com "echo" ["<fn=2>\xf0aa</fn>"] "uparrow" 3600
|
||||
-- Uptime
|
||||
, Run Uptime ["-t", "uptime: <days>d <hours>h"] 360
|
||||
-- Echos a "bell" icon in front of the pacman updates.
|
||||
, Run Com "echo" ["<fn=2>\xf0f3</fn>"] "bell" 3600
|
||||
-- Check for pacman updates (script found in .local/bin)
|
||||
, Run Com ".local/bin/pacupdate" [] "pacupdate" 36000
|
||||
-- Time and date
|
||||
, Run Date "<fn=2>\xf017</fn> %b %d %Y - (%H:%M) " "date" 50
|
||||
-- Script that dynamically adjusts xmobar padding depending on number of trayer icons.
|
||||
, Run Com "/home/dt/.config/xmobar/trayer-padding-icon.sh" [] "trayerpad" 20
|
||||
-- Prints out the left side items such as workspaces, layout, etc.
|
||||
-- The workspaces are 'clickable' in my configs.
|
||||
-- Prints out the left side items such as workspaces, layout, etc.
|
||||
, Run UnsafeStdinReader
|
||||
]
|
||||
, sepChar = "%"
|
||||
, alignSep = "}{"
|
||||
, template = " <icon=haskell_20.xpm/> <fc=#666666>|</fc> %UnsafeStdinReader% }{ <box type=Bottom width=2 mb=2 color=#51afef><fc=#51afef><action=`alacritty -e htop`>%uptime%</action> </fc></box> <box type=Bottom width=2 mb=2 color=#ecbe7b><fc=#ecbe7b><action=`alacritty -e htop`>%cpu%</action></fc></box> <box type=Bottom width=2 mb=2 color=#ff6c6b><fc=#ff6c6b><action=`alacritty -e htop`>%memory%</action></fc></box> <box type=Bottom width=2 mb=2 color=#a9a1e1><fc=#a9a1e1><action=`alacritty -e htop`>%disku%</action></fc></box> <box type=Bottom width=2 mb=2 color=#98be65><fc=#98be65><action=`alacritty -e sudo iftop`>%enp6s0%</action></fc></box> <box type=Bottom width=2 mb=2 color=#c678dd><fc=#c678dd>%echo% <action=`alacritty -e sudo pacman -Syu`>%pacupdate%</action></fc></box> <box type=Bottom width=2 mb=2 color=#46d9ff><fc=#46d9ff><action=`emacsclient -c -a 'emacs' --eval '(doom/window-maximize-buffer(dt/year-calendar))'`>%date%</action></fc></box> %trayerpad%"
|
||||
, template = " <icon=haskell_20.xpm/> <fc=#666666>|</fc> %UnsafeStdinReader% }{ <box type=Bottom width=2 mb=2 color=#51afef><fc=#51afef>%penguin% <action=`alacritty -e htop`>%kernel%</action> </fc></box> <box type=Bottom width=2 mb=2 color=#ecbe7b><fc=#ecbe7b><action=`alacritty -e htop`>%cpu%</action></fc></box> <box type=Bottom width=2 mb=2 color=#ff6c6b><fc=#ff6c6b><action=`alacritty -e htop`>%memory%</action></fc></box> <box type=Bottom width=2 mb=2 color=#a9a1e1><fc=#a9a1e1><action=`alacritty -e htop`>%disku%</action></fc></box> <box type=Bottom width=2 mb=2 color=#98be65><fc=#98be65>%uparrow% <action=`alacritty -e htop`>%uptime%</action></fc></box> <box type=Bottom width=2 mb=2 color=#c678dd><fc=#c678dd>%bell% <action=`alacritty -e sudo pacman -Syu`>%pacupdate%</action></fc></box> <box type=Bottom width=2 mb=2 color=#46d9ff><fc=#46d9ff><action=`emacsclient -c -a 'emacs' --eval '(doom/window-maximize-buffer(dt/year-calendar))'`>%date%</action></fc></box> %trayerpad%"
|
||||
}
|
||||
|
|
|
@ -613,9 +613,9 @@ This is the "main" of XMonad. This where everything in our configs comes togethe
|
|||
main :: IO ()
|
||||
main = do
|
||||
-- Launching three instances of xmobar on their monitors.
|
||||
xmproc0 <- spawnPipe "xmobar -x 0 $HOME/.config/xmobar/xmobarrc0"
|
||||
xmproc1 <- spawnPipe "xmobar -x 1 $HOME/.config/xmobar/xmobarrc1"
|
||||
xmproc2 <- spawnPipe "xmobar -x 2 $HOME/.config/xmobar/xmobarrc2"
|
||||
xmproc0 <- spawnPipe "xmobar -x 0 $HOME/.config/xmobar/xmobarrc"
|
||||
xmproc1 <- spawnPipe "xmobar -x 1 $HOME/.config/xmobar/xmobarrc"
|
||||
xmproc2 <- spawnPipe "xmobar -x 2 $HOME/.config/xmobar/xmobarrc"
|
||||
-- the xmonad, ya know...what the WM is named after!
|
||||
xmonad $ ewmh def
|
||||
{ manageHook = myManageHook <+> manageDocks
|
||||
|
|
|
@ -499,9 +499,9 @@ myKeys =
|
|||
main :: IO ()
|
||||
main = do
|
||||
-- Launching three instances of xmobar on their monitors.
|
||||
xmproc0 <- spawnPipe "xmobar -x 0 $HOME/.config/xmobar/xmobarrc0"
|
||||
xmproc1 <- spawnPipe "xmobar -x 1 $HOME/.config/xmobar/xmobarrc1"
|
||||
xmproc2 <- spawnPipe "xmobar -x 2 $HOME/.config/xmobar/xmobarrc2"
|
||||
xmproc0 <- spawnPipe "xmobar -x 0 $HOME/.config/xmobar/xmobarrc"
|
||||
xmproc1 <- spawnPipe "xmobar -x 1 $HOME/.config/xmobar/xmobarrc"
|
||||
xmproc2 <- spawnPipe "xmobar -x 2 $HOME/.config/xmobar/xmobarrc"
|
||||
-- the xmonad, ya know...what the WM is named after!
|
||||
xmonad $ ewmh def
|
||||
{ manageHook = myManageHook <+> manageDocks
|
||||
|
|
Loading…
Reference in New Issue