postmarketos-ui-i3wm (#1225)

* Added a ui package for i3wm

* Added n900 specific i3wm config

* Fixed mixed tabs and spaces in i3status.

This is also the first commit made on an n900
running postmarketOS.

* Removed redundant X11

* Use lock.sh to lock the device

* Windows management improvements

* bump pkgver

* Fix device-nokia-n900 checksums

* Fixed path in the i3wm split package
This commit is contained in:
Martijn Braam 2018-02-20 11:21:03 +01:00 committed by GitHub
parent 0f371e426f
commit 481c99f50c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 154 additions and 3 deletions

View File

@ -1,6 +1,6 @@
pkgname=device-nokia-n900
pkgver=1
pkgrel=2
pkgver=2
pkgrel=0
pkgdesc="Nokia N900"
url="https://github.com/postmarketOS"
arch="noarch"
@ -8,7 +8,7 @@ license="MIT"
depends="linux-postmarketos-stable uboot-tools linux-firmware kbd kbd-bkeymaps ofono mesa-dri-swrast"
makedepends="uboot-tools kbd kbd-bkeymaps"
install="$pkgname.post-install"
subpackages="$pkgname-weston $pkgname-x11"
subpackages="$pkgname-weston $pkgname-x11 $pkgname-i3wm"
source="
deviceinfo
uboot-script.cmd
@ -22,6 +22,8 @@ source="
pointercal
asound.state
weston.ini
i3wm/i3wm.conf
i3wm/i3status.conf
$install
"
options="!check"
@ -76,6 +78,14 @@ x11() {
"$subpkgdir"/etc/X11/xorg.conf.d/40-xkb.conf
}
i3wm() {
install_if="$pkgname postmarketos-ui-i3wm"
install -D -m644 "$srcdir"/i3wm.conf \
"$subpkgdir"/etc/skel/.config/i3/config
install -D -m644 "$srcdir"/i3status.conf \
"$subpkgdir"/etc/skel/.config/i3/i3status.conf
}
sha512sums="b8b61cc2a795e59bb11318ddcaeca1c36dbe786a9925fae366c4ab639db0314fb14f5d08e52665df65fabd62db2a580fd3055b9f56f0e61313b96e185af5f79f deviceinfo
8f5b68b86f5345698114a2d70fd174699e5729f6c157659e4e57bef1dcab8c1209c13b30df6f5c2e8f31fee077039ffbc7817ca201f0745467b693e7550eaf6b uboot-script.cmd
3d55e34b95791636e44a5f41754f3d0de039dbba41f7a556d43a95c9e64afcfa930046b4b96b40020b6f196096ffba93514682927e32fa4488686fdd19c6da5a backlight-enable.sh
@ -88,4 +98,6 @@ c9ff8b5968fe94007e1139db5ae76f3ee6c214356bff297b9672276c6adb332ba2342b6ca54cf799
143c21f0b18a016d37cb44178e9daea09f128a90769b48353c03c3f245cb9b1f7e773b9ccee084973fc78ddd7a18c2642e54888a85bda7c7daecddc9a8c62eff pointercal
e023df91295fe7e410e163747d17e5b92fe3c022ff076e286778b8334368f885603b8fda65671e4a7328766da7b2552ea4df1b1399df23e504a41a6655771142 asound.state
e7749ce65de8e90b64f728f6ff695d4199cfcac31f0a7def19c46cd3cd6fba623b03202036ab99bdaec8611bfe7c787259f6f6ef7316f208a2b2fe9a7d01d22f weston.ini
bd140c57259f8788c1db49e0b85d17868d837fa094f8d3bb3dc5114b4c6ad5c184b718ceb60b920cefe6f42162477c9753d7784494b7787202c6ba57b49d5005 i3wm.conf
ea70ed51ed55ff307a6562985c8919d3e57c8bf6a4f6ab9fe5329477f0409da9424ca5c8371fb497ecfc5438c106d967f8258054725e4eb84e4a49e7f95f5dcd i3status.conf
a7ce458dd3c6d2b94639b59719ee972fe8c71781c3415f74f5340a4de1c8211853a07c29001ecbca832c471c288bed54b45c37fad05e088c197edc2bd7e7ce1b device-nokia-n900.post-install"

View File

@ -0,0 +1,42 @@
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
interval = 10
color_good = "#009900"
color_bad = "#990000"
color_degraded = "#999900"
}
order += "disk /"
order += "wireless _first_"
order += "battery all"
order += "load"
order += "tztime local"
wireless _first_ {
format_up = "W: (%quality at %essid) %ip"
format_down = "W: down"
}
battery all {
format = "%status %percentage %remaining"
}
tztime local {
format = "%Y-%m-%d %H:%M:%S"
}
load {
format = "%1min"
}
disk "/" {
format = "%avail"
}

