From 8c04857e8b0216e7bb0d9fbf056e1d464dd1aebd Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 22 Feb 2026 13:51:34 +0100 Subject: m fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- .gitignore | 1 - COPYING | 1 - DEPENDENCIES | 2 -- Makefile | 47 +++++++++++++++-------------------------------- README | 1 - TODO | 1 - src/blueshift-tray.py | 2 +- 7 files changed, 16 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index 3d80dbc..8491757 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,3 @@ __pycache__/ .* !.git* *~ - diff --git a/COPYING b/COPYING index 736222e..7fefdb1 100644 --- a/COPYING +++ b/COPYING @@ -15,4 +15,3 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . - diff --git a/DEPENDENCIES b/DEPENDENCIES index 2205c05..dc4905e 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -4,11 +4,9 @@ RUNTIME DEPENDENCIES: pygtk blueshift>=1.10 - MAKE DEPENDENCIES: make coreutils sed auto-auto-complete - diff --git a/Makefile b/Makefile index bf9a0e0..0cc9ec0 100644 --- a/Makefile +++ b/Makefile @@ -2,48 +2,40 @@ # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. +.POSIX: -PREFIX ?= /usr -BIN ?= /bin -DATA ?= /share -BINDIR ?= $(PREFIX)$(BIN) -DATADIR ?= $(PREFIX)$(DATA) -LICENSEDIR ?= $(DATADIR)/licenses -LOCALEDIR ?= $(DATADIR)/locale -ICONDIR ?= $(DATADIR)/icons +PREFIX = /usr +BIN = /bin +DATA = /share +BINDIR = $(PREFIX)$(BIN) +DATADIR = $(PREFIX)$(DATA) +LICENSEDIR = $(DATADIR)/licenses +LOCALEDIR = $(DATADIR)/locale +ICONDIR = $(DATADIR)/icons -SHEBANG ?= /usr/bin/env python2 -COMMAND ?= blueshift-tray -PKGNAME ?= blueshift-tray +SHEBANG = /usr/bin/env python2 +COMMAND = blueshift-tray +PKGNAME = blueshift-tray ICONS = blueshift blueshift-on blueshift-off -.PHONY: all all: command shell -.PHONY: command command: bin/blueshift-tray -.PHONY: shell shell: bash zsh fish - -.PHONY: bash bash: bin/blueshift-tray.bash - -.PHONY: zsh zsh: bin/blueshift-tray.zsh - -.PHONY: fish fish: bin/blueshift-tray.fish bin/blueshift-tray: src/blueshift-tray.py @mkdir -p bin cp $< $@ - sed -i '/^LOCALEDIR *= /s#^.*$$#LOCALEDIR = '\''$(LOCALEDIR)'\''#' $@ - sed -i 's:^#!/usr/bin/env python2$$:#!$(SHEBANG):' $@ + sed '/^LOCALEDIR *= /s#^.*$$#LOCALEDIR = '\''$(LOCALEDIR)'\''#' $@ > $@.tmp && mv -- $@.tmp $@ + sed 's:^#!/usr/bin/env python2$$:#!$(SHEBANG):' $@ > $@.tmp && mv -- $@.tmp $@ bin/blueshift-tray.bash: src/completion @mkdir -p bin @@ -58,44 +50,35 @@ bin/blueshift-tray.fish: src/completion auto-auto-complete fish --output $@ --source $< -.PHONY: install install: install-base install-shell -.PHONY: install-base install-base: install-command install-license -.PHONY: install-command install-command: bin/blueshift-tray $(foreach I,$(ICONS),icons/$(I).svg) install -dm755 -- "$(DESTDIR)$(BINDIR)" install -m755 bin/blueshift-tray -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" install -dm755 -- "$(DESTDIR)$(ICONDIR)/hicolor/scalable/apps" install -m644 $(foreach I,$(ICONS),icons/$(I).svg) -- "$(DESTDIR)$(ICONDIR)/hicolor/scalable/apps" -.PHONY: install-license install-license: install -dm755 -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" install -m644 COPYING LICENSE -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" -.PHONY: install-shell install-shell: install-bash install-zsh install-fish -.PHONY: install-bash install-bash: bin/blueshift-tray.bash install -dm755 -- "$(DESTDIR)$(DATADIR)/bash-completion/completions" install -m644 $< -- "$(DESTDIR)$(DATADIR)/bash-completion/completions/$(COMMAND)" -.PHONY: install-zsh install-zsh: bin/blueshift-tray.zsh install -dm755 -- "$(DESTDIR)$(DATADIR)/zsh/site-functions" install -m644 $< -- "$(DESTDIR)$(DATADIR)/zsh/site-functions/_$(COMMAND)" -.PHONY: install-fish install-fish: bin/blueshift-tray.fish install -dm755 -- "$(DESTDIR)$(DATADIR)/fish/completions" install -m644 $< -- "$(DESTDIR)$(DATADIR)/fish/completions/$(COMMAND).fish" -.PHONY: uninstall uninstall: -rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" -rm -- $(foreach I,$(ICONS),"$(DESTDIR)$(ICONDIR)/hicolor/scalable/apps/$(I).svg") @@ -113,7 +96,7 @@ uninstall: -rmdir -- "$(DESTDIR)$(DATADIR)/bash-completion" -.PHONY: all clean: -rm -r bin +.PHONY: all command shell bash zsh fish install install-base install-command install-license install-shell install-bash install-zsh install-fish uninstall clean diff --git a/README b/README index 283b274..5da7ec6 100644 --- a/README +++ b/README @@ -1,2 +1 @@ Systray wrapper for Blueshift - diff --git a/TODO b/TODO index 39d8c81..d78af00 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,2 @@ Make extensible Add a blueshift-tray-attach command that does not spawn its own blueshift - diff --git a/src/blueshift-tray.py b/src/blueshift-tray.py index d8b08d3..965d1f8 100755 --- a/src/blueshift-tray.py +++ b/src/blueshift-tray.py @@ -59,7 +59,7 @@ def term(count = 1, kill = False): Terminate the blueshift if alive @param count:int Number of times to send SIGTERM - @param kill:bool Whether to also send SIGKILL and the exit + @param kill:bool Whether to also send SIGKILL and then exit ''' if process is not None: process.send_signal(signal.SIGTERM) -- cgit v1.2.3-70-g09d2