diff options
Diffstat (limited to '')
| -rw-r--r-- | dotfiles/labwc/autostart | 16 | ||||
| -rw-r--r-- | dotfiles/labwc/environment | 28 | ||||
| -rw-r--r-- | dotfiles/labwc/menu.xml | 76 | ||||
| -rw-r--r-- | dotfiles/labwc/rc.xml | 501 |
4 files changed, 621 insertions, 0 deletions
diff --git a/dotfiles/labwc/autostart b/dotfiles/labwc/autostart new file mode 100644 index 0000000..ace51fe --- /dev/null +++ b/dotfiles/labwc/autostart @@ -0,0 +1,16 @@ +# Configure output directives such as mode, position, scale and transform using kanshi. +kanshi >/dev/null 2>&1 & + +# Set background image. +wbg ~/.nix/wallpapers/riverfall.jpg & + +# Launch a panel such as yambar or waybar. +waybar >/dev/null 2>&1 & + +# Enable notifications. Typically GNOME/KDE application notifications go +# through the org.freedesktop.Notifications D-Bus API and require a client such +# as mako to function correctly. Thunderbird is an example of this. +mako >/dev/null 2>&1 & + +# Start the Thunar daemon for better startup +thunar --daemon & diff --git a/dotfiles/labwc/environment b/dotfiles/labwc/environment new file mode 100644 index 0000000..306e057 --- /dev/null +++ b/dotfiles/labwc/environment @@ -0,0 +1,28 @@ +## Uncomment lines starting with one '#' to suit your needs. + +## Use the XKB_DEFAULT_LAYOUT variable to set the keyboard layout. For example +## to start with Swedish keyboard layout set it to 'se'. If you are unsure what +## your country code is, refer to the layout section of: +## /usr/share/X11/xkb/rules/evdev.lst +## +## Multiple keyboard layouts can be set by comma-separating the country codes. +## If multiple layouts are used, specify the toggle-keybind using +## XKB_DEFAULT_OPTIONS as show below. +## For further details, see xkeyboard-config(7) +XKB_DEFAULT_LAYOUT=us,gr +XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle + +## Force firefox to use wayland backend. +MOZ_ENABLE_WAYLAND=1 + +## Set cursor theme and size. Find system icons themes with: +## `find /usr/share/icons/ -type d -name "cursors"` +XCURSOR_THEME=Qogir +XCURSOR_SIZE=24 + +## BEMENU stuff +BEMENU_OPTS= -ni -B 3 --bdr "#C1A550" --tb "#2A2A2A" --tf "#C1A550" --fb "#2A2A2A" --nb "#2A2A2A" --nf "#EDE6DB" --ab "#2A2A2A" --af "#EDE6DB" --hb "#2A2A2A" --hf "#C1A550" --line-height 30 "$@" --center --wrap --ignorecase --prompt '> $' --list 12 --no-overlap --width-factor 0.5 --fn 'Lilex' +BEMENU_BACKEND=wayland + +## bemenu needs this +XDG_DATA_DIRS = ~/.local/share/flatpak/exports/share/applications:$XDG_DATA_DIRS diff --git a/dotfiles/labwc/menu.xml b/dotfiles/labwc/menu.xml new file mode 100644 index 0000000..8760d83 --- /dev/null +++ b/dotfiles/labwc/menu.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<openbox_menu> + + <menu label="root-menu" id="root-menu"> + + <menu id="Web" label="Web"> + <item label="Web Browser" icon="zen-beta"> + <action name="Execute"><command>zen-beta</command></action> + </item> + <item label="Mail Client" icon="eu.betterbird.Betterbird"> + <action name="Execute"><command>flatpak run eu.betterbird.Betterbird</command></action> + </item> + </menu> + + <separator/> + + <menu id="Miscellaneous" label="Miscellaneous"> + <item label="Grayjay" icon="app.grayjay.Grayjay"> + <action name="Execute"><command>flatpak run app.grayjay.Grayjay</command></action> + </item> + <item label="Telegram" icon="org.telegram.desktop"> + <action name="Execute"><command>flatpak run org.telegram.desktop</command></action> + </item> + <item label="Discord" icon="io.github.equicord.equibop"> + <action name="Execute"><command>flatpak run io.github.equicord.equibop</command></action> + </item> + <item label="WhatsApp" icon="com.rtosta.zapzap"> + <action name="Execute"><command>flatpak run com.rtosta.zapzap</command></action> + </item> + <item label="LocalSend" icon="org.localsend.localsend_app"> + <action name="Execute"><command>flatpak run org.localsend.localsend_app</command></action> + </item> + </menu> + + <separator/> + + <menu id="System" label="System"> + <item label="File Manager" icon="thunar"> + <action name="Execute"><command>thunar</command></action> + </item> + <item label="Flatseal" icon="com.github.tchx84.Flatseal"> + <action name="Execute"><command>flatpak run com.github.tchx84.Flatseal</command></action> + </item> + <item label="GPG Frontend" icon="com.bktus.gpgfrontend"> + <action name="Execute"><command>flatpak run com.bktus.gpgfrontend</command></action> + </item> + <item label="System Terminal" icon="Alacritty"> + <action name="Execute"><command>alacritty</command></action> + </item> + <item label="Screenshot" icon=""> + <action name="Execute"><command>sh -c 'grim -g "$(slurp)" - | swappy -f -'</command></action> + </item> + <item label="Network Configuration" icon="preferences-system-network"> + <action name="Execute"><command>alacritty -e nmtui</command></action> + </item> + </menu> + + </menu> + + <menu label="sys-menu" id="sys-menu"> + <item label="Reconfigure"> + <action name="Reconfigure"></action> + </item> + <item label="Logout"> + <action name="Exit"></action> + </item> + <item label="Reboot"> + <action name="Execute" command="systemctl reboot"></action> + </item> + <item label="Shutdown"> + <action name="Execute" command="systemctl poweroff"></action> + </item> + </menu> + +</openbox_menu> + diff --git a/dotfiles/labwc/rc.xml b/dotfiles/labwc/rc.xml new file mode 100644 index 0000000..fdda1a7 --- /dev/null +++ b/dotfiles/labwc/rc.xml @@ -0,0 +1,501 @@ +<?xml version="1.0"?> +<!-- +This file contains all supported config elements & attributes with +default values. +--> +<labwc_config> + <core> + <decoration>server</decoration> + <gap>5</gap> + <adaptiveSync>no</adaptiveSync> + <reuseOutputMode>no</reuseOutputMode> + </core> + <!-- <font><theme> can be defined without an attribute to set all places --> + <theme> + <name>Orzhov</name> + <cornerRadius>0</cornerRadius> + <keepBorder>yes</keepBorder> + <font> + <name>Segoe UI</name> + <size>10</size> + <slant>normal</slant> + <weight>normal</weight> + </font> + <dropShadows>yes</dropShadows> + <titlebar> + <layout>icon:iconify,max,close</layout> + </titlebar> + </theme> + <!-- +Just as for window-rules, 'identifier' relates to app_id for native Wayland +windows and WM_CLASS for XWayland clients. +--> + <windowSwitcher show="yes" preview="yes" outlines="yes"> + <fields> + <field content="type" width="25%"/> + <field content="identifier" width="25%"/> + <field content="title" width="50%"/> + </fields> + </windowSwitcher> + <!-- edge strength is in pixels --> + <resistance> + <screenEdgeStrength>20</screenEdgeStrength> + </resistance> + <!-- Show a simple resize and move indicator --> + <resize popupShow="Never"/> + <focus> + <followMouse>yes</followMouse> + <followMouseRequiresMovement>yes</followMouseRequiresMovement> + <raiseOnFocus>no</raiseOnFocus> + </focus> + <!-- Set range to 0 to disable window snapping completely --> + <snapping> + <range>1</range> + <topMaximize>yes</topMaximize> + </snapping> + <!-- Workspaces can be configured like this: --> + <desktops> + <popupTime>1000</popupTime> + <names> + <name>Terminal 1</name> + <name>Terminal 2</name> + <name>Web 1</name> + <name>Web 2</name> + <name>Notes</name> + <name>Social</name> + <name>Mail</name> + <name>Music</name> + </names> + </desktops> + <regions> + <region name="top-left" x="0%" y="0%" height="50%" width="50%"/> + <region name="top" x="0%" y="0%" height="50%" width="100%"/> + <region name="top-right" x="50%" y="0%" height="50%" width="50%"/> + <region name="left" x="0%" y="0%" height="100%" width="50%"/> + <region name="center" x="10%" y="10%" height="80%" width="80%"/> + <region name="right" x="50%" y="0%" height="100%" width="50%"/> + <region name="bottom-left" x="0%" y="50%" height="50%" width="50%"/> + <region name="bottom" x="0%" y="50%" height="50%" width="100%"/> + <region name="bottom-right" x="50%" y="50%" height="50%" width="50%"/> + </regions> + <!-- +Keybind actions are specified in labwc-actions(5) +The following keybind modifiers are supported: +W - window/super/logo +A - alt +C - ctrl +S - shift + +Use <keyboard><default /> to load all the default keybinds (those listed +below). If the default keybinds are largely what you want, a sensible +approach could be to start the <keyboard> section with a <default /> +element, and then (re-)define any special binds you need such as launching +your favourite terminal or application launcher. See rc.xml for an example. +--> + <keyboard> + <numlock>on</numlock> + <repeatRate>25</repeatRate> + <repeatDelay>600</repeatDelay> + <keybind key="W-r"> + <action name="Reconfigure"/> + </keybind> + <keybind key="Print"> + <action name="Execute"> + <command>sh -c 'grim -g "$(slurp)" - | swappy -f -'</command> + </action> + </keybind> + <keybind key="A-Tab"> + <action name="NextWindow"/> + </keybind> + <keybind key="W-Return"> + <action name="Execute" command="ghostty"/> + </keybind> + <keybind key="W-w"> + <action name="Execute" command="zen-beta"/> + </keybind> + <keybind key="W-space"> + <action name="Execute" command="j4-dmenu-desktop --dmenu=bemenu"/> + </keybind> + <keybind key="W-f"> + <action name="Execute" command="thunar"/> + </keybind> + <keybind key="W-m"> + <action name="Execute" command="flatpak run eu.betterbird.Betterbird"/> + </keybind> + <keybind key="W-c"> + <action name="Close"/> + </keybind> + <keybind key="W-1"> + <action name="GoToDesktop" to="1"/> + <action name="Execute" command="bash -c 'echo 1 > /tmp/workspace'"/> + </keybind> + <keybind key="W-2"> + <action name="GoToDesktop" to="2"/> + <action name="Execute" command="bash -c 'echo 2 > /tmp/workspace'"/> + </keybind> + <keybind key="W-3"> + <action name="GoToDesktop" to="3"/> + <action name="Execute" command="bash -c 'echo 3 > /tmp/workspace'"/> + </keybind> + <keybind key="W-4"> + <action name="GoToDesktop" to="4"/> + <action name="Execute" command="bash -c 'echo 4 > /tmp/workspace'"/> + </keybind> + <keybind key="W-5"> + <action name="GoToDesktop" to="5"/> + <action name="Execute" command="bash -c 'echo 5 > /tmp/workspace'"/> + </keybind> + <keybind key="W-6"> + <action name="GoToDesktop" to="6"/> + <action name="Execute" command="bash -c 'echo 6 > /tmp/workspace'"/> + </keybind> + <keybind key="W-7"> + <action name="GoToDesktop" to="7"/> + <action name="Execute" command="bash -c 'echo 7 > /tmp/workspace'"/> + </keybind> + <keybind key="W-8"> + <action name="GoToDesktop" to="8"/> + <action name="Execute" command="bash -c 'echo 8 > /tmp/workspace'"/> + </keybind> + <keybind key="W-S-1"> + <action name="SendToDesktop" to="1"/> + <action name="Execute" command="bash -c 'echo 1 > /tmp/workspace'"/> + </keybind> + <keybind key="W-S-2"> + <action name="SendToDesktop" to="2"/> + <action name="Execute" command="bash -c 'echo 2 > /tmp/workspace'"/> + </keybind> + <keybind key="W-S-3"> + <action name="SendToDesktop" to="3"/> + <action name="Execute" command="bash -c 'echo 3 > /tmp/workspace'"/> + </keybind> + <keybind key="W-S-4"> + <action name="SendToDesktop" to="4"/> + <action name="Execute" command="bash -c 'echo 4 > /tmp/workspace'"/> + </keybind> + <keybind key="W-S-5"> + <action name="SendToDesktop" to="5"/> + <action name="Execute" command="bash -c 'echo 5 > /tmp/workspace'"/> + </keybind> + <keybind key="W-S-6"> + <action name="SendToDesktop" to="6"/> + <action name="Execute" command="bash -c 'echo 6 > /tmp/workspace'"/> + </keybind> + <keybind key="W-S-7"> + <action name="SendToDesktop" to="7"/> + <action name="Execute" command="bash -c 'echo 7 > /tmp/workspace'"/> + </keybind> + <keybind key="W-S-8"> + <action name="SendToDesktop" to="8"/> + <action name="Execute" command="bash -c 'echo 8 > /tmp/workspace'"/> + </keybind> + <keybind key="W-S-Left"> + <action name="GoToDesktop" to="left"/> + <action name="Execute" command="bash -c 'echo left > /tmp/workspace'"/> + </keybind> + <keybind key="W-S-Right"> + <action name="GoToDesktop" to="right"/> + <action name="Execute" command="bash -c 'echo right > /tmp/workspace'"/> + </keybind> + <desktops number="4"/> + <keybind key="W-C-S-Right"> + <action name="SendToDesktop" to="right"/> + <action name="Execute" command="bash -c 'echo right > /tmp/workspace'"/> + </keybind> + <keybind key="W-C-S-Left"> + <action name="SendToDesktop" to="left"/> + <action name="Execute" command="bash -c 'echo left > /tmp/workspace'"/> + </keybind> + <keybind key="W-Left"> + <action name="SnapToEdge" direction="left"/> + <action name="Focus"/> + <action name="Raise"/> + </keybind> + <keybind key="W-Right"> + <action name="SnapToEdge" direction="right"/> + <action name="Focus"/> + <action name="Raise"/> + </keybind> + <keybind key="W-Up"> + <action name="ToggleMaximize"/> + <action name="Focus"/> + <action name="Raise"/> + </keybind> + <keybind key="W-Down"> + <action name="SnapToRegion" region="center"/> + <action name="Focus"/> + <action name="Raise"/> + </keybind> + <keybind key="W-A-C-Right"> + <action name="SnapToRegion" region="top-right"/> + </keybind> + <keybind key="W-A-Right"> + <action name="SnapToRegion" region="bottom-right"/> + </keybind> + <keybind key="W-A-C-Left"> + <action name="SnapToRegion" region="top-left"/> + </keybind> + <keybind key="W-A-Left"> + <action name="SnapToRegion" region="bottom-left"/> + </keybind> + <keybind key="A-Space"> + <action name="ShowMenu" menu="client-menu"/> + </keybind> + <keybind key="W-C-l"> + <action name="Execute" command="waylock -init-color 0x000000 -input-color 0xC1A550 -fail-color 0xff0000"/> + </keybind> + <keybind key="XF86_AudioLowerVolume"> + <action name="Execute" command="wpctl set-volume @DEFAULT_SINK@ 5%-"/> + </keybind> + <keybind key="XF86_AudioRaiseVolume"> + <action name="Execute" command="wpctl set-volume @DEFAULT_SINK@ 5%+ --limit 1.0"/> + </keybind> + <keybind key="XF86_AudioMute"> + <action name="Execute" command="wpctl set-mute @DEFAULT_SINK@ toggle"/> + </keybind> + <keybind key="XF86_MonBrightnessUp"> + <action name="Execute" command="brightnessctl set +10%"/> + </keybind> + <keybind key="XF86_MonBrightnessDown"> + <action name="Execute" command="brightnessctl set 10%-"/> + </keybind> + <!-- +<keybind key="W-KP_7"><action name="SnapToRegion" region="top-left" /></keybind> +<keybind key="W-KP_8"><action name="SnapToRegion" region="top" /></keybind> +<keybind key="W-KP_9"><action name="SnapToRegion" region="top-right" /></keybind> +<keybind key="W-KP_4"><action name="SnapToRegion" region="left" /></keybind> +<keybind key="W-KP_5"><action name="SnapToRegion" region="center" /></keybind> +<keybind key="W-KP_6"><action name="SnapToRegion" region="right" /></keybind> +<keybind key="W-KP_1"><action name="SnapToRegion" region="bottom-left" /></keybind> +<keybind key="W-KP_2"><action name="SnapToRegion" region="bottom" /></keybind> +<keybind key="W-KP_3"><action name="SnapToRegion" region="bottom-right" /></keybind> +--> + </keyboard> + <!-- +Multiple <mousebind> can exist within one <context> +Multiple <actions> can exist within one <mousebind> +Currently, the only openbox-action not supported is "Unshade" + +Use <mouse><default /> to load all the default mousebinds (those listed +below). If the default mousebinds are largely what you want, a sensible +approach could be to start the <mouse> section with a <default /> +element, and then (re-)define any special binds you need such as launching +a custom menu when right-clicking on your desktop. See rc.xml for an example. +--> + <mouse> + <!-- time is in ms --> + <doubleClickTime>500</doubleClickTime> + <context name="Frame"> + <mousebind button="W-Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind button="W-Left" action="Drag"> + <action name="Move"/> + </mousebind> + <mousebind button="W-Right" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind button="W-Right" action="Drag"> + <action name="Resize"/> + </mousebind> + </context> + <context name="Top"> + <mousebind button="Left" action="Drag"> + <action name="Resize"/> + </mousebind> + </context> + <context name="Left"> + <mousebind button="Left" action="Drag"> + <action name="Resize"/> + </mousebind> + </context> + <context name="Right"> + <mousebind button="Left" action="Drag"> + <action name="Resize"/> + </mousebind> + </context> + <context name="Bottom"> + <mousebind button="Left" action="Drag"> + <action name="Resize"/> + </mousebind> + </context> + <context name="TRCorner"> + <mousebind button="Left" action="Drag"> + <action name="Resize"/> + </mousebind> + </context> + <context name="BRCorner"> + <mousebind button="Left" action="Drag"> + <action name="Resize"/> + </mousebind> + </context> + <context name="TLCorner"> + <mousebind button="Left" action="Drag"> + <action name="Resize"/> + </mousebind> + </context> + <context name="BLCorner"> + <mousebind button="Left" action="Drag"> + <action name="Resize"/> + </mousebind> + </context> + <context name="Maximize"> + <mousebind button="Left" action="Click"> + <action name="ToggleMaximize"/> + </mousebind> + <mousebind button="Right" action="Click"> + <action name="ToggleMaximize" direction="horizontal"/> + </mousebind> + <mousebind button="Middle" action="Click"> + <action name="ToggleMaximize" direction="vertical"/> + </mousebind> + </context> + <context name="WindowMenu"> + <mousebind button="Left" action="Click"> + <action name="ShowMenu" menu="client-menu"/> + </mousebind> + <mousebind button="Right" action="Click"> + <action name="ShowMenu" menu="client-menu"/> + </mousebind> + </context> + <context name="Iconify"> + <mousebind button="Left" action="Click"> + <action name="Iconify"/> + </mousebind> + </context> + <context name="Close"> + <mousebind button="Left" action="Click"> + <action name="Close"/> + </mousebind> + </context> + <context name="Title"> + <mousebind button="Left" action="Drag"> + <action name="Move"/> + </mousebind> + <mousebind button="Left" action="DoubleClick"> + <action name="ToggleMaximize"/> + </mousebind> + <mousebind button="Right" action="Click"> + <action name="ShowMenu" menu="client-menu"/> + </mousebind> + </context> + <context name="Client"> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind button="Middle" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind button="Right" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + </context> + <context name="TitleBar"> + <mousebind button="Left" action="Press"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind button="Right" action="Click"> + <action name="Focus"/> + <action name="Raise"/> + </mousebind> + <mousebind direction="Up" action="Scroll"> + <action name="Unshade"/> + <action name="Focus"/> + </mousebind> + <mousebind direction="Down" action="Scroll"> + <action name="Unfocus"/> + <action name="Shade"/> + </mousebind> + </context> + <context name="Root">// + <mousebind button="Left" action="Press"><action name="ShowMenu" menu="root-menu"/></mousebind> + <mousebind button="Right" action="Press"><action name="ShowMenu" menu="sys-menu"/></mousebind> + <mousebind button="Middle" action="Press"><action name="ShowMenu" menu="root-menu"/></mousebind> + <mousebind direction="Down" action="Scroll"><action name="GoToDesktop" to="left" wrap="yes"/><action name="Execute" command="bash -c 'echo left > /tmp/workspace'"/></mousebind> + <mousebind direction="Up" action="Scroll"><action name="GoToDesktop" to="right" wrap="yes"/><action name="Execute" command="bash -c 'echo right > /tmp/workspace'"/></mousebind> + </context> + </mouse> + <!-- +The *category* element can be set to touch, non-touch, default or the name +of a device. You can obtain device names by running *libinput list-devices* +as root or member of the input group. + +Tap is set to *yes* be default. All others are left blank in order to use +device defaults. + +All values are [yes|no] except for: +- pointerSpeed [-1.0 to 1.0] +- accelProfile [flat|adaptive] +- tapButtonMap [lrm|lmr] +--> + <libinput> + <device category="touchpad"> + <scrollFactor>1.0</scrollFactor> + <naturalScroll>yes</naturalScroll> + <leftHanded/> + <pointerSpeed/> + <accelProfile/> + <tap>yes</tap> + <tapButtonMap/> + <tapAndDrag/> + <dragLock/> + <middleEmulation/> + <disableWhileTyping/> + </device> + </libinput> + <!-- +# Window Rules +# - Criteria can consist of 'identifier' or 'title' or both (in which case +# AND logic is used). +# - 'identifier' relates to app_id for native Wayland windows and WM_CLASS +# for XWayland clients. +# - Criteria can also contain `matchOnce="true"` meaning that the rule +# must only apply to the first instance of the window with that +# particular 'identifier' or 'title'. +# - Matching against patterns with '*' (wildcard) and '?' (joker) is +# supported. Pattern matching is case-insensitive. + +<windowRules> +<windowRule identifier="*"><action name="Maximize"/></windowRule> +<windowRule identifier="foo" serverDecoration="yes"/> +<windowRule title="bar" serverDecoration="yes"/> +<windowRule identifier="baz" title="quax" serverDecoration="yes"/> +</windowRules> + +# Example below for `lxqt-panel` and `pcmanfm-qt \-\-desktop` +# where 'matchOnce' is used to avoid applying rule to the panel configuration +# window with the same 'app_id' + +<windowRules> +<windowRule identifier="lxqt-panel" matchOnce="true"> +<skipTaskbar>yes</skipTaskbar> +<action name="MoveTo" x="0" y="0" /> +<action name="ToggleAlwaysOnTop"/> +</windowRule> +<windowRule title="pcmanfm-desktop*"> +<skipTaskbar>yes</skipTaskbar> +<skipWindowSwitcher>yes</skipWindowSwitcher> +<action name="MoveTo" x="0" y="0" /> +<action name="ToggleAlwaysOnBottom"/> +</windowRule> +</windowRules> +--> + <windowRules> + <windowRule identifier="*"> + <action name="ToggleDecorations"></action> + </windowRule> + <windowRule identifier="*" serverDecoration="no"> + <action name="ToggleDecorations"></action> + </windowRule> + </windowRules> + <placement> + <policy>Center</policy> + </placement> +</labwc_config> + |
