사용자 도구

사이트 도구


linux:windowmanager:openbox

문서의 이전 판입니다!


OpenBox Window Manager

단축키 설정

  • obkey - Openbox Key Editor 참조 - 잘못된 매핑을 하는 경우가 많이 발견된다.
  • F11 ToggleFullScreen 이 기본 지정돼 있는데 이 키를 다른 것으로 바꿔준다. F11을 풀스크린 단축키로 사용하는 다른 대부분의 애플리케이션들과 충돌한다.
  • OpenBox Actions 단축키 지정 액션 목록

Application 설정

몇몇 실행 창 백그라운드로 뜨는 문제

Alt-F2 로 띄우는 실행창 등의 단축키로 띄우는 프로그램들이 전면으로 뜨지 않고 백그라운드로 뜨는 문제가 발생하고 있다. rc.xml 파일에서 다음 항목을 추가해야 한다. <applications> 요소가 있으면 그 안의 내용만 넣고, 없으면 통째로 복사한다.

<applications>
  <application name="lxpanel">
    <focus>yes</focus>
  </application>
  <application name="pcmanfm">
    <focus>yes</focus>
  </application>
</applications>

lxpanel run이 실행창을 띄우는 명령이라서 저런 설정을 할 것이다. 자세한 사항은 rc.xml에 함께 들어있는 주석을 참조한다.

마우스 휠로 데스크탑 이동 중지

기본적으로 마우스 휠을 바탕화면에서 작동시키면 데스크탑을 이전/다음으로 이동할 수 있다. 이 기능이 터치패드를 사용할 때 터치패드를 살짝 건드렸을 때 작동하는 경우가 자주 발생하여 꺼버렸다.

설정파일의 <mouse> 항목 아래에서 다음 부분을 <!– 내용 –> 형태로 주석처리한다. 휠을 통한 데스크탑 이동은 금지되지만 Alt-휠, Ctrl-Alt-휠은 작동한다.

    <context name="Desktop">
    <!--
      <mousebind action="Click" button="Up">
        <action name="DesktopPrevious"/>
      </mousebind>
      <mousebind action="Click" button="Down">
        <action name="DesktopNext"/>
      </mousebind>
    -->
   ... 그 외 내용
   </context>

Tiling Windows

  • 단축키 조합을 통한 창 타일링을 만들어낼 수 있다.아래는 <Super><Shift>방향키를 통해 창을 배치하는 단축키 조합이다.
        <keybind key="S-W-Up">
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>0</x>
            <y>0</y>
            <width>100%</width>
            <height>50%</height>
          </action>
        </keybind>
        <keybind key="S-W-Down">
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>0</x>
            <y>50%</y>
            <width>100%</width>
            <height>50%</height>
          </action>
        </keybind>
        <keybind key="S-W-Left">
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>0</x>
            <y>0</y>
            <width>50%</width>
            <height>100%</height>
          </action>
        </keybind>
        <keybind key="S-W-Right">
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>50%</x>
            <y>0</y>
            <width>50%</width>
            <height>100%</height>
          </action>
        </keybind>
        <keybind key="S-W-Home">
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>0</x>
            <y>0</y>
            <width>50%</width>
            <height>50%</height>
          </action>
        </keybind>
        <keybind key="S-W-End">
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>0</x>
            <y>50%</y>
            <width>50%</width>
            <height>50%</height>
          </action>
        </keybind>
        <keybind key="S-W-Page_Up">
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>50%</x>
            <y>0</y>
            <width>50%</width>
            <height>50%</height>
          </action>
        </keybind>
        <keybind key="S-W-Page_Down">
          <action name="UnmaximizeFull"/>
          <action name="MoveResizeTo">
            <x>50%</x>
            <y>50%</y>
            <width>50%</width>
            <height>50%</height>
          </action>
        </keybind>
        <keybind key="S-W-M">
          <action name="ToggleMaximizeFull"/>
        </keybind>
  • 참고자료

함께 사용하면 좋은 툴들

Quake Style Terminal

  • Guake 같은 터미널을 직접 만들어낼 수 있다. terminator 터미널을 사용한다고 가정 했을 때.
  • sudo apt-get install terminator wmctrl xdotool 먼저 수행.
  • quaketerminal.sh
    #!/bin/sh
     
    if [ "`wmctrl -l -x | grep -c QuakeTerminator`" = "0" ]
    then
        terminator -b --classname=QuakeTerminator &
        # compton 사용시 투명도 조정
        sleep 1
        xdotool search QuakeTerminator windowfocus
        compton-trans -c 80
        # OpenBox가 아닐 경우에는 아래 필요할 수도. Window Manager의 설정 기능에 따라 달라짐.
        #sleep 1
        #wmctrl -x -r QuakeTerminator -e 0,0,0,-1,-1
        #wmctrl -x -r QuakeTerminator -b add,maximized_horz
        #wmctrl -x -r QuakeTerminator -b add,above
    else
        echo "running else.."
        wmctrl -x -r QuakeTerminator -b toggle,hidden
        xdotool search QuakeTerminator windowfocus
    fi
  • ~/.config/openbox/rc.xml
    <applications>
        <application name="QuakeTerminator">
            <position force="yes">
                <x>0</x>
                <y>0</y>
            </position>
            <size> <!-- 원하는 대로 크기 조정 -->
                <width>100%</width>
                <height>50%</height>
            </size>
            <focus>yes</focus>
            <layer>above</layer>
            <shade>no</shade>
            <decor>no</decor>
            <skip_pager>yes</skip_pager>
            <skip_taskbar>yes</skip_taskbar>
        </application>
    </applications>
     
    <!-- 단축키 바인딩 추가 : Super + ~ -->
    <keyboard>
        <keybind key="W-grave">
          <action name="Execute">
            <command>quaketerminal.sh</command>
          </action>
          <action name="Focus"/>
        </keybind>
    </keyboard>
  • openbox --reconfigure 명령으로 설정 변경 적용
  • application > nameobxprop 명령으로 Terminator 윈도우를 찍었을 때 출력되는 _OB_APP_NAME 값.
  • Terminator의 --layout이나 --profile 등의 옵션과의 조합도 가능하므로 다양하게 활용가능.
linux/windowmanager/openbox.1428758227.txt.gz · 마지막으로 수정됨: 2015/04/11 22:17 저자 kwon37xi