Compare commits

...

21 commits

Author SHA1 Message Date
Tobias Powalowski
824a86a859 start sway support 2023-07-10 21:50:01 +02:00
Tobias Powalowski
1ee47d373f start sway support 2023-07-10 21:44:52 +02:00
Tobias Powalowski
b427c171b2 start sway support 2023-07-10 21:42:51 +02:00
Tobias Powalowski
6a99512549 start sway support 2023-07-10 21:40:06 +02:00
Tobias Powalowski
6a6432935c start sway support 2023-07-10 21:28:12 +02:00
Tobias Powalowski
44bc2afd80 start sway support 2023-07-10 21:27:17 +02:00
Tobias Powalowski
cc976f2fa4 start sway support 2023-07-10 20:49:22 +02:00
Tobias Powalowski
dafaaaefe0 start sway support 2023-07-10 18:28:30 +02:00
Tobias Powalowski
9c1fd0fcf4 start sway support 2023-07-10 18:12:18 +02:00
Tobias Powalowski
0736b35144 start sway support 2023-07-10 16:59:24 +02:00
Tobias Powalowski
cc24442aa0 start sway support 2023-07-10 16:12:59 +02:00
Tobias Powalowski
d35a531c68 start sway support 2023-07-10 16:08:29 +02:00
Tobias Powalowski
5b34d46dc3 start sway support 2023-07-10 16:05:00 +02:00
Tobias Powalowski
d36dbbffdf start sway support 2023-07-10 15:46:49 +02:00
Tobias Powalowski
4237061d32 start sway support 2023-07-10 15:42:28 +02:00
Tobias Powalowski
00378225ca start sway support 2023-07-10 15:36:47 +02:00
Tobias Powalowski
fb86811c52 start sway support 2023-07-10 15:35:47 +02:00
Tobias Powalowski
24c54dc166 start sway support 2023-07-10 15:29:53 +02:00
Tobias Powalowski
7c915664d0 start sway support 2023-07-10 14:59:21 +02:00
Tobias Powalowski
c34f3a38d0 start sway support 2023-07-10 14:57:21 +02:00
Tobias Powalowski
fccb505d1a start sway support 2023-07-10 14:22:06 +02:00
2 changed files with 76 additions and 8 deletions

View file

