GW2: Desktop

Posted on Tue 24 September 2019 in linux

G W 2


  • wm: dwm
  • terminal: kitty OR st
  • app launcher: dmenu
  • browser: firefox
  • sh: zsh
  • editor: nvim OR vim
  • image viewer: feh
  • IME: libpinyin-fcitx4 OR fcitx5 rime



In make.conf : VIDEO_CARDS='intel' INPUT_DEVICES='libinput'

Emerge xorg-server (of i965 drivers) and all the deps.

And emerge xsetroot, xmodmap, xrandr, setxkbmap, inconsolata, source-han-sans.

Before xmodmap keys, xmodmap -pke > default to save up the default mapping.


Emerge x11-libs/libXScrnSaver first

Build this simple C applet as, say, xidle:

int main() {
    XScreenSaverInfo *info = XScreenSaverAllocInfo();
    Display *dpy = XOpenDisplay(0);
    if(!info || !dpy ||
    !XScreenSaverQueryInfo(dpy, RootWindow(dpy,DefaultScreen(dpy)), info)) return -1;
    printf("%ld", info->idle / 1000); // sec
    return 0;

Suckless family

Clone the source codes and well patch/test before commiting final full patches into /etc/portage/patches. Patch is good enough, no much need for savedconfig.

  • common: font, font size, xinerama USE
  • dwm: the "meta" key, pertag
  • st: colorscheme, zoom, scroll

If pixelsize=14 invalid in st's font setting, try size=14

For intuitive usage intro on dwm, read and

To make st look (un)fancy, go to

Gtk+ w/o dbus

  • Follow this simple instruction:
  • Atoms in /etc/portage/profile/package.provided are considered as already installed, so as to suppress emerge from installing them.
  • The line numbers in the diff patch might vary with different versions, so generate one from a real diff call.
  • After putting everything in place, go to the ebuild repo and run ebuild <P>.ebuild prepare to see if the patch works!!
  • Sometimes patches don't work due to an erroneous umask...
  • A better patch is to add the accessibility USE


Global scaling by layout.css.devPixelsPerPx in about:config.

To get audio with PulseAudio, check pacmd's sinks.


symlink fonts under .wine/drive_c/windows/Fonts and improve font by regedit following archwiki

winetricks : install (3) DLL files of rich*


export ICAROOT=/opt/Citrix/ICAClient

cd $icaclient

./wfica -file /path/to/foo.ica

IME fcitx 4

Emerge fcitx-libpinyin, and configure.

Custom configuration can be done by editing files under $HOME/.config/fcitx. For instance, to enable pinyin IME (or any other IME), modify EnabledIMList in $HOME/.config/fcitx/profile.

Copy the codes that import the dbus-launch xinitrc.d script ( eval "$(dbus-launch --sh-syntax --exit-with-x11)" ) from /etc/X11/xinit/xinitrc to $HOME/.xinitrc, if userland .xinitrc is used by startx.

Key remapping by xmodmap may be overwritten by fcitx, as said in the official wiki. There is also a github issue related to it. To solve it, write xmodmap rules in $HOME/.Xmodmap and fcitx will load them at startup.

IME fcitx 5

fcitx:5, fcitx-rime:5, fcitx-qt:5, fcitx-gtk:5, (fcitx-configtool:5)

run fcitx5 as daemon or fcitx-configtool trigger

CONF_DIR: .config/ibus/rime OR .local/share/fcitx5/rime

  • default.custom.yaml : main, patch
  • wongdean/rime-settings
  • rime_deployer --build CONF_DIR /usr/share/rime-data CONF_DIR/build


USE libinput pulseaudio wayland -X

sys-auth/seatd USE server ; boot, group

gui-libs/wlroots , media-libs/mesa USE vulkan ; WLR_RENDERER=vulkan

sway alacritty tmux google-chrome OR firefox-bin



  • input * xkb_layout custom
  • set $mod Mod4
  • set $term alacritty
  • bindsym $mod+Shift+Return exec $term
  • bindsym $mod+Shift+c kill
  • floating_modifier $mod normal
  • hide_edge_borders smart_no_gaps
  • workspace_auto_back_and_forth yes


media-video/pipewire USE dbus sound-server

emerge media-video/wireplumber

usermod -aG pipewire larry (/dev/snd char devices group pipewire, usermod -rG audio larry)

cp /usr/share/pipewire/pipewire.conf ~/.config/pipewire/pipewire.conf

INIT gentoo-pipewire-launcher


USE fuse io-uring iscsi spice gtk; TARGETS

  • -enable-kvm -cpu host -smp 2 -m 1024M
  • -device virtio-net,netdev=vmnic,mac=12:34:12:34:12:34 -netdev user,id=vmnic,hostfwd=tcp:
  • -drive file=/path/to/x.iso,media=cdrom -boot d
  • -display gtk -vga std