add files
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 41s

This commit is contained in:
Ward from fusion-voyager-3 2024-08-27 19:47:19 +03:00
parent 582b707b03
commit c061a2c973
41 changed files with 22212 additions and 97 deletions

View File

@ -1 +1 @@
1 2

5
debian/changelog vendored
View File

@ -1,5 +0,0 @@
upstream-name (1.0-101pika1) pika; urgency=medium
* Initial release. (Closes: #nnnn) <nnnn is the bug number of your ITP>
-- ferreo <harderthanfire@gmail.com> Wed, 18 Jan 2023 21:48:14 +0000

19
debian/control vendored
View File

@ -1,19 +0,0 @@
Source: upstream-name
Section: admin
Priority: optional
Maintainer: name <email>
Standards-Version: 4.6.1
Build-Depends: debhelper-compat (= 13)
Rules-Requires-Root: no
Package: pkgname1
Architecture: linux-any
# Delete any of these lines if un-used
Depends: ${misc:Depends}, depends
Recommends: high priority optdepends
Conflicts: conflicts
Suggests: low priority optdepends
Breaks: also conflicts!?
Provides: provides
#
Description: pkgdesc

0
debian/copyright vendored
View File

67
debian/rules vendored
View File

@ -1,67 +0,0 @@
#! /usr/bin/make -f
## See debhelper(7) (uncomment to enable).
## Output every command that modifies files on the build system.
export DH_VERBOSE = 1
export PIKA_BUILD_ARCH = $(shell cat ../pika-build-arch)
## === the chain of command ===
## debuild runs a chain of dh functions in the following order:
## dh_testdir
## dh_clean
## dh_auto_clean
## dh_update_autotools_config
## dh_autoreconf
## dh_auto_configure
## dh_prep
## dh_build
## dh_auto_build
## dh_install
## dh_auto_install
## dh_installdocs
## dh_installchangelogs
## dh_perl
## dh_link
## dh_strip_nondeterminism
## dh_compress
## dh_fixperms
## dh_missing
## dh_dwz
## dh_strip
## dh_makeshlibs
## dh_shlibdeps
## dh_installdeb
## dh_gencontrol
## but you are most likely to only need to override the following:
## dh_clean
## dh_auto_configure
## dh_build
## dh_install
## === End end of region ===
## === overriding dh functions ===
## by default all dh functions will run a specific command based on the build system selected by "dh $@"
## if you have a makefile that does everything you need this is fine,
## but most likely you have no MakeFile and you want to add your own commands
## Note : overrides must be places above %:
## So here's a few examples:
## overriding dh_clean to make it not delete rust vendor files:
#override_dh_clean:
# echo "disabled"
## overriding dh_auto_configure to add custom configs:
#override_dh_auto_configure:
# $(srcdir)/configure -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_DATADIR=/usr/share -DCMAKE_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu -DBUILD_PLUGIN=OFF
## overriding dh_install to install files to a package:
#override_dh_auto_configure:
# mkdir -p debian/pikman/usr/bin
# cp pikman debian/pikman/usr/bin/
## === End end of region ===
## This here will start the build:
%:
dh $@

View File

@ -0,0 +1,5 @@
gnome-shell-extension-custom-accent-colors (46.0-101pika1) pika; urgency=medium
* Initial Creation
-- Ward Nakchbandi <hotrod.master@hotmail.com> Sat, 01 Oct 2022 14:50:00 +0200

View File

@ -0,0 +1 @@
10

View File

@ -0,0 +1,22 @@
Source: gnome-shell-extension-custom-accent-colors
Section: gnome
Priority: optional
Maintainer: Marco Trevisan <marco@ubuntu.com>
Build-Depends: debhelper (>= 10),
eslint <!nocheck>,
libglib2.0-bin,
node-chalk <!nocheck>,
node-js-yaml <!nocheck>,
node-strip-ansi <!nocheck>,
libgettextpo-dev,
gettext,
sassc
Standards-Version: 4.1.1
Package: gnome-shell-extension-custom-accent-colors
Architecture: all
Depends: gnome-shell,
${misc:Depends},
${shlibs:Depends},
Description: A GNOME Shell Extension that provides 7 Custom Accent Colors.
The selected Accent Color can be applied to GTK4/GTK3 apps and the Gnome Shell.

View File

@ -0,0 +1,23 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ubuntu-dock
Source: https://micheleg.github.io/dash-to-dock
Files: *
Copyright: 2012-2017 Michele Gaio <micxgx@gmail.com>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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 <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
glib-compile-schemas /usr/share/glib-2.0/schemas/

View File

@ -0,0 +1,7 @@
#!/bin/sh
set -e
glib-compile-schemas /usr/share/glib-2.0/schemas/

View File

@ -0,0 +1,6 @@
#!/usr/bin/make -f
export DH_VERBOSE = 1
export DEB_BUILD_OPTIONS=nocheck
%:
dh $@

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<schema id="org.gnome.shell.extensions.custom-accent-colors" path="/org/gnome/shell/extensions/custom-accent-colors/">
<key name="accent-color" type="s">
<default>"default"</default>
</key>
<key name="theme-flatpak" type="b">
<default>false</default>
</key>
<key name="theme-gtk3" type="b">
<default>false</default>
</key>
<key name="theme-shell" type="b">
<default>false</default>
</key>
</schema>
</schemalist>

View File

@ -0,0 +1,207 @@
/* extension.js
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* 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 <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
/* exported init */
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import * as Config from 'resource:///org/gnome/shell/misc/config.js';
const ShellVersion = parseInt(Config.PACKAGE_VERSION);
export default class CustomAccentColors extends Extension {
enable() {
this.settings = this.getSettings(
'org.gnome.shell.extensions.custom-accent-colors'
);
this.settings.connect('changed::accent-color', () => {
this.applyAccentColor(true);
});
this.settings.connect('changed::theme-flatpak', () => {
this.updateFlatpakTheming(this.settings.get_boolean('theme-flatpak'));
});
this.settings.connect('changed::theme-gtk3', () => {
this.updateGtkTheming('gtk-3.0', this.settings.get_boolean('theme-gtk3'));
});
this.settings.connect('changed::theme-shell', () => {
this.updateShellTheming(this.settings.get_boolean('theme-shell'));
});
this.applyAccentColor(true);
}
disable() {
this.applyAccentColor(false);
this.settings = null;
}
createDir(path) {
try {
const file = Gio.File.new_for_path(path);
file.make_directory_with_parents(null);
} catch (e) {
console.error(e);
}
}
readFile(path) {
try {
const file = Gio.File.new_for_path(path);
const [, contents, etag] = file.load_contents(null);
const decoder = new TextDecoder('utf-8');
const contentsString = decoder.decode(contents);
return contentsString;
} catch (e) {
console.error(e);
}
}
async writeFile(str, path) {
try {
const file = Gio.File.new_for_path(path);
await new Promise((resolve, reject) => {
file.replace_contents_bytes_async(
new GLib.Bytes(str),
null,
false,
Gio.FileCreateFlags.REPLACE_DESTINATION,
null,
(file_, result) => {
try {
resolve(file.replace_contents_finish(result));
} catch (e) {
reject(e);
}
}
);
});
} catch (e) {
console.error(e);
}
}
async deleteFileDir(path) {
try {
const file = Gio.File.new_for_path(path);
await new Promise((resolve, reject) => {
file.delete_async(GLib.PRIORITY_DEFAULT, null, (file_, result) => {
try {
resolve(file.delete_finish(result));
} catch (e) {
reject(e);
}
});
});
} catch (e) {
console.error(e);
}
}
applyAccentColor(apply) {
this.accentColor = this.settings.get_string('accent-color');
this.updateGtkTheming('gtk-4.0', apply);
if (this.settings.get_boolean('theme-flatpak')) {
this.updateFlatpakTheming(apply);
}
if (this.settings.get_boolean('theme-gtk3')) {
this.updateGtkTheming('gtk-3.0', apply);
}
if (apply && this.settings.get_boolean('theme-shell')) {
this.updateShellTheming(true);
}
}
updateGtkTheming(gtkVer, apply) {
const meDir = this.path;
const configDir = GLib.get_user_config_dir();
const gtkFile = Gio.File.new_for_path(configDir + '/' + gtkVer + '/gtk.css');
if (apply && this.accentColor != 'default') {
const gtkDir = Gio.File.new_for_path(configDir + '/' + gtkVer);
if (!gtkDir.query_exists(null)) {
this.createDir(gtkDir.get_path());
}
const str = this.readFile(meDir + '/resources/' + this.accentColor + '/gtk.css');
this.writeFile(str, gtkFile.get_path());
} else if (gtkFile.query_exists(null)) {
this.deleteFileDir(gtkFile.get_path());
}
}
updateFlatpakTheming(apply) {
if (apply && this.accentColor != 'default') {
try {
GLib.spawn_command_line_async(
'flatpak override --user --filesystem=xdg-config/gtk-4.0:ro --filesystem=xdg-config/gtk-3.0:ro'
);
} catch (e) {
console.error(e);
}
} else {
try {
GLib.spawn_command_line_async(
'flatpak override --user --nofilesystem=xdg-config/gtk-4.0 --nofilesystem=xdg-config/gtk-3.0'
);
} catch (e) {
console.error(e);
}
}
}
updateShellTheming(apply) {
const meDir = this.path;
const dataDir = GLib.get_user_data_dir();
let shellThemeDir = Gio.File.new_for_path(
dataDir + '/themes/Custom-Accent-Colors'
);
if (apply && this.accentColor != 'default') {
if (!shellThemeDir.query_exists(null)) {
this.createDir(shellThemeDir.get_path() + '/gnome-shell');
}
let str = this.readFile(
meDir +
'/resources/' +
this.accentColor +
'/gnome-shell/' +
ShellVersion +
'/gnome-shell.css'
);
this.writeFile(str, shellThemeDir.get_path() + '/gnome-shell/gnome-shell.css');
str = this.readFile(
meDir +
'/resources/' +
this.accentColor +
'/gnome-shell/' +
ShellVersion +
'/toggle-on.svg'
);
this.writeFile(str, shellThemeDir.get_path() + '/gnome-shell/toggle-on.svg');
} else if (shellThemeDir.query_exists(null)) {
this.deleteFileDir(shellThemeDir.get_path() + '/gnome-shell/gnome-shell.css');
this.deleteFileDir(shellThemeDir.get_path() + '/gnome-shell/toggle-on.svg');
this.deleteFileDir(shellThemeDir.get_path() + '/gnome-shell');
this.deleteFileDir(shellThemeDir.get_path());
}
}
}

View File

@ -0,0 +1,11 @@
{
"_generated": "Generated by SweetTooth, do not edit",
"description": "A GNOME Shell Extension that provides 7 Custom Accent Colors. The selected Accent Color can be applied to GTK4/GTK3 apps and the Gnome Shell.",
"name": "Custom Accent Colors",
"shell-version": [
"46"
],
"url": "https://github.com/demiskp/custom-accent-colors",
"uuid": "custom-accent-colors@demiskp",
"version": 11
}

View File

@ -0,0 +1,139 @@
/* prefs.js */
/* exported init buildPrefsWidget */
import Adw from 'gi://Adw';
import Gio from 'gi://Gio';
import GObject from 'gi://GObject';
import Gtk from 'gi://Gtk';
import {ExtensionPreferences} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
const CustomAccentColors = GObject.registerClass({
Properties: {
name: GObject.ParamSpec.string(
'name',
'name',
'name',
GObject.ParamFlags.READWRITE,
null
),
value: GObject.ParamSpec.string(
'value',
'value',
'value',
GObject.ParamFlags.READWRITE,
null
),
},
},
class CustomAccentColors extends GObject.Object {
_init(name, value) {
super._init({ name, value });
}
}
);
class CustomAccentColorsPrefsWidget extends Adw.PreferencesPage {
static {
GObject.registerClass(this);
}
constructor(settings) {
super();
this.settings = settings;
this.mainGroup = new Adw.PreferencesGroup();
this.add(this.mainGroup);
const listModel = new Gio.ListStore({ item_type: CustomAccentColors });
listModel.append(new CustomAccentColors('Default', 'default'));
listModel.append(new CustomAccentColors('Green', 'green'));
listModel.append(new CustomAccentColors('Yellow', 'yellow'));
listModel.append(new CustomAccentColors('Orange', 'orange'));
listModel.append(new CustomAccentColors('Red', 'red'));
listModel.append(new CustomAccentColors('Pink', 'pink'));
listModel.append(new CustomAccentColors('Purple', 'purple'));
listModel.append(new CustomAccentColors('Brown', 'brown'));
this.mainRow = new Adw.ComboRow({
title: 'Accent Color',
subtitle:
'Requires Log Out to activate properly. Any custom "gtk.css" files will be irreversibly overwritten!',
model: listModel,
expression: new Gtk.PropertyExpression(CustomAccentColors, null, 'name'),
});
this.mainRow.connect('notify::selected-item', () => {
const { selectedItem } = this.mainRow;
this.settings.set_string('accent-color', selectedItem.value);
});
this.settings.connect('changed::color', () => {
this.updateSelectedColor();
});
this.updateSelectedColor();
this.mainGroup.add(this.mainRow);
this.extraGroup = new Adw.PreferencesGroup({
title: 'Extra Options',
});
this.add(this.extraGroup);
let toggle = new Gtk.Switch({
action_name: 'theme-flatpak',
valign: Gtk.Align.CENTER,
});
this.settings.bind('theme-flatpak', toggle, 'active', Gio.SettingsBindFlags.DEFAULT);
let extraRow = new Adw.ActionRow({
title: 'Flatpak Theming',
activatable_widget: toggle,
});
extraRow.add_suffix(toggle);
this.extraGroup.add(extraRow);
toggle = new Gtk.Switch({
action_name: 'theme-gtk3',
valign: Gtk.Align.CENTER,
});
this.settings.bind('theme-gtk3', toggle, 'active', Gio.SettingsBindFlags.DEFAULT);
extraRow = new Adw.ActionRow({
title: 'GTK3 Theming',
subtitle: 'Requires the "adw-gtk3" Theme.',
activatable_widget: toggle,
});
extraRow.add_suffix(toggle);
this.extraGroup.add(extraRow);
toggle = new Gtk.Switch({
action_name: 'theme-shell',
valign: Gtk.Align.CENTER,
});
this.settings.bind('theme-shell', toggle, 'active', Gio.SettingsBindFlags.DEFAULT);
extraRow = new Adw.ActionRow({
title: 'Shell Theming',
subtitle: 'Requires the Shell Theme to be set to "Custom-Accent-Colors" in Gnome Tweaks.',
activatable_widget: toggle,
});
extraRow.add_suffix(toggle);
this.extraGroup.add(extraRow);
}
updateSelectedColor() {
const accentColor = this.settings.get_string('accent-color');
const { model } = this.mainRow;
for (let i = 0; i < model.get_n_items(); i++) {
const item = model.get_item(i);
if (item.value === accentColor) {
this.mainRow.set_selected(i);
break;
}
}
}
}
export default class CustomAccentColorsPrefs extends ExtensionPreferences {
getPreferencesWidget() {
return new CustomAccentColorsPrefsWidget(
this.getSettings('org.gnome.shell.extensions.custom-accent-colors')
);
}
}

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="46" height="26"><g transform="translate(0 -291.18)"><rect width="46" height="26" y="291.18" fill="#3081e3" rx="12.458" ry="13" style="fill:#63452c;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="295.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#000;fill-opacity:.2;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="294.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#fff;stroke:none;stroke-width:1;marker:none"/></g></svg>

After

Width:  |  Height:  |  Size: 533 B

View File

@ -0,0 +1,2 @@
@define-color accent_color #865e3c;
@define-color accent_bg_color #63452c;

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="46" height="26"><g transform="translate(0 -291.18)"><rect width="46" height="26" y="291.18" fill="#3081e3" rx="12.458" ry="13" style="fill:#26a269;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="295.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#000;fill-opacity:.2;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="294.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#fff;stroke:none;stroke-width:1;marker:none"/></g></svg>

After

Width:  |  Height:  |  Size: 533 B

View File

@ -0,0 +1,2 @@
@define-color accent_color #2ec27e;
@define-color accent_bg_color #26a269;

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="46" height="26"><g transform="translate(0 -291.18)"><rect width="46" height="26" y="291.18" fill="#3081e3" rx="12.458" ry="13" style="fill:#c64600;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="295.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#000;fill-opacity:.2;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="294.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#fff;stroke:none;stroke-width:1;marker:none"/></g></svg>

After

Width:  |  Height:  |  Size: 533 B

View File

@ -0,0 +1,2 @@
@define-color accent_color #e66100;
@define-color accent_bg_color #c64600;

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="46" height="26"><g transform="translate(0 -291.18)"><rect width="46" height="26" y="291.18" fill="#3081e3" rx="12.458" ry="13" style="fill:#c061cb;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="295.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#000;fill-opacity:.2;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="294.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#fff;stroke:none;stroke-width:1;marker:none"/></g></svg>

After

Width:  |  Height:  |  Size: 533 B

View File

@ -0,0 +1,2 @@
@define-color accent_color #dc8add;
@define-color accent_bg_color #c061cb;

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="46" height="26"><g transform="translate(0 -291.18)"><rect width="46" height="26" y="291.18" fill="#3081e3" rx="12.458" ry="13" style="fill:#613583;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="295.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#000;fill-opacity:.2;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="294.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#fff;stroke:none;stroke-width:1;marker:none"/></g></svg>

After

Width:  |  Height:  |  Size: 533 B

View File

@ -0,0 +1,2 @@
@define-color accent_color #813d9c;
@define-color accent_bg_color #613583;

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="46" height="26"><g transform="translate(0 -291.18)"><rect width="46" height="26" y="291.18" fill="#3081e3" rx="12.458" ry="13" style="fill:#a51d2d;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="295.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#000;fill-opacity:.2;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="294.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#fff;stroke:none;stroke-width:1;marker:none"/></g></svg>

After

Width:  |  Height:  |  Size: 533 B

View File

@ -0,0 +1,2 @@
@define-color accent_color #c01c28;
@define-color accent_bg_color #a51d2d;

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="46" height="26"><g transform="translate(0 -291.18)"><rect width="46" height="26" y="291.18" fill="#3081e3" rx="12.458" ry="13" style="fill:#e5a50a;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="295.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#000;fill-opacity:.2;stroke:none;stroke-width:1;marker:none"/><rect width="20" height="20" x="23" y="294.18" fill="#f8f7f7" rx="10" ry="10" style="fill:#fff;stroke:none;stroke-width:1;marker:none"/></g></svg>

After

Width:  |  Height:  |  Size: 533 B

View File

@ -0,0 +1,2 @@
@define-color accent_color #f5c211;
@define-color accent_bg_color #e5a50a;

View File

@ -6,15 +6,13 @@ set -e
echo "$PIKA_BUILD_ARCH" > pika-build-arch echo "$PIKA_BUILD_ARCH" > pika-build-arch
VERSION="1.0" VERSION="46.0"
# Clone Upstream # Clone Upstream
mkdir -p ./src-pkg-name cd ./gnome-shell-extension-custom-accent-colors/
cp -rvf ./debian ./src-pkg-name/
cd ./src-pkg-name/
# Get build deps # Get build deps
LOGNAME=root dh_make --createorig -y -l -p src-pkg-name_"$VERSION" || echo "dh-make: Ignoring Last Error" LOGNAME=root dh_make --createorig -y -l -p gnome-shell-extension-custom-accent-colors_"$VERSION" || echo "dh-make: Ignoring Last Error"
apt-get build-dep ./ -y apt-get build-dep ./ -y
# Build package # Build package