XMonad.Prompt font

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

XMonad.Prompt font

Adam Sjøgren
I was experimenting with switching from dmenu to XMonad.Prompt.Shell.

With dmenu I can get the font I want by passing the argument '-fn "DejaVu
Sans Condensed-8:normal"' (a truetype font, using xft).

I would like the same in XMonad.Prompt.Shell.

xfontsel(1) of course does not list truetype fonts, and the
documentation only says:

  "data XPConfig
     Constructors
       XPC
         font :: String    Font"

    - http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Prompt.html

So if anyone else runs into this: what you need to know/guess is to
prefix the 'font' with "xft:" in your configuration; i.e.:

  myPromptConfig = defaultXPConfig
                   {
                     position = Top
                     -- ...
                   , font = "xft:DejaVu Sans Condensed-8"
                   }


  Best regards,

    Adam

--
 "How are you this tiny and this strong? You are              Adam Sjøgren
  like an ant!"                                          [hidden email]

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: XMonad.Prompt font

Daniel Wagner-4
Thanks, I've pushed an improvement to the docs that mentions this.

~d

On Sun, Jun 12, 2016 at 1:40 PM, Adam Sjøgren <[hidden email]> wrote:
I was experimenting with switching from dmenu to XMonad.Prompt.Shell.

With dmenu I can get the font I want by passing the argument '-fn "DejaVu
Sans Condensed-8:normal"' (a truetype font, using xft).

I would like the same in XMonad.Prompt.Shell.

xfontsel(1) of course does not list truetype fonts, and the
documentation only says:

  "data XPConfig
     Constructors
       XPC
         font :: String    Font"

    - http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Prompt.html

So if anyone else runs into this: what you need to know/guess is to
prefix the 'font' with "xft:" in your configuration; i.e.:

  myPromptConfig = defaultXPConfig
                   {
                     position = Top
                     -- ...
                   , font = "xft:DejaVu Sans Condensed-8"
                   }


  Best regards,

    Adam

--
 "How are you this tiny and this strong? You are              Adam Sjøgren
  like an ant!"                                          [hidden email]

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad


_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad