<?xml version="1.0" encoding="UTF-8"?>
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
  <!-- You can reserve a portion of your screen where windows will not cover when
       they are maximized, or when they are initially placed. -->
  <margins>
    <top>0</top>
    <bottom>0</bottom>
    <left>0</left>
    <right>0</right>
  </margins>
  <keyboard>
    <!-- XKB configuration.  See `man xkeyboard-config` for more information -->
    <!-- You can use the XKB_* environment variables instead -->
    <!-- <xkb>
      <model>105</model>
      <layout>us</layout>
      <options>ctrl:swapcaps,esperanto:dvorak,lv3:ralt_switch_multikey</options>
      <rules>evdev</rules>
      <variant>dvorak</variant>
    </xkb> -->
    <!-- Keybindings for windows -->
    <keybind key="A-F4">
      <action name="Close"/>
    </keybind>
    <keybind key="C-Escape">
      <action name="Exit"/>
    </keybind>
    <keybind key="W-c">
      <action name="Reconfigure"/>
    </keybind>
    <keybind key="W-m">
      <action name="Iconify"/>
    </keybind>
    <keybind key="W-S-M">
      <action name="ToggleMaximize"/>
    </keybind>
    <keybind key="W-s">
      <action name="Shade"/>
    </keybind>
    <keybind key="W-S-S">
      <action name="Unshade"/>
    </keybind>
    <!-- Keybindings for window switching -->
    <keybind key="A-Tab">
      <action name="NextWindow"/>
      <action name="Unshade"/>
    </keybind>
    <keybind key="A-S-ISO_Left_Tab">
      <action name="PreviousWindow"/>
      <action name="Unshade"/>
    </keybind>
    <keybind key="C-A-Tab">
      <action name="NextWindow"/>
      <action name="Unshade"/>
    </keybind>
    <!-- Keybindings for running applications -->
    <keybind key="W-Return">
      <action name="Execute">
        <execute>$TERMINAL</execute>
      </action>
    </keybind>
    <keybind key="Print">
      <action name="Execute">
        <execute>grim "$(xdg-user-dir PICTURES)/$(date +'%Y-%m-%d-%H%M%S_grim_fs.png')"</execute>
      </action>
    </keybind>
    <keybind key="A-Sys_Req">
      <action name="Execute">
        <execute>grim -g "$(slurp -d)" "$(xdg-user-dir PICTURES)/$(date +'%Y-%m-%d-%H%M%S_grim_sel.png')"</execute>
      </action>
    </keybind>
    <keybind key="A-F2">
      <action name="Execute">
        <execute>obrun l</execute>
      </action>
    </keybind>
    <keybind key="W-e">
      <action name="Execute">
        <execute>konqueror || falkon</execute>
      </action>
    </keybind>
    <keybind key="W-o">
      <action name="Execute">
        <execute>$TERMINAL -e mc</execute>
      </action>
    </keybind>
    <keybind key="W-w">
      <action name="Execute">
        <execute>x-www-browser</execute>
      </action>
    </keybind>
    <!-- Media keys -->
    <keybind key="XF86AudioMute">
      <action name="Execute">
        <execute>amixer -c 0 -D pulse -q sset Master toggle</execute>
      </action>
    </keybind>
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <execute>amixer -c 0 -q set Master 3%-</execute>
      </action>
    </keybind>
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <execute>amixer -c 0 -q set Master 3%+</execute>
      </action>
    </keybind>
  </keyboard>
  <!-- Configuration for mice and other pointers. <mouse> instead of <pointer> only for backwards compatibility. -->
  <mouse>
    <!-- libinput configuration. -->
    <!-- <libinput>
      <accelProfile>adaptive</accelProfile>
      <accelSpeed>0.9</accelSpeed>
      <calibrationMatrix>0 0 0 0 0 0</calibrationMatrix>
      <clickMethod>buttonAreas</clickMethod>
      <disableWhileTrackpointing>enabled</disableWhileTrackpointing>
      <disableWhileTyping>enabled</disableWhileTyping>
      <leftHanded>disabled</leftHanded>
      <middleEmulation>enabled</middleEmulation>
      <naturalScroll>disabled</naturalScroll>
      <scrollButton>BTN_MIDDLE</scrollButton>
      <scrollButtonLock>disabled</scrollButtonLock>
      <scrollMethod>twofinger</scrollMethod>
      <tap>enabled</tap>
      <tapButtonMap>lrm</tapButtonMap>
      <tapDrag>enabled</tapDrag>
      <tapDragLock>enabled</tapDragLock>
    </libinput> -->
  </mouse>
</openbox_config>
