sway-git build script for latest wayland wm
#1
greetings,

sway is an i3wm replacement window manager for wayland, and my preferred ui. here's a build script for sway-git. working on debian sid arm64.

providing these build scripts as how-tos. the combination of linux 5.5, mesa-git and sway-git works exceptionally well on the pbp, which leverages the latest panfrost graphics and wayland.

after installing sway-git, consider these post-install recommendations:
  • copy sway/config.in to ~/.config/sway/config if you are starting from scratch
  • change $term to your preferred terminal (i use termit)
  • choose your background image
  • uncomment the swayidle block and configure to your liking
  • use the example trackpad input block below
  • comment/disable swaybar and "exec waybar" at the bottom of the config to use waybar instead
  • consider adding the included custom settings at the bottom of your file
  • (additional software referenced is grim light waybar blueman network-manager-gnome pasystray)

pbp trackpad:
Quote:input "9610:30:HAILUCK_CO.,LTD_USB_KEYBOARD_Touchpad" {
       dwt enabled
       tap enabled
       natural_scroll enabled
       middle_emulation enabled
   }

custom settings
Quote:# DEFAULT MOD BINDINGS FOR REFERENCE
# mod+a focus parent
# mod+b splith
# mod+d menu
# mod+e layout toggle split
# mod+f fullscreen
# mod+h focus left
# mod+j focus down
# mod+k focus up
# mod+l focus right
# mod+r resize
# mod+s layout stacking
# mod+v slitv
# mod+w layout tabbed
# mod+Shift+c reload config
# mod+Shift+e exit
# mod+Shift+q kill
 
# CUSTOM KEYBINDS
bindsym $mod+g exec grim -t png ~/Screenshots/screenshot-`date +%Y%m%d.%H%M%S`.png
bindsym $mod+Shift+s exec systemctl suspend
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86MonBrightnessDown exec light -A 5%
bindsym XF86MonBrightnessUp exec light -U 5%
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
 
# LAUNCH AT STARTUP 
exec waybar
exec blueman-applet
exec nm-applet --indicator
exec pasystray

dependencies:
Quote:sudo apt-get -y install build-essential ccache meson cmake git \
wayland-protocols libwayland-dev libwayland-egl-backend-dev \
libgles2-mesa-dev libegl1-mesa-dev libdrm-dev libgbm-dev \
libinput-dev libxkbcommon-dev libudev-dev libpixman-1-dev \
libx11-xcb-dev libxcb-xinput-dev libxcb-xfixes0-dev \
libxcb-composite0-dev libxcb-xrender0-dev libpcap-dev \ 
libsystemd-dev libxcb-icccm4-dev libpng-dev libavutil-dev \
libavcodec-dev libavformat-dev \
libjson-c-dev libpcre3-dev libcairo2-dev libpango1.0-dev \
libgdk-pixbuf2.0-dev libevdev-dev libinput-dev \
bash-completion fish scdoc \
libpam-dev libcrypt-dev

build script:
Quote:#!/bin/sh
 
### v0.20200205.2251
## BUILD SWAY FROM GIT
 
# VARS
DEVDIR=~/Development/UPSTREAM/SWAY
 
# PREP
mkdir -p $DEVDIR &&\
cd $DEVDIR &&\
 
# GIT
for dir in wlroots sway swaybg swayidle swaylock;do \
test -d $dir || git clone --depth=1 https://github.com/swaywm/$dir.git;
done &&\
 
# UPDATE (RERUN)
for dir in wlroots sway swaybg swayidle swaylock;do \
cd $dir && git clean -f && git reset --hard && git pull && cd ..;
done &&\
 
# BUILD AND INSTALL
for dir in wlroots sway swaybg swayidle swaylock;do \
cd $dir &&\
rm -Rf pbp-build &&\
meson pbp-build -Dprefix=/usr/local -Dbuildtype=release &&\
ninja -C pbp-build &&\
sudo ninja -C pbp-build install &&\
cd ..;
done &&\
sudo ldconfig;
 
# EXIT
exit
 
# ENJOY
#2
Great, thanks a lot for sharing; will try it in a few days. I'm using I3 but would like to check how wayland performes; the PBP seems like a good benchmark device.
#3
not sure who is using THE BEST WM FOR PBP Wink but just wanted to share projects that I've added to my setup:

wlogout: (logout selection prompt)
https://github.com/ArtsyMacaw/wlogout
config: bindsym $mod+Shift+e exec wlogout

dmenu-wayland: (wayland dmenu replacement)
https://github.com/nyyManni/dmenu-wayland
config: set $menu dmenu-wl_run -i


Possibly Related Threads…
Thread Author Replies Views Last Post
  kernel build script for latest mainline manjaro kernel xmixahlx 42 64,450 07-11-2020, 09:01 PM
Last Post: xmixahlx
  mesa-git build script for latest panfrost xmixahlx 28 52,120 06-11-2020, 11:16 PM
Last Post: xmixahlx
  openarena build script xmixahlx 4 7,342 03-20-2020, 10:25 PM
Last Post: xmixahlx
  i3blocks Manjaro battery status script Gerhard 0 3,143 01-05-2020, 02:35 PM
Last Post: Gerhard

Forum Jump:


Users browsing this thread: 2 Guest(s)