@ -9,7 +9,9 @@ _install_sway() {
_start_sway() {
echo -e "Launching \e[1mSway\e[m now, logging is done on \e[1m/dev/tty7\e[m..."
echo -e "To relaunch \e[1mSway\e[m use: \e[92msway-wayland\e[m"
echo "MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland XDG_SESSION_TYPE=wayland exec dbus-run-session sway >/dev/tty7 2>&1" > /usr/bin/sway-wayland
echo "MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland XDG_SESSION_TYPE=wayland \
XKB_DEFAULT_LAYOUT="$(grep 'KEYMAP' /etc/vconsole.conf | cut -d '=' -f2 | sed -e 's#-.*##g')" \
exec dbus-run-session sway >/dev/tty7 2>&1" > /usr/bin/sway-wayland
chmod 755 /usr/bin/sway-wayland
sway-wayland
}

View file

@ -51,9 +51,9 @@ usage () {
_graphic_options
fi
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2500000 ]]; then
echo -e " \e[1m-sway\e[m Launch Sway desktop."
echo -e " \e[1m-xfce\e[m Launch XFCE desktop with VNC sharing enabled."
echo -e " \e[1m-custom-xorg\e[m Install custom X environment."
echo -e " \e[1m-sway\e[m Launch Sway desktop."
[[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3400000 ]] && echo -e " \e[1m-custom-wayland\e[m Install custom Wayland environment."
echo ""
fi
@ -664,23 +664,89 @@ EOF
_configure_sway() {
echo "Configuring Sway..."
echo "Enable bemenu..."
sed -i -e 's|^set $menu.*|set $menu j4-dmenu-desktop --dmenu=\x27bemenu -i --nb "#3f3f3f" --nf "#dcdccc" --fn "pango:DejaVu Sans Mono 12"\x27 --term="foot" --no-generic|g' /etc/sway/config
sed -i -e 's|^set $menu.*|set $menu j4-dmenu-desktop --dmenu=\x27bemenu -i --tf "#00ff00" --hf "#00ff00" --nf "#dcdccc" --fn "pango:Terminus 12"\x27 --no-generic --term="foot"|g' /etc/sway/config
echo "Setting wallpaper..."
sed -i -e 's|^output .*|output * bg /usr/share/archboot/grub/archboot-background.png fill|g' /etc/sway/config
echo "Setting tango theme for foot..."
grep -q '\[main\]' /etc/xdg/foot/foot.ini ||\
echo "[main]" >>/etc/xdg/foot/foot.ini
grep -q 'include=/usr/share/foot/themes/tango' /etc/xdg/foot/foot.ini||\
echo "include=/usr/share/foot/themes/tango" >>/etc/xdg/foot/foot.ini
echo "Configuring foot..."
if ! grep -q 'archboot colors' /etc/xdg/foot/foot.ini; then
cat <<EOF >> /etc/xdg/foot/foot.ini
# archboot colors
[colors]
background=000000
foreground=ffffff
## Normal/regular colors (color palette 0-7)
regular0=000000 # bright black
regular1=ff0000 # bright red
regular2=00ff00 # bright green
regular3=ffff00 # bright yellow
regular4=005fff # bright blue
regular5=ff00ff # bright magenta
regular6=00ffff # bright cyan
regular7=ffffff # bright white
## Bright colors (color palette 8-15)
bright0=000000 # bright black
bright1=ff0000 # bright red
bright2=00ff00 # bright green
bright3=ffff00 # bright yellow
bright4=005fff # bright blue
bright5=ff00ff # bright magenta
bright6=00ffff # bright cyan
bright7=ffffff # bright white
[main]
font=monospace:size=12
EOF
fi
echo "Autostarting setup..."
grep -q 'exec foot' /etc/sway/config ||\
echo "exec foot -- /usr/bin/setup" >> /etc/sway/config
if ! grep -q firefox /etc/sway/config; then
cat <<EOF >> /etc/sway/config
# from https://wiki.gentoo.org/wiki/Sway
# automatic floating
for_window [window_role = "pop-up"] floating enable
for_window [window_role = "bubble"] floating enable
for_window [window_role = "dialog"] floating enable
for_window [window_type = "dialog"] floating enable
for_window [window_role = "task_dialog"] floating enable
for_window [window_type = "menu"] floating enable
for_window [app_id = "floating"] floating enable
for_window [app_id = "floating_update"] floating enable, resize set width 1000px height 600px
for_window [class = "(?i)pinentry"] floating enable
for_window [title = "Administrator privileges required"] floating enable
# firefox tweaks
for_window [title = "About Mozilla Firefox"] floating enable
for_window [window_role = "About"] floating enable
for_window [app_id="firefox" title="Library"] floating enable, border pixel 1, sticky enable
for_window [title = "Firefox - Sharing Indicator"] kill
for_window [title = "Firefox — Sharing Indicator"] kill
EOF
fi
echo "Setup desktop file..."
cat << EOF > /usr/share/applications/archboot.desktop
[Desktop Entry]
Type=Application
Name=Archboot Setup
GenericName=Installer
Exec=foot -- /usr/bin/setup
Icon=system-software-install
EOF
_HIDE_MENU="avahi-discover bssh bvnc org.codeberg.dnkl.foot-server org.codeberg.dnkl.footclient qvidcap qv4l2"
echo "Hiding ${_HIDE_MENU} menu entries..."
for i in ${_HIDE_MENU}; do
echo "[DESKTOP ENTRY]" > /usr/share/applications/"${i}".desktop
echo 'NoDisplay=true' >> /usr/share/applications/"${i}".desktop
done
echo "Setting dialog values..."
cat <<EOF > /etc/dialogrc
border_color = (BLACK,WHITE,ON)
border2_color = (BLACK,WHITE,ON)
menubox_border_color = (BLACK,WHITE,ON)
menubox_border2_color = (BLACK,WHITE,ON)
EOF
}
_custom_wayland_xorg() {