# to boot into a graphical environment
greetd
sway
+# for waybar script
+calc
# for sound
pulseaudio
# for setting console keyboard via /etc/default/keyboard
firefox-esr
# for convenience
foot
+less
sudo
vim
ack
+man-db
[terminal]
vt = 7
[default_session]
-command = "/home/plom/.on_session_start.sh"
+command = "~/.nonpath_bins/on_session_start.sh"
user = "plom"
-include /etc/sway/config
-output * background #551199 solid_color
-bindsym $mod+Shift+p exec swaynag -t warning -m 'Really exit sway/end Wayland session?' -B 'Yes, exit sway' 'swaymsg exit'
+# because these are included by /etc/sway/config for probably good reason …
+include /etc/sway/config-vars.d/*
+include /etc/sway/config.d/*
+
+# simple green background
+output * background #559911 solid_color
+
+# keyboard layout
input * xkb_layout "de"
+
+# waybar
+bar {
+ position top
+ status_command ~/.nonpath_bins/status.sh
+}
+
+# keybindings
+set $mod Mod4
+
+bindsym $mod+Return exec foot
+bindsym $mod+Shift+q kill
+bindsym $mod+Shift+p exit
+
+bindsym $mod+f fullscreen
+bindsym $mod+space focus mode_toggle
+bindsym $mod+Shift+space floating toggle
+
+bindsym $mod+Left focus left
+bindsym $mod+Down focus down
+bindsym $mod+Up focus up
+bindsym $mod+Right focus right
+
+bindsym $mod+Shift+Left move left
+bindsym $mod+Shift+Down move down
+bindsym $mod+Shift+Up move up
+bindsym $mod+Shift+Right move right
+
--- /dev/null
+#!/usr/bin/sh
+# Iinitalize anything we want in our sessions opened by greetd.
+
+# Workaround to pulseaudio daemon somehow not respecting setting these with
+# ~/.config/pulse/default.pa – note that the first pactl call also seems
+# necessary, probably for forcing some init routines without which the pacmd
+# calls that follow won't work; TODO: find cleaner solutions
+pactl list sinks > /dev/null
+pacmd set-default-sink alsa_output.platform-fef05700.hdmi.hdmi-stereo
+pacmd set-sink-volume alsa_output.platform-fef05700.hdmi.hdmi-stereo 65536
+
+# Wayland environment.
+/usr/bin/sway
--- /dev/null
+#!/bin/sh
+# see sway-bar(5) and swaybar-protocol(7)
+printf '{ "version": 1 }\n[\n'
+while true; do
+ printf ' [\n'
+ printf ' {"full_text": "%s"},\n' "$(ip -4 addr show scope global | grep -oP '(?<=inet\s)\d+(\.\d+){3}')"
+ printf ' {"full_text": "%d° C"},\n' $(calc "$(cat /sys/class/thermal/thermal_zone0/temp) // 1000")
+ printf ' {"full_text": "%.1f GHz"},\n' $(calc "$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq) / 1000000")
+ printf ' {"full_text": "%s"},\n' "$(date +'%Y-%m-%d %X')"
+ printf ' ],\n'
+ sleep 1
+done
+++ /dev/null
-#!/usr/bin/sh
-# Iinitalize anything we want in our sessions opened by greetd.
-
-# Workaround to pulseaudio daemon somehow not respecting setting these with
-# ~/.config/pulse/default.pa – note that the first pactl call also seems
-# necessary, probably for forcing some init routines without which the pacmd
-# calls that follow won't work; TODO: find cleaner solutions
-pactl list sinks > /dev/null
-pacmd set-default-sink alsa_output.platform-fef05700.hdmi.hdmi-stereo
-pacmd set-sink-volume alsa_output.platform-fef05700.hdmi.hdmi-stereo 32768
-
-# Wayland environment.
-/usr/bin/sway