From 59594a52d26e8504b1f275d14500141b96350e7f Mon Sep 17 00:00:00 2001 From: moson-mo Date: Mon, 11 Oct 2021 12:15:26 +0200 Subject: [PATCH 1/2] Add CI --- .github/workflows/rust.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..4dd1560 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose From fcef209fefd4579745629bd88421bdfd0a3b8344 Mon Sep 17 00:00:00 2001 From: moson-mo Date: Mon, 11 Oct 2021 14:24:28 +0200 Subject: [PATCH 2/2] amend readme; add xessions file; add autostart example --- README.md | 37 +++++++++++++++++++----- screenshot.png => assets/screenshot.png | Bin assets/worm.desktop | 6 ++++ examples/autostart | 23 +++++++++++++++ 4 files changed, 58 insertions(+), 8 deletions(-) rename screenshot.png => assets/screenshot.png (100%) create mode 100644 assets/worm.desktop create mode 100755 examples/autostart diff --git a/README.md b/README.md index aa412db..5f9ab8f 100644 --- a/README.md +++ b/README.md @@ -7,22 +7,43 @@ A floating window manager, like the \*box family of window managers as well as W Tags are a unique concept borrowed from window managers like DWM and Awesome. Instead of workspaces having windows, windows have tags. This is a very unique concept. You can view 3 separate tags at a time, or have a window on 3 separate tags. Right now only the use case of being used like workspaces is supported, but internally the foundation for tags is there; just needs to be exposed to the user with IPC support. -## Get (git) the code - a refresher if needed - -Depending on where you store your source code, go to the parent folder of your other git projects (if any), or where you want this code repo to be. +## Building +Building requires cargo/rust to be installed on your system. +Simply clone this git repository and build with cargo: ``` $ git clone https://github.com/codic12/worm +$ cd worm +$ cargo build --release ``` -## Install + +You'll find the binaries in the `target/release` directory. + +## Installing +After building, copy `worm` and `wormc` to a directory listed in the PATH variable. +(typically you'd put it into `/usr/local/bin`) + ``` -$ cargo build --release +$ sudo cp target/release/{worm,wormc} /usr/local/bin/ ``` -In the target/release directory you should find two binaries, `worm` and `wormc`. Put them somewhere in your path, and then launch as usual - whether with a display manager or via startx (~/.xinitrc). -Or, if you're running an Arch based system, check out the AUR package [worm-git](https://aur.archlinux.org/packages/worm-git/), kindly maintained by `moson`. +For those of you using a display manager, you can copy the `worm.desktop` file located in `assets` to your xsessions directoy. + +``` +$ sudo cp assets/worm.desktop /usr/share/xsessions/ +``` + +If you're running an Arch-based distribution, you can use the [worm-git](https://aur.archlinux.org/packages/worm-git/) AUR package to build and install worm. + + +## Autostart / configuration +Worm will try to execute the file `~/.config/worm/autostart` on startup. +Simply create it as a shell-script to execute your favorite applications with worm. +(don't forget to make it executable) + +An example can be found [here](examples/autostart) ## Screenshot -![](screenshot.png) +![](assets/screenshot.png) ## Contribute Use it! Spread the word! Report issues! Submit pull requests! diff --git a/screenshot.png b/assets/screenshot.png similarity index 100% rename from screenshot.png rename to assets/screenshot.png diff --git a/assets/worm.desktop b/assets/worm.desktop new file mode 100644 index 0000000..d5750b2 --- /dev/null +++ b/assets/worm.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=Worm +Comment=A floating, tag-based window manager written in Rust +Exec=worm +DesktopNames=Worm +Type=Application diff --git a/examples/autostart b/examples/autostart new file mode 100755 index 0000000..443cac5 --- /dev/null +++ b/examples/autostart @@ -0,0 +1,23 @@ +#!/bin/bash + +## +## This file is being executed by worm during startup +## Place it in your .config folder at ~/.config/worm/ +## + +## Autostart applications +# Start polybar +polybar mybar & + +# Start firefox browser +firefox & + +# Start terminal +xfce4-terminal + +## worm settings +# Set border width to 1 px +wormc border-width 1 + +# Set border color (base 10 value). F.e.: 0x1793D1 -> 1545169 +wormc border-pixel 1545169 \ No newline at end of file