免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1685 | 回复: 0
打印 上一主题 下一主题

Stupid GUI Tricks: OpenBSD + Xinerama + x11/awesom [复制链接]

论坛徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕节徽章
日期:2015-08-21 11:06:17
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-07 16:07 |只看该作者 |倒序浏览
Contributed by
merdely
on Tue May 6 18:01:15 2008 (GMT)
from the xinerama-is-awesome dept.
Xinerama(3)
[
Wikipedia
] has been part of the OpenBSD X distribution for some time. I was able to get a chance to play with it when I got my hands on a second video card and monitor.
As an x11/dwm user, I leaned towards x11/awesome as my Xinerama-aware window manager. More information about how I got Xinerama working and how I configured x11/awesome below.
Prior to adding the second video card and monitor to my system, I was previously able to run xenocara without an
xorg.conf
on my i386 machine. After installing the second card and attaching the monitor, I used 'X -configure' to generate a configuration file. After that, I only had to modify a couple pieces of my xorg.conf. My ServerLayout section looks like this. I had to add the "Xinerama" "On" Option:
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen 0       "Screen0" 0 0
        Screen 1       "Screen1" RightOf "Screen0"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
        Option         "Xinerama" "On"
EndSection
Not all window managers are Xinerama-aware/capable. The "
awesome
" window manager is a fork of the
dwm
window manager that supports Xinerama and run-time configuration. Since I use dwm on my laptop, I felt comfortable using awesome on my dual-head desktop. The only pertinent changes I made to my ~/.awesomerc (to make it more useful to me) are changing:
    key
    {
        modkey = {"Mod1"}
        key = "Tab"
        command = "focus_history"
        arg = "-1"
    }to
    key
    {
        modkey = {"Mod1"}
        key = "Tab"
        command = "screen_focus"
        arg = "+1"
    }
    key
    {
        modkey = {"Mod1", "Shift"}
        key = "Tab"
        command = "screen_focus"
        arg = "-1"
    }The above change allows + and ++ to cycle between screens instead of windows. I also added:
    key
    {
        modkey = {"Mod1"}
        key = "p"
        command = "spawn"
        arg = "exec dmenu_run"
    }
    key
    {   
        modkey = {"Mod1", "Shift", "Control"}
        key = "j"
        command = "client_movetoscreen"
        arg = "+1"
    }
    key
    {   
        modkey = {"Mod1", "Shift", "Control"}
        key = "k"
        command = "client_movetoscreen"
        arg = "-1"
    }This makes + launch x11/
dmenu
, +++ move a window to the screen to the right and +++ move a window to the screen to the left.
With my two screen set up, I generally have my GUI applications on the left-hand screen (firefox, thunderbird) and a local xterm. On the right-hand screen, I have my "main" xterm running screen with mutt, irssi and different connections to the different hosts I manage. [
screenshot
]
Even though Xinerama has generally been deprecated by
XRandR
(and it's accompanying command:
xrandr(1)
), XRandR isn't supported by older X drivers (like the one I'm using). Also, XRandR is designed for use with multiple outputs on one card, not multiple cards as in this case. I don't have a dual-head card to test, so can't comment on it. If anyone with such hardware would like to comment, please do so below.
If you've got some "Stupid User Tricks" you'd like to share, please
submit a story
.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4206/showart_680149.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP