Skip to content

Commit

Permalink
Expanded README with screenshots and useful programs
Browse files Browse the repository at this point in the history
Fixes wizbright#36 and resolves partially wizbright#32
  • Loading branch information
keithbowes committed Dec 29, 2023
1 parent d139b41 commit 3687099
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 12 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Waybox
An Openbox clone on Wayland (WIP)

A \*box-style (minimalist) Wayland compositor modeled largely on Openbox (WIP)

### Goals
The main goal of this project is to provide a similar feel to Openbox but on Wayland

The main goal of this project is to provide a similar feel to \*box-style window managers but on Wayland

### Contributing

Expand All @@ -29,6 +31,26 @@ ninja

After that, you should have an executable as waybox/waybox

### Screenshots

![Plain desktop with wallpaper, panel, and dock](raw/master/screenshots/emptydesktop.png)

![Showing Firefox and some of the Waybox source code](raw/master/screenshots/work.png)

![All work and no play](raw/master/screenshots/play.png)

### Useful Programs

Because \*box-style compositors are minimalist, most functionality is left to external programs. As such, Waybox only functions as a box in which you can put whatever you need. Here are some useful programs to complement Waybox if you desire:

* Panel: You can use [Waybar](https://github.com/Alexays/Waybar) or [yambar](https://codeberg.org/dnkl/yambar), similar to tint2 or fbpanel in Openbox or Fluxbox.
* Dock: You can use [Cairo Dock](https://www.glx-dock.org/) just like you did on Openbox. There's also a [port with Wayland-specific enhancements](https://github.com/dkondor/cairo-dock-core/) that you may want to try.
* Wallpaper utility: There are various utilities to set your wallpaper, each with their own advantages, including [wpaperd](https://github.com/danyspin97/wpaperd) (can select a random wallpaper from a directory), [swaybg](https://github.com/swaywm/swaybg) (can set the background color as well well as a wallpaper), and [hyprpaper](https://github.com/hyprwm/hyprpaper) (can change the wallpaper dynamically during runtime through IPC).
* Notification client: [mako](https://wayland.emersion.fr/mako/)
* [wl-clipboard](https://wayland.emersion.fr/mako/): Access the clipboard in scripts (also used by [neovim](https://neovim.io/))
* Screenshots: [grim](https://git.sr.ht/~emersion/grim) and [slurp](https://github.com/emersion/slurp)
* Screen recording: [wf-recorder](https://github.com/ammen99/wf-recorder)

### Contact
I can be found as wiz on Rizon and wizbright on Libera.
Join [#waybox](https://libera.chat/guides/connect) for discussion
48 changes: 38 additions & 10 deletions data/autostart
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,43 @@ cairo-dock &
mako &

# Load a random wallpaper
oldifs=$IFS
IFS=:
data_dirs=${XDG_DATA_DIRS:-${datadir:-/usr/share}}:${XDG_DATA_HOME:-~/.local/share}
for data_dir in $data_dirs;
do
wpdir="$data_dir/wallpapers"
test -d "$wpdir" && \
find $wpdir -name '*.jpg' -o -name '*.png' -o -name '*.svg'
done | (shuf -n 1 || tail -n 1) | xargs swaybg -c '#303030' -m fill -i &
IFS=$oldifs
get_random_wallpaper()
{
oldifs=$IFS
IFS=:
data_dirs=${XDG_DATA_DIRS:-${datadir:-/usr/share}}:${XDG_DATA_HOME:-~/.local/share}
for data_dir in $data_dirs;do
IFS=$oldifs
wpdir="$data_dir/wallpapers"
test -d "$wpdir" && \
find $wpdir -name '*.jpg' -o -name '*.png' -o -name '*.svg'
done | (shuf -n 1 || tail -n 1)
}

load_wallpaper() {
if (which hyprpaper && which socat && which wayland-info) >/dev/null 2>&1; then
hyprpaper &
HYPRPAPER_SOCKET=/tmp/hypr/.hyprpaper.sock
# Change the wallpaper every hour
while test -S $HYPRPAPER_SOCKET; do
#current_output=$(wayland-info -i wl_output | \
# grep 'name:' | tail -n 1 | cut -d : -f 2 | tr -d ' ')
random_wallpaper="$(get_random_wallpaper)"
for cmd in "preload $random_wallpaper" \
"wallpaper $current_output,$random_wallpaper" \
'unload all';
do
printf "$cmd" | socat UNIX-CONNECT:$HYPRPAPER_SOCKET -
done
[ $? -eq 0 ] && sleep 60m
done
elif which swaybg >/dev/null 2>&1; then
get_random_wallpaper | xargs swaybg -c '#303030' -m fill -i &
elif which wpaperd >/dev/null 2>&1; then
wpaperd &
fi
}

load_wallpaper &

# vim: ft=sh
6 changes: 6 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ install_data(
install_mode: 'rw-r--r--',
)

install_data(
'waybox.svg',
install_dir: get_option('prefix') / get_option('datadir') / 'icons',
install_mode: 'rw-r--r--',
)

install_data(
'waybox.desktop',
install_dir: get_option('prefix') / get_option('datadir') + '/wayland-sessions',
Expand Down
1 change: 1 addition & 0 deletions data/waybox.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Comment=An Openbox-like compositor for Wayland
Comment[de]=Ein Wayland-Compositor ähnlich zu Openbox
Comment[eo]=Komponilo de Wayland, kiu similas je Openbox
Exec=waybox
Icon=waybox
Type=Application
14 changes: 14 additions & 0 deletions data/waybox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/emptydesktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/work.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3687099

Please sign in to comment.