Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
bab0247
internal: Current weather details show based on settings
romanlefler Jun 25, 2025
e134741
refactor: Put current weather details in Displayable interface
romanlefler Jun 25, 2025
5297297
fix: If the location switcher in the popup is clicked when there is o…
romanlefler Jun 25, 2025
b7644af
refactor: Move display detail to its own function
romanlefler Jun 26, 2025
a6eb014
internal: Make displayDetail show invalid as the string Invalid
romanlefler Jun 26, 2025
ca31649
fix: Update GUI when details list is changed
romanlefler Jun 26, 2025
21866e4
feat: Drag-and-drop to configure current weather pop-up
romanlefler Jun 26, 2025
ce5c7e7
version: Mark as 48.1.0-dev
romanlefler Jun 26, 2025
97e9759
github: CI test development branch for pushes and not master sicne pu…
romanlefler Jun 26, 2025
821f709
github: Rename workflow build_translations -> build
romanlefler Jun 26, 2025
6430419
fix: Stylesheet is included in preferences now
romanlefler Jun 26, 2025
e11d8b4
refactor: Move GTK prefs stylesheet into separate file
romanlefler Jun 26, 2025
d970b79
build: Check node_modules/.package-lock.json instead of just the dir …
romanlefler Jun 26, 2025
7f08921
feat: Option to click buttons and click target to set details instead…
romanlefler Jun 26, 2025
ddb6d05
feat: Double-click search result to add it
romanlefler Jun 26, 2025
c3349b9
internal: Remove unnecessary log msg
romanlefler Jun 26, 2025
02f9191
impr: Clicking enter on the search field presses Search button
romanlefler Jun 26, 2025
9911c9d
impr: Search button disables until search is complete
romanlefler Jun 26, 2025
b278ac9
impr: Keep add button on screen and make list scrollable
romanlefler Jun 26, 2025
f8a5d79
impr: Center copyright text in search and make it smaller
romanlefler Jun 26, 2025
7091ddd
impr: Make copyright text in search slightly bigger
romanlefler Jun 26, 2025
0281e32
github: Remove pull request templates since you can't even auto-tag w…
romanlefler Jun 26, 2025
2ac8c54
github: PR template with instruction to not open PRs to master
romanlefler Jun 26, 2025
a194064
github: Rename 'Translation Build' -> Build
romanlefler Jun 26, 2025
8e2c268
github: Include development branch in Build workflow
romanlefler Jun 26, 2025
7284282
github: Block PRs to master unless owner creates them
romanlefler Jun 26, 2025
70cdf57
impr: Clicking enter on edit location field saves it
romanlefler Jun 26, 2025
c84ba37
refactor: Humidity -> Percentage
romanlefler Jun 26, 2025
f93bcc7
feat: Cloud Cover % as current weather detail
romanlefler Jun 26, 2025
3c7a6c9
impr: Make about screen look better
romanlefler Jun 26, 2025
a4a5524
feat: Configure where to show panel button in top bar (complete #1)
romanlefler Jul 3, 2025
76763f8
refactor: Make config.#settings not nullable and on free use ts-ignore
romanlefler Jul 3, 2025
ef30bb6
build: Fix install for system-wide installations using DESTDIR
romanlefler Jul 4, 2025
c84e55d
feat: Configure text in panel to show any detail
romanlefler Jul 4, 2025
4269cb7
refactor: Remove detailFormat since it made translations redundant
romanlefler Jul 4, 2025
3cbd875
refactor: Remove use of displayTemp in popup.ts
romanlefler Jul 4, 2025
e1c4d16
impr: Donation link on About page
romanlefler Jul 4, 2025
26d5403
impr: Change message in about to reference the pop-up not the panel
romanlefler Jul 4, 2025
7905148
build: Use incremental building (although it's not really noticably f…
romanlefler Jul 4, 2025
3163657
impr: Weather data copyright dynamically shows current year
romanlefler Jul 4, 2025
7a9179b
impr: Use "Today" word in forecast and use gettext for days of week i…
romanlefler Jul 4, 2025
b9d8707
feat: Choose different panel themes (example sky and coffee themes --…
romanlefler Jul 4, 2025
e52e55e
docs: Documentation for themes so-far
romanlefler Jul 4, 2025
8fe042e
docs: Fix accidentally didn't commit themes doc
romanlefler Jul 4, 2025
01b39b3
Update tr.po
alaahmet Jul 4, 2025
0b7cd95
Update de.po
alaahmet Jul 4, 2025
bd947ff
transl(de): Merge from alaahmet
romanlefler Jul 4, 2025
b007ff0
transl(tr): Merge from alaahmet
romanlefler Jul 4, 2025
6d879b4
impr: Credits button in About which shows AUTHORS file
romanlefler Jul 4, 2025
52d339f
impr(theme): Add light theme and remove coffee & sky themes
romanlefler Jul 5, 2025
0613e4f
impr: Add afterdark theme
romanlefler Jul 9, 2025
f25a621
impr(theme): Menu has swa-open class when open
romanlefler Jul 9, 2025
d4812f6
impr(theme): Add condition and time classes
romanlefler Jul 9, 2025
19eba08
fix: resource.js modification not appending end of string
romanlefler Jul 9, 2025
463c311
impr(icon): few-clouds-night looked like it had a sun instead of a mo…
romanlefler Jul 10, 2025
22141a8
fix(theme): Day/night theme attr never appearing
romanlefler Jul 10, 2025
f1bd578
feat(theme): Immersive theme
romanlefler Jul 10, 2025
c136628
docs: Update README to demo the Immersive theme instead of i18n
romanlefler Jul 10, 2025
594603d
impr(high-contrast): High contrast a11y feature now works on custom t…
romanlefler Jul 10, 2025
1888af4
docs: Link to GNOME extensions website
romanlefler Jul 10, 2025
ad8b513
fix(popup): Fix Mutter crash if Mutter can't find the cursor
romanlefler Jul 13, 2025
94d4347
fix(themes): Some themes showing weird button backgrounds on some GNO…
romanlefler Jul 13, 2025
e948fab
compat(46): Support GNOME 46
romanlefler Jul 13, 2025
a54a230
feat(panel): Setting to show a second panel detail and to hide the co…
romanlefler Jul 13, 2025
ddc0beb
feat(detail): Add Condition detail
romanlefler Jul 13, 2025
396659e
impr(detail): Move condition higher up list
romanlefler Jul 13, 2025
841b2a8
docs(changelog): Current CHANGELOG for upcoming v48.1.0 release
romanlefler Jul 13, 2025
3b04b5f
version(48.1.0): v48.1.0 release
romanlefler Jul 13, 2025
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
14 changes: 0 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE/1-translation.md

This file was deleted.

10 changes: 0 additions & 10 deletions .github/PULL_REQUEST_TEMPLATE/2-bug-fix.md

This file was deleted.

10 changes: 0 additions & 10 deletions .github/PULL_REQUEST_TEMPLATE/3-feature.md

This file was deleted.

2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

🚫 Do NOT open PRs to `master`. Use `development` branch instead.
17 changes: 17 additions & 0 deletions .github/workflows/BlockMasterPRs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Block PRs to master

on:
pull_request:
branches:
- master

jobs:
block-master-prs:
runs-on: ubuntu-latest
steps:
- name: Block PRs to master
run: |
if [ "${{ github.actor }}" != "${{ github.repository_owner }}" ]; then
echo 'Please open PRs to the development branch instead.'
exit 1
fi
8 changes: 4 additions & 4 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: 'Translation Build'
name: 'Build'

on:
workflow_dispatch:
pull_request:
types: [ 'opened' ]
branches: [ 'master' ]
branches: [ 'master', 'development' ]
paths:
- '**.po'
- '**.ts'
Expand All @@ -15,10 +15,10 @@ on:
- 'Makefile'
push:
branches:
- 'master'
- 'development'

jobs:
build_translations:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 5 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

Maintainer/Programmer: Roman Lefler

German (Deutsch): Ahmet Ala
Turkish (Türkçe): Ahmet Ala
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

# v48.1.0

## Features

- Support for GNOME 46
- Themes (choose between default, Light, Afterdark, and Immersive)
- Label in panel can show any weather detail
- Second available label in panel
- Show or hide the condition icon in panel
- Current weather details can be configured
- Configure where panel is shown in top bar
- Configure the location provider

## Improvements

- Change cloudy night icon to be more clear
- Credits dialog in About
- Use the word "Today" in the forecast
- Weather data copyright always shows current year
- Improve keyboard and mouse shortcuts in locations menus
- Pop-up shows which city it thinks you're in when set to My Location
- Better make script for packaging

## Bug Fixes

- Fix Mutter crash on some machines if Mutter couldn't find cursor when hovering the panel

## Translations

- German (thanks Ahmet Ala)
- Turkish (thanks Ahmet Ala)

59 changes: 46 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,40 @@ BUILD := $(DIST)/build
SCHEMAOUTDIR := $(BUILD)/schemas
PO := ./po
ICONS := ./icons
THEMES := ./themes
AUTHORS := ./AUTHORS

METADATA := $(STATIC)/metadata.json
STYLESHEET := $(STATIC)/stylesheet.css
STATICSRCS := $(wildcard $(STATIC)/*)
SCHEMASRC := $(SCHEMAS)/org.gnome.shell.extensions.$(NAME).gschema.xml
# This excludes .d.ts files
SRCS := $(shell find $(SRC) -type f -name '*.ts' ! -name '*.d.ts')
POFILES := $(wildcard $(PO)/*.po)
# This intentionally includes the license file
ICONSSRCS := $(wildcard $(ICONS)/*)
CSSSRCS := $(wildcard $(THEMES)/*.css)

SCHEMAOUT := $(SCHEMAOUTDIR)/gschemas.compiled
SCHEMACP := $(SCHEMAOUTDIR)/org.gnome.shell.extensions.$(NAME).gschema.xml
METADATACP := $(BUILD)/metadata.json
STYLESHEETCP := $(BUILD)/stylesheet.css
STATICOUT := $(STATICSRCS:$(STATIC)/%=$(BUILD)/%)
ZIP := $(DIST)/$(NAME)-v$(VERSION).zip
POT := $(PO)/$(UUID).pot
ICONSOUT := $(ICONSSRCS:$(ICONS)/%=$(BUILD)/icons/%)
CSSOUT := $(BUILD)/stylesheet.css
MOS := $(POFILES:$(PO)/%.po=$(BUILD)/locale/%/LC_MESSAGES/$(UUID).mo)

# Packages should use make DESTDIR=... for packaging
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

.PHONY: out pack install clean copyicons ts

out: $(POT) ts $(SCHEMAOUT) $(SCHEMACP) $(METADATACP) $(STYLESHEETCP) $(ICONSOUT) $(MOS)
out: $(POT) ts $(SCHEMAOUT) $(SCHEMACP) $(STATICOUT) $(ICONSOUT) $(MOS) $(CSSOUT)

pack: $(ZIP)

Expand All @@ -42,20 +54,40 @@ install: out
rm -rf ~/.local/share/gnome-shell/extensions/$(UUID)
mkdir -p ~/.local/share/gnome-shell/extensions
cp -r $(BUILD) ~/.local/share/gnome-shell/extensions/$(UUID)
ifeq ($(INSTALLTYPE),system)
rm -r $(addprefix $(INSTALLBASE)/$(UUID)/, schemas locale LICENSE)
mkdir -p $(SHARE_PREFIX)/glib-2.0/schemas \
$(SHARE_PREFIX)/locale \
$(SHARE_PREFIX)/licenses/$(UUID)
cp -r $(BUILD)/schemas/*gschema.xml $(SHARE_PREFIX)/glib-2.0/schemas
cp -r $(BUILD)/locale/* $(SHARE_PREFIX)/locale
cp -r $(BUILD)/LICENSE $(SHARE_PREFIX)/licenses/$(UUID)
endif

clean:
rm -rf $(DIST)
rm -f $(POT)

./node_modules: package.json
./node_modules/.package-lock.json: package.json
printf -- 'NEEDED: npm\n'
npm install

ts: $(BUILD)/extension.js

$(BUILD)/extension.js: $(SRCS) ./node_modules
# Build files with tsc
# Also inserts "const authors=FILE" into resources.js
$(BUILD)/extension.js $(BUILD)/resource.js: $(SRCS) $(AUTHORS) ./node_modules/.package-lock.json
printf -- 'NEEDED: tsc\n'
tsc
@touch $(BUILD)/extension.js

@if ! grep -q '// Inserted' $(BUILD)/resource.js; then \
printf '// Inserted\n\nconst authors = `' >> $(BUILD)/resource.js; \
cat $(AUTHORS) >> $(BUILD)/resource.js; \
printf '`;' >> $(BUILD)/resource.js; \
else \
touch $(BUILD)/resource.js; \
fi

$(SCHEMAOUT): $(SCHEMASRC)
printf -- 'NEEDED: glib-compile-schemas\n'
Expand All @@ -66,13 +98,9 @@ $(SCHEMACP): $(SCHEMASRC)
mkdir -p $(SCHEMAOUTDIR)
cp $(SCHEMASRC) $(SCHEMACP)

$(METADATACP): $(METADATA)
mkdir -p $(BUILD)
cp $(METADATA) $(METADATACP)

$(STYLESHEETCP): $(STYLESHEET)
$(STATICOUT): $(BUILD)/%: $(STATIC)/%
mkdir -p $(BUILD)
cp $(STYLESHEET) $(STYLESHEETCP)
cp $< $@

$(POT): $(SRCS)
printf -- 'NEEDED: xgettext\n'
Expand All @@ -93,6 +121,11 @@ $(BUILD)/icons:
$(BUILD)/icons/%: $(ICONS)/% $(BUILD)/icons
cp $< $@

# Explicitly putting stylesheet.css here makes it
# first in the outputted file
$(CSSOUT): $(THEMES)/stylesheet.css $(CSSSRCS)
cat $^ > $@

$(ZIP): out
printf -- 'NEEDED: zip\n'
mkdir -p $(DIST)
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ A highly configurable GNOME shell extension for viewing the weather.

![Screenshot](./docs/screenshot.png)

Also has support for translations (albeit translations are probably poor).
Support for themes, the following screenshot uses the *Immersive* theme:

![International Screenshot](./docs/intlscreenshot.png)
![Immersive Theme Screenshot](./docs/immersivescreenshot.png)

## Installation

[![Get on GNOME Extensions](./docs/ego.png)](https://extensions.gnome.org/extension/8261/simpleweather/)

## Features

Expand Down
Binary file added docs/ego.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/immersivescreenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/intlscreenshot.png
Binary file not shown.
13 changes: 13 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

# Set Up for Development

Note that working on this project requires the GNOME shell,
the GNU gettext utilities, and npm.

If you are just translating you can use any text editor or
a specialized translation editor.

If you want to write code then preferably use an editor that supports
TypeScript/LSPs like VS Code, Neovim, or Emacs.


68 changes: 68 additions & 0 deletions docs/themes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

# Themes

Themes are done by dynamically adding the correct classes onto widgets for the chosen theme.

## Files and Naming

Themes are stored in the `themes/` directory as `<name>.css`.

In order for them to appear in the settings, they must be added to
`src/preferences/generalPage.ts` in the themes model and array.

Each class takes the name of `sw-style-<theme>-<class>`.

Example of a "sky" theme in `themes/sky.css`:

```css
.sw-style-sky-bg {
background: #C2DAE6;
}

.sw-style-sky-forecast-box:hover {
background: #DAEBF2;
}
```

> **Note**
> `light` is a good example of a theme.

### Notes

Prefer `background` over `background-color` in case a GTK style uses a background image.

### Classes

```
menu
|--- bg
| |--- left-box
| |--- forecast-box
| |--- faded
```

Additional clases:

```
button
```

### "Attributes"

There are "attribute" classes which show some kind of logic in the program.
They look like `swa-<name>`.
Attributes should be in selectors in conjunction with the normal classes.

The `menu` can have the following:

- `open` when pop-up is open
- any of the following for weather conditions: `clear`, `cloudy`, `rainy`, `snowy`, `stormy`, `windy`
- either `day` or `night`

For example, this selector makes the faded text yellow on a sunny day:

```css
.sw-style-<theme>-menu.swa-clear.swa-day .sw-style-<theme>-faded {
color: yellow;
}
```
16 changes: 1 addition & 15 deletions icons/weather-few-clouds-night-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading