0

Recently got a new laptop with 1920x1080 monitor instead of 1366x768 on old laptop. All my many xterms suddenly smaller and text illegible. After investigation, decided easiest solution was an alias for xterm, xterm -fa Default -fs 14

Worked fine but not with icewm's keys file. So I removed the alias from .bashrc and changed all xterm explicitly to xterm -fa Default -fs 14

You may wonder why I use -fa rather than -fn, which seemed at first the logical choice. This is because -fa works (except in icewm keys) and -fn produces this response:

~ $ xterm -g 75x59+0+0 -fn Default -fs 14
xterm: cannot load font "Default"
~ $ xterm -g 75x59+0+0 -fa Default -fs 14

Using uxterm instead of xterm produces the same responses. Explicitly naming a font in .Xresources was not satisfactory, because the basic problem seems to be that something (xterm, icewm or my local gremlin) insists that the font be Tiny and the xterm box size adjusts to fit.

All suggestions appreciated.

1 Answer 1

0

I don't have a solution, other than in general terms originally stated I don't even know what the problem is. But I have developed a work-around, as follows:

  1. In icewm startup script I added this line

    xterm -g 9x56+1820+0 -fa Default -fs 12 -title HOTK -e bash /home/q/Scripts/xt.sh &

  2. xt.sh contains the following code:

    select a in $(grep -o "[A-Z][A-Z][A-Z0-9]*" < ~/.icewm/xt.key|sort -u); do c=$(grep $a < ~/.icewm/xt.key); xterm -fa Default -fs 12 ${c}; done

  3. xt.key contains the actual code I want to run for each hotkey command, eg:

    -g 60x9+1003+0 -title MUSIC -e bash /home/q/Scripts/newmusic.sh &

  4. As I spend most of my time in Vim, I added a key-mapping in .vimrc:

    nmap qq :^Ulet @*=v:count1:!bash /home/q/Scripts/hk.sh

Note ^U is entered as ctrl-v ctrl-u, allowing one to pass a number to hk.sh which is the identifier for the hotkey choice to be run.

  1. hk.sh is invoked in vim, transferring focus to the 'select' statement in 2. above, and entering the number for the chosen item, which the select statement then runs. hk.sh has the following code:

    wmctrl -a HOTK; xdotool type "$(xsel -o)"; xdotool key Return; sleep; wmctrl -a Vim

Kind of involved, but it gets the job done by pressing just 3 keys in Vim (us. a single digit choice followed by qq) vs. just 2 keys done thru icewm, but on the plus side I now get a constant visual record of which key I need to press to run the desired process (with the old method I often couldn't remember which key invoked which process and had to look them up).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .