Blob Blame History Raw
%global sys_name nwg_panel

Name:       nwg-panel
Version:    0.9.13
Release:    %autorelease
Summary:    GTK3-based panel for sway window manager
BuildArch:  noarch

License:    MIT
Source:     %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires: desktop-file-utils
BuildRequires: python3-devel >= 3.4
BuildRequires: python3-setuptools
BuildRequires: systemd-rpm-macros

Requires:   gtk-layer-shell
Requires:   gtk3
Requires:   python3-gobject
Requires:   python3-i3ipc
Requires:   python3-dasbus
Requires:   wlr-randr

Recommends: /usr/bin/pactl
Recommends: light
Recommends: playerctl
Recommends: python3-netifaces
Recommends: python3-psutil
Recommends: python3-pybluez

I have been using sway since 2019 and find it the most comfortable working
environment, but... Have you ever missed all the graphical bells and whistles
in your panel, we used to have in tint2? It happens to me. That's why I
decided to try to code a GTK-based panel, including best features from my two
favourites: Waybar and tint2. Many thanks to Developers and Contributors of
the both projects!

There are 8 modules available at the moment, and I don't plan on many more.
Basis system controls are available in the Controls module, and whatever else
you may need, there's an executor for that.


sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|' \



# Remove shebang from Python libraries
for lib in %{buildroot}%{python3_sitelib}/%{sys_name}/{/,modules}/*.py; do
 sed '1{\@^#!/usr/bin/env python@d}' $lib > $ &&
 touch -r $lib $ &&
 mv $ $lib

# Remove shebang from Python libraries
for lib in %{buildroot}%{python3_sitelib}/%{sys_name}/*.py; do
 sed '1{\@^#!/usr/bin/python@d}' $lib > $ &&
 touch -r $lib $ &&
 mv $ $lib

install -Dpm 0644 %{name}.svg -t %{buildroot}%{_datadir}/pixmaps/
install -Dpm 0644 nwg-shell.svg -t %{buildroot}%{_datadir}/pixmaps/
install -Dpm 0755 %{name}-config.desktop -t %{buildroot}%{_datadir}/applications/
install -Dpm 0644 %{name}.service -t %{buildroot}%{_userunitdir}/

desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop

%systemd_user_post %{name}.service

%systemd_user_preun %{name}.service

%systemd_user_postun_with_restart %{name}.service

%license LICENSE