You are not logged in.

#1 2009-05-11 18:39:44

scv5
Member
Registered: 2008-10-19
Posts: 109

[SOLVED] Mutt is ugly in arch

Using mutt in Ubuntu, by default, the top menu bar that has the q: Quit
d:Del suggestions is blue (bg) and with green text.  The blue background
for this line stretches from the left side of the terminal to the
further right. When I highlight an email, that email is highlighted by a
lighter blue that again, stretches from furtherest left to furtherest
right.  And lastly, the bottom, there's another line that states
"--Mutt: =INBOX [Msgs:300 Old:... ) and that is the same color blue as
the first line.

This is all fine, but in Arch Linux, these are all white (bg) with black
text. And they don't reach from left to right, the white background and
black text only applies to the text.  Any blank spaces, are black, so
there's no solid line.  So each word in an email line in the index, and
each menu option presents itself as a white block with black text in it,
then a black space, then another white block with black text, and so on.

it looks incredibly tacky and makes it hard to read.  anyone know how
to make mutt in arch look like it is in ubuntu?

(and yes, I have colors going on in my .muttrc, but they only affect
text color of new mail, readmail, headers, and quoted text.  I tried
commenting all my lines regarding color out on Arch and it remained the
same.


If anyone has any ideas, please shoot them my way. Thanks

This is the mutt -v output for Ubuntu where it looks nice:

http://pastebin.com/m7507d00d

This is the mutt -v output for Arch where it's not so nice:

http://pastebin.com/m40cf5598

I'll follow up with screenshots if needed.

Last edited by scv5 (2009-05-12 02:18:00)

Offline

#2 2009-05-11 19:20:17

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [SOLVED] Mutt is ugly in arch

Maybe check your terminal colors -- my mutt looks exactly as you describe the 'nice' looking version. I didn't do anything special to it!

my muttrc:

set realname='Scott & Chrystie Hansen'
set from='Scott & Chrystie Hansen<email@email.com>'
set smtp_url='smtp://username:password@smtp.email.com'
set include=no
set status_on_top=yes
set edit_headers=yes
set folder=~/mail
# set mbox=+mbox
set spoolfile=+inbox
set record=+sent
set postponed=+drafts
set mbox_type=Maildir
set nomove      # Keeps message MAIL, don't ask moving them anywhere when quitting
mailboxes +inbox
unset mark_old  # Don't mark as old when moving over them with the cursor
set implicit_autoview
auto_view text/html  application/x-pgp-message
set mailcap_path="~/.mailcap"
mime_lookup application/octet-stream
macro index \cb |urlview\n 'call urlview to extract URLs out of a message'

set alias_file="~/.mutt/alias"
source ~/.mutt/alias

set query_command= "abook --mutt-query '%s'"
macro index,pager A "<pipe-message>abook --add-email-quiet<return>" "add the sender address to abook"
macro index G "!getmail -v\n" "Invoke getmail"
set noconfirmappend # Don't ask when appending (saving) messages to existing folder/mailbox
set pager_context=1 # Show 3 lines overlap in the message view pager
set pager_index_lines=8
set pager_stop # Don't jump to next message at the end of a message
set fast_reply # Don't ask from To or Subj on reply
set sort=reverse-threads
set ispell="aspell -e -c"
bind pager <up> previous-line
bind pager <down> next-line
set arrow_cursor
set abort_nosubject=noset delete=yes
set auto_tag=yes

color normal    white black
color attachment brightyellow black
color hdrdefault cyan black
color indicator black cyan
color markers   brightred black
color quoted    green black
color signature cyan black
color status    brightgreen blue
color tilde     blue black
color tree      red black

color index     red black ~D
color index     magenta black ~T
color index     brightyellow black ~F
color header    brightgreen black ^From:
color header    brightcyan black ^To:
color header    brightcyan black ^Reply-To:
color header    brightcyan black ^Cc:
color header    brightblue black ^Subject:

color body      brightred black [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
# identifies email addresses

color body      brightblue black (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+
# identifies URLs

set print_command="muttprint"

# set up the sidebar, default not visible 
set sidebar_width=20 
set sidebar_visible=yes 
set sidebar_delim='|' 
# which mailboxes to list in the sidebar 
mailboxes =inbox =sent =drafts =Scotty =Chrystie =BelaStuff =Family =Chase =Morgan =Nick =Sydney =Fire =Tech =junk =Trash
# color of folders with new mail 
color sidebar_new yellow default 
# ctrl-j, ctrl-k to select next, prev folder 
# ctrl-o to open selected folder 
bind index \CK sidebar-prev 
bind index \CJ sidebar-next 
bind index \CO sidebar-open 
bind pager \CK sidebar-prev 
bind pager \CJ sidebar-next 
bind pager \CO sidebar-open 
# b toggles sidebar visibility 
macro index b '<enter-command>toggle sidebar_visible<enter>'
macro pager b '<enter-command>toggle sidebar_visible<enter>' 

# Set S to trigger the mairix search (all folders)
macro generic S "<enter-command>set my_cmd = \`mutt-mairix\`<return><enter-command>push \$my_cmd<return>"

macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook"

# SpamAssassin integration
#
# Delete is re-bound to move messages to Trash. They will be filed as ham by a cron script later.
macro index d "s=Trash\n" "move message to trash"
macro pager d "s=Trash\n" "move message to trash"

# Spam that SA missed is manually sent to the junkmail folder
macro index X "s=junk\n" "file as Spam"
macro pager X "s=junk\n" "file as Spam"
# Junk/spam mail older than four days is automatically marked for deletion
# because it will have already been processed as spam by a cron script
folder-hook     "=junk" 'push "D~d>4d"\n'
set allow_ansi=yes 
## Ignore everything but the really important lines:
ignore *
unignore from: date subject to cc X-Spam-Status
set editor="vim +':set textwidth=77' +':set wrap'"

Scott

Offline

#3 2009-05-11 19:28:21

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED] Mutt is ugly in arch

as for the line going all the way across, that was a termcap problem that i only encountered when running inside screen (and fixed by hacking at the xterm-256color termcap file manually).  i have a forum post on what i did if you're interested in digging that deep.

as for colors, i think if you're not explicitly coloring something in muttrc, then that piece of the mailbox (normal text, statusbar, helpbar, whatever) will just be black and white.

mutt takes a while to setup just right but it's so worth it.  my mutt/gmail/offlinemap configs are pretty extensive and all available at dotfiles.org/~brisbin33 if you're interested.  otherwise, you can google for a million muttrc examples ranging from simple to incredibly complex.  `man muttrc` was also invaluable for me.

enjoy.

Last edited by brisbin33 (2009-05-11 19:30:15)

Offline

#4 2009-05-11 19:34:03

scv5
Member
Registered: 2008-10-19
Posts: 109

Re: [SOLVED] Mutt is ugly in arch

This is my.muttrc and .bashrc (both are the same in Ubuntu and Arch, i merely copied them from ubuntu to arch).

.muttrc

  9 set folder = "imaps://imap.gmail.com:993"
 10 set spoolfile = "+INBOX"
 11 set postponed="+[Gmail]/Drafts"
 12 
 13 set header_cache=~/.mutt/cache/headers
 14 set message_cachedir=~/.mutt/cache/bodies
 15 set certificate_file=~/.mutt/certificates
 16 
 17 set move = no
 18 set sort = 'threads'
 19 set sort_aux = 'last-date-received'
 20 set imap_check_subscribed
 21 
 22 ignore "Authentication-Results:"
 23 ignore "DomainKey-Signature:"
 24 ignore "DKIM-Signature:"
 25 hdr_order Date From To Cc
 26 
 27 # lines to hide the email headers
 28 ignore *
 29 unignore From: To: Cc: Subject: Date:
 30 
 31 #Different colors for different levels of quoting.
 32 ## Syntax
 33 # color WHERE FOREGROUND BACKGROUND REGEXP
 34 color hdrdefault white black
 35 color header brightgreen black ^From:
 36 color header brightgreen black ^To:
 37 color quoted magenta black
 38 color quoted1 blue black
 39 color quoted2 red black
 40 color quoted3 yellow black
 41 color quoted4 cyan black          
 42 color quoted5 blue black
 43 color quoted6 magenta black
 44 color quoted7 red black
 45 color quoted8 yellow black
 46 color quoted9 cyan black
 47 color signature blue default
 48 
 49 color index brightgreen default ~p # To me (personal)
 50 color index yellow default ~N # New
 51 color index yellow default ~O # Old
 52 auto_view text/html
 53 
 54 macro pager \cu |urlview\n
 56 
 64 
 65 set imap_keepalive=300
 66 set timeout=300

.bashrc

  1 [ -z "$PS1" ] && return
  2 
  3 # Bash completion
  4 if [ -f /etc/bash_completion ]; then
  5         . /etc/bash_completion
  6 fi
  7 
  8 # Define a few Colours
  9 BLACK='\e[0;30m'
 10 BLUE='\e[0;34m'
 11 GREEN='\e[0;32m'
 12 CYAN='\e[0;36m'
 13 RED='\e[0;31m'
 14 PURPLE='\e[0;35m'
 15 BROWN='\e[0;33m'
 16 LIGHTGRAY='\e[0;37m'
 17 DARKGRAY='\e[1;30m'
 18 LIGHTBLUE='\e[1;34m'
 19 LIGHTGREEN='\e[1;32m'
 20 LIGHTCYAN='\e[1;36m'
 21 LIGHTRED='\e[1;31m'
 22 LIGHTPURPLE='\e[1;35m'
 23 YELLOW='\e[1;33m'
 24 WHITE='\e[1;37m'
 25 NC='\e[0m'              # No Color
 26 
 27 # check the window size after each command and, if necessary,
 28 # update the values of LINES and COLUMNS.
 29 shopt -s checkwinsize
 30 
 31 # make less more friendly for non-text input files, see lesspipe(1)
 32 [ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
 33 

Skipping aliases


109 # WELCOME SCREEN
110 #######################################################
111 
112 clear
113             
114 echo -ne "${LIGHTGREEN}" "Hello, $USER. today is, "; date
115 echo -e "${LIGHTRED}"; cal ;  
116 echo -ne "${CYAN}";
117 echo -ne "${LIGHTPURPLE}Sysinfo:";uptime ;echo ""

Offline

#5 2009-05-11 19:48:57

scv5
Member
Registered: 2008-10-19
Posts: 109

Re: [SOLVED] Mutt is ugly in arch

brisbin33 wrote:

as for the line going all the way across, that was a termcap problem that i only encountered when running inside screen (and fixed by hacking at the xterm-256color termcap file manually).  i have a forum post on what i did if you're interested in digging that deep.

as for colors, i think if you're not explicitly coloring something in muttrc, then that piece of the mailbox (normal text, statusbar, helpbar, whatever) will just be black and white.

mutt takes a while to setup just right but it's so worth it.  my mutt/gmail/offlinemap configs are pretty extensive and all available at dotfiles.org/~brisbin33 if you're interested.  otherwise, you can google for a million muttrc examples ranging from simple to incredibly complex.  `man muttrc` was also invaluable for me.

enjoy.

Let me just try getting some clarification from that post so when i go home (i forgot to turn on shell access. ) I can fix this.

# use "term xterm-256color" in .screenrc
> infocmp -L xterm-256color > temp.terminfo
> vim term.terminfo
# remove "back_color_erase," from second or third line
> install -d .terminfo
> tic -o .terminfo/ term.terminfo
> sudo mv /usr/share/terminfo/x/xterm-256color ./terminfo.backup
> sudo mv .terminfo/x/xterm-256color /usr/share/terminfo/x/xterm-256color
> ?
> profit
http://bbs.archlinux.org/viewtopic.php?id=67464

1. "term xterm-256color" needs to go in .screenrc without quotes
2. issue command:  infocmp -L xterm-256color > temp.terminfo
3. vim term.terminfo
4. within vim of the term.terminfo file remove "back_color_erase," from second or third line
5. and the rest are just single commands

?

just making sure  And curious, would this apply to xterm as much as it would to urxvt?

Last edited by scv5 (2009-05-11 19:49:38)

Offline

#6 2009-05-11 19:49:35

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED] Mutt is ugly in arch

hmm... the line not going all the way across is definitely a terminal setting issue, do you find the same thing happens when you use a program like htop?  the colors may be related to this.  what terminal are you using? what does `echo $TERM` say?

edit: here is my post about the similar problem i had in screen.  don't know if it's related but the symptoms are similar:

http://bbs.archlinux.org/viewtopic.php?id=67464

Last edited by brisbin33 (2009-05-11 19:51:34)

Offline

#7 2009-05-11 19:51:01

scv5
Member
Registered: 2008-10-19
Posts: 109

Re: [SOLVED] Mutt is ugly in arch

i'm using urxvt but the same happens in xterm too.  I'm generally running this in screen but i have the same problem outside of screen as well (at least I think I did that last night? )

And no i haven't given htop a try.  But other cli apps look fine (cmus for instance).

Offline

#8 2009-05-11 20:01:26

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED] Mutt is ugly in arch

you should verify that this happens both in and out of screen before going any further.  if it's only occurring inside screen, take a look at my post.  or it could even be a more simple ~/.screenrc issue going on.

edit: your assumptions about my instructions are correct btw.

you're basically doing this:

tell screen to use xterm-256color as its $TERM (right, no quotes)
dumping info about xterm-256color into a temp file
editing that temp file to remove the back_color_erase bit
installing that edited version back as the new xterm-256color termcap file (globally)

edit2: you could remove that back_color_erase bit out of all your termcap files (xterm/urxvt) if you wanted, but i was only getting that shortened color line if i was inside screen.  in a normal xterm-256color or rxvt-256color mutt/htop looked fine.  but the above fix hasn't had any negative effects since i've done it.  so that's nice.

Last edited by brisbin33 (2009-05-11 20:15:30)

Offline

#9 2009-05-11 20:14:28

scv5
Member
Registered: 2008-10-19
Posts: 109

Re: [SOLVED] Mutt is ugly in arch

thanks I'll try this when i get home and see what works. smile

Offline

#10 2009-05-11 22:00:55

scv5
Member
Registered: 2008-10-19
Posts: 109

Re: [SOLVED] Mutt is ugly in arch

brisbin33 wrote:

you should verify that this happens both in and out of screen before going any further.  if it's only occurring inside screen, take a look at my post.  or it could even be a more simple ~/.screenrc issue going on.

edit: your assumptions about my instructions are correct btw.

you're basically doing this:

tell screen to use xterm-256color as its $TERM (right, no quotes)
dumping info about xterm-256color into a temp file
editing that temp file to remove the back_color_erase bit
installing that edited version back as the new xterm-256color termcap file (globally)

edit2: you could remove that back_color_erase bit out of all your termcap files (xterm/urxvt) if you wanted, but i was only getting that shortened color line if i was inside screen.  in a normal xterm-256color or rxvt-256color mutt/htop looked fine.  but the above fix hasn't had any negative effects since i've done it.  so that's nice.

yup, this happens in screen, outside of screen in both xterm and urxvt.   I followed your above steps regarding screen specifically and there's no change.

$ echo $TERM
xterm

I renamed my .bashrc file and tried in a new terminal and got the same results.   So i know it's not coming from that.  Removing all the colors from my .muttrc doesn't seem to fix the issue much either.

Last edited by scv5 (2009-05-11 22:09:24)

Offline

#11 2009-05-12 01:29:24

scv5
Member
Registered: 2008-10-19
Posts: 109

Re: [SOLVED] Mutt is ugly in arch

well this can be marked as solved.  Your .muttrc at dotfiles did it, much thanks.

Offline

#12 2009-05-12 01:44:17

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: [SOLVED] Mutt is ugly in arch

hello scv5, edit your first post and change the subject to [SOLVED] Mutt is ugly in Arch that will be helpful to other.

Offline

#13 2009-05-12 02:17:41

scv5
Member
Registered: 2008-10-19
Posts: 109

Re: [SOLVED] Mutt is ugly in arch

will do

Offline

Board footer

Powered by FluxBB