commit e74305ac15d29847c659f71c0463d0b9b3b799ac Author: Daniel Napora Date: Wed Dec 25 21:38:12 2024 +0100 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..547f8a3 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +## Mabox file for Labwc + +Experimental diff --git a/bin/mabox-labwc b/bin/mabox-labwc new file mode 100644 index 0000000..2bc35af --- /dev/null +++ b/bin/mabox-labwc @@ -0,0 +1,2 @@ +#!/bin/bash +labwc -C $HOME/.config/mabox-labwc/ diff --git a/config/labwc/README b/config/labwc/README new file mode 100644 index 0000000..c90c047 --- /dev/null +++ b/config/labwc/README @@ -0,0 +1,11 @@ +Config layout for ~/.config/labwc/ +- autostart +- environment +- menu.xml +- rc.xml +- shutdown +- themerc-override +- xinitrc + +See `man labwc-config and `man labwc-theme` for further details. + diff --git a/config/labwc/autostart b/config/labwc/autostart new file mode 100644 index 0000000..fb3548b --- /dev/null +++ b/config/labwc/autostart @@ -0,0 +1,34 @@ +# Example autostart file + +# Set background color. +swaybg -c '#113344' >/dev/null 2>&1 & + +# Configure output directives such as mode, position, scale and transform. +# Use wlr-randr to get your output names +# Example ~/.config/kanshi/config below: +# profile { +# output HDMI-A-1 position 1366,0 +# output eDP-1 position 0,0 +# } +#kanshi >/dev/null 2>&1 & + +# 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 & + +# Lock screen after 5 minutes; turn off display after another 5 minutes. +# +# Note that in the context of idle system power management, it is *NOT* a good +# idea to turn off displays by 'disabling outputs' for example by +# `wlr-randr --output --off` because this re-arranges views +# (since a837fef). Instead use a wlr-output-power-management client such as +# https://git.sr.ht/~leon_plickat/wlopm +swayidle -w \ + timeout 300 'swaylock -f -c 000000' \ + timeout 600 'wlopm --off \*' \ + resume 'wlopm --on \*' \ + before-sleep 'swaylock -f -c 000000' >/dev/null 2>&1 & diff --git a/config/labwc/environment b/config/labwc/environment new file mode 100644 index 0000000..f9c59b1 --- /dev/null +++ b/config/labwc/environment @@ -0,0 +1,77 @@ +## +## Example ~/.config/labwc/environment file. +## 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 a variant layout is needed, the syntax is layout(variant) +## 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=se +# XKB_DEFAULT_LAYOUT=se,us(intl) +# XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle +# XKB_DEFAULT_OPTIONS=grp:shift_caps_toggle + +## +## Set cursor theme and size. Find system icons themes with: +## `find /usr/share/icons/ -type d -name "cursors"` +## + +# XCURSOR_THEME=breeze_cursors +# XCURSOR_THEME=capitaine-cursors +# XCURSOR_SIZE=24 + +## +## Disable hardware cursors. Most users would not want to do this, but if you +## are experiencing issues with disappearing cursors, this might fix it. +## + +# WLR_NO_HARDWARE_CURSORS=1 + +## +## In order for labwc to work out of the box, the environment variable below +## is set to "1" by default to avoid menus with incorrect offset and blank +## windows with Java applications such as JetBrains and Intellij Idea. +## See https://github.com/swaywm/sway/issues/595 +## labwc will not override any already set environment variables, so if you for +## some reason do not want this, then just set it to "0" (not recommended, but +## mentioned here for completeness). +## + +# _JAVA_AWT_WM_NONREPARENTING=0 + +## +## This allows xdg-desktop-portal-wlr to function (e.g. for screen-recording). +## It is automatically set to "labwc:wlroots" by labwc though, so it is only +## included here for completeness. Again, labwc will not over-write an +## already set environment variable, so if you need it set to something else, +## then uncomment and adjust. +## + +# XDG_CURRENT_DESKTOP=labwc:wlroots + +## +## This causes a virtual output to be created automatically whenever there +## are no outputs around. This helps for cases like wayvnc so there is always +## an output available to connect to. The name can be chosen freely but there +## must be no duplicate output names, for this reason using VIRTUAL-x or a +## physical connector name like HDMI-A-1 is not recommended as wlroots may +## want to create outputs with those names later on which would then fail. +## +## Using an output name that starts with NOOP- has the additional benefit +## that wayvnc will detect it being a virtual output and allow clients to +## resize the output to match the client resolution. +## + +# LABWC_FALLBACK_OUTPUT=NOOP-fallback + diff --git a/config/labwc/menu.xml b/config/labwc/menu.xml new file mode 100644 index 0000000..bd2f966 --- /dev/null +++ b/config/labwc/menu.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/labwc/rc.xml b/config/labwc/rc.xml new file mode 100644 index 0000000..edcca86 --- /dev/null +++ b/config/labwc/rc.xml @@ -0,0 +1,41 @@ + + + + + + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/labwc/rc.xml.all b/config/labwc/rc.xml.all new file mode 100644 index 0000000..05dde96 --- /dev/null +++ b/config/labwc/rc.xml.all @@ -0,0 +1,691 @@ + + + + + + + + server + 0 + no + no + no + yes + + + + cascade + + + + + + + + + icon:iconify,max,close + yes + + 8 + yes + no + + sans + 10 + normal + normal + + + sans + 10 + normal + normal + + + sans + 10 + normal + normal + + + sans + 10 + normal + normal + + + sans + 10 + normal + normal + + + + + + + + + + + + + + + + + + 20 + 20 + + 20 + + 150 + + + + + Never + + yes + + + + no + yes + no + + + + + 1 + + + + yes + always + + + + + 1000 + + Default + + + + + + + + + + + on + global + 25 + 600 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 500 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + yes + + + + + + + + + 1.0 + + + + + + + 250 + + + + + 400 + 400 + 2.0 + 0.2 + true + + + diff --git a/config/labwc/shutdown b/config/labwc/shutdown new file mode 100644 index 0000000..970eaa2 --- /dev/null +++ b/config/labwc/shutdown @@ -0,0 +1,4 @@ +# Example shutdown file + +# This file is executed as a shell script when labwc is preparing to terminate itself. +# For further details see labwc-config(5). diff --git a/config/labwc/themerc b/config/labwc/themerc new file mode 100644 index 0000000..1ab3934 --- /dev/null +++ b/config/labwc/themerc @@ -0,0 +1,115 @@ +# This file contains all themerc options with default values +# +# System-wide and local themes can be overridden by creating a copy of this +# file and renaming it to $HOME/.config/labwc/themerc-override. Be careful +# though - if you only want to override a small number of specific options, +# make sure all other lines are commented out or deleted. + +# general +border.width: 1 + +# +# The global padding.{width,height} of openbox are not supported because +# the default labwc button geometry deviates from that of openbox +# +window.titlebar.padding.width: 0 +window.titlebar.padding.height: 0 + +# window border +window.active.border.color: #aaaaaa +window.inactive.border.color: #aaaaaa + +# ToggleKeybinds status indicator +window.active.indicator.toggled-keybind.color: #ff0000 + +# window titlebar background +window.active.title.bg.color: #e1dedb +window.inactive.title.bg.color: #f6f5f4 + +# window titlebar text +window.active.label.text.color: #000000 +window.inactive.label.text.color: #000000 +window.label.text.justify: center + +# window button width and spacing +window.button.width: 26 +window.button.height: 26 +window.button.spacing: 0 + +# window button hover effect +window.button.hover.bg.corner-radius: 0 + +# window buttons +window.active.button.unpressed.image.color: #000000 +window.inactive.button.unpressed.image.color: #000000 + +# window drop-shadows +window.active.shadow.size: 60 +window.inactive.shadow.size: 40 +window.active.shadow.color: #00000060 +window.inactive.shadow.color: #00000040 + +# Note that "menu", "iconify", "max", "close" buttons colors can be defined +# individually by inserting the type after the button node, for example: +# +# window.active.button.iconify.unpressed.image.color: #333333 + +# menu +menu.overlap.x: 0 +menu.overlap.y: 0 +menu.width.min: 20 +menu.width.max: 200 +menu.border.width: 1 +menu.border.color: #aaaaaa +menu.items.bg.color: #fcfbfa +menu.items.text.color: #000000 +menu.items.active.bg.color: #e1dedb +menu.items.active.text.color: #000000 +menu.items.padding.x: 7 +menu.items.padding.y: 4 +menu.separator.width: 1 +menu.separator.padding.width: 6 +menu.separator.padding.height: 3 +menu.separator.color: #888888 +menu.title.bg.color: #589bda +menu.title.text.color: #ffffff +menu.title.text.justify: Center + +# on screen display (window-cycle dialog) +osd.bg.color: #e1dedb +osd.border.color: #000000 +osd.border.width: 1 +osd.label.text.color: #000000 + +# width can be set as percent (of screen width) +# example 50% or 75% instead of 600, max 100% +osd.window-switcher.width: 600 + +osd.window-switcher.padding: 4 +osd.window-switcher.item.padding.x: 10 +osd.window-switcher.item.padding.y: 1 +osd.window-switcher.item.active.border.width: 2 +osd.window-switcher.preview.border.width: 1 +osd.window-switcher.preview.border.color: #dddda6,#000000,#dddda6 + +osd.workspace-switcher.boxes.width: 20 +osd.workspace-switcher.boxes.height: 20 + +# Default values for following options change depending on the rendering +# backend. For software-based renderers, *.bg.enabled is "no" and +# *.border.enabled is "yes" if not set. For hardware-based renderers, +# *.bg.enabled is "yes" and *.border.enabled is "no" if not set. +# Setting *.bg.enabled to "yes" for software-based renderer with translucent +# background color may severely impact performance. +# +# snapping.overlay.region.bg.enabled: +# snapping.overlay.edge.bg.enabled: +# snapping.overlay.region.border.enabled: +# snapping.overlay.edge.border.enabled: + +snapping.overlay.region.bg.color: #8080b380 +snapping.overlay.edge.bg.color: #8080b380 +snapping.overlay.region.border.width: 1 +snapping.overlay.edge.border.width: 1 +snapping.overlay.region.border.color: #dddda6,#000000,#dddda6 +snapping.overlay.edge.border.color: #dddda6,#000000,#dddda6 diff --git a/config/mabox-labwc/README b/config/mabox-labwc/README new file mode 100644 index 0000000..c90c047 --- /dev/null +++ b/config/mabox-labwc/README @@ -0,0 +1,11 @@ +Config layout for ~/.config/labwc/ +- autostart +- environment +- menu.xml +- rc.xml +- shutdown +- themerc-override +- xinitrc + +See `man labwc-config and `man labwc-theme` for further details. + diff --git a/config/mabox-labwc/autostart b/config/mabox-labwc/autostart new file mode 100644 index 0000000..fb3548b --- /dev/null +++ b/config/mabox-labwc/autostart @@ -0,0 +1,34 @@ +# Example autostart file + +# Set background color. +swaybg -c '#113344' >/dev/null 2>&1 & + +# Configure output directives such as mode, position, scale and transform. +# Use wlr-randr to get your output names +# Example ~/.config/kanshi/config below: +# profile { +# output HDMI-A-1 position 1366,0 +# output eDP-1 position 0,0 +# } +#kanshi >/dev/null 2>&1 & + +# 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 & + +# Lock screen after 5 minutes; turn off display after another 5 minutes. +# +# Note that in the context of idle system power management, it is *NOT* a good +# idea to turn off displays by 'disabling outputs' for example by +# `wlr-randr --output --off` because this re-arranges views +# (since a837fef). Instead use a wlr-output-power-management client such as +# https://git.sr.ht/~leon_plickat/wlopm +swayidle -w \ + timeout 300 'swaylock -f -c 000000' \ + timeout 600 'wlopm --off \*' \ + resume 'wlopm --on \*' \ + before-sleep 'swaylock -f -c 000000' >/dev/null 2>&1 & diff --git a/config/mabox-labwc/environment b/config/mabox-labwc/environment new file mode 100644 index 0000000..f9c59b1 --- /dev/null +++ b/config/mabox-labwc/environment @@ -0,0 +1,77 @@ +## +## Example ~/.config/labwc/environment file. +## 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 a variant layout is needed, the syntax is layout(variant) +## 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=se +# XKB_DEFAULT_LAYOUT=se,us(intl) +# XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle +# XKB_DEFAULT_OPTIONS=grp:shift_caps_toggle + +## +## Set cursor theme and size. Find system icons themes with: +## `find /usr/share/icons/ -type d -name "cursors"` +## + +# XCURSOR_THEME=breeze_cursors +# XCURSOR_THEME=capitaine-cursors +# XCURSOR_SIZE=24 + +## +## Disable hardware cursors. Most users would not want to do this, but if you +## are experiencing issues with disappearing cursors, this might fix it. +## + +# WLR_NO_HARDWARE_CURSORS=1 + +## +## In order for labwc to work out of the box, the environment variable below +## is set to "1" by default to avoid menus with incorrect offset and blank +## windows with Java applications such as JetBrains and Intellij Idea. +## See https://github.com/swaywm/sway/issues/595 +## labwc will not override any already set environment variables, so if you for +## some reason do not want this, then just set it to "0" (not recommended, but +## mentioned here for completeness). +## + +# _JAVA_AWT_WM_NONREPARENTING=0 + +## +## This allows xdg-desktop-portal-wlr to function (e.g. for screen-recording). +## It is automatically set to "labwc:wlroots" by labwc though, so it is only +## included here for completeness. Again, labwc will not over-write an +## already set environment variable, so if you need it set to something else, +## then uncomment and adjust. +## + +# XDG_CURRENT_DESKTOP=labwc:wlroots + +## +## This causes a virtual output to be created automatically whenever there +## are no outputs around. This helps for cases like wayvnc so there is always +## an output available to connect to. The name can be chosen freely but there +## must be no duplicate output names, for this reason using VIRTUAL-x or a +## physical connector name like HDMI-A-1 is not recommended as wlroots may +## want to create outputs with those names later on which would then fail. +## +## Using an output name that starts with NOOP- has the additional benefit +## that wayvnc will detect it being a virtual output and allow clients to +## resize the output to match the client resolution. +## + +# LABWC_FALLBACK_OUTPUT=NOOP-fallback + diff --git a/config/mabox-labwc/menu.xml b/config/mabox-labwc/menu.xml new file mode 100644 index 0000000..bd2f966 --- /dev/null +++ b/config/mabox-labwc/menu.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/mabox-labwc/rc.xml b/config/mabox-labwc/rc.xml new file mode 100644 index 0000000..c107834 --- /dev/null +++ b/config/mabox-labwc/rc.xml @@ -0,0 +1,689 @@ + + + + + + + + server + 0 + no + no + no + yes + + + + cascade + + + + + + + + + icon:iconify,max,close + yes + + 8 + yes + no + + sans + 10 + normal + normal + + + sans + 10 + normal + normal + + + sans + 10 + normal + normal + + + sans + 10 + normal + normal + + + sans + 10 + normal + normal + + + + + + + + + + + + + + + + + + 20 + 20 + + 20 + + 150 + + + + + Never + + yes + + + + no + yes + no + + + + + 1 + + + + yes + always + + + + + 1000 + + Default + + + + + + + + + + + + + + + + + + + + + + on + global + 25 + 600 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 500 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + yes + + + + + + + + + 1.0 + + + + + + + 250 + + + + + 400 + 400 + 2.0 + 0.2 + true + + + diff --git a/config/mabox-labwc/shutdown b/config/mabox-labwc/shutdown new file mode 100644 index 0000000..970eaa2 --- /dev/null +++ b/config/mabox-labwc/shutdown @@ -0,0 +1,4 @@ +# Example shutdown file + +# This file is executed as a shell script when labwc is preparing to terminate itself. +# For further details see labwc-config(5). diff --git a/config/mabox-labwc/themerc b/config/mabox-labwc/themerc new file mode 100644 index 0000000..1ab3934 --- /dev/null +++ b/config/mabox-labwc/themerc @@ -0,0 +1,115 @@ +# This file contains all themerc options with default values +# +# System-wide and local themes can be overridden by creating a copy of this +# file and renaming it to $HOME/.config/labwc/themerc-override. Be careful +# though - if you only want to override a small number of specific options, +# make sure all other lines are commented out or deleted. + +# general +border.width: 1 + +# +# The global padding.{width,height} of openbox are not supported because +# the default labwc button geometry deviates from that of openbox +# +window.titlebar.padding.width: 0 +window.titlebar.padding.height: 0 + +# window border +window.active.border.color: #aaaaaa +window.inactive.border.color: #aaaaaa + +# ToggleKeybinds status indicator +window.active.indicator.toggled-keybind.color: #ff0000 + +# window titlebar background +window.active.title.bg.color: #e1dedb +window.inactive.title.bg.color: #f6f5f4 + +# window titlebar text +window.active.label.text.color: #000000 +window.inactive.label.text.color: #000000 +window.label.text.justify: center + +# window button width and spacing +window.button.width: 26 +window.button.height: 26 +window.button.spacing: 0 + +# window button hover effect +window.button.hover.bg.corner-radius: 0 + +# window buttons +window.active.button.unpressed.image.color: #000000 +window.inactive.button.unpressed.image.color: #000000 + +# window drop-shadows +window.active.shadow.size: 60 +window.inactive.shadow.size: 40 +window.active.shadow.color: #00000060 +window.inactive.shadow.color: #00000040 + +# Note that "menu", "iconify", "max", "close" buttons colors can be defined +# individually by inserting the type after the button node, for example: +# +# window.active.button.iconify.unpressed.image.color: #333333 + +# menu +menu.overlap.x: 0 +menu.overlap.y: 0 +menu.width.min: 20 +menu.width.max: 200 +menu.border.width: 1 +menu.border.color: #aaaaaa +menu.items.bg.color: #fcfbfa +menu.items.text.color: #000000 +menu.items.active.bg.color: #e1dedb +menu.items.active.text.color: #000000 +menu.items.padding.x: 7 +menu.items.padding.y: 4 +menu.separator.width: 1 +menu.separator.padding.width: 6 +menu.separator.padding.height: 3 +menu.separator.color: #888888 +menu.title.bg.color: #589bda +menu.title.text.color: #ffffff +menu.title.text.justify: Center + +# on screen display (window-cycle dialog) +osd.bg.color: #e1dedb +osd.border.color: #000000 +osd.border.width: 1 +osd.label.text.color: #000000 + +# width can be set as percent (of screen width) +# example 50% or 75% instead of 600, max 100% +osd.window-switcher.width: 600 + +osd.window-switcher.padding: 4 +osd.window-switcher.item.padding.x: 10 +osd.window-switcher.item.padding.y: 1 +osd.window-switcher.item.active.border.width: 2 +osd.window-switcher.preview.border.width: 1 +osd.window-switcher.preview.border.color: #dddda6,#000000,#dddda6 + +osd.workspace-switcher.boxes.width: 20 +osd.workspace-switcher.boxes.height: 20 + +# Default values for following options change depending on the rendering +# backend. For software-based renderers, *.bg.enabled is "no" and +# *.border.enabled is "yes" if not set. For hardware-based renderers, +# *.bg.enabled is "yes" and *.border.enabled is "no" if not set. +# Setting *.bg.enabled to "yes" for software-based renderer with translucent +# background color may severely impact performance. +# +# snapping.overlay.region.bg.enabled: +# snapping.overlay.edge.bg.enabled: +# snapping.overlay.region.border.enabled: +# snapping.overlay.edge.border.enabled: + +snapping.overlay.region.bg.color: #8080b380 +snapping.overlay.edge.bg.color: #8080b380 +snapping.overlay.region.border.width: 1 +snapping.overlay.edge.border.width: 1 +snapping.overlay.region.border.color: #dddda6,#000000,#dddda6 +snapping.overlay.edge.border.color: #dddda6,#000000,#dddda6 diff --git a/share/wayland-sessions/mabox-labwc.desktop b/share/wayland-sessions/mabox-labwc.desktop new file mode 100644 index 0000000..756dcac --- /dev/null +++ b/share/wayland-sessions/mabox-labwc.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Mabox LabWC +Comment=A wayland stacking compositor +#Exec=sh -c "labwc -C $HOME/.config/mabox-labwc/" +Exec=mabox-labwc +Icon=labwc +Type=Application +DesktopNames=labwc;wlroots