From 4e6e0cad5ec5e9c542c2d3cc2d734a7efeeda3bb Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 17 Jan 2024 11:47:18 -0500 Subject: [PATCH] Add basic default configuration --- INSTALL.md | 25 ++++++-- defaults/Xmd/panel/10 Terminal.replicant | 4 ++ defaults/Xmd/panel/80 Battery.replicant | 2 + defaults/Xmd/panel/90 Clock.replicant | 3 + defaults/Xmd/startup/mwm.sh | 1 + defaults/Xmd/startup/panel.sh | 1 + defaults/install.sh | 5 ++ defaults/misc/.mwmrc | 74 ++++++++++++++++++++++++ defaults/misc/.xinitrc | 1 + defaults/misc/.xsession | 1 + 10 files changed, 112 insertions(+), 5 deletions(-) create mode 100644 defaults/Xmd/panel/10 Terminal.replicant create mode 100644 defaults/Xmd/panel/80 Battery.replicant create mode 100644 defaults/Xmd/panel/90 Clock.replicant create mode 100755 defaults/Xmd/startup/mwm.sh create mode 100755 defaults/Xmd/startup/panel.sh create mode 100755 defaults/install.sh create mode 100644 defaults/misc/.mwmrc create mode 100644 defaults/misc/.xinitrc create mode 100644 defaults/misc/.xsession diff --git a/INSTALL.md b/INSTALL.md index 3bbe957..11c9b88 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -47,13 +47,28 @@ in their respective subdirectories: # ./build.sh install ``` -## Session - -Xmd includes several scripts to facilitate using it as a desktop environment. It -can be installed using `./install.sh` in the `session` directory. - ## Glue Xmd includes some utility scripts to provide a standard interface for things like screenshotting. These can be installed using `./install.sh` in the `glue` directory. + +## Session + +Xmd includes several scripts to facilitate using it as a desktop environment. It +can be installed using `./install.sh` in the `session` directory. Note that +without a configuration in place, the session scripts don't really do anything +useful. The next section of this document describes how to install a default +configuration. + +## Default configuration + +A default configuration can be installed by running `./install.sh` in the +`defaults` directory. It contains: + +- An MWM configuration +- .xinitrc and .xsession files +- Default startup items + - MWM + - XMPanel +- Default panel replicants diff --git a/defaults/Xmd/panel/10 Terminal.replicant b/defaults/Xmd/panel/10 Terminal.replicant new file mode 100644 index 0000000..0a82082 --- /dev/null +++ b/defaults/Xmd/panel/10 Terminal.replicant @@ -0,0 +1,4 @@ +[Launcher] +Name=Terminal +Exec=uxterm +Icon=Terminal diff --git a/defaults/Xmd/panel/80 Battery.replicant b/defaults/Xmd/panel/80 Battery.replicant new file mode 100644 index 0000000..138a016 --- /dev/null +++ b/defaults/Xmd/panel/80 Battery.replicant @@ -0,0 +1,2 @@ +[Battery] +Interval=2 diff --git a/defaults/Xmd/panel/90 Clock.replicant b/defaults/Xmd/panel/90 Clock.replicant new file mode 100644 index 0000000..c323e76 --- /dev/null +++ b/defaults/Xmd/panel/90 Clock.replicant @@ -0,0 +1,3 @@ +[Clock] +Type=Digital +Format=%a, %b %d\n%H:%M diff --git a/defaults/Xmd/startup/mwm.sh b/defaults/Xmd/startup/mwm.sh new file mode 100755 index 0000000..e3c61ae --- /dev/null +++ b/defaults/Xmd/startup/mwm.sh @@ -0,0 +1 @@ +mwm diff --git a/defaults/Xmd/startup/panel.sh b/defaults/Xmd/startup/panel.sh new file mode 100755 index 0000000..2196fdb --- /dev/null +++ b/defaults/Xmd/startup/panel.sh @@ -0,0 +1 @@ +xmpanel diff --git a/defaults/install.sh b/defaults/install.sh new file mode 100755 index 0000000..2177f7e --- /dev/null +++ b/defaults/install.sh @@ -0,0 +1,5 @@ +#!/bin/sh +. ../scripts/flags.sh +mkdir -p ~/.Xmd +cp misc/* ~ +cp Xmd/* ~/.Xmd diff --git a/defaults/misc/.mwmrc b/defaults/misc/.mwmrc new file mode 100644 index 0000000..d9d9899 --- /dev/null +++ b/defaults/misc/.mwmrc @@ -0,0 +1,74 @@ +Menu DefaultRootMenu +{ + "Root Menu" f.title + "Terminal" f.exec "uxterm &" + "Shuffle Up" f.circle_up + "Shuffle Down" f.circle_down + "Refresh" f.refresh + "Pack Icons" f.pack_icons + no-label f.separator + "Screen Shot" f.exec "screenshot selection clipboard" + no-label f.separator + "Restart MWM" f.restart + "Quit..." f.exec "xmd-end-session" +} + +Menu DefaultWindowMenu +{ + Restore _R Shift Mod4m f.restore + Move _M Mod4g f.move + Size _S Mod4s f.resize + Minimize _n Mod4h f.minimize + Maximize _x Mod4m f.maximize + no-label f.separator + "Screen Shot" _e Alt CtrlPrint f.exec "screenshot window clipboard" + no-label f.separator + Close _C Mod4q f.kill +} + +Keys DefaultKeyBindings +{ + Mod4Escape window|icon f.post_wmenu + Mod4Tab root|icon|window f.next_key + Mod4 ShiftTab root|icon|window f.prev_key + Mod4Right root|icon|window f.next_key window + Mod4Left root|icon|window f.prev_key window + Tab icon f.next_key icon + ShiftTab icon f.prev_key icon + Right icon f.next_key icon + Left icon f.prev_key icon + Alt Shift Ctrlexclam root|icon|window f.set_behavior + Mod4 Shiftr root|icon|window f.restart + Mod4 Shiftq root|icon|window f.quit_mwm + Mod4Return root|icon|window f.exec "uxterm &" + Mod4R root|icon|window f.exec "rofi -show run &" + Mod4space root|icon|window f.exec "rofi -show drun &" + Return icon f.restore + space icon f.post_wmenu + + XF86MonBrightnessUp root|icon|window f.exec "brightnessctl s --exponent=10 +5%" + XF86MonBrightnessDown root|icon|window f.exec "brightnessctl s --exponent=10 5%-" + XF86AudioRaiseVolume root|icon|window f.exec "pamixer -i 2" + XF86AudioLowerVolume root|icon|window f.exec "pamixer -d 2" + Mod4period root|icon|window f.exec "pamixer -i 2" + Mod4comma root|icon|window f.exec "pamixer -d 2" + + Print root|icon|window f.exec "screenshot" + CtrlPrint root|icon|window f.exec "screenshot clipboard" + ShiftPrint root|icon|window f.exec "screenshot selection" + Shift CtrlPrint root|icon|window f.exec "screenshot selection clipboard" + AltPrint icon|window f.exec "screenshot window" + + Mod4grave window f.next_key icon + Mod4grave root|icon f.next_key window +} + +Buttons DefaultButtonBindings +{ + icon|frame f.raise + icon|frame f.post_wmenu + root f.menu DefaultRootMenu + Mod4 window|icon f.move + Mod4 window|icon f.lower + Mod4 window|icon f.resize +} diff --git a/defaults/misc/.xinitrc b/defaults/misc/.xinitrc new file mode 100644 index 0000000..3b8e83a --- /dev/null +++ b/defaults/misc/.xinitrc @@ -0,0 +1 @@ +. ~/.xsession diff --git a/defaults/misc/.xsession b/defaults/misc/.xsession new file mode 100644 index 0000000..2b8bd50 --- /dev/null +++ b/defaults/misc/.xsession @@ -0,0 +1 @@ +exec dbus-run-session xmd