XFCE 配上 Chromium 系列瀏覽器 (Chrome/Brave/...),視窗最大化時的問題

今天發現 Brave 在視窗最大化時會超出預期的邊界,而非放大到螢幕的邊緣,找了一下發現有人已經在 Brave 的 GitHub 上開了「Incorrect scale if browser is full screen #18964」這張票,後來看到有人說在 Chromium 的 bug system 上已經有人提出來了:「Issue 1257119: Goes under the taskbar when maximized」、「Issue 1260821: maximise gets screen dimension wron」與「Issue 1261797: [User Feedback - Stable] Reports that when Chrome is maximized after being minimized, it launches to beyond the window frame on Linux」。

這次遇到的 bug 看起來是只有用 XFCE 的使用者才會中獎,目前先摸索出一套 workaround 是透過 wmctrl 操作修改瀏覽器的位置與視窗大小。

方法是先用 wmctrl -l -G 列出所有視窗的資訊,包括 geometry 的資料,接著再用 wmctrl -i -r 0x12345678 -e 0,3760,15,1232,1935 這樣的指令去指定瀏覽器的位置與視窗大小。

不知道要撐多久就是了...

限制 WeeChat 中 buffers.pl 的寬度

WeeChat 上的 buffers.pl 是個很好用的套件,可以在側邊列出 channel,像是這樣:

weechat_bar_buffers_2008-09-02

其中一個特點是,左側的 channel list 會自動伸展到目前最長的 channel name。由於我用 WeeChat 連 Slack 提供的 IRC Gateway,加上最近提供多人交談的功能,就產生出這樣的 channel name:

#mpdm-gslin--persona--personb--personc--persond--persone----1

解法是限制側邊的寬度,用 /set buffers.look.name_size_max 32 後再 /save 存起來就可以了。是在「[buffers.pl] name_size_max adding crop suffix too soon in certain cases」這邊找到的關鍵字。