View File

@ -0,0 +1,58 @@
font pango:monospace 8
new_window 1pixel
mode "workspace" {
bindsym Left workspace prev
bindsym Right workspace next
bindsym Shift+Left move container to workspace prev
bindsym Shift+Right move container to workspace next
bindsym q mode "command"
}
mode "command" {
bindsym t exec i3-sensible-terminal; mode "default"
bindsym d exec dmenu_run; mode "default"
bindsym q mode "default"
bindsym k kill; mode "default"
bindsym b exec netsurf
bindsym r restart
bindsym Left focus left
bindsym Right focus right
bindsym Up focus up
bindsym Down focus down
bindsym Shift+Left move left
bindsym Shift+Right move right
bindsym Shift+Up move up
bindsym Shift+Down move down
bindsym h split h
bindsym v split v
bindsym w mode "workspace"
}
# Enter command mode
bindsym Shift+space mode "command"
# This is the slidey button on the side
bindsym XF86ScreenSaver exec --no-startup-id lock.sh
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
position top
status_command i3status --conf ~/.config/i3/i3status.conf
colors {
background #000000
statusline #ffffff
separator #009900
focused_workspace #009900 #009900 #ffffff
inactive_workspace #003300 #003300 #dddddd
urgent_workspace #990000 #990000 #fffff
}
}
exec_always --no-startup-id feh --bg-scale ~/.config/i3/wallpaper.jpg

View File

@ -0,0 +1,23 @@
pkgname=postmarketos-ui-i3wm
pkgver=0.1
pkgrel=0
pkgdesc="(X11) Tiling WM (keyboard required)"
url="https://i3wm.org"
arch="noarch"
license="GPL3"
depends="xorg-server mesa-egl i3wm i3status dmenu xset lxdm xfce4-terminal"
makedepends=""
subpackages=""
install="$pkgname.post-install"
source="
$install
lock.sh
"
options="!check"
package() {
install -D -m644 "$srcdir"/lock.sh \
"$pkgdir"/usr/bin/lock.sh
}
sha512sums="f1556fa83ddecf453333d784004c28d6bd9b7cf4c5ee2c0d31d51e67f5e1fa9949a6dd4377793eeb72e619add0689208fdd497924ebefa778c349a26e57ad30a postmarketos-ui-i3wm.post-install
ae41416dc56751825a87024dfe145afcba80a1aba5152280f199dfb3f289626fc8ec6ad38d0f25b7b5e5e74edde1d560e01c71251040d195da47214c4068c702 lock.sh"

View File

@ -0,0 +1,12 @@
#!/bin/sh
FILE=~/tmp/screenoff
if [ -f $FILE ]; then
xinput set-prop 8 "Device Enabled" 1
xset dpms force on
rm ~/.screenoff
else
xset dpms force off
xinput set-prop 8 "Device Enabled" 0
touch ~/.screenoff
fi

View File

@ -0,0 +1,4 @@
#!/bin/sh
# Enable the login manager on boot
rc-update add lxdm default