diff --git a/channels.scm b/channels.scm index acff6e6..7f36783 100644 --- a/channels.scm +++ b/channels.scm @@ -33,14 +33,14 @@ list "993d200265630e9c408028a022f32f34acacdf29" (openpgp-fingerprint "7EBE A494 60CE 5E2C 0875 7FDB 3B5A A993 E1A2 DFF0")))) -(channel - (name 'rrr) - (url "https://git.sr.ht/~akagi/rrr") - (introduction - (make-channel-introduction - "794d6e5eb362bfcf81ada12b6a49a0cd55c8e031" - (openpgp-fingerprint - "FF72 877C 4F21 FC4D 467D 20C4 DCCB 5255 2098 B6C1")))) +;;(channel +;; (name 'rrr) +;; (url "https://git.sr.ht/~akagi/rrr") +;; (introduction +;; (make-channel-introduction + ;; "794d6e5eb362bfcf81ada12b6a49a0cd55c8e031" + ;; (openpgp-fingerprint + ;; "FF72 877C 4F21 FC4D 467D 20C4 DCCB 5255 2098 B6C1")))) (channel (name 'rde) (url "https://git.sr.ht/~abcdw/rde") @@ -48,4 +48,27 @@ list (make-channel-introduction "257cebd587b66e4d865b3537a9a88cccd7107c95" (openpgp-fingerprint - "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0"))))) + "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0")))) + (channel + (name 'radix) + (url "https://codeberg.org/anemofilia/radix.git") + (branch "main") + (introduction + (make-channel-introduction + "f9130e11e35d2c147c6764ef85542dc58dc09c4f" + (openpgp-fingerprint + "F164 709E 5FC7 B32B AEC7 9F37 1F2E 76AC E3F5 31C8")))) + (channel + (name 'ajatt) + (url "https://codeberg.org/hashirama/ajatt-tools-guix.git") + (branch "main") + (introduction + (make-channel-introduction + "5f1904f1a514b89b2d614300d8048577aa717617" + (openpgp-fingerprint + "F164 709E 5FC7 B32B AEC7 9F37 1F2E 76AC E3F5 31C8")))) + ;;(channel +;; (name 'guix-local) +;; (url "https://codeberg.org/florhizome/guix-local.git") +;; (commit "6b6e50e3f4b7edc52d9116e4ff61ec57cd24a802")) +) diff --git a/config.scm b/config.scm index c0953e6..cfbf0f9 100644 --- a/config.scm +++ b/config.scm @@ -14,6 +14,9 @@ (guix packages) (gnu packages fcitx5) (gnu packages gnuzilla) + (gnu packages haskell) + (gnu packages gcc) + (gnu packages commencement) (gnu packages freedesktop) (gnu packages image) (gnu packages image-viewers) @@ -132,6 +135,7 @@ xdg-desktop-portal-gtk xdg-desktop-portal tmux + gnupg sdcv alacritty ;; stumpwm-test @@ -178,7 +182,16 @@ picom feh xmodmap + ;; deps for xmonad + xmonad + ghc ;; ridiculous, gcc and ghc are runtime dependencies , yet people didnt put in the package description + gcc + gcc-toolchain + xmessage + ghc-xmonad-contrib rofi + linux-libre-headers + ;;-------- yt-dlp ;; nicotine+ linux-firmware diff --git a/home-configuration/home-configuration.scm b/home-configuration/home-configuration.scm index 2a925ac..22c697e 100644 --- a/home-configuration/home-configuration.scm +++ b/home-configuration/home-configuration.scm @@ -7,6 +7,7 @@ (use-modules (gnu home) (gnu packages) (gnu services) + (gnu packages haskell) (guix gexp) (radix utils) (gnu home services) @@ -100,6 +101,7 @@ aria2 xdg-desktop-portal xdg-desktop-portal-gtk + gnupg xprop ;;nicotine+ yt-dlp @@ -138,7 +140,7 @@ feh xmodmap rofi - sbcl + sbcl stumpwm `(,stumpwm "lib") emacs-stumpwm-mode sbcl-stumpwm-net @@ -150,6 +152,12 @@ sbcl-clx sbcl-stumpwm-swm-gaps cmus + ;; xmonad + xmonad + ghc + xmobar + ghc-xmonad-contrib + ;;----------------- zstd ;; suckless-dictpopup scrot @@ -196,8 +204,12 @@ "/home/hashirama/src/guix-config/.bash_profile" "bash_profile"))) (environment-variables - '(("GUILE_LOAD_PATH" - . "$HOME/dev/guix_channel/ajatt-tools-guix:$GUILE_LOAD_PATH"))) + '( + ("GUILE_LOAD_PATH" + . "$HOME/dev/guix_channel/ajatt-tools-guix:$GUILE_LOAD_PATH") + ("XMONAD_CONFIG_DIR" + . "$HOME/.xmonad") + )) )) @@ -238,7 +250,7 @@ "audio/ogg" "audio/opus" "audio/x-opus+ogg" - "audio/flac" + "audio/flac" "video/mp4" "video/x-matroska" "video/webm")) @@ -252,10 +264,10 @@ ('emacs.desktop `("image/vnd.djvu")) ('foliate.desktop - `("application/epub+zip")) + `("application/epub+zip")) ('sioyek.desktop `("application/pdf")) - )))) + )))) (simple-service 'font-antialias home-fontconfig-service-type @@ -301,7 +313,7 @@ ("SHELL" . "bash") ("TERMINAL" . "kitty") ("VISUAL" . "emacs") - ("WM" . "stumpwm"))))) + ("WM" . "xmonad"))))) ) diff --git a/home-configuration/home-configuration.scm~ b/home-configuration/home-configuration.scm~ deleted file mode 100644 index 94fd53c..0000000 --- a/home-configuration/home-configuration.scm~ +++ /dev/null @@ -1,132 +0,0 @@ -;; This "home-environment" file can be passed to 'guix home reconfigure' -;; to reproduce the content of your profile. This is "symbolic": it only -;; specifies package names. To reproduce the exact same profile, you also -;; need to capture the channels being used, as returned by "guix describe". -;; See the "Replicating Guix" section in the manual. - -(use-modules (gnu home) - (gnu packages) - (gnu services) - (guix gexp) - (gnu home services shells)) - -(home-environment - ;; Below is the list of packages that will show up in your - ;; Home profile, under ~/.guix-home/profile. - (packages (specifications->packages (list "flameshot" - "ncmpcpp" - "font-meslo-lg-dz" - "font-meslo-lg" - "gd-tools" - "emacs-org-roam-ui" - "wmctrl" - "telegram-desktop" - "lf" - "ranger" - "ueberzug++" - "fzf" - "emacs-org-roam" - "libime" - "fcitx5-gtk4" - "fcitx5-qt" - "fcitx5-gtk" - "sselp" - "nano" - "thunar" - "mcomix" - "pinentry" - "goldendict-ng" - "xdg-utils" - "font-google-material-design-icons" - "gst-plugins-good-qt" - "qtmultimedia" - "xpad-module" - "unzip" - "zip" - "emacs-esxml" - "html-xml-utils" - "emacs-rainbow-delimiters" - "aria2" - "xdg-desktop-portal" - "xdg-desktop-portal-gtk" - "xprop" - "nicotine+" - "yt-dlp" - "higan" - "nyxt" - "emacs-nyxt" - "tmux" - "alacritty" - "lm-sensors" - "anki" - "emacs-olivetti" - "foliate" - "emacs-slime" - "python" - "xrdb" - "dbus" - "steam" - "make" - "p7zip" - "cmake" - "element-desktop" - "emacs-dirvish" - "readline" - "curl" - "nix" - "qpdfview" - "xclip" - "font-apple-color-emoji" - "emacs-nerd-icons" - "emacs-telega" - "htop" - "cl-clx" - "neofetch" - "kitty" - "sbcl-stumpwm-ttf-fonts" - "cl-clx-truetype" - "picom" - "feh" - "xmodmap" - "rofi" - "emacs-stumpwm-mode" - "sbcl-stumpwm-net" - "sbcl-stumpwm-cpu" - "sbcl-stumpwm-mem" - "sbcl-stumpwm-disk" - "sbcl-stumpwm-screenshot" - "sbcl-stumpwm-pamixer" - "sbcl-stumpwm-swm-gaps" - "cmus" - "zstd" - "scrot" - "cl-css" - "git" - "gst-plugins-good" - "gst-plugins-bad" - "gstreamer" - "ungoogled-chromium" - "guile" - "icecat" - "pavucontrol-qt" - "mpv" - "emacs"))) - - ;; Below is the list of Home services. To search for available - ;; services, run 'guix home search KEYWORD' in a terminal. - (services - (list (service home-bash-service-type - (home-bash-configuration - (aliases '(("analyze_video" . "~/.local/bin/analyze_video.sh") - ("ct" . "~/.local/bin/compatibility.sh") - ("grep" . "grep --color=auto") - ("lf" . "~/.local/bin/lf/lfrun") - ("ll" . "ls -l") - ("ls" . "ls -p --color=auto") - ("revive" . "xmodmap -e '\\''clear mod4'\\'' && xmodmap -e '\\''keycode 133 = F20'\\''"))) - (bashrc (list (local-file - "/home/hashirama/src/guix-config/.bashrc" - "bashrc"))) - (bash-profile (list (local-file - "/home/hashirama/src/guix-config/.bash_profile" - "bash_profile")))))))) diff --git a/stumpwm/.gitignore b/stumpwm/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/stumpwm/init.lisp b/stumpwm/init.lisp deleted file mode 100644 index a34adc6..0000000 --- a/stumpwm/init.lisp +++ /dev/null @@ -1,171 +0,0 @@ -(in-package :stumpwm) - -(add-to-load-path "~/.guix-profile/share/common-lisp/sbcl/stumpwm-ttf-fonts/") -(add-to-load-path "~/.guix-profile/share/common-lisp/sbcl/stumpwm-swm-gaps/") -;;(add-to-list ) - -;;;; gaps -;;(load-module "swm-gaps") -;; -(when *initializing* - (mode-line)) - - -(run-shell-command "xmodmap -e 'clear mod4'" t) ;; clears windowskey/mod4 - -(run-shell-command "xmodmap -e 'keycode 133 = F20'" t) ;;assigns F20 to keycode 133 - -(set-prefix-key (kbd "F20")) ;; sets prefix to F20 which was just assigned to windows key - -(run-shell-command "exec feh --bg-fill ~/wallpaper.jpg & picom -b") -(run-shell-command "xrandr --output HDMI-A-0 --mode 1366x768") - -(defcommand screenshot () () - (run-shell-command "flameshot gui --path=/mnt/Data/mpv-screenshots/screenshots")) -(define-key *top-map* (kbd "M-i") "screenshot") - -(defcommand nyxt () () - (run-or-raise "nyxt" '(:class "Nyxt"))) - -(define-key *top-map* (kbd "M-p") "nyxt") - -;; in the case i want a new terminal -(define-key *top-map* (kbd "M-l") "exec kitty") - -;; for reusing a open terminal -(defcommand terminal () () - (run-or-raise "kitty" '(:class "kitty"))) - -(define-key *top-map* (kbd "M-v") "terminal") - -(defcommand goldendict () () - (run-or-raise "goldendict" '(:class "GoldenDict-ng"))) -(define-key *top-map* (kbd "M-e") "goldendict") - - -(define-key *top-map* (kbd "M-d") "exec rofi -show run") -(define-key *root-map* (kbd "R") "restart-hard") - -;; Frames -(define-key *root-map* (kbd "x") "hsplit") -(define-key *root-map* (kbd "z") "vsplit") -(define-key *root-map* (kbd "n") "remove-split") -(define-key *root-map* (kbd "Q") "quit") - -(define-key *root-map* (kbd "q") "delete") -(define-key *root-map* (kbd "r") "remove") - -(define-key *root-map* (kbd "h") "move-focus left") -(define-key *root-map* (kbd "j") "move-focus down") -(define-key *root-map* (kbd "k") "move-focus up") -(define-key *root-map* (kbd "l") "move-focus right") -(define-key *top-map* (kbd "H") "move-window left") -(define-key *top-map* (kbd "J") "move-window down") -(define-key *top-map* (kbd "K") "move-window up") -(define-key *top-map* (kbd "L") "move-window right") - -(setf *mouse-focus-policy* :click) - - - -(define-key *top-map* (kbd "M-n") "exec xmodmap -e 'clear mod4' && exec xmodmap -e 'keycode 133 = F20'") -(run-shell-command "xrdb /home/hashirama/.Xresources") -(run-shell-command "export GTK_IM_MODULE=fcitx") -(run-shell-command "export QT_IM_MODULE=fcitx") -(run-shell-command "export export XMODIFIERS=@im=fcitx") -(sleep 2) -(run-shell-command "fcitx5") -(sleep 2) - -(run-shell-command "xmodmap -e 'clear mod4'" t) ;; clears windowskey/mod4 - -(run-shell-command "xmodmap -e 'keycode 133 = F20'" t) ;;assigns F20 to keycode 133 - - - -(defun pretty-time () - "日付を '17:19:51 2014年4月27日、日曜日' の形式で返します。" - (defun stringify-dow (dow) - (nth dow '("月曜日" "火曜日" "水曜日" "木曜日" "金曜日" "土曜日" "日曜日"))) - (defun stringify-mon (mon) - (nth (- mon 1) '("1月" "2月" "3月" "4月" - "5月" "6月" "7月" "8月" - "9月" "10月" "11月" "12月"))) -(multiple-value-bind (sec min hr date mon yr dow dst-p tz) - (get-decoded-time) - (format NIL "~2,'0d:~2,'0d:~2,'0d ~d年~a時 ~d分、~a秒" - yr (stringify-mon mon) - date (stringify-dow dow) - hr min sec))) - -;; ---- - -(setf *mode-line-timeout* 2) - - -;;--- - -(defvar *senju/workspaces* -;; (list "一" "二" "三" "四" "五" "六" "七" "八" "九" "十" "数学" "勉強")) - - (list "一" "二" "三" "四" "五" "六" "七" "八" "九" "十" "数学" "勉強")) - (stumpwm:grename (nth 0 *senju/workspaces*)) -(dolist (workspace (cdr *senju/workspaces*)) - (stumpwm:gnewbg workspace)) - -(defvar *move-to-keybinds* - (list "!" "@" "#" "$" "%" "^" "&" "*" "(" "[" "]")) -(dotimes (y (length *senju/workspaces*)) - (let ((workspace (write-to-string (+ y 1)))) - (define-key *root-map* (kbd workspace) (concat "gselect " workspace)) - (define-key *root-map* (kbd (nth y *move-to-keybinds*)) (concat "gmove-and-follow " workspace)))) - -(defun workspace-number-to-character (index) - (elt '("一" "二" "三" "四" "五" "六" "七" "八" "九" "十" "数学" "勉強") index)) - -;; Modify the modeline format to display group numbers as characters -(defvar *modeline-format* - '(" " (:eval (workspace-number-to-character (current-group))) " " mode-line-misc-info mode-line-client - mode-line-modified mode-line-frame-identification " " mode-line-buffer-identification)) - - - - - -(load-module "ttf-fonts") - -(setf xft:*font-dirs* '("~/.local/share/fonts/")) -(xft:cache-fonts) - -(set-font (make-instance 'xft:font :family "Iosevka Comfy,Iosevka Comfy SemiLight" :subfamily "SemiLight" :size 10)) -(setf *startup-message* "fonts loaded") - - -(setf *screen-mode-line-format* (list "[^B%n^b] %W^>%d")) -(setf *mode-line-timeout* 2) -(setf *screen-mode-line-format* - (list "[^B%n^b] %W " ; groups/windows - "^>" ; right align -(list '(:eval (concat "| " - - " |"))) - - - " ^7* " '(:eval (pretty-time)); date - )) - - -;; gaps - - -(load-module "swm-gaps") - -(setf swm-gaps:*inner-gaps-size* 10 - swm-gaps:*outer-gaps-size* 5 - swm-gaps:*head-gaps-size* 5) - -(when *initializing* - (swm-gaps:toggle-gaps)) - - - diff --git a/xmonad/build-x86_64-linux/Main.hi b/xmonad/build-x86_64-linux/Main.hi new file mode 100644 index 0000000..cbe3a1b Binary files /dev/null and b/xmonad/build-x86_64-linux/Main.hi differ diff --git a/xmonad/build-x86_64-linux/Main.o b/xmonad/build-x86_64-linux/Main.o new file mode 100644 index 0000000..6d16f14 Binary files /dev/null and b/xmonad/build-x86_64-linux/Main.o differ diff --git a/xmonad/xmonad-x86_64-linux b/xmonad/xmonad-x86_64-linux new file mode 100755 index 0000000..8428850 Binary files /dev/null and b/xmonad/xmonad-x86_64-linux differ diff --git a/xmonad/xmonad.errors b/xmonad/xmonad.errors new file mode 100644 index 0000000..01fa52a --- /dev/null +++ b/xmonad/xmonad.errors @@ -0,0 +1,8 @@ +$ ghc --make xmonad.hs -dynamic -fPIC -i -ilib -fforce-recomp -main-is main -v0 -outputdir /home/hashirama/.xmonad/build-x86_64-linux -o /home/hashirama/.xmonad/xmonad-x86_64-linux + +xmonad.hs:56:1: warning: [-Wtabs] + Tab character found here, and in two further locations. + Please use spaces instead. + | +56 | spawnOnce "xrdb /home/hashirama/.Xresources" + | ^^^^^^^^ diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs new file mode 100644 index 0000000..2b113d4 --- /dev/null +++ b/xmonad/xmonad.hs @@ -0,0 +1,115 @@ +import XMonad + +import XMonad.Hooks.DynamicLog +import XMonad.Hooks.ManageDocks +import XMonad.Hooks.ManageHelpers +import XMonad.Hooks.StatusBar +import XMonad.Hooks.StatusBar.PP + +import XMonad.StackSet as W -- float purposes +import XMonad.Actions.MouseResize + + +import XMonad.Util.EZConfig +import XMonad.Util.Loggers +import XMonad.Util.Ungrab + +import XMonad.Layout.Magnifier +import XMonad.Layout.ThreeColumns +import XMonad.Layout.Spacing + +import XMonad.Hooks.EwmhDesktops +import XMonad.Util.SpawnOnce (spawnOnce) + +-- run or raise +import XMonad.Actions.WindowGo (runOrRaise) +import XMonad.ManageHook (className) +import XMonad.StackSet (RationalRect(..)) +-- + +import XMonad.Layout.Decoration (decoration, DefaultShrinker(..), Theme(..), shrinkText) +import XMonad.Layout.Simplest +import XMonad.Layout.SimplestFloat +import XMonad.Layout.Spacing + + + + + + + +main :: IO () +main = xmonad + . ewmhFullscreen + . ewmh + . withEasySB (statusBarProp "xmobar" (pure myXmobarPP)) defToggleStrutsKey + $ myConfig + +myConfig = def + { modMask = mod4Mask -- Rebind Mod to the Super key + , layoutHook = myLayout -- Use custom layouts + , terminal = "alacritty" + , manageHook = myManageHook -- Match on certain windows + , startupHook = do + -- other startup commands + spawnOnce "xrandr --output HDMI-A-0 --mode 1366x768" + spawnOnce "xrdb /home/hashirama/.Xresources" + spawnOnce "feh --bg-fill /home/hashirama/wallpaper.jpg" + spawnOnce "compton -b" + } + `additionalKeysP` + [ ("M-d", spawn "rofi -show run") + , ("M-s", spawn "bash -c dictpopup") + , ("M-C-s", unGrab *> spawn "scrot -s" ) + , ("M-e", runOrRaise "goldendict" (className =? "GoldenDict-ng")) + , ("M-p", runOrRaise "nyxt" (className =? "Nyxt")) + , ("M-t", withFocused $ windows . W.sink) -- Toggle float for the focused window + ] + + +myManageHook :: ManageHook +myManageHook = composeAll + [ className =? "Gimp" --> doFloat + , isDialog --> doFloat + ] + + +myTheme :: Theme +myTheme = def + { decoHeight = 20 -- Adjust the height of the title bar as needed + -- Add other theme properties as needed + } + +myLayout = mouseResize $ spacingRaw True (Border 10 10 10 10) True (Border 10 10 10 10) True $ + Tall 1 (3/100) (1/2) ||| Full + + + + +myXmobarPP :: PP +myXmobarPP = def + { ppSep = magenta " • " + , ppTitleSanitize = xmobarStrip + , ppCurrent = wrap " " "" . xmobarBorder "Top" "#8be9fd" 2 + , ppHidden = white . wrap " " "" + , ppHiddenNoWindows = lowWhite . wrap " " "" + , ppUrgent = red . wrap (yellow "!") (yellow "!") + , ppOrder = \[ws, l, _, wins] -> [ws, l, wins] + , ppExtras = [logTitles formatFocused formatUnfocused] + } + where + formatFocused = wrap (white "[") (white "]") . magenta . ppWindow + formatUnfocused = wrap (lowWhite "[") (lowWhite "]") . blue . ppWindow + + -- | Windows should have *some* title, which should not not exceed a + -- sane length. + ppWindow :: String -> String + ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 30 + + blue, lowWhite, magenta, red, white, yellow :: String -> String + magenta = xmobarColor "#ff79c6" "" + blue = xmobarColor "#bd93f9" "" + white = xmobarColor "#f8f8f2" "" + yellow = xmobarColor "#f1fa8c" "" + red = xmobarColor "#ff5555" "" + lowWhite = xmobarColor "#bbbbbb" "" diff --git a/xmonad/xmonad.hs~ b/xmonad/xmonad.hs~ new file mode 100644 index 0000000..b388572 --- /dev/null +++ b/xmonad/xmonad.hs~ @@ -0,0 +1,114 @@ +import XMonad + +import XMonad.Hooks.DynamicLog +import XMonad.Hooks.ManageDocks +import XMonad.Hooks.ManageHelpers +import XMonad.Hooks.StatusBar +import XMonad.Hooks.StatusBar.PP + +import XMonad.StackSet as W -- float purposes +import XMonad.Actions.MouseResize + + +import XMonad.Util.EZConfig +import XMonad.Util.Loggers +import XMonad.Util.Ungrab + +import XMonad.Layout.Magnifier +import XMonad.Layout.ThreeColumns +import XMonad.Layout.Spacing + +import XMonad.Hooks.EwmhDesktops +import XMonad.Util.SpawnOnce (spawnOnce) + +-- run or raise +import XMonad.Actions.WindowGo (runOrRaise) +import XMonad.ManageHook (className) +import XMonad.StackSet (RationalRect(..)) +-- + +import XMonad.Layout.Decoration (decoration, DefaultShrinker(..), Theme(..), shrinkText) +import XMonad.Layout.Simplest +import XMonad.Layout.SimplestFloat +import XMonad.Layout.Spacing + + + + + + + +main :: IO () +main = xmonad + . ewmhFullscreen + . ewmh + . withEasySB (statusBarProp "xmobar" (pure myXmobarPP)) defToggleStrutsKey + $ myConfig + +myConfig = def + { modMask = mod4Mask -- Rebind Mod to the Super key + , layoutHook = myLayout -- Use custom layouts + , terminal = "alacritty" + , manageHook = myManageHook -- Match on certain windows + , startupHook = do + -- other startup commands + spawnOnce "xrandr --output HDMI-A-0 --mode 1366x768" + spawnOnce "xrdb /home/hashirama/.Xresources" + spawnOnce "feh --bg-fill /home/hashirama/wallpaper.jpg" + } + `additionalKeysP` + [ ("M-d", spawn "rofi -show run") + , ("M-s", spawn "bash -c dictpopup") + , ("M-C-s", unGrab *> spawn "scrot -s" ) + , ("M-e", runOrRaise "goldendict" (className =? "GoldenDict-ng")) + , ("M-p", runOrRaise "nyxt" (className =? "Nyxt")) + , ("M-t", withFocused $ windows . W.sink) -- Toggle float for the focused window + ] + + +myManageHook :: ManageHook +myManageHook = composeAll + [ className =? "Gimp" --> doFloat + , isDialog --> doFloat + ] + + +myTheme :: Theme +myTheme = def + { decoHeight = 20 -- Adjust the height of the title bar as needed + -- Add other theme properties as needed + } + +myLayout = mouseResize $ spacingRaw True (Border 10 10 10 10) True (Border 10 10 10 10) True $ + Tall 1 (3/100) (1/2) ||| Full + + + + +myXmobarPP :: PP +myXmobarPP = def + { ppSep = magenta " • " + , ppTitleSanitize = xmobarStrip + , ppCurrent = wrap " " "" . xmobarBorder "Top" "#8be9fd" 2 + , ppHidden = white . wrap " " "" + , ppHiddenNoWindows = lowWhite . wrap " " "" + , ppUrgent = red . wrap (yellow "!") (yellow "!") + , ppOrder = \[ws, l, _, wins] -> [ws, l, wins] + , ppExtras = [logTitles formatFocused formatUnfocused] + } + where + formatFocused = wrap (white "[") (white "]") . magenta . ppWindow + formatUnfocused = wrap (lowWhite "[") (lowWhite "]") . blue . ppWindow + + -- | Windows should have *some* title, which should not not exceed a + -- sane length. + ppWindow :: String -> String + ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 30 + + blue, lowWhite, magenta, red, white, yellow :: String -> String + magenta = xmobarColor "#ff79c6" "" + blue = xmobarColor "#bd93f9" "" + white = xmobarColor "#f8f8f2" "" + yellow = xmobarColor "#f1fa8c" "" + red = xmobarColor "#ff5555" "" + lowWhite = xmobarColor "#bbbbbb" ""