Showing posts with label i3. Show all posts
Showing posts with label i3. Show all posts

Friday, November 13, 2015

Running i3 under HiDPI display

I recently got a MacbookPro (early 2015) with retina display for work.  I installed a fresh Slackware64-current on to it with rEFInd as the boot loader.  The process was quite smooth, I used a USB boot image then network install (with a thunderbolt gigabyte adapter).  Some devices/functions are not fully functional but usable for me. Console font is using the kernel built in SUN12x22 font with kernel option "fbcon:font=SUN12x22".

Since this laptop has a 2560x1600 on a 13" display, roughly 227DI, my old setting for i3 did not work well, although I already using xft font for status bar display.  After a few search, I found out xorg server always set DPI 96, that is a bad move in my opinion, as it makes previous valid DPI calculation wrong and still wrong for those cases that the calculation do not fit.  And I have to add a line
xrandr --fbmm 286x179
in .xinitrc file in order to let i3 pick up the correct DPI setting.  OK, now the i3 status bar display fine.  The default dmenu I initially installed does not support xft font, so it looks really small.  Luckily there is a dmenu2 which merged the xft patched.  Remove the old dmenu package and install the dmenu2 package, then add the font parameter to the dmenu_run command in i3's config Latest dmenu works with xft font now. Everything works fine.

I have the following settings in my .Xresources file.
Xft.dpi : 227
Xft.antialias: false
Xft.rgba: rgb

URxvt.scrollstyle: xterm
URxvt.background: black
URxvt.foreground: gray
URxvt.preeditType: Root
URxvt.scrollBar_right: true
URxvt.jumpScroll: true
URxvt.perl-ext-common:  tabbed
URxvt.tabbed.tabbar-fg: 2
URxvt.tabbed.tabbar-bg: 0
URxvt.tabbed.tab-fg:    3
URxvt.tabbed.tab-bg:    0
URxvt.termName: rxvt
URxvt.geometry: 83x27
urxvt.font: xft:DejaVuSansMono:size=8

Xpdf*fontList: -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1
Xpdf.initialZoom: 200

Xcursor.size: 64

With the following, the width should be $((11*COLUMNS+13)) pixels;
! in contrast, the fixed = 6x13 bitmap font is typically used on a
! low-definition screen, giving a width of $((6*COLUMNS+13)) pixels.
XTerm*faceName:  Monospace
XTerm*faceSize:  10
! For xterm menus. This font is large enough, but a bit ugly.
XTerm*font:  -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1
My default terminal is rxvt-unicode, so it works fine. You may notice I have turn antialias off, the font looks sharp, you may see zigzag when looking really close, but for 227DPI, it's very clear without it already.  Most of the document on line regarding GTK+3's HiDPI support is by setting
export GDK_SCALE=2
export GDK_DPI_SCALE=05
I found the program behave a little strange when this kind of scaling in effect.  Font is a little blur than none scale one. For the Gnat Programing Studio (GPS), with the scaling effect, the menu display strangely:
compare with the one without scaling:
I am not sure whether its GTK3' fault or GPS's fault.  I would hope for a GDK_IMAGE_SCALE and only scale image, maybe that will work better.


P.S. After upgrade to kernel 4.4, all the special keys (fn+Fx) works as expected (with pommed-light)

Wednesday, July 10, 2013

gvim and i3 not playing too well together

It seems gvim is not playing nicely with tiling manager.  I encountered this bug.

It seems I am not alone with this problem.  To maximize and restore the window each time doesn't seem to be a good workaround.  The workaround I used are from the stackexchange, add the following line into my .vimrc:

set showtabline=2
It always display the tab bar.  Although it wastes some spaces, it gives me a proper displayed window.

Friday, June 28, 2013

3 days using i3 tiling window manager under Slackware

I have heard about tiling window manager for some time, but lack the initiative to test one.  Recently I finally got fed up with resizing two windows side by side and decided to give titling manager a test.

After some research from the web, I settled on i3 tiling window manager for its simplicity.  With the help from SlackBuilds, I got the window manager installed and run without hassle (I did recompile the cairo with xcb support (from current) and use the latest i3 release version 4.5.1).

It took me a while to get familiar with the key bindings.  Thanks for the good documentation, I got used to it quickly and customized the configuration to suite my own needs.  No longer do I need to fight with the mouse to place the window to gain the last pixel.  Wow, I wish I should try it earlier.  It just simply awesome! Oh, and awesome is another good tiling window manager too ^_^.

I have used various window mangers and DE during the years of using Slackware.  From the beginning, it was fvwm, fvwm2, IceWM, window maker, GNOME, KDE, XFCE, LXDE, blackbox, EDE, E16, E17, fluxbox.  Now I am simply sold to the tiling manager and won't go back to the normal one.