Compare commits

...

7 commits

Author SHA1 Message Date
65df525742 Disable default wallpaper
It is not available on NixOS.

One can use the custom config file to provide one for the setup.
2023-01-21 23:30:49 +01:00
66a227164d Use waybar as status bar
It's easier to configure and works better than my clonky status.sh
script.
2023-01-21 23:27:38 +01:00
17f155a771 Switch to wofi as app menu
It's made for wayland and as first class sway support.
2023-01-21 23:25:10 +01:00
3caf85a01f Switch to foot as terminal emulator
It's the new default on sway and it's lighter than alacritty regarding
ressources.
2023-01-21 23:21:52 +01:00
d538d45c4b Move loading the default config to the top
We want to first load the default configuration an then to customize it.
In case they introduce a new feature, it will use the default
configuration.
2023-01-21 23:18:21 +01:00
5dd4c5ef3e Remove header comment
This comment was originally copied from the default config.
2023-01-21 23:16:03 +01:00
3e31948931 Add waybar configuration 2023-01-21 23:12:05 +01:00
5 changed files with 225 additions and 21 deletions

View file

@ -6,8 +6,8 @@ Meine `sway` configuration.
- pamixer - pamixer
- pulseaudio - pulseaudio
- pavucontrol - pavucontrol
- dmenu - wofi
- alacritty - foot
- sway - sway
- swaylock - swaylock
- swayidle - swayidle
@ -16,6 +16,7 @@ Meine `sway` configuration.
- mako - mako
- upower - upower
- networkmanager - networkmanager
- waybar
// AUR // AUR
- wob // https://github.com/francma/wob import gpg key - wob // https://github.com/francma/wob import gpg key

View file

@ -1,14 +1,12 @@
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference. # Read `man 5 sway` for a complete reference.
include /etc/sway/config.d/*
# Starup # Starup
# Create a pipe for wob # Create a pipe for wob
exec mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob exec mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob
exec mako --default-timeout 5000 exec mako --default-timeout 5000
exec foot -s
### Variables ### Variables
# #
@ -20,16 +18,16 @@ set $down j
set $up k set $up k
set $right l set $right l
# Your preferred terminal emulator # Your preferred terminal emulator
set $term alacritty set $term footclient
# Your preferred application launcher # Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened # Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on. # on the original workspace that the command was run on.
set $menu dmenu_path | dmenu | xargs swaymsg exec -- set $menu wofi --show run | xargs swaymsg exec --
### Output configuration ### Output configuration
# #
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill #output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# #
# Example configuration: # Example configuration:
# #
@ -239,17 +237,7 @@ bindsym Mod4+Ctrl+p exec grimshot save window
# #
# Read `man 5 sway-bar` for more information about this section. # Read `man 5 sway-bar` for more information about this section.
bar { bar {
position top swaybar_command waybar
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
status_command while ~/.config/sway/status.sh; do sleep 1; done
colors {
statusline #ffffff
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
}
} }
default_border pixel 2 default_border pixel 2
@ -260,5 +248,4 @@ gaps inner 4
smart_gaps on smart_gaps on
include /etc/sway/config.d/*
include ~/.config/sway/custom include ~/.config/sway/custom

137
waybar/config Normal file
View file

@ -0,0 +1,137 @@
// -*- mode: json -*-
{
"layer": "top",
"position": "top",
"modules-left": [
"sway/workspaces",
"custom/right-arrow-dark"
],
"modules-center": [
"custom/left-arrow-dark",
"clock#1",
"custom/left-arrow-light",
"custom/left-arrow-dark",
"clock#2",
"custom/right-arrow-dark",
"custom/right-arrow-light",
"clock#3",
"custom/right-arrow-dark"
],
"modules-right": [
"custom/left-arrow-dark",
"pulseaudio",
"custom/left-arrow-light",
"custom/left-arrow-dark",
"memory",
"custom/left-arrow-light",
"custom/left-arrow-dark",
"cpu",
"custom/left-arrow-light",
"custom/left-arrow-dark",
"battery",
"custom/left-arrow-light",
"custom/left-arrow-dark",
"disk",
"custom/left-arrow-light",
"custom/left-arrow-dark",
"tray"
],
"custom/left-arrow-dark": {
"format": "",
"tooltip": false
},
"custom/left-arrow-light": {
"format": "",
"tooltip": false
},
"custom/right-arrow-dark": {
"format": "",
"tooltip": false
},
"custom/right-arrow-light": {
"format": "",
"tooltip": false
},
"sway/workspaces": {
"disable-scroll": true,
"format": "{name}"
},
"clock#1": {
"format": "{:%a}",
"tooltip": false
},
"clock#2": {
"format": "{:%H:%M}",
"tooltip": false
},
"clock#3": {
"format": "{:%d-%m}",
"tooltip": false
},
"pulseaudio": {
"format": "{icon} {volume:2}%",
"format-bluetooth": "{icon} {volume}%",
"format-muted": "MUTE",
"format-icons": {
"headphones": "",
"default": [
"",
""
]
},
"scroll-step": 5,
"on-click": "pamixer -t",
"on-click-right": "pavucontrol"
},
"memory": {
"interval": 5,
"format": "Mem {}%"
},
"cpu": {
"interval": 5,
"format": "CPU {usage:2}%"
},
"battery": {
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-icons": [
"",
"",
"",
"",
""
]
},
"disk": {
"interval": 5,
"format": "Disk {percentage_used:2}%",
"path": "/"
},
"network": {
"interval": 1,
"interface": "wlp61s0",
"format": "{ifname}",
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr} ",
"format-disconnected": "", //An empty format will hide the module.
"tooltip-format": "{ifname} via {gwaddr} ",
"tooltip-format-wifi": "{essid} ({signalStrength}%) ",
"tooltip-format-ethernet": "{ifname} ",
"tooltip-format-disconnected": "Disconnected",
"max-length": 50
},
"tray": {
"icon-size": 20
}
}

75
waybar/style.css Normal file
View file

@ -0,0 +1,75 @@
* {
font-size: 20px;
font-family: monospace;
}
window#waybar {
background: #292b2e;
color: #fdf6e3;
}
#custom-right-arrow-dark,
#custom-left-arrow-dark {
color: #1a1a1a;
}
#custom-right-arrow-light,
#custom-left-arrow-light {
color: #292b2e;
background: #1a1a1a;
}
#workspaces,
#clock.1,
#clock.2,
#clock.3,
#pulseaudio,
#memory,
#cpu,
#battery,
#disk,
#tray {
background: #1a1a1a;
}
#workspaces button {
padding: 0 2px;
color: #fdf6e3;
}
#workspaces button.focused {
color: #268bd2;
}
#workspaces button:hover {
box-shadow: inherit;
text-shadow: inherit;
}
#workspaces button:hover {
background: #1a1a1a;
border: #1a1a1a;
padding: 0 3px;
}
#pulseaudio {
color: #268bd2;
}
#memory {
color: #2aa198;
}
#cpu {
color: #6c71c4;
}
#battery {
color: #859900;
}
#disk {
color: #b58900;
}
#clock,
#pulseaudio,
#memory,
#cpu,
#battery,
#disk {
padding: 0 10px;
}

4
waybar/update.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
mkdir -p $HOME/.config/waybar/
cp . $HOME/.config/waybar/