Skip to content

Commit 174f118

Browse files
committed
add shell scripts
1 parent 1b07339 commit 174f118

9 files changed

+267
-67
lines changed

CHANGELOG.bbcode

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
[h2]v5.4[/h2]
2+
[list]
3+
[*] fix configuration menu not available
4+
[*] fix error in logging function
5+
[*] update package structure
6+
[*] add install/uninstall scripts
7+
[*] make script automatically enabled on install
8+
[*] add changelog in BBCode format
9+
[/list]
10+
11+
[h2]v5.3[/h2]
12+
[list]
13+
[*] fix minimize and restore on manual move/resize not working
14+
[/list]
15+
16+
[h2]v5.2[/h2]
17+
[list]
18+
[*] fix restore on geometry change not working
19+
[/list]
20+
21+
[h2]v5.1[/h2]
22+
[list]
23+
[*] fix trigger on geometry change not working
24+
[/list]
25+
26+
[h1]v5.0[/h1]
27+
[list]
28+
[*] more fine-grained filter by window type
29+
[*] improve parsing of window classes in configuration
30+
[/list]
31+
32+
[h2]v4.1[/h2]
33+
[list]
34+
[*] improve focus restoration behavior
35+
[*] improve efficiency
36+
[/list]
37+
38+
[h1]v4.0[/h1]
39+
[list]
40+
[*] filter by application
41+
[/list]
42+
43+
[h2]v3.9[/h2]
44+
[list]
45+
[*] ensure focus is assigned to the correct window when minimizing and restoring
46+
[/list]
47+
48+
[h2]v3.8[/h2]
49+
[list]
50+
[*] fix script not working
51+
[/list]
52+
53+
[h2]v3.7[/h2]
54+
[list]
55+
[*] add Dutch and German translations of metadata
56+
[/list]
57+
58+
[h2]v3.6[/h2]
59+
[list]
60+
[*] fix newly opened windows covered by old windows
61+
[/list]
62+
63+
[h2]v3.5[/h2]
64+
[list]
65+
[*] fix floating tiles not properly applied on system startup or screen layout change
66+
[*] fix order of restoration sometimes incorrect
67+
[/list]
68+
69+
[h2]v3.4[/h2]
70+
[list]
71+
[*] rewrite for clearer code
72+
[/list]
73+
74+
[h2]v3.3[/h2]
75+
76+
[*] rewrite for clearer code
77+
[*] add debug mode
78+
79+
[h2]v3.2[/h2]
80+
[list]
81+
[*] fix a bug with autorestore
82+
[/list]
83+
84+
[h2]v3.1[/h2]
85+
[list]
86+
[*] fix an error with autorestore
87+
[/list]
88+
89+
[h1]v3.0[/h1]
90+
[list]
91+
[*] rewrite for compatibility with older KWin versions
92+
[/list]
93+
94+
[h2]v2.1[/h2]
95+
[list]
96+
[*] set default for ignore special to true
97+
[/list]
98+
99+
[h1]v2.0[/h1]
100+
[list]
101+
[*] fix config button not working
102+
[/list]
103+
104+
[h1]v1.0[/h1]
105+
[list]
106+
[*] initial release
107+
[/list]

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## v5.4
2+
- fix configuration menu not available
3+
- fix error in logging function
4+
- update package structure
5+
- add install/uninstall scripts
6+
- make script automatically enabled on install
7+
- add changelog in BBCode format
8+
19
## v5.3
210

311
- fix minimize and restore on manual move/resize not working

README.bbcode

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ The windows to be affected can be filtered by window type and application.
88

99
By default, any window that has been automatically minimized will be automatically restored once the space above it is free again; this can be disabled in the configuration.
1010

