Closed vKnmnn closed 7 years ago
Could you check the whole env in both cases, and what is actually passed to rofi in both cases? A simple way is to add | tee /tmp/rofi-stuff
in your pipe and copy /tmp/rofi-stuff
after each call.
As suspected, the output given to rofi via the block does not contain the markup.
as it seems, the cal --color=always
command is not executed properly.
forcing color output via /etc/terminal-colors.d/cal.enable
doesn't change this behaviour.
edit: diff'ing both env's shows a few things not set for the block. Those are: EDITOR VTE_VERSION=4803 LS_COLORS=loads of stuff TERM=xterm-256color COLORTERM=truecolor VISUAL=vim
and setting those manually in the script doesn't change anything
the man-page of cal states, that color is enabled by default
can you reproduce this?
cal
for me does not have the color option? what program (link) are you running?
(p.s. this might be interesting, it has an option to output pango markup: https://github.com/DaveDavenport/out2html. )
TERM
is the one, I guess it uses it to detect ANSI codes support. I would set it to vt100
to get the smallest (?) set.
i use cal from util-linux 2.30.1-2, it's part of coreutils (in arch)
putting export TERM=xterm
into the script produces the expected behaviour, whereas vt100 breaks things even further.
weird though, that TERM=xterm-256color does not work.
This is the difference:
TERM=xterm tty-pipe ncal | hexdump -c
0000000 S e p t e m b e r 2 0
0000010 1 7 \n m a 4
0000020 033 [ 7 m 1 1 033 [ 2 7 m 1 8 2
0000030 5 \n d i 5 1 2
0000040 1 9 2 6 \n w o
0000050 6 1 3 2 0 2 7 \n d
0000060 o 7 1 4 2 1 2 8
0000070 \n v r 1 8 1 5
0000080 2 2 2 9 \n z a 2
0000090 9 1 6 2 3 3 0 \n z o
00000a0 3 1 0 1 7 2 4
00000b0 \n
00000b3
TERM=xterm-256 tty-pipe ncal | hexdump -c
0000000 S e p t e m b e r 2 0
0000010 1 7 \n m a 4
0000020 _ \b 1 _ \b 1 1 8 2 5 \n
0000030 d i 5 1 2 1 9 2
0000040 6 \n w o 6 1 3
0000050 2 0 2 7 \n d o
0000060 7 1 4 2 1 2 8 \n v
0000070 r 1 8 1 5 2 2 2 9
0000080 \n z a 2 9 1 6
0000090 2 3 3 0 \n z o 3 1
00000a0 0 1 7 2 4 \n
I see. i consider this not-a-bug, so this will be closed. Thanks for your support
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Version
Version: 1.3.1 - 1.3.1-692-gf62216fa (master) Version: 1.3.1 - 1.3.1-692-gf62216fa (master)
Steps to reproduce
create block in i3blocks
date-cal looks like this:
finally, rofi-cal looks like this:
What behaviour you see
What behaviour you expect to see