Commit 01d5a75e authored by Gabriele Musco's avatar Gabriele Musco
Browse files

first commit, base functionality present

parents
Pipeline #179887 failed with stage
in 27 seconds
/build
__pycache__
*.glade\~
*.glade\#
*.o
.deps
/**/*.swp
/*.bak
/*.gcda
/*.gcno
/*.o
/*.orig
/*.rej
/*.tab.c
/*~
/.*.sw[nop]
/.dirstamp
/ChangeLog
/GPATH
/GRTAGS
/GSYMS
/GTAGS
/ID
/INSTALL
/Makefile
/Makefile.in
/TAGS
/aclocal.m4
/autom4te.cache
/build-aux
/config
/config.cache
/config.h
/config.h.in
/config.log
/config.lt
/config.status
/config.status.lineno
/configure
/configure.lineno
/gtk-doc.m4
/gtk-doc.make
/intltool-extract.in
/intltool-merge.in
/intltool-update.in
/libtool
/po/*.gmo
/po/*.header
/po/*.mo
/po/*.sed
/po/*.sin
/po/.intltool-merge-cache
/po/Makefile
/po/Makefile.in
/po/Makefile.in.in
/po/Makefile.in.in~
/po/Makevars.template
/po/POTFILES
/po/Rules-quot
/po/grant.pot
/po/stamp-it
/so_locations
/stamp-h1
/tags
/builddir
/buildflatpak
.buildconfig
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
variables:
BUNDLE: "whatip.flatpak"
test:
image: python:3.7
script:
- pip install pyflakes
- pyflakes whatip
flatpak:
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.36'
variables:
MANIFEST_PATH: "dist/flatpak/org.gabmus.whatip.json"
MESON_ARGS: "-Dprofile=Devel"
FLATPAK_MODULE: "whatip"
RUNTIME_REPO: "https://flathub.org/repo/flathub.flatpakrepo"
APP_ID: "org.gabmus.whatip"
extends: .flatpak
review:
stage: deploy
dependencies:
- 'flatpak'
extends: '.review'
stop_review:
stage: deploy
extends: '.stop_review'
This diff is collapsed.
# <a href="https://gabmus.gitlab.io/notorious"><img height="32" src="data/icons/org.gabmus.notorious.svg" /> Notorious</a>
Keyboard centric notes
![screenshot](https://gitlab.gnome.org/GabMus/notorious/raw/website/website/screenshots/mainwindow.png)
## Notes on the distribution of this app
I decided to target flatpak mainly. It's just another package manager at the end of the day, but
it's supported by many Linux distributions. It bundles all of the dependencies you need in one
package.
This helps a lot in supporting many different distros because I know which version of which
dependency you have installed, so I don't have to mess with issues caused by version mismatches.
If you want to report an issue, feel free to. But please at least first see if this issue happens
with the flatpak version as well.
As for development it's a similar story. I do most of my testing directly inside a flatpak sandbox
and you should do the same. It's easy to set up, just open up this repo in GNOME Builder and press
the run button. It will handle the rest.
## Installing from Flathub
You can install Notorious via [Flatpak](https://flathub.org/apps/details/org.gabmus.notorious).
## Installing from AUR
Notorious is available as an AUR package: [`notorious-git`](https://aur.archlinux.org/packages/notorious-git/).
<!--
## Installing from Fedora
Notorious is available in [Fedora repos](https://apps.fedoraproject.org/packages/notorious): `sudo dnf install notorious`
-->
# Building on different distributions
**Note**: these are illustrative instructions. If you're a developer or a package maintainer, they
can be useful to you. If not, just install the flatpak.
## Building on Ubuntu/Debian
```bash
git clone https://gitlab.gnome.org/GabMus/notorious
cd notorious
mkdir build
cd build
meson ..
meson configure -Dprefix=$PWD/testdir # use this line if you want to avoid installing system wide
ninja
ninja install
```
## Building on Arch/Manjaro
```bash
sudo pacman -S python-gobject
git clone https://gitlab.gnome.org/GabMus/notorious
cd notorious
mkdir build
cd build
meson ..
meson configure -Dprefix=$PWD/testdir # use this line if you want to avoid installing system wide
ninja
ninja install
```
conf = configuration_data()
conf.set('VERSION', meson.project_version())
conf.set('localedir', join_paths(prefix, get_option('localedir')))
conf.set('pkgdatadir', pkgdatadir)
conf.set('PYTHON', python.find_python().path())
conf.set('pythondir', join_paths(prefix, pythondir))
conf.set('localedir', join_paths(prefix, localedir))
conf.set('projectname', meson.project_name())
conf.set('authorfullname', authorfullname)
conf.set('authoremail', authoremail)
conf.set('appid', '.'.join([domain, author, meson.project_name()]))
configure_file(
input: meson.project_name() + '.in',
output: meson.project_name(),
configuration: conf,
install_dir: get_option('bindir')
)
myprogram = join_paths(meson.build_root(), 'bin', meson.project_name())
run_target('run',
command: [myprogram]
)
#!@PYTHON@
# @projectname@
#
# Copyright (C) 2019 @authorfullname@ <@authoremail@>
#
# 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 3 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/>.
import os
import sys
import signal
import gettext
import locale
sys.path.insert(1, '@pythondir@')
VERSION = '@VERSION@'
pkgdatadir = '@pkgdatadir@'
localedir = '@localedir@'
builddir = os.environ.get('MESON_BUILD_ROOT')
if builddir:
pkgdatadir = os.path.join(builddir, 'data')
os.environ['GSETTINGS_SCHEMA_DIR'] = pkgdatadir
sys.dont_write_bytecode = True
sys.path.insert(1, os.environ['MESON_SOURCE_ROOT'])
signal.signal(signal.SIGINT, signal.SIG_DFL)
# Why both locale and gettext?
# gettext works for the python part
# but not for the glade/xml files
# they need locale
# don't ask me, it's effin weird
# I copied this from uberwriter
locale.textdomain('notorious')
locale.bindtextdomain('notorious', localedir)
gettext.textdomain('notorious')
gettext.bindtextdomain('notorious', localedir)
if __name__ == '__main__':
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('GtkSource', '4')
gi.require_version('Gdk', '3.0')
gi.require_version('Handy', '0.0')
from gi.repository import Gio
resource = Gio.Resource.load(os.path.join(pkgdatadir, '@appid@.gresource'))
resource._register()
from notorious import __main__
__main__.main()
#!/bin/bash
rm -rf build
mkdir build
cd build
meson ..
meson configure -Dprefix=$PWD/build/testdir
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
viewBox="0 0 16 16"
version="1.1"
id="svg5"
sodipodi:docname="org.gabmus.notorious-symbolic_inkscape.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)">
<metadata
id="metadata11">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs9" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1376"
id="namedview7"
showgrid="true"
inkscape:object-paths="false"
inkscape:snap-smooth-nodes="true"
inkscape:zoom="32"
inkscape:cx="7.8031365"
inkscape:cy="4.0098057"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg5"
inkscape:document-rotation="0"
inkscape:snap-page="true"
inkscape:snap-nodes="false"
inkscape:snap-bbox="true"
inkscape:bbox-nodes="true">
<inkscape:grid
type="xygrid"
id="grid818"
dotted="false"
spacingx="0.25"
spacingy="0.25"
empspacing="4"
empcolor="#3f3fff"
empopacity="0.58039216"
color="#3f3fff"
opacity="0.0745098" />
</sodipodi:namedview>
<path
id="path4"
style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;fill:#474747;marker:none"
d="M 3.09375,0 C 2.52475,0 2,0.5025 2,1.0625 v 13.875 C 2,15.4985 2.52475,16 3.09375,16 H 13 c 0.558,0 1.07375,-0.48525 1.09375,-1.03125 V 1.0625 C 14.09375,0.5015 13.569,0 13,0 Z"
sodipodi:nodetypes="sssssccss" />
<g
style="font-size:14.0912px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;stroke-width:1"
id="text1490"
aria-label="?">
<path
id="path833"
style="fill:#ffffff;stroke-width:1"
d="m 6.9369674,11.481516 h 1.3967351 v 1.74764 H 6.9369674 Z M 8.2924197,10.470088 H 6.9782502 V 9.4104954 q 0,-0.6949273 0.1926531,-1.1421578 Q 7.3635564,7.8211072 7.9827986,7.2293868 L 8.6020408,6.6170251 Q 8.9942275,6.2523603 9.1662392,5.9289783 9.3451314,5.6055962 9.3451314,5.2684533 q 0,-0.6123617 -0.4541109,-0.9907875 Q 8.44379,3.89924 7.7006994,3.89924 q -0.543557,0 -1.1627992,0.2408164 Q 5.9255385,4.3808728 5.258133,4.8418642 V 3.5483361 Q 5.9048971,3.1561494 6.565422,2.9634963 7.2328275,2.7708431 7.9415158,2.7708431 q 1.2660062,0 2.0297383,0.6674055 0.7706129,0.6674055 0.7706129,1.7614 0,0.5229156 -0.247697,0.9976679 -0.247697,0.4678719 -0.8669394,1.0595922 L 9.0217494,7.848629 Q 8.6983673,8.1720111 8.560758,8.3577837 8.4300291,8.5366759 8.3749853,8.7086876 8.3337025,8.8531775 8.3130611,9.0595915 8.2924197,9.2660056 8.2924197,9.6237899 Z" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
viewBox="0 0 16 16"
version="1.1"
id="svg5"
sodipodi:docname="org.gabmus.notorious-symbolic_inkscape.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)">
<metadata
id="metadata11">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs9" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1376"
id="namedview7"
showgrid="true"
inkscape:object-paths="false"
inkscape:snap-smooth-nodes="true"
inkscape:zoom="32"
inkscape:cx="7.8031365"
inkscape:cy="4.0098057"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg5"
inkscape:document-rotation="0"
inkscape:snap-page="true"
inkscape:snap-nodes="false"
inkscape:snap-bbox="true"
inkscape:bbox-nodes="true">
<inkscape:grid
type="xygrid"
id="grid818"
dotted="false"
spacingx="0.25"
spacingy="0.25"
empspacing="4"
empcolor="#3f3fff"
empopacity="0.58039216"
color="#3f3fff"
opacity="0.0745098" />
</sodipodi:namedview>
<path
id="path4"
style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;fill:#474747;marker:none"
d="M 3.09375,0 C 2.52475,0 2,0.5025 2,1.0625 v 13.875 C 2,15.4985 2.52475,16 3.09375,16 H 13 c 0.558,0 1.07375,-0.48525 1.09375,-1.03125 V 1.0625 C 14.09375,0.5015 13.569,0 13,0 Z"
sodipodi:nodetypes="sssssccss" />
<g
style="font-size:14.0912px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;stroke-width:1"
id="text1490"
aria-label="?">
<path
id="path833"
style="fill:#ffffff;stroke-width:1"
d="m 6.9369674,11.481516 h 1.3967351 v 1.74764 H 6.9369674 Z M 8.2924197,10.470088 H 6.9782502 V 9.4104954 q 0,-0.6949273 0.1926531,-1.1421578 Q 7.3635564,7.8211072 7.9827986,7.2293868 L 8.6020408,6.6170251 Q 8.9942275,6.2523603 9.1662392,5.9289783 9.3451314,5.6055962 9.3451314,5.2684533 q 0,-0.6123617 -0.4541109,-0.9907875 Q 8.44379,3.89924 7.7006994,3.89924 q -0.543557,0 -1.1627992,0.2408164 Q 5.9255385,4.3808728 5.258133,4.8418642 V 3.5483361 Q 5.9048971,3.1561494 6.565422,2.9634963 7.2328275,2.7708431 7.9415158,2.7708431 q 1.2660062,0 2.0297383,0.6674055 0.7706129,0.6674055 0.7706129,1.7614 0,0.5229156 -0.247697,0.9976679 -0.247697,0.4678719 -0.8669394,1.0595922 L 9.0217494,7.848629 Q 8.6983673,8.1720111 8.560758,8.3577837 8.4300291,8.5366759 8.3749853,8.7086876 8.3337025,8.8531775 8.3130611,9.0595915 8.2924197,9.2660056 8.2924197,9.6237899 Z" />
</g>
</svg>
<
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="org.gabmus.notorious.svg"
width="128"
height="128"
id="svg11300"
version="1.0"
style="display:inline;enable-background:new"
viewBox="0 0 128 128">
<sodipodi:namedview
inkscape:snap-intersection-paths="true"
inkscape:snap-bbox-midpoints="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox="true"
inkscape:current-layer="svg11300"
inkscape:window-maximized="0"
inkscape:window-y="299"
inkscape:window-x="595"
inkscape:cy="74.049274"
inkscape:cx="83.490054"
inkscape:zoom="4"
showgrid="false"
id="namedview59"
inkscape:window-height="996"
inkscape:window-width="1863"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<title
id="title4162">Adwaita Icon Template</title>
<defs
id="defs3">
<linearGradient
id="linearGradient1038">
<stop
id="stop1026"
offset="0"
style="stop-color:#1a5fb4;stop-opacity:1" />
<stop
style="stop-color:#3584e4;stop-opacity:1"
offset="0.04545454"
id="stop1028" />
<stop
style="stop-color:#1a5fb4;stop-opacity:1"
offset="0.09090909"
id="stop1030" />
<stop
style="stop-color:#1a5fb4;stop-opacity:1"
offset="0.90909088"
id="stop1032" />
<stop
id="stop1034"
offset="0.95454544"
style="stop-color:#3584e4;stop-opacity:1" />
<stop
id="stop1036"
offset="1"
style="stop-color:#1a5fb4;stop-opacity:1" />
</linearGradient>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath2213">
<rect
style="display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new"
id="rect2215"
width="16"
height="56"
x="160"
y="-188"
rx="8"
ry="8" />
</clipPath>
<linearGradient
id="linearGradient1005">
<stop
id="stop1001"
offset="0"
style="stop-color:#d0bb8e;stop-opacity:1" />
<stop
id="stop1003"
offset="1"
style="stop-color:#ffffff;stop-opacity:1" />
</linearGradient>
<linearGradient
id="linearGradient1351-3">
<stop
style="stop-color:#d5d3cf;stop-opacity:1"
offset="0"
id="stop1347" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop1349-6" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient1038"
id="linearGradient1159"
x1="27.99999"
y1="-276"
x2="115.99999"
y2="-276"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-135.99999,170)" />
<linearGradient
xlink:href="#linearGradient1005"
id="linearGradient1103"
gradientUnits="userSpaceOnUse"
x1="128.81717"
y1="-97.698288"
x2="158.51802"
y2="-127.39915"
gradientTransform="matrix(0.07621224,-0.44419723,0.44419725,-0.07621223,77.725794,159.83807)" />
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath1609-7">
<path
id="path1611-5"
d="m 252,116 28,-28 v -8 h -36 v 36 z"
style="fill:#e74747;stroke:none;stroke-width:0.25px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</clipPath>
<linearGradient
xlink:href="#linearGradient1351-3"
id="linearGradient1130"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.25,0,0,0.25,180,83)"
x1="344"
y1="76"
x2="340"
y2="72" />
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath1062">
<rect
clip-path="none"
ry="8"
rx="8"
y="-116"
x="-108"
height="108"
width="88"
id="rect1064"
style="opacity:1;vector-effect:none;fill:#f6f5f4;fill-opacity:1;stroke:none;stroke-width:13.71876526;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
transform="scale(-1)" />
</clipPath>
</defs>
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>GNOME Design Team</dc:title>
</cc:Agent>
</dc:creator>
<dc:source />
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
<dc:title>Adwaita Icon Template</dc:title>
<dc:subject>
<rdf:Bag />
</dc:subject>
<dc:date />
<dc:rights>
<cc:Agent>
<dc:title />
</cc:Agent>
</dc:rights>
<dc:publisher>
<cc:Agent>
<dc:title />
</cc:Agent>
</dc:publisher>
<dc:identifier />
<dc:relation />