<?xml version="1.0"?>
<JWM>

    <!-- Root menu: regenerated from .desktop files on every -restart/-reload.
         onroot="0" + the root Mouse bindings below = no desktop-click menus. -->
    <RootMenu onroot="0">
        <Include>exec:python3 /home/epochryphon/.jwm/gen-menu.py</Include>
        <Separator/>
        <Program icon="utilities-terminal" label="Terminal">xfce4-terminal</Program>
        <Program icon="folder" label="File Explorer">thunar</Program>
        <Program icon="lock" label="Lock">xscreensaver-command -lock</Program>
        <Separator/>
        <Restart label="Restart" icon="reload"/>
        <Program label="Power Off" icon="xfce4-settings.png">/usr/libexec/jwm/jwm-poweroff.sh</Program>
        <Exit label="Log Out" confirm="true" icon="exit"/>
    </RootMenu>

    <!-- Groups. A group with no Class/Name applies to ALL windows. -->
    <Group>
        <Class>Synapse</Class>
        <Option>border</Option>
        <Option>title</Option>
    </Group>
    <Group>
        <Option>aerosnap</Option>
    </Group>
    <Group>
        <Name>xterm</Name>
        <Option>vmax</Option>
    </Group>
    <Group>
        <Name>xclock</Name>
        <Option>drag</Option>
        <Option>notitle</Option>
    </Group>

    <!-- Bottom tray: start button, tasks, dock, clock. No pager, no show-desktop. -->
    <Tray height="40">
        <TrayButton icon="/usr/share/pixmaps/debian-logo.png">root:0</TrayButton>
        <Spacer width="2"/>
        <TaskList maxwidth="256"/>
        <Dock/>
        <Clock format="%l:%M %p"></Clock>
    </Tray>

    <!-- Styles -->
    <WindowStyle decorations="motif">
        <Font>Sans-12:bold</Font>
        <Width>4</Width>
        <Corner>0</Corner>
        <Foreground>#FFFFFF</Foreground>
        <Background>#555555</Background>
        <Opacity>0.5</Opacity>
        <Active>
            <Foreground>#FFFFF</Foreground>
            <Background>#222222</Background>
        </Active>
    </WindowStyle>
    <TrayStyle decorations="motif">
        <Font>Sans-12</Font>
        <Background>#333333</Background>
        <Foreground>#FFFFFF</Foreground>
        <Opacity>0.75</Opacity>
    </TrayStyle>
    <TaskListStyle list="all" group="true">
        <Font>Sans-12</Font>
        <Foreground>#FFFFFF</Foreground>
        <Background>#333333</Background>
        <Active>
            <Foreground>#FFFFFF</Foreground>
            <Background>#555555</Background>
        </Active>
    </TaskListStyle>
    <MenuStyle decorations="motif">
        <Font>Sans-12</Font>
        <Foreground>#FFFFFF</Foreground>
        <Background>#333333</Background>
        <Active>
            <Foreground>#FFFFFF</Foreground>
            <Background>#0077CC</Background>
        </Active>
        <Opacity>0.85</Opacity>
    </MenuStyle>
    <PopupStyle>
        <Font>Sans-12</Font>
        <Foreground>#000000</Foreground>
        <Background>#999999</Background>
    </PopupStyle>

    <IconPath>/usr/share/icons/hicolor/scalable/actions</IconPath>
    <IconPath>/usr/share/icons/hicolor/scalable/animations</IconPath>
    <IconPath>/usr/share/icons/hicolor/scalable/apps</IconPath>
    <IconPath>/usr/share/icons/hicolor/scalable/categories</IconPath>
    <IconPath>/usr/share/icons/hicolor/scalable/devices</IconPath>
    <IconPath>/usr/share/icons/hicolor/scalable/emblems</IconPath>
    <IconPath>/usr/share/icons/hicolor/scalable/emotes</IconPath>
    <IconPath>/usr/share/icons/hicolor/scalable/intl</IconPath>
    <IconPath>/usr/share/icons/hicolor/scalable/mimetypes</IconPath>
    <IconPath>/usr/share/icons/hicolor/scalable/places</IconPath>
    <IconPath>/usr/share/icons/hicolor/scalable/status</IconPath>
    <IconPath>/usr/share/icons/hicolor/scalable/stock/media</IconPath>

    <IconPath>/var/lib/flatpak/exports/share/icons/hicolor/128x128/apps</IconPath>
    <IconPath>/var/lib/flatpak/exports/share/icons/hicolor/scalable/apps</IconPath>
    <IconPath>$HOME/.local/share/flatpak/exports/share/icons/hicolor/128x128/apps</IconPath>
    <IconPath>$HOME/.local/share/flatpak/exports/share/icons/hicolor/scalable/apps</IconPath>
    <IconPath>/usr/share/icons/gnome/32x32/actions</IconPath>
    <IconPath>/usr/share/icons/gnome/32x32/animations</IconPath>
    <IconPath>/usr/share/icons/gnome/32x32/apps</IconPath>
    <IconPath>/usr/share/icons/gnome/32x32/categories</IconPath>
    <IconPath>/usr/share/icons/gnome/32x32/devices</IconPath>
    <IconPath>/usr/share/icons/gnome/32x32/emblems</IconPath>
    <IconPath>/usr/share/icons/gnome/32x32/emotes</IconPath>
    <IconPath>/usr/share/icons/gnome/32x32/mimetypes</IconPath>
    <IconPath>/usr/share/icons/gnome/32x32/places</IconPath>
    <IconPath>/usr/share/icons/gnome/32x32/status</IconPath>

    <IconPath>/usr/share/icons/gnome/256x256/actions</IconPath>
    <IconPath>/usr/share/icons/gnome/256x256/animations</IconPath>
    <IconPath>/usr/share/icons/gnome/256x256/apps</IconPath>
    <IconPath>/usr/share/icons/gnome/256x256/categories</IconPath>
    <IconPath>/usr/share/icons/gnome/256x256/devices</IconPath>
    <IconPath>/usr/share/icons/gnome/256x256/emblems</IconPath>
    <IconPath>/usr/share/icons/gnome/256x256/emotes</IconPath>
    <IconPath>/usr/share/icons/gnome/256x256/mimetypes</IconPath>
    <IconPath>/usr/share/icons/gnome/256x256/places</IconPath>
    <IconPath>/usr/share/icons/gnome/256x256/status</IconPath>

    <IconPath>/usr/share/icons/hicolor/32x32/actions</IconPath>
    <IconPath>/usr/share/icons/hicolor/32x32/animations</IconPath>
    <IconPath>/usr/share/icons/hicolor/32x32/apps</IconPath>
    <IconPath>/usr/share/icons/hicolor/32x32/categories</IconPath>
    <IconPath>/usr/share/icons/hicolor/32x32/devices</IconPath>
    <IconPath>/usr/share/icons/hicolor/32x32/emblems</IconPath>
    <IconPath>/usr/share/icons/hicolor/32x32/emotes</IconPath>
    <IconPath>/usr/share/icons/hicolor/32x32/intl</IconPath>
    <IconPath>/usr/share/icons/hicolor/32x32/mimetypes</IconPath>
    <IconPath>/usr/share/icons/hicolor/32x32/places</IconPath>
    <IconPath>/usr/share/icons/hicolor/32x32/status</IconPath>
    <IconPath>/usr/share/icons/hicolor/32x32/stock</IconPath>

    <IconPath>/usr/share/icons/hicolor/64x64/actions</IconPath>
    <IconPath>/usr/share/icons/hicolor/64x64/animations</IconPath>
    <IconPath>/usr/share/icons/hicolor/64x64/apps</IconPath>
    <IconPath>/usr/share/icons/hicolor/64x64/categories</IconPath>
    <IconPath>/usr/share/icons/hicolor/64x64/devices</IconPath>
    <IconPath>/usr/share/icons/hicolor/64x64/emblems</IconPath>
    <IconPath>/usr/share/icons/hicolor/64x64/emotes</IconPath>
    <IconPath>/usr/share/icons/hicolor/64x64/intl</IconPath>
    <IconPath>/usr/share/icons/hicolor/64x64/mimetypes</IconPath>
    <IconPath>/usr/share/icons/hicolor/64x64/places</IconPath>
    <IconPath>/usr/share/icons/hicolor/64x64/status</IconPath>
    <IconPath>/usr/share/icons/hicolor/64x64/stock</IconPath>

    <IconPath>/usr/share/icons/hicolor/128x128/actions</IconPath>
    <IconPath>/usr/share/icons/hicolor/128x128/animations</IconPath>
    <IconPath>/usr/share/icons/hicolor/128x128/apps</IconPath>
    <IconPath>/usr/share/icons/hicolor/128x128/categories</IconPath>
    <IconPath>/usr/share/icons/hicolor/128x128/devices</IconPath>
    <IconPath>/usr/share/icons/hicolor/128x128/emblems</IconPath>
    <IconPath>/usr/share/icons/hicolor/128x128/emotes</IconPath>
    <IconPath>/usr/share/icons/hicolor/128x128/intl</IconPath>
    <IconPath>/usr/share/icons/hicolor/128x128/mimetypes</IconPath>
    <IconPath>/usr/share/icons/hicolor/128x128/places</IconPath>
    <IconPath>/usr/share/icons/hicolor/128x128/status</IconPath>
    <IconPath>/usr/share/icons/hicolor/128x128/stock</IconPath>

    <IconPath>/usr/share/icons</IconPath>
    <IconPath>/usr/share/pixmaps</IconPath>

    <!-- 2 workspaces, single row, scaled wallpaper -->
    <Desktops width="2" height="1">
        <Background type="scale">/home/epochryphon/Pictures/Wallpapers/hills.png</Background>
    </Desktops>

    <SnapMode distance="10">border</SnapMode>
    <StartupCommand>/home/epochryphon/.jwm/startup</StartupCommand>

    <!-- Keys: only non-stock bindings. Alt+F1 kept because stock is root:1. -->
    <Key mask="A" key="F1">root:0</Key>

    <!-- Super + arrows / PgUp / PgDn: Win7-style snapping -->
    <Key mask="4" key="Left">maxleft</Key>
    <Key mask="4" key="Right">maxright</Key>
    <Key mask="4" key="Up">maximize</Key>
    <Key mask="4" key="Down">minimize</Key>
    <Key mask="4" key="Prior">maxtop</Key>
    <Key mask="4" key="Next">maxbottom</Key>
    <Key mask="4" key="r">restore</Key>
    <Key mask="4" key="d">showdesktop</Key>

    <!-- Workspaces without a pager: Super+1/2 switch, Super+Shift+1/2 send -->
    <Key mask="4" key="#">desktop#</Key>
    <Key mask="4S" key="#">send#</Key>

    <!-- Mouse: desktop clicks dead, desktop scroll switches workspace.
         Everything else (title/border/buttons) uses JWM defaults. -->
    <Mouse context="root" button="1">none</Mouse>
    <Mouse context="root" button="2">none</Mouse>
    <Mouse context="root" button="3">none</Mouse>
    <Mouse context="root" button="4">ldesktop</Mouse>
    <Mouse context="root" button="5">rdesktop</Mouse>
    <!-- Keys: only non-stock bindings. Alt+F1 kept because stock is root:1. -->
    <Key mask="A" key="F1">root:0</Key>
    <Key mask="A" key="Left">ldesktop</Key>
    <Key mask="A" key="Right">rdesktop</Key>

</JWM>
