aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sway-de/config/foot/foot.ini (renamed from config/linux/foot/foot.ini)0
-rw-r--r--sway-de/config/mako/config4
-rw-r--r--sway-de/config/sway/config (renamed from config/linux/sway/config)20
-rw-r--r--sway-de/config/swaylock/config (renamed from config/linux/swaylock/config)0
-rw-r--r--sway-de/config/waybar/config (renamed from config/linux/waybar/config)0
-rw-r--r--sway-de/config/waybar/style.css (renamed from config/linux/waybar/style.css)5
-rw-r--r--sway-de/config/wob/wob.ini (renamed from config/linux/wob/wob.ini)0
-rw-r--r--sway-de/config/wofi/style.css (renamed from config/linux/wofi/style.css)0
-rwxr-xr-xsway-de/install.sh56
-rwxr-xr-xsway-de/local/bin/dmenu-wl (renamed from bin/linux/dmenu-wl)0
-rwxr-xr-xsway-de/local/bin/dnf-needs-restarting (renamed from bin/linux/dnf-needs-restarting)0
-rwxr-xr-xsway-de/local/bin/setbright (renamed from bin/linux/setbright)11
-rwxr-xr-xsway-de/local/bin/setvol (renamed from bin/linux/setvol)11
-rw-r--r--sway-de/local/share/systemd/user/lxpolkit.service15
-rw-r--r--sway-de/local/share/systemd/user/mako.service19
-rw-r--r--sway-de/local/share/systemd/user/udiskie.service15
-rw-r--r--sway-de/local/share/systemd/user/wob.service13
-rw-r--r--sway-de/local/share/systemd/user/wob.socket9
18 files changed, 161 insertions, 17 deletions
diff --git a/config/linux/foot/foot.ini b/sway-de/config/foot/foot.ini
index ece9c04..ece9c04 100644
--- a/config/linux/foot/foot.ini
+++ b/sway-de/config/foot/foot.ini
diff --git a/sway-de/config/mako/config b/sway-de/config/mako/config
new file mode 100644
index 0000000..44d0f83
--- /dev/null
+++ b/sway-de/config/mako/config
@@ -0,0 +1,4 @@
+font=Noto Sans 10
+background-color=#efefef
+text-color=#4a484d
+border-color=#005289
diff --git a/config/linux/sway/config b/sway-de/config/sway/config
index 4ea5985..daca478 100644
--- a/config/linux/sway/config
+++ b/sway-de/config/sway/config
@@ -65,11 +65,6 @@ output * background ~/.local/share/backgrounds/default fill
xkb_options ctrl:nocaps
}
-### wob indicator
-
-set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock
-exec rm -f $WOBSOCK && mkfifo $WOBSOCK && tail -f $WOBSOCK | wob
-
### Key bindings
#
# Basics:
@@ -98,12 +93,12 @@ exec rm -f $WOBSOCK && mkfifo $WOBSOCK && tail -f $WOBSOCK | wob
bindsym $mod+Shift+i exec swaylock
# Media keys
- bindsym XF86AudioRaiseVolume exec ~/.local/bin/setvol up > $WOBSOCK
- bindsym XF86AudioLowerVolume exec ~/.local/bin/setvol down > $WOBSOCK
+ bindsym XF86AudioRaiseVolume exec ~/.local/bin/setvol up
+ bindsym XF86AudioLowerVolume exec ~/.local/bin/setvol down
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
- bindsym XF86MonBrightnessDown exec ~/.local/bin/setbright down > $WOBSOCK
- bindsym XF86MonBrightnessUp exec ~/.local/bin/setbright up > $WOBSOCK
+ bindsym XF86MonBrightnessDown exec ~/.local/bin/setbright down
+ bindsym XF86MonBrightnessUp exec ~/.local/bin/setbright up
#bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
#bindsym XF86MonBrightnessUp exec brightnessctl set +5%
#bindsym XF86AudioPlay exec playerctl play-pause
@@ -248,6 +243,12 @@ bar {
}
#
+# System sway config
+#
+
+include /etc/sway/config.d/*.conf
+
+#
# Apps
#
@@ -260,4 +261,3 @@ exec firefox &
bindsym $mod+comma exec PATH=~/.local/bin:$PATH /usr/bin/passmenu
-include /etc/sway/config.d/*
diff --git a/config/linux/swaylock/config b/sway-de/config/swaylock/config
index f8ceefc..f8ceefc 100644
--- a/config/linux/swaylock/config
+++ b/sway-de/config/swaylock/config
diff --git a/config/linux/waybar/config b/sway-de/config/waybar/config
index 17bade2..17bade2 100644
--- a/config/linux/waybar/config
+++ b/sway-de/config/waybar/config
diff --git a/config/linux/waybar/style.css b/sway-de/config/waybar/style.css
index 73e2d5f..3866d6f 100644
--- a/config/linux/waybar/style.css
+++ b/sway-de/config/waybar/style.css
@@ -29,9 +29,8 @@ window#waybar {
}
tooltip {
- background: alpha(#efefef, 0.95);
- border: 1px solid #5e4b4f;
- border-radius: 5px;
+ background: alpha(#fafafa, 0.95);
+ border: 1px solid #ddd;
}
tooltip label {
diff --git a/config/linux/wob/wob.ini b/sway-de/config/wob/wob.ini
index ab4ffcb..ab4ffcb 100644
--- a/config/linux/wob/wob.ini
+++ b/sway-de/config/wob/wob.ini
diff --git a/config/linux/wofi/style.css b/sway-de/config/wofi/style.css
index 5cfaf6c..5cfaf6c 100644
--- a/config/linux/wofi/style.css
+++ b/sway-de/config/wofi/style.css
diff --git a/sway-de/install.sh b/sway-de/install.sh
new file mode 100755
index 0000000..62ab544
--- /dev/null
+++ b/sway-de/install.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+#
+# Designed for Fedora Workstation
+#
+# Installs and configures sway and related tools to provide a richer
+# "desktop environment" style session. Relies on systemd for running
+# services as much as possible.
+
+set -euo pipefail
+
+while [[ $# -gt 0 ]]; do
+ case $1 in
+ --skip-packages)
+ skip_packages=1
+ shift
+ ;;
+ *)
+ shift
+ ;;
+ esac
+done
+
+if ! command -v dnf > /dev/null !! [ ! -f /etc/fedora-release ]; then
+ echo "doesn't seem to be fedora workstation"
+ exit 1
+fi
+
+if [ -z "$skip_packages" ]; then
+
+ # install rpmfusion if it's not already installed
+ repos_installed=$(dnf --cacheonly repolist | tail -n+2 | cut -f1 -d' ' | egrep -x 'rpmfusion-free|rpmfusion-nonfree' | wc -l)
+ if [ "$repos_installed" -lt "2" ]; then
+ sudo dnf install \
+ https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
+ https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
+ fi
+
+ # install packages
+ sudo dnf install \
+ sway waybar wob wofi foot lxpolkit mako cascadia-mono-pl-fonts \
+ udiskie libappindicator-gtk3 duplicity python3-b2sdk pass passmenu \
+ brightnessctl vlc unzip vim wget git zsh stow
+
+fi
+
+# use stow to install config files
+stow \
+ --verbose \
+ --dir /home/matt/.dotfiles/sway-de \
+ --target /home/matt/.config \
+ --stow config
+stow \
+ --verbose \
+ --dir /home/matt/.dotfiles/sway-de \
+ --target /home/matt/.local \
+ --stow local
diff --git a/bin/linux/dmenu-wl b/sway-de/local/bin/dmenu-wl
index 7ac2273..7ac2273 100755
--- a/bin/linux/dmenu-wl
+++ b/sway-de/local/bin/dmenu-wl
diff --git a/bin/linux/dnf-needs-restarting b/sway-de/local/bin/dnf-needs-restarting
index a080649..a080649 100755
--- a/bin/linux/dnf-needs-restarting
+++ b/sway-de/local/bin/dnf-needs-restarting
diff --git a/bin/linux/setbright b/sway-de/local/bin/setbright
index 42cd48f..7d2784a 100755
--- a/bin/linux/setbright
+++ b/sway-de/local/bin/setbright
@@ -2,6 +2,13 @@
set -euo pipefail
+wobsock="$XDG_RUNTIME_DIR/wob.sock"
+if [ ! -p "$wobsock" ]; then
+ echo $wobsock
+ echo "communication socket not found"
+ exit 2
+fi
+
current=$(brightnessctl -m info | cut -d, -f4 | tr --delete '%')
case $1 in
up)
@@ -11,7 +18,7 @@ case $1 in
new=100
fi
brightnessctl set $new% > /dev/null 2>&1
- echo $new;;
+ echo $new > $wobsock;;
down)
increment=$(( ( ( current - 1 ) % 5 ) + 1 ))
new=$(( current - increment ))
@@ -19,5 +26,5 @@ case $1 in
new=0
fi
brightnessctl set $new% > /dev/null 2>&1
- echo $new;;
+ echo $new > $wobsock;;
esac
diff --git a/bin/linux/setvol b/sway-de/local/bin/setvol
index bf9cbed..f8bb4df 100755
--- a/bin/linux/setvol
+++ b/sway-de/local/bin/setvol
@@ -2,6 +2,13 @@
set -euo pipefail
+wobsock="$XDG_RUNTIME_DIR/wob.sock"
+if [ ! -p "$wobsock" ]; then
+ echo $wobsock
+ echo "communication socket not found"
+ exit 2
+fi
+
current_volume=$(pactl get-sink-volume @DEFAULT_SINK@ | grep Volume | sed -e 's/.* \([0-9][0-9]*\)%.*/\1/')
case $1 in
up)
@@ -11,7 +18,7 @@ case $1 in
newvol=100
fi
pactl set-sink-volume @DEFAULT_SINK@ $newvol%
- echo $newvol;;
+ echo $newvol > $wobsock;;
down)
increment=$(( ( ( current_volume - 1 ) % 5 ) + 1 ))
newvol=$(( current_volume - increment ))
@@ -19,5 +26,5 @@ case $1 in
newvol=0
fi
pactl set-sink-volume @DEFAULT_SINK@ $newvol%
- echo $newvol;;
+ echo $newvol > $wobsock;;
esac
diff --git a/sway-de/local/share/systemd/user/lxpolkit.service b/sway-de/local/share/systemd/user/lxpolkit.service
new file mode 100644
index 0000000..98697d7
--- /dev/null
+++ b/sway-de/local/share/systemd/user/lxpolkit.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Simple PolicyKit authentication agent developed for LXDE
+PartOf=sway-session.target
+After=sway-session.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/lxpolkit
+ExecStop=/bin/kill -2 $MAINPID
+Restart=on-failure
+RestartSec=1
+TimeoutStopSec=10
+
+[Install]
+WantedBy=sway-session.target
diff --git a/sway-de/local/share/systemd/user/mako.service b/sway-de/local/share/systemd/user/mako.service
new file mode 100644
index 0000000..c05b06b
--- /dev/null
+++ b/sway-de/local/share/systemd/user/mako.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Lightweight Wayland notification daemon
+Documentation=man:mako(1)
+PartOf=sway-session.target
+After=sway-session.target
+
+[Service]
+Type=dbus
+BusName=org.freedesktop.Notifications
+ExecCondition=/bin/sh -c '[ -n "$WAYLAND_DISPLAY" ]'
+ExecStart=/usr/bin/mako
+ExecReload=/usr/bin/makoctl reload
+ExecStop=/bin/kill -2 $MAINPID
+Restart=on-failure
+RestartSec=1
+TimeoutStopSec=10
+
+[Install]
+WantedBy=sway-session.target
diff --git a/sway-de/local/share/systemd/user/udiskie.service b/sway-de/local/share/systemd/user/udiskie.service
new file mode 100644
index 0000000..ba7e7f0
--- /dev/null
+++ b/sway-de/local/share/systemd/user/udiskie.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Handle automounting of usb devices
+Documentation=man:udiskie(1)
+PartOf=sway-session.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/udiskie -s
+ExecStop=/bin/kill -2 $MAINPID
+Restart=on-failure
+RestartSec=1
+TimeoutStopSec=10
+
+[Install]
+WantedBy=sway-session.target
diff --git a/sway-de/local/share/systemd/user/wob.service b/sway-de/local/share/systemd/user/wob.service
new file mode 100644
index 0000000..1193b30
--- /dev/null
+++ b/sway-de/local/share/systemd/user/wob.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=A lightweight overlay volume/backlight/progress/anything bar for Wayland
+Documentation=man:wob(1)
+PartOf=sway-session.target
+After=sway-session.target
+ConditionEnvironment=WAYLAND_DISPLAY
+
+[Service]
+StandardInput=socket
+ExecStart=/usr/bin/wob
+
+[Install]
+WantedBy=sway-session.target
diff --git a/sway-de/local/share/systemd/user/wob.socket b/sway-de/local/share/systemd/user/wob.socket
new file mode 100644
index 0000000..01296d8
--- /dev/null
+++ b/sway-de/local/share/systemd/user/wob.socket
@@ -0,0 +1,9 @@
+[Socket]
+ListenFIFO=%t/wob.sock
+SocketMode=0600
+RemoveOnStop=on
+# If wob exits on invalid input, systemd should NOT shove following input right back into it after it restarts
+FlushPending=yes
+
+[Install]
+WantedBy=sockets.target