From e9a63d41282d4dd894ec1228a355102945421e8c Mon Sep 17 00:00:00 2001 From: Dejvino Date: Sun, 10 Jan 2021 22:21:55 +0100 Subject: [PATCH] Install packages listed, added sway service --- README.md | 21 +++++++++++ config/.menuoptions | 7 ++++ config/sway/config | 4 +-- config/waybar/config | 11 +++++- config/waybar/style.css | 8 +++++ etc/systemd/system/sway.env | 4 +++ usr/lib/systemd/system/sway.service | 54 +++++++++++++++++++++++++++++ 7 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 config/.menuoptions create mode 100644 etc/systemd/system/sway.env create mode 100644 usr/lib/systemd/system/sway.service diff --git a/README.md b/README.md index bf33e5b..0fe4fdc 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,33 @@ Linux UI customized to resemble a Fallout Pip-Boy. To be used with the PINE64 Pi ## Install ```bash +sudo pacman -S \ + sway swaylock swayidle swaybg waybar \ + termite termite-terminfo \ + htop dialog \ + imv \ + ttf-font-awesome unicode-emoji \ + portfolio-fm \ + mplayer pavucontrol \ + xfmpc mpd mpc \ + git + git clone --recurse-submodules https://git.dejvino.cz/dejvino/PinePhoneBoyOS cd PinePhoneBoyOS ./convert_icons.sh +sudo cp -R usr/* /usr/ +sudo cp -R etc/* /etc/ + +mkdir -p ~/.config +cp config/* ~/.config/ +cp config/.dialogrc ~/.dialogrc +cp config/.menuoptions ~/.menuoptions + +sudo systemctl disable phosh || echo "Needed only if you still have phosh installed." +sudo systemctl enable --now sway ... ``` diff --git a/config/.menuoptions b/config/.menuoptions new file mode 100644 index 0000000..2cc3ef1 --- /dev/null +++ b/config/.menuoptions @@ -0,0 +1,7 @@ +termite Terminal +xfmpc "Music Player" +firefox "Web Browser" +megapixels "Camera" +portfolio-fm "File Manager" +"sudo reboot" Restart +"sudo poweroff" Shutdown diff --git a/config/sway/config b/config/sway/config index f3db8a5..ac364dc 100644 --- a/config/sway/config +++ b/config/sway/config @@ -313,8 +313,8 @@ exec "portfolio-fm" for_window [app_id="portfolio-fm"] move workspace $WINV # DATA -exec "epiphany" -for_window [app_id="epiphany"] move workspace $WDATA +exec "firefox" +for_window [app_id="firefox"] move workspace $WDATA; boarder none # MAP exec "gnome-maps" diff --git a/config/waybar/config b/config/waybar/config index f5d2353..ded5cb4 100755 --- a/config/waybar/config +++ b/config/waybar/config @@ -94,7 +94,7 @@ { "layer": "top", "position": "left", - "width": 15, + "width": 60, "output": "DSI-1", "modules-left": [ @@ -102,6 +102,7 @@ "memory", //"battery", // broken for some reason... "custom/battery", + "idle_inhibitor", "temperature", "disk", "backlight", @@ -124,6 +125,14 @@ "format": "⚛ {}" }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "custom/kill": { "on-click": "swaymsg kill", "format": "☠" diff --git a/config/waybar/style.css b/config/waybar/style.css index 8101e25..0ccefef 100755 --- a/config/waybar/style.css +++ b/config/waybar/style.css @@ -27,6 +27,7 @@ #network, #pulseaudio, #temperature, +#idle_inhibitor, #custom-battery, #custom-alsa, #custom-kill, @@ -85,6 +86,13 @@ color: red; } +#idle_inhibitor.activated { + color: orange; +} +#idle_inhibitor.deactivated { + color: green; +} + #clock.date { font-weight: bold; } diff --git a/etc/systemd/system/sway.env b/etc/systemd/system/sway.env new file mode 100644 index 0000000..0d8c288 --- /dev/null +++ b/etc/systemd/system/sway.env @@ -0,0 +1,4 @@ +MOZ_ENABLE_WAYLAND=1 +GDK_GL=gles +QT_WAYLAND_DISABLE_WINDOWDECORATION=1 +QT_QPA_PLATFORM=wayland diff --git a/usr/lib/systemd/system/sway.service b/usr/lib/systemd/system/sway.service new file mode 100644 index 0000000..f0de1d9 --- /dev/null +++ b/usr/lib/systemd/system/sway.service @@ -0,0 +1,54 @@ +[Unit] +Description=Sway Window Manager +Documentation= + +# Make sure we are started after logins are permitted. +After=systemd-user-sessions.service +# If Plymouth is used, we want to start when it is on its way out. +After=plymouth-quit-wait.service + +# D-Bus is necessary for contacting logind. Logind is required. +Wants=dbus.socket +After=dbus.socket + +# This scope is created by pam_systemd when logging in as the user. +# This directive is a workaround to a systemd bug, where the setup of the +# user session by PAM has some race condition, possibly leading to a failure. +# See README for more details. +After=session-c1.scope + +# Since we are part of the graphical session, make sure we are started before +# it is complete. +Before=graphical.target + +# Prevent starting on systems without virtual consoles +ConditionPathExists=/dev/tty0 + +[Service] +ExecStart=/usr/bin/sway +EnvironmentFile=/etc/systemd/system/sway.env +TimeoutStartSec=30 +User=1000 +PAMName=login +WorkingDirectory=~ +Restart=on-failure +RestartSec=5s + +# A virtual terminal is needed. +TTYPath=/dev/tty7 +TTYReset=yes +TTYVHangup=yes +TTYVTDisallocate=yes + +# Fail to start if not controlling the tty. +StandardInput=tty-fail +StandardOutput=journal +StandardError=journal + +# Log this user with utmp, letting it show up with commands 'w' and 'who'. +UtmpIdentifier=tty7 +UtmpMode=user + +[Install] +WantedBy=graphical.target +