Compare commits
5 commits
105c59d122
...
34dac42c31
Author | SHA1 | Date | |
---|---|---|---|
|
34dac42c31 | ||
|
7f9d26004a | ||
|
5b9939ec4d | ||
|
aff6df8646 | ||
|
4e6f02ec59 |
17 changed files with 59 additions and 106 deletions
|
@ -1,6 +1,3 @@
|
|||
graft src
|
||||
include src/*.py
|
||||
graft icons
|
||||
graft distfiles
|
||||
include sample_config.toml
|
||||
recursive-include icons *
|
||||
exclude README.org
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
DIST wallman-1.4.2.4.tar.gz 871198 BLAKE2B 02ccfa69e14b73eff667ecf4707fcebd08ba63362a6e25ae77bef96ff77d8723e417e14e8586f2b8a9e0b23f29a1be8b7e1c0cab10a7f242dc8a7b2fe418cfe4 SHA512 87f2cad40f6db418dc4a94a259b4c491e69fc0f7bdf121196679270492227449f79751f40467d6f50e4bf7598e38d78853818ac9df8cfa96a7dc34698128ac71
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<name>Emma Nora Theuer</name>
|
||||
<email>gentoo@entheuer.de</email>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="pypi">Wallman</remote-id>
|
||||
</upstream>
|
||||
<longdescription>
|
||||
Wallman is a small python program meant to bring dynamic wallpapers
|
||||
to standalone X11 Window managers and Wayland compositors.
|
||||
It uses APScheduler in the background. For setting wallpaperss
|
||||
It currently relies on feh in the background. libnotify is used for
|
||||
Desktop notifications.
|
||||
|
||||
Wallman reads it's configuration data from a TOML file and logs to
|
||||
~/.local/share/wallman/wallman.log
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
|
@ -1,70 +0,0 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the MIT License
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{11,12} )
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="A python program that sets dynamic wallpapers on minimalistic Window Managers."
|
||||
HOMEPAGE="https://git.entheuer.de/emma/wallman/"
|
||||
SRC_URI="$(pypi_sdist_url "${PN^}" "${PV}")"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/APScheduler[${PYTHON_USEDEP}]
|
||||
dev-python/pillow[${PYTHON_USEDEP}]
|
||||
dev-python/pystray[${PYTHON_USEDEP}]
|
||||
media-gfx/feh
|
||||
x11-libs/libnotify
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
dev-python/wheel[${PYTHON_USEDEP}]
|
||||
dev-python/certifi[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
#src_prepare() {
|
||||
# mv src/* . || die "Failed to move source files"
|
||||
#}
|
||||
python_compile() {
|
||||
distutils-r1_python_compile -j1
|
||||
}
|
||||
python_install() {
|
||||
distutils-r1_python_install
|
||||
# Add a symlink to make the script callable from the commandline
|
||||
local scriptname="wallman.py"
|
||||
local target="/usr/bin/wallman"
|
||||
local scriptpath="$(python_get_sitedir)/${scriptname}"
|
||||
fperms +x "${scriptpath}"
|
||||
dosym "${scriptpath}" "${target}"
|
||||
# Copy files into /etc/wallman
|
||||
dodir /etc/wallman
|
||||
insinto /etc/wallman
|
||||
newins "${S}/sample_config.toml" "wallman.toml"
|
||||
doins -r "${S}/icons/" "icons/"
|
||||
# Create logfile directory
|
||||
dodir /var/log/wallman
|
||||
keepdir /var/log/wallman
|
||||
fperms 0733 /var/log/wallman
|
||||
# Copy .desktop file into the appropriate location
|
||||
insinto /usr/share/applications
|
||||
newins "${S}/distfiles/wallman.desktop" "wallman.desktop"
|
||||
}
|
||||
|
||||
#src_install() {
|
||||
#}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Wallman has been installed. A sample configuration file called wallman.toml is located in /etc/wallman. Copy that file into ~/.config/wallman/wallman.toml to configure wallman."
|
||||
elog "A log file for Wallman can be found in /etc/log/wallman"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
masters = gentoo
|
||||
thin-manifests = true
|
||||
sign-manifests = false
|
|
@ -1 +0,0 @@
|
|||
8
|
|
@ -1 +0,0 @@
|
|||
wallman
|
38
packaging/Arch/PKGBUILD
Normal file
38
packaging/Arch/PKGBUILD
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Maintainer: Emma Nora Theuer <wallman@entheuer.de>
|
||||
|
||||
pkgname=wallman
|
||||
pkgver=1.5.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="A simple program to set dynamic wallpapers on standalone X11 window managers and wayland compositors"
|
||||
arch=('any')
|
||||
url="https://git.entheuer.de/emma/wallman"
|
||||
license=('MIT')
|
||||
depends=('feh' 'python' 'python-apscheduler' 'python-pillow' 'python-pystray')
|
||||
makedepends=('python-build' 'python-setuptools' 'python-wheel' 'python-installer')
|
||||
provides=("$pkgname=$pkgver")
|
||||
source=("https://files.pythonhosted.org/packages/9f/dd/0fadf37c5dbd1bb686afbcbe77760dfe0765520f7f4dbe67c442238ef62b/wallman-$pkgver.tar.gz")
|
||||
b2sums=('ddb067ca50f8e2e02e82e94d48126f69a1fcc22e11ca330d25c807284f0771754d84cf45c249d953c201533d3532d80925c348f8b0946c5efe0643738433cbc3')
|
||||
|
||||
build(){
|
||||
cd "$pkgname-$pkgver"
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
package(){
|
||||
cd "$pkgname-$pkgver"
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
|
||||
# Copy LICENSE
|
||||
install -D -m 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
|
||||
|
||||
# Copy Icons
|
||||
install -d -m 755 "$pkgdir/etc/$pkgname/icons"
|
||||
cp -r icons/* "$pkgdir/etc/$pkgname/icons/"
|
||||
|
||||
# Copy sample config
|
||||
install -D -m 644 sample_config.toml -t "$pkgdir/etc/$pkgname/"
|
||||
|
||||
# Create logfile
|
||||
install -d -m 733 "$pkgdir/var/log/$pkgname"
|
||||
touch "$pkgdir/var/log/$pkgname/$pkgname.log"
|
||||
}
|
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||
|
||||
[project]
|
||||
name = "wallman"
|
||||
version = "1.4.4.4"
|
||||
version = "1.5.0.0"
|
||||
authors = [
|
||||
{name = "Emma Nora Theuer", email = "wallman@entheuer.de"},
|
||||
]
|
||||
|
@ -29,6 +29,14 @@ dependencies = [
|
|||
'importlib-metadata; python_version<"3.10"',
|
||||
]
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["."]
|
||||
include = ["wallman*"]
|
||||
exclude = ["icons*", "packaging*"]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://git.entheuer.de/emma/Wallman"
|
||||
Issues = "https://git.entheuer.de/emma/Wallman/issues"
|
||||
|
||||
[project.scripts]
|
||||
wallman = "wallman.main:main"
|
||||
|
|
0
wallman/__init__.py
Normal file
0
wallman/__init__.py
Normal file
6
wallman/__main__.py
Normal file
6
wallman/__main__.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from main import main
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env python3
|
||||
import wallman_lib
|
||||
from wallman_lib import ConfigValidity, WallpaperLogic
|
||||
|
||||
def main():
|
||||
validator: wallman_lib.ConfigValidity = wallman_lib.ConfigValidity()
|
||||
logic: wallman_lib.WallpaperLogic = wallman_lib.WallpaperLogic()
|
||||
validator: ConfigValidity = ConfigValidity()
|
||||
logic: WallpaperLogic = WallpaperLogic()
|
||||
validator.validate_config()
|
||||
logic.set_wallpaper_by_time()
|
||||
logic.schedule_wallpapers()
|
|
@ -5,8 +5,9 @@ import tomllib
|
|||
from datetime import datetime, time
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from apscheduler.triggers.cron import CronTrigger
|
||||
from typing import Dict, List
|
||||
|
||||
from wallman_classes import *
|
||||
from wallman_classes import ConfigError, ConfigGeneral, ConfigFile
|
||||
|
||||
# Setup Logging. NOTE: Declaration as a global variable is necessary to ensure correct functionality across multiple modules.
|
||||
global logger
|
Loading…
Reference in a new issue