11-
[b]In order for the configuration menu to be available, you may have to activate it first.[/b] For more information on installation, configuration and usage as well as any requests, please visit [url=https://github.com/nclarius/floating-tiles]the GitHub page[/url].
11+
For more information on installation, configuration and usage as well as any requests, please visit [url=https://github.com/nclarius/floating-tiles]the GitHub page[/url].
1212

1313
© 2021 Natalie Clarius ‹[email protected]
1414

15-
This work is licensed under the GNU General Public License v3.0.
16-
This program comes with absolutely no warranty.
17-
This is free software, and you are welcome to redistribute and/or modify it under certain conditions.
15+
This work is licensed under the GNU General Public License v3.0.
16+
This program comes with absolutely no warranty.
17+
This is free software, and you are welcome to redistribute and/or modify it under certain conditions.
1818

1919
If you would like to thank me, you can always make me happy with a review or a cup of coffee:
2020
[url="https://www.paypal.com/donate/?hosted_button_id=7LUUJD83BWRM4"][img height="30"]https://www.paypalobjects.com/en_US/DK/i/btn/btn_donateCC_LG.gif[/img][/url] [url="https://www.buymeacoffee.com/nclarius"][img height="30"]https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png[/img][/url]

README.md

+5-14
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,16 @@ By default, any window that has been automatically minimized will be automatical
2020

2121
`kwin` version ≥ 5.21.
2222

23-
### Method 1: via graphical interface
23+
### Installation via graphical interface
2424

25-
1. Install the script via *System Settings* > *Window Management* > *KWin Scripts* > *Get New Scripts …* > search for *Floating Tiles* > *Install*.
26-
2. Activate the script by selecting the checkbox in the *Floating Tiles* entry.
25+
*System Settings* > *Window Management* > *KWin Scripts* > *Get New Scripts …* > search for *Floating Tiles* > *Install*.
2726

28-
### Method 2: via command line
27+
### Installation via command line
2928

3029
```bash
3130
git clone https://github.com/nclarius/floating-tiles.git
32-
plasmapkg2 --type kwinscript -i floating-tiles
33-
kwriteconfig5 --file kwinrc --group Plugins --key floatingtilesEnabled true
34-
qdbus org.kde.KWin /KWin reconfigure
31+
cd floating-tiles
32+
./install.sh
3533
```
3634

3735
## Configuration
@@ -40,13 +38,6 @@ qdbus org.kde.KWin /KWin reconfigure
4038

4139
You may have to disable the script, apply, reenable, and reapply in order for the changes to take effect.
4240

43-
If the configuration button is missing (this is due to a central limitation with the KWin script installation component), try the following:
44-
45-
````bash
46-
mkdir -p ~/.local/share/kservices5
47-
ln -sf ~/.local/share/kwin/scripts/floatingtiles/metadata.desktop ~/.local/share/kservices5/floatingtiles.desktop
48-
````
49-
5041
## Usage
5142

5243
### Known issues

install.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
kpackagetool5 --type=KWin/Script --install package || kpackagetool5 --type=KWin/Script --upgrade package
3+
qdbus org.kde.KWin /KWin reconfigure

package.sh

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#/bin/bash
2+
3+
# get plugin info
4+
name=$(basename "$PWD")
5+
version=$(grep -oP '(?<=X-KDE-PluginInfo-Version=).*' package/metadata.desktop)
6+
echo "$name v$version"
7+
8+
# generate changelog in markdown format
9+
heading_md=$([[ $version == *.0 ]] && echo "#" || echo "##")
10+
caption_md="${heading_md} v${version}"
11+
changes_md=$(cat CHANGELOG.txt)
12+
echo "$caption_md"$'\n'"$changes_md"$'\n\n'"$(cat CHANGELOG.md)" > "CHANGELOG.md"
13+
echo "generated changelog markdown"
14+
15+
# generate changelog in bbcode format
16+
heading_bb=$([[ $version == *.0 ]] && echo "h1" || echo "h2")
17+
caption_bb="[$heading_bb]v$version[/$heading_bb]"
18+
changes_bb=$'[list]\n'"$(cat CHANGELOG.txt | sed "s/- /[*] /g")"$'\n[/list]'
19+
echo "$caption_bb"$'\n'"$changes_bb"$'\n\n'"$(cat CHANGELOG.bbcode)" > "CHANGELOG.bbcode"
20+
echo "generated changelog bbcode"
21+
22+
# generate GitHub release
23+
gh release create "${name}_v${version}" -F CHANGELOG.txt
24+
echo "generated GitHub release"
25+
26+
# generate KDE store release
27+
find . -name "*.kwinscript" -type f -delete
28+
zip -rq "${name}_v${version}.kwinscript" \
29+
package \
30+
install.sh \
31+
uninstall.sh \
32+
README.md \
33+
README.bbcode \
34+
CHANGELOG.md \
35+
CHANGELOG.bbcode \
36+
LICENSE
37+
echo "generated KDE Store release"
38+
39+
# commit changes to GitHub
40+
git add *
41+
git commit -q -m "release $name v$version"
42+
git push -q
43+
echo "commited changes to git"
44+
45+
echo "done"

0 commit comments

Comments
 (0)