-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62c2140
commit 7506f2a
Showing
28 changed files
with
3,299 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build | ||
*.ui~ | ||
*.ui# |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from os import environ, path | ||
from subprocess import call | ||
|
||
prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local') | ||
datadir = path.join(prefix, 'share') | ||
destdir = environ.get('DESTDIR', '') | ||
|
||
# Package managers set this so we don't need to run | ||
if not destdir: | ||
print('Updating icon cache...') | ||
call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')]) | ||
|
||
print('Updating desktop database...') | ||
call(['update-desktop-database', '-q', path.join(datadir, 'applications')]) | ||
|
||
print('Compiling GSettings schemas...') | ||
call(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')]) | ||
|
||
|
130 changes: 130 additions & 0 deletions
130
data/icons/hicolor/scalable/apps/org.erikreider.sway-notification-center.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
...cons/hicolor/symbolic/apps/org.erikreider.sway-notification-center-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
application_id = 'org.erikreider.sway-notification-center' | ||
|
||
scalable_dir = join_paths('hicolor', 'scalable', 'apps') | ||
install_data( | ||
join_paths(scalable_dir, ('@[email protected]').format(application_id)), | ||
install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir) | ||
) | ||
|
||
symbolic_dir = join_paths('hicolor', 'symbolic', 'apps') | ||
install_data( | ||
join_paths(symbolic_dir, ('@[email protected]').format(application_id)), | ||
install_dir: join_paths(get_option('datadir'), 'icons', symbolic_dir) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
desktop_file = i18n.merge_file( | ||
input: 'org.erikreider.sway-notification-center.desktop.in', | ||
output: 'org.erikreider.sway-notification-center.desktop', | ||
type: 'desktop', | ||
po_dir: '../po', | ||
install: true, | ||
install_dir: join_paths(get_option('datadir'), 'applications') | ||
) | ||
|
||
desktop_utils = find_program('desktop-file-validate', required: false) | ||
if desktop_utils.found() | ||
test('Validate desktop file', desktop_utils, | ||
args: [desktop_file] | ||
) | ||
endif | ||
|
||
appstream_file = i18n.merge_file( | ||
input: 'org.erikreider.sway-notification-center.appdata.xml.in', | ||
output: 'org.erikreider.sway-notification-center.appdata.xml', | ||
po_dir: '../po', | ||
install: true, | ||
install_dir: join_paths(get_option('datadir'), 'appdata') | ||
) | ||
|
||
appstream_util = find_program('appstream-util', required: false) | ||
if appstream_util.found() | ||
test('Validate appstream file', appstream_util, | ||
args: ['validate', appstream_file] | ||
) | ||
endif | ||
|
||
install_data('org.erikreider.sway-notification-center.gschema.xml', | ||
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas') | ||
) | ||
|
||
compile_schemas = find_program('glib-compile-schemas', required: false) | ||
if compile_schemas.found() | ||
test('Validate schema file', compile_schemas, | ||
args: ['--strict', '--dry-run', meson.current_source_dir()] | ||
) | ||
endif | ||
|
||
subdir('icons') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<component type="desktop"> | ||
<id>org.erikreider.sway-notification-center.desktop</id> | ||
<metadata_license>CC0-1.0</metadata_license> | ||
<project_license>GPL-3.0-or-later</project_license> | ||
<description> | ||
</description> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Desktop Entry] | ||
Name=sway-notificaton-center | ||
Exec=sway-notificaton-center | ||
Icon=org.erikreider.sway-notification-center | ||
Terminal=false | ||
Type=Application | ||
Categories=GTK; | ||
StartupNotify=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<schemalist gettext-domain="sway-notificaton-center"> | ||
<schema id="org.erikreider.sway-notification-center" path="/org/erikreider/sway-notification-center/"> | ||
</schema> | ||
</schemalist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
project('sway-notificaton-center', ['c', 'vala'], | ||
version: '0.1.0', | ||
meson_version: '>= 0.50.0', | ||
default_options: [ 'warning_level=2', | ||
], | ||
) | ||
|
||
i18n = import('i18n') | ||
|
||
|
||
|
||
subdir('data') | ||
subdir('src') | ||
subdir('po') | ||
|
||
meson.add_install_script('build-aux/meson/postinstall.py') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"app-id" : "org.erikreider.sway-notification-center", | ||
"runtime" : "org.gnome.Platform", | ||
"runtime-version" : "40", | ||
"sdk" : "org.gnome.Sdk", | ||
"command" : "sway-notificaton-center", | ||
"finish-args" : [ | ||
"--share=network", | ||
"--share=ipc", | ||
"--socket=fallback-x11", | ||
"--socket=wayland" | ||
], | ||
"cleanup" : [ | ||
"/include", | ||
"/lib/pkgconfig", | ||
"/man", | ||
"/share/doc", | ||
"/share/gtk-doc", | ||
"/share/man", | ||
"/share/pkgconfig", | ||
"/share/vala", | ||
"*.la", | ||
"*.a" | ||
], | ||
"modules" : [ | ||
{ | ||
"name" : "sway-notificaton-center", | ||
"builddir" : true, | ||
"buildsystem" : "meson", | ||
"sources" : [ | ||
{ | ||
"type" : "git", | ||
"url" : "file:///home/erikreider/GitHub/Sway-Notificaton-Center" | ||
} | ||
] | ||
} | ||
] | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
data/org.erikreider.sway-notification-center.desktop.in | ||
data/org.erikreider.sway-notification-center.appdata.xml.in | ||
data/org.erikreider.sway-notification-center.gschema.xml | ||
src/window.ui | ||
src/main.vala | ||
src/window.vala | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
i18n.gettext('sway-notificaton-center', preset: 'glib') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[DBus (name = "org.erikreider.swaync.cc")] | ||
interface CcDaemon : GLib.Object { | ||
public abstract void toggle () throws DBusError, IOError; | ||
} | ||
|
||
public void main (string[] args) { | ||
try { | ||
CcDaemon controlCenter = Bus.get_proxy_sync (BusType.SESSION, "org.erikreider.swaync.cc", | ||
"/org/erikreider/swaync/cc"); | ||
controlCenter.toggle (); | ||
} catch (IOError e) { | ||
stderr.printf ("Could not connect to CC service\n"); | ||
} catch (DBusError e) { | ||
stderr.printf ("Could not connect to CC service\n"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
namespace SwayNotificatonCenter { | ||
public class Constants { | ||
} | ||
} |
Oops, something went wrong.