summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrIng2015-12-09 01:02:42 +0100
committerCyrIng2015-12-09 01:02:42 +0100
commitbcdc029d98d2bb7801824488d9c4b49cdd9aaf66 (patch)
tree4878f6e2115cba218e2440cf2ed8cda697a571a1
parent7b2d9a6844db2e140c17ce9cc1d6103e7a3cf508 (diff)
downloadaur-bcdc029d98d2bb7801824488d9c4b49cdd9aaf66.tar.gz
Twm for XFreq
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD19
-rwxr-xr-xXsession9
-rw-r--r--twm-xfreq.Xresources10
-rw-r--r--twm-xfreq.desktop7
-rw-r--r--twm-xfreq.rc179
-rwxr-xr-xxdm-xfreq.rc2
7 files changed, 227 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 993988b68877..79bab80d840d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = xdm-xfreq
pkgdesc = A customized XDM for XFreq
- pkgver = 0.7
+ pkgver = 0.8
pkgrel = 1
url = http://github.com/cyring/xdm-xfreq
install = xdm-xfreq.install
@@ -15,10 +15,14 @@ pkgbase = xdm-xfreq
optdepends = scrot
optdepends = imagemagick
optdepends = xorg-xsetroot
+ optdepends = xorg-twm
optdepends = numlockx
+ optdepends = xdg-utils
backup = etc/xdm-xfreq/Xresources
backup = etc/xdm-xfreq/xdm-xfreq.rc
backup = etc/xdm-xfreq/xdm-config
+ backup = etc/xdm-xfreq/twm-xfreq.rc
+ backup = etc/xdm-xfreq/twm-xfreq.Xresources
source = xdm-config
source = Xsetup
source = Xstartup
@@ -27,6 +31,12 @@ pkgbase = xdm-xfreq
source = xdm-xfreq.rc
source = xdm-xfreq-xdesktops
source = xdm-xfreq.service
+ source = twm-xfreq.desktop
+ source = twm-xfreq.rc
+ source = twm-xfreq.Xresources
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
md5sums = SKIP
md5sums = SKIP
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index e66a667b6433..1028b96bfd6d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,19 @@
# Maintainer: CyrIng <xfreq[at]cyring[dot]fr>
# Contributor: CyrIng <xfreq[at]cyring[dot]fr>
pkgname=xdm-xfreq
-pkgver=0.7
+pkgver=0.8
pkgrel=1
pkgdesc="A customized XDM for XFreq"
arch=(any)
license=('GPL')
url="http://github.com/cyring/xdm-xfreq"
depends=('xorg-xdm' 'xorg-xclock' 'xorg-xmessage' 'xorg-xdpyinfo' 'gawk')
-optdepends=('xfreq-git' 'scrot' 'imagemagick' 'xorg-xsetroot' 'numlockx')
+optdepends=('xfreq-git' 'scrot' 'imagemagick' 'xorg-xsetroot' 'xorg-twm' 'numlockx' 'xdg-utils')
backup=(etc/xdm-xfreq/Xresources
etc/xdm-xfreq/xdm-xfreq.rc
- etc/xdm-xfreq/xdm-config)
+ etc/xdm-xfreq/xdm-config
+ etc/xdm-xfreq/twm-xfreq.rc
+ etc/xdm-xfreq/twm-xfreq.Xresources)
install=xdm-xfreq.install
source=(xdm-config
Xsetup
@@ -20,7 +22,10 @@ source=(xdm-config
Xsession
xdm-xfreq.rc
xdm-xfreq-xdesktops
- xdm-xfreq.service)
+ xdm-xfreq.service
+ twm-xfreq.desktop
+ twm-xfreq.rc
+ twm-xfreq.Xresources)
md5sums=('SKIP'
'SKIP'
'SKIP'
@@ -28,15 +33,19 @@ md5sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
'SKIP')
package() {
mkdir -p ${pkgdir}/etc/xdm-xfreq
- cp Xresources xdm-xfreq.rc xdm-config ${pkgdir}/etc/xdm-xfreq
+ cp Xresources xdm-xfreq.rc xdm-config twm-xfreq.rc twm-xfreq.Xresources ${pkgdir}/etc/xdm-xfreq
chmod 0755 ${pkgdir}/etc/xdm-xfreq/xdm-xfreq.rc
mkdir -p ${pkgdir}/etc/X11/xdm/xdm-xfreq
cp Xsession Xsetup Xstartup ${pkgdir}/etc/X11/xdm/xdm-xfreq
chmod 0755 ${pkgdir}/etc/X11/xdm/xdm-xfreq/{Xsession,Xsetup,Xstartup}
install -Dm755 ${srcdir}/xdm-xfreq-xdesktops ${pkgdir}/usr/lib/systemd/scripts/xdm-xfreq-xdesktops
install -Dm0644 ${srcdir}/xdm-xfreq.service ${pkgdir}/usr/lib/systemd/system/xdm-xfreq.service
+ install -Dm0644 ${srcdir}/twm-xfreq.desktop ${pkgdir} ${pkgdir}/usr/share/xsessions/twm-xfreq.desktop
}
diff --git a/Xsession b/Xsession
index c1c609444061..ff555f98237e 100755
--- a/Xsession
+++ b/Xsession
@@ -6,11 +6,8 @@ case $# in
0)
session_argument="userhome"
;;
-1)
- session_argument=$1
-;;
*)
- session_argument="failsafe"
+ session_argument=$*
;;
esac
@@ -58,6 +55,10 @@ failsafe)
exec /usr/bin/xterm -name login
;;
*)
+ resources=$HOME/.Xresources
+ if [ -r "$resources" ]; then
+ /usr/bin/xrdb -load "$resources"
+ fi
exec /bin/sh -ls -c "$session_argument"
;;
esac
diff --git a/twm-xfreq.Xresources b/twm-xfreq.Xresources
new file mode 100644
index 000000000000..d66961e59c67
--- /dev/null
+++ b/twm-xfreq.Xresources
@@ -0,0 +1,10 @@
+Xmessage*borderWidth:1
+Xmessage*Command.highlightThickness:1
+Xmessage*Command.internalWidth:12
+Xmessage*Command.internalHeight:4
+Xmessage*Command.shapeStyle:rectangle
+Xmessage*message.scrollVertical:never
+Xmessage*message.scrollHorizontal:never
+Xmessage*Text.borderWidth:0
+
+XTerm*vt100.allowBoldFonts:false
diff --git a/twm-xfreq.desktop b/twm-xfreq.desktop
new file mode 100644
index 000000000000..56649196f78c
--- /dev/null
+++ b/twm-xfreq.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Twm for XFreq
+Comment=Tab Window Manager
+Exec="xrdb -load /etc/xdm-xfreq/twm-xfreq.Xresources; twm -f /etc/xdm-xfreq/twm-xfreq.rc"
+Icon=twm
+Type=XSession
diff --git a/twm-xfreq.rc b/twm-xfreq.rc
new file mode 100644
index 000000000000..76edd9c15dc8
--- /dev/null
+++ b/twm-xfreq.rc
@@ -0,0 +1,179 @@
+#
+BorderWidth 1
+ButtonIndent 2
+# ClientBorderWidth
+DecorateTransients
+# ForceIcons
+FramePadding 1
+IconFont "-misc-fixed-*-*-*-*-15-*-*-*-*-*-*-*"
+IconBorderWidth 1
+IconifyByUnmapping
+IconBorderWidth 1
+# IconDirectory "/usr/share/icons"
+IconFont "-misc-fixed-*-*-*-*-14-110-*-*-*-*-*-*"
+IconRegion "=160x1024+0+64" North West 5 10
+IconRegion "=160x1024-0+64" North East 5 10
+IconManagerDontShow { "Clock" "PopUp" }
+IconManagerGeometry "2384x32+0+0" 16
+IconManagerFont "-misc-fixed-*-*-*-*-14-110-*-*-*-*-*-*"
+NoGrabServer
+NoHighlight
+NoTitle { "TWM Icon Manager" "Clock" "PopUp"}
+MenuBorderWidth 1
+MenuFont "-misc-fixed-*-*-*-*-15-*-*-*-*-*-*-*"
+OpaqueMove
+RandomPlacement
+ResizeFont "-misc-fixed-*-*-*-*-12-*-*-*-*-*-*-*"
+RestartPreviousState
+ShowIconManager
+SqueezeTitle
+TitleButtonBorderWidth 1
+TitleFont "-misc-fixed-*-*-*-*-14-110-*-*-*-*-*-*"
+TitlePadding 8
+
+Color
+{
+ BorderColor "chocolate"
+ {
+# "Clock" "#dfdfdf"
+ "PopUp" "#2a0308"
+ "TWM Icon Manager" "#2a0308"
+ }
+ BorderTileBackground "#2a0308"
+ BorderTileForeground "chocolate"
+ DefaultBackground "#2a0308"
+ DefaultForeground "#dfdfdf"
+ TitleBackground "#2a0308"
+ TitleForeground "#dfdfdf"
+ MenuBackground "#2a0308"
+ MenuForeground "#dfdfdf"
+ MenuBorderColor "chocolate"
+ MenuShadowColor "#2a0308"
+ MenuTitleBackground "#2a0308"
+ MenuTitleForeground "#efefef"
+ IconBackground "#2a0308"
+ IconForeground "#dfdfdf"
+ IconBorderColor "chocolate"
+ IconManagerBackground "#2a0308"
+ IconManagerForeground "#dfdfdf"
+ IconManagerHighlight "#efefef"
+}
+
+#
+# Motion-based actions.
+#
+MoveDelta 3
+Function "move-or-lower" { f.move f.deltastop f.lower }
+Function "move-or-raise" { f.move f.deltastop f.raise }
+Function "move-or-iconify" { f.move f.deltastop f.iconify }
+Function "raise-and-focus" { f.raise f.focus }
+Function "raise-and-move" { f.raise f.move }
+Function "raise-and-resize" { f.raise f.resize }
+Function "run-app" { f.exec "dmenu_run -b -nb '#2a0308' -nf white -sb chocolate" }
+
+#
+# Mouse buttons bindings.
+#
+Button1 = : root : f.menu "leftops"
+Button2 = : root : f.menu "TwmWindows"
+Button3 = : root : f.menu "rightops"
+Button4 = : root : f.warpring "prev"
+Button5 = : root : f.warpring "next"
+
+Button1 = : window : f.raise
+
+Button1 = m : window|icon : f.function "move-or-lower"
+Button2 = m : window|icon : f.iconify
+Button3 = m : window|icon : f.function "move-or-raise"
+
+Button1 = : title : f.function "move-or-raise"
+Button2 = : title : f.raiselower
+
+Button1 = : icon : f.function "move-or-iconify"
+Button2 = : icon : f.iconify
+
+Button1 = : iconmgr : f.iconify
+Button2 = : iconmgr : f.iconify
+
+Button1 = : frame : f.function "raise-and-move"
+Button1 = c : frame : f.function "raise-and-resize"
+
+#
+# Keyboard bindings.
+#
+"F1" = : all : f.function "run-app"
+"r" = c : all : f.function "run-app"
+
+#
+# Menus
+#
+menu "winops"
+{
+"" f.nop
+"Iconify" f.iconify
+"Resize" f.resize
+"Move" f.move
+"Raise" f.raise
+"Lower" f.lower
+"" f.nop
+"Focus" f.focus
+"Unfocus" f.unfocus
+"Show Iconmgr" f.showiconmgr
+"Hide Iconmgr" f.hideiconmgr
+"" f.nop
+"Kill" f.destroy
+"Delete" f.delete
+"" f.nop
+}
+
+menu "sysops"
+{
+"" f.nop
+"Sleep" f.exec "systemctl suspend"
+"Hibernate" f.exec "systemctl hibernate"
+"Hybrid-sleep" f.exec "systemctl hybrid-sleep"
+"" f.nop
+"Rescue" f.exec "(xmessage -buttons Rescue:11,Cancel:99 -default Cancel -timeout 30 -fg '#dfdfdf' -bg '#2a0308' -bd chocolate -geometry -16-32 -fn -misc-fixed-*-*-*-*-15-*-*-*-*-*-*-* -name PopUp 'Enter rescue mode ?';if [[ $? == 11 ]]; then systemctl rescue; fi) &"
+"Reboot" f.exec "(xmessage -buttons Reboot:11,Cancel:99 -default Cancel -timeout 30 -fg '#dfdfdf' -bg '#2a0308' -bd chocolate -geometry -16-32 -fn -misc-fixed-*-*-*-*-15-*-*-*-*-*-*-* -name PopUp 'Shut down and reboot the system ?';if [[ $? == 11 ]]; then systemctl reboot; fi) &"
+"PowerOff" f.exec "(xmessage -buttons PowerOff:11,Cancel:99 -default Cancel -timeout 30 -fg '#dfdfdf' -bg '#2a0308' -bd chocolate -geometry -16-32 -fn -misc-fixed-*-*-*-*-15-*-*-*-*-*-*-* -name PopUp 'Shut down and power-off the system ?';if [[ $? == 11 ]]; then systemctl poweroff; fi) &"
+"" f.nop
+}
+
+menu "twmops"
+{
+"" f.nop
+"Restart" f.restart
+"Quit" f.quit
+"" f.nop
+}
+
+menu "leftops"
+{
+"Computer" f.title
+"" f.nop
+"Window" f.menu "winops"
+"System" f.menu "sysops"
+"Manager" f.menu "twmops"
+"" f.nop
+}
+
+menu "termops"
+{
+"" f.nop
+"96x30-18px" f.exec "exec xterm -bg black -fg white -geometry 96x30 -fn -misc-fixed-medium-*-*-*-18-*-*-*-*-*-*-* -name Terminal &"
+"96x30-15px" f.exec "exec xterm -bg black -fg white -geometry 96x30 -fn -misc-fixed-medium-*-*-*-15-*-*-*-*-*-*-* -name Terminal &"
+"80x25-12px" f.exec "exec xterm -bg black -fg white -geometry 80x25 -fn -misc-fixed-medium-*-*-*-12-*-*-*-*-*-*-* -name Terminal &"
+"" f.nop
+}
+
+menu "rightops"
+{
+"Applications" f.title
+"" f.nop
+"Run..." f.function "run-app"
+"XFreq" f.exec "xfreq-gui -D 0 -f 0x994c00 -l 1 -g 0:0x0+640-64,1:0x0-64+64,2:0x0+64+64,3:0x0+640+64,4:0x0+64-64,5:0x0-64-136 &"
+"Clock" f.exec "xclock -digital -twentyfour -update 1 -strftime '%a %e %b %H:%M:%S' -bg '#2a0308' -fg white -geometry 175x26-0+0 -fa DejaVuSans-9:bold -name Clock &"
+"Terminal" f.menu "termops"
+"Internet" f.exec "$(grep -w 'Exec' /usr/share/applications/$(xdg-settings get default-web-browser)|cut -d '=' -f 2) &"
+"" f.nop
+}
diff --git a/xdm-xfreq.rc b/xdm-xfreq.rc
index 1edb70ac6446..f23dcef1755f 100755
--- a/xdm-xfreq.rc
+++ b/xdm-xfreq.rc
@@ -12,7 +12,7 @@ XDM_XFREQ_SCREEN_SET_ARGS="dpms"
# Background color
XDM_XFREQ_BG_COLOR_PATH=xsetroot
-XDM_XFREQ_BG_COLOR_ARGS="-solid darkred"
+XDM_XFREQ_BG_COLOR_ARGS="-solid '#2a0308'"
# Background picture
# XDM_XFREQ_BG_WALLPAPER_PATH=display