Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ old_files/
styles/
.vscode/
.buildconfig
*.json
*~
*.dpt.css
.goutputstream*
*#
.buildconfig
globals.d.ts
_build/**
_compiled/**


node_modules/**
node_modules/**
.sass-cache/**
4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
"tabWidth": 4,
"singleQuote": true
}
110 changes: 110 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Basic Makefile
# Copied from Dash to Dock, with modifications.

UUID = dynamic-panel-transparency@rockon999.github.io
SRC_MODULES = extension.ts main.ts inject.ts dock.ts dash.ts stylesheet.css theme.scss
BASE_MODULES = metadata.json COPYING README.md
EXTRA_MODULES = src/prefs.ui
TOLOCALIZE = _build/prefs.js
MSGSRC = $(wildcard po/*.po)
ifeq ($(strip $(DESTDIR)),)
INSTALLTYPE = local
INSTALLBASE = $(HOME)/.local/share/gnome-shell/extensions
else
INSTALLTYPE = system
SHARE_PREFIX = $(DESTDIR)/usr/share
INSTALLBASE = $(SHARE_PREFIX)/gnome-shell/extensions
endif
INSTALLNAME = dynamic-panel-transparency@rockon999.github.io

# The command line passed variable VERSION is used to set the version string
# in the metadata and in the generated zip-file. If no VERSION is passed, the
# current commit SHA1 is used as version number in the metadata while the
# generated zip file has no string attached.
ifdef VERSION
VSTRING = _v$(VERSION)
else
VERSION = $(shell git rev-parse HEAD)
VSTRING =
endif

all: extension

clean:
rm -f ./schemas/gschemas.compiled

cleanbuild:
rm -Rf ./_compiled
rm -Rf ./_build

extension: ./schemas/gschemas.compiled $(MSGSRC:.po=.mo)

./schemas/gschemas.compiled: ./schemas/org.gnome.shell.extensions.dynamic-panel-transparency.gschema.xml
glib-compile-schemas ./schemas/

potfile: ./po/dynamic-panel-transparency.pot

mergepo: potfile
for l in $(MSGSRC); do \
msgmerge -U $$l ./po/dynamic-panel-transparency.pot; \
done;

./po/dynamic-panel-transparency.pot: compile $(TOLOCALIZE) src/prefs.ui
mkdir -p po
touch po/dynamic-panel-transparency.pot
xgettext -k --keyword=__ --keyword=N__ --add-comments='Translators:' -o po/dynamic-panel-transparency.pot --package-name "Simple Dock" $(TOLOCALIZE)
intltool-extract --type=gettext/glade src/prefs.ui
xgettext -k --keyword=_ --keyword=N_ --join-existing -o po/dynamic-panel-transparency.pot prefs.ui.h

./po/%.mo: ./po/%.po
msgfmt -c $< -o $@

install-local: _build
rm -rf $(INSTALLBASE)/$(INSTALLNAME)
mkdir -p $(INSTALLBASE)/$(INSTALLNAME)
cp -r ./_build/* $(INSTALLBASE)/$(INSTALLNAME)/
ifeq ($(INSTALLTYPE),system)
# system-wide settings and locale files
rm -r $(INSTALLBASE)/$(INSTALLNAME)/schemas $(INSTALLBASE)/$(INSTALLNAME)/locale
mkdir -p $(SHARE_PREFIX)/glib-2.0/schemas $(SHARE_PREFIX)/locale
cp -r ./schemas/*gschema.* $(SHARE_PREFIX)/glib-2.0/schemas
cp -r ./_build/locale/* $(SHARE_PREFIX)/locale
endif
echo done

install: install-local cleanbuild

zip: _build
cd _build ; \
zip -qr "$(UUID)$(VSTRING).zip" .
mv _build/$(UUID)$(VSTRING).zip ./

zip-file: zip cleanbuild

compile:
tsc -p tsconfig.json --outDir _compiled/
rollup --no-treeshake ./_compiled/src/extension.js --file ./_build/extension.js --format es

setup-build:
-rm -fR ./_build
mkdir -p _build
cp $(BASE_MODULES) $(EXTRA_MODULES) _build
mkdir -p _build/schemas

sass:
sass src/theme.scss _compiled/theme.css
cp _compiled/theme.css _build/theme.css

_build: all setup-build compile sass
cp src/stylesheet.css _build/stylesheet.css
cp _compiled/src/prefs.js _build/prefs.js
cp schemas/*.xml _build/schemas/
cp schemas/gschemas.compiled _build/schemas/
mkdir -p _build/locale
for l in $(MSGSRC:.po=.mo) ; do \
lf=_build/locale/`basename $$l .mo`; \
mkdir -p $$lf; \
mkdir -p $$lf/LC_MESSAGES; \
cp $$l $$lf/LC_MESSAGES/dynamic-panel-transparency.mo; \
done;
sed -i 's/"version": -1/"version": "$(VERSION)"/' _build/metadata.json;
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,11 @@
## Classy transparency for your panel
This extension *fades* your top panel to nothingness when there are no maximized windows present. Never again will the panel be abruptly darkened!

## Installing from source (3.20 and lower)
## Building from source

To use and test the latest version of this extension you may install it directly from the source.

Clone the legacy branch with git...

<pre>git clone -b legacy https://github.com/rockon999/dynamic-panel-transparency.git</pre>
...or download the branch from Github.

Move the 'dynamic-panel-transparency@rockon999.github.io' folder to ~/.local/share/gnome-shell/extensions/

Reload your shell using <code>Alt+F2</code> <code>r</code> <code>Enter</code> and enable the extension via *gnome-tweak-tool* or *dconf*.
Run `make _build`.

## Installing from source (3.22+)
## Installing from source

To use and test the latest version of this extension you may install it directly from the source.

Expand All @@ -26,9 +17,9 @@ Clone the master branch with git...
<pre>git clone https://github.com/rockon999/dynamic-panel-transparency.git</pre>
...or download the branch from Github.

Move the 'dynamic-panel-transparency@rockon999.github.io' folder to ~/.local/share/gnome-shell/extensions/
First run `npm install` to install build dependencies.

Reload your shell using <code>Alt+F2</code> <code>r</code> <code>Enter</code> and enable the extension via *gnome-tweak-tool* or *dconf*.
Then run `make install` to install the extension.

## Bugs

Expand Down
12 changes: 0 additions & 12 deletions dynamic-panel-transparency@rockon999.github.io/__init__.js

This file was deleted.

9 changes: 0 additions & 9 deletions dynamic-panel-transparency@rockon999.github.io/compat.js

This file was deleted.

Loading