Skip to content
Snippets Groups Projects
Commit 7d4d5261 authored by Dan Denkijin's avatar Dan Denkijin
Browse files

README.md edit

parent d881c656
Branches master
No related tags found
No related merge requests found
# Template for Building a Package
# Waybar [![Licence](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Paypal Donate](https://img.shields.io/badge/Donate-Paypal-2244dd.svg)](https://paypal.me/ARouillard)<br>![Waybar](https://raw.githubusercontent.com/alexays/waybar/master/preview-2.png)
This template is designed for building packages and can only be used in the `obcommunity` repository. If you intend to add a package to `obcore` or `obextra`, please use the [prototype-apkg](https://git.obarun.org/pkg/prototype-apkg) repository instead. In this guide, we'll use the `conky` package as an example, but feel free to replace it with the package you need.
# Installation for a New Project
## Create a clone
Begin by making a clone of this [repository](https://git.obarun.org/pkg/prototype-pkg)
```
git clone https://git.obarun.org/pkg/prototype-pkg
```
Rename the directory to conky and navigate inside it
```
mv prototype-pkg conky
cd conky
> Highly customizable Wayland bar for Sway and Wlroots based compositors.<br>
> Available in [all major distributions](https://github.com/Alexays/Waybar/wiki/Installation)<br>
> This repository is for [Obarun](http://web.obarun.org/) or other systemdless distros.<br>
> *Waybar [examples](https://github.com/Alexays/Waybar/wiki/Examples)*
#### Current features
- No Systemd dependency
- Sway (Workspaces, Binding mode, Focused window name)
- River (Mapping mode, Tags, Focused window name)
- Hyprland (Window Icons, Workspaces, Focused window name)
- Niri (Workspaces, Focused window name, Language)
- DWL (Tags, Focused window name) [requires dwl ipc patch](https://github.com/djpohly/dwl/wiki/ipc)
- Tray [#21](https://github.com/Alexays/Waybar/issues/21)
- Local time
- Battery
- UPower
- Power profiles daemon
- Network
- Bluetooth
- Pulseaudio
- Privacy Info
- Wireplumber
- Disk
- Memory
- Cpu load average
- Temperature
- MPD
- Custom scripts
- Custom image
- Multiple output configuration
- And many more customizations
#### Configuration and Styling
[See the wiki for more details](https://github.com/Alexays/Waybar/wiki).
### Installation
Waybar is available from a number of Linux distributions:
[![Packaging status](https://repology.org/badge/vertical-allrepos/waybar.svg?columns=3&header=Waybar%20Downstream%20Packaging)](https://repology.org/project/waybar/versions)
The Obarun package is [hosted here.](https://git.obarun.org/denkijin/waybar)
An Ubuntu PPA with more recent versions is available
[here](https://launchpad.net/~nschloe/+archive/ubuntu/waybar).
#### Building from source
```bash
$ git clone https://github.com/Alexays/Waybar
$ cd Waybar
$ meson setup build
$ ninja -C build
$ ./build/waybar
# If you want to install it
$ ninja -C build install
$ waybar
```
**Dependencies**
```
gtkmm3
jsoncpp
libsigc++
fmt
wayland
chrono-date
spdlog
libgtk-3-dev [gtk-layer-shell]
gobject-introspection [gtk-layer-shell]
libgirepository1.0-dev [gtk-layer-shell]
libpulse [Pulseaudio module]
libnl [Network module]
libappindicator-gtk3 [Tray module]
libdbusmenu-gtk3 [Tray module]
libmpdclient [MPD module]
libsndio [sndio module]
libevdev [KeyboardState module]
xkbregistry
upower [UPower battery module]
```
**Build dependencies**
```
cmake
meson
scdoc
wayland-protocols
```
On Ubuntu, you can install all the relevant dependencies using this command (tested with 19.10 and 20.04):
```
sudo apt install \
clang-tidy \
gobject-introspection \
libdbusmenu-gtk3-dev \
libevdev-dev \
libfmt-dev \
libgirepository1.0-dev \
libgtk-3-dev \
libgtkmm-3.0-dev \
libinput-dev \
libjsoncpp-dev \
libmpdclient-dev \
libnl-3-dev \
libnl-genl-3-dev \
libpulse-dev \
libsigc++-2.0-dev \
libspdlog-dev \
libwayland-dev \
scdoc \
upower \
libxkbregistry-dev
```
Delete the .git directory
```
rm -rf .git
```
Initialize a fresh Git repository
```
git init --initial-branch=master
```
## Configure the git remote origin
Contributions welcome!<br>
Have fun :)<br>
The style guidelines are [Google's](https://google.github.io/styleguide/cppguide.html)
## License
We need to define the remote origin of the repository
```
git remote add origin ssh://git@git.obarun.org:22023/pkg/obcommunity/conky.git
```
If you prefer using HTTPS instead of SSH, replace the address with
```
git remote add origin https://git.obarun.org/pkg/obcommunity/conky.git
```
## Update the `trunk` directory
The scripts used to build the project expect to find the `PKGBUILD` and necessary files in the trunk directory. Therefore, edit the `PKGBUILD` file to fit your project's requirements, along with other files like patches and installation files. Typically, you can find these files on the [Archlinux](https://gitlab.archlinux.org/archlinux/packaging/packages/conky) GitLab instance.
## Adding, committing and pushing your changes
Check the status of your repository
```
git status
```
Next, add your changes
```
git add .
```
Commit your changes with an informative message
```
git commit -m"upgrade: 1.2.6-2"
```
Finally, push your changes to the remote repository
```
git push --set-upstream origin master
```
## Make the project publicly accessible
Make sure that the project is publicly accessible. To do so:
Connect to [`gitlab`](https://git.obarun.org) obarun instance.
- On the left sidebar, select **Search or go to** and find your project.
- Select **Settings** > **General**.
- Expand **Visibility, project features, permissions**
- Under **Project visibility** pick **public** at drop-down menu.
## Triggering the Runner with Tags
The `runner` responsible for building the package is activated only when you push tags. You are free to make changes and commit to the repository without triggering the runner, as long as you haven't pushed a tag.
To trigger the runner, create an annotated tag with the following commands
```
git tag -am"1.2.6-2" 1.2.6-2
```
Then, push the tag along with your changes using the following command
```
git push --follow-tags
```
Waybar is licensed under the MIT license. [See LICENSE for more information](https://github.com/Alexays/Waybar/blob/master/LICENSE).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment