how to setup wob in archlinux sway
- User
how to setup wob in archlinux sway
- Assistant
Setting up WOB (a lightweight window overlay for displaying information on your desktop) in Arch Linux with the Sway window manager involves several steps. Below is a general guide to get you started.
Prerequisites
-
Arch Linux Installed: Ensure you have Arch Linux installed and configured with Sway.
-
Sway Installed: Ensure you have Sway installed. You can install it using:
sudo pacman -S sway -
Dependencies for WOB: You may need some libraries. Install the following:
sudo pacman -S git gcc make pkg-config sudo pacman -S libx11 libxrender xorg-xrdb
Step 1: Install WOB
You can install WOB from the AUR (Arch User Repository) using an AUR helper like
yay. If you don't have an AUR helper, you can install it manually.Using yay
-
First, install
yayif you haven't done so yet:sudo pacman -S yay -
Now install WOB:
yay -S wob
Manual Installation
If you prefer a manual installation, clone the WOB repository and build it:
git clone https://github.com/sirjofri/wob.git cd wob make sudo make installStep 2: Configure WOB
WOB can be configured using flags. You can create a script to manage the display of WOB using various options. Below is a basic example script that you can customize:
Create a file named
wob.shin your home directory:nano ~/wob.shPaste the following example script into the file:
#!/bin/bash # Example script to run WOB # Customize the value displayed below, such as CPU or memory usage value=$(free -h | grep Mem | awk '{print $3}') max=$(free -h | grep Mem | awk '{print $2}') echo -e "$value / $max" | wob -x 100 -y 100 -s 50Make the script executable:
chmod +x ~/wob.shStep 3: Running WOB with Sway
You can integrate WOB into your Sway session by modifying your Sway config file.
-
Open your Sway configuration file located at
~/.config/sway/config. -
Add the following line to run your
wob.shscript:
exec --no-startup-id ~/wob.sh- Save the file and restart Sway (usually by pressing
$mod+Shift+eand confirming).
Step 4: Customizing WOB
You can customize how WOB looks and behaves through its command-line options. Some useful options include:
-x Xand-y Y: to position WOB on the screen.-s SIZE: to set the size of the WOB window.--bg-colorand--fg-color: to set background and foreground colors.
For more detailed usage, you can run:
man wobConclusion
With these steps, you should have WOB running under Sway on your Arch Linux installation. You can customize the output to show whatever information you need. Adjust your script accordingly for other metrics (like CPU usage, battery status, etc.) depending on your requirements.
-