diff -Nru budgie-extras-0.8.0/budgie-showtime/bshowtime_panelrunner budgie-extras-0.8.1/budgie-showtime/bshowtime_panelrunner
--- budgie-extras-0.8.0/budgie-showtime/bshowtime_panelrunner 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/bshowtime_panelrunner 1970-01-01 00:00:00.000000000 +0000
@@ -1,73 +0,0 @@
-#!/usr/bin/env python3
-import os
-import subprocess
-import time
-import psutil
-from clocktools import app_path, user
-
-"""
-Budgie ShowTime
-Author: Jacob Vlijm
-Copyright © 2017-2018 Ubuntu Budgie Developers
-Website=https://ubuntubudgie.org
-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 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 .
-"""
-
-dcpath = "/com/solus-project/budgie-panel/applets/"
-app = os.path.join(app_path, "ShowTime")
-
-
-def getkey():
- # get the specific dconf path, referring to the applet's key
- data = subprocess.check_output([
- "dconf", "dump", dcpath,
- ]).decode("utf-8").splitlines()
- try:
- match = [l for l in data if "ShowTime" in l][0]
- watch = data.index(match) - 3
- return data[watch][1:-1]
- except IndexError:
- pass
-
-
-def get_pid():
- try:
- return int(subprocess.check_output([
- "pgrep", "-f", "-u", user, app,
- ]).decode("utf-8").strip())
- except subprocess.CalledProcessError:
- return subprocess.Popen(app).pid
-
-
-def run_showtime():
- # give dconf a few seconds to create the key
- time.sleep(3)
- key = getkey()
- while True:
- time.sleep(3)
- try:
- # ok, ok, this should be fetched with help from wmovertools...
- check = subprocess.check_output([
- "dconf", "dump", dcpath + key + "/",
- ]).decode("utf-8")
- if not check:
- break
- except TypeError:
- break
-
-
-pid = get_pid()
-run_showtime()
-
-
-try:
- psutil.Process(pid).terminate()
-except psutil.NoSuchProcess:
- pass
diff -Nru budgie-extras-0.8.0/budgie-showtime/BudgieShowTime.plugin budgie-extras-0.8.1/budgie-showtime/BudgieShowTime.plugin
--- budgie-extras-0.8.0/budgie-showtime/BudgieShowTime.plugin 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/BudgieShowTime.plugin 1970-01-01 00:00:00.000000000 +0000
@@ -1,9 +0,0 @@
-[Plugin]
-Loader=python3
-Module=budgie_showtime
-Name=ShowTime
-Description=Desktop time & date
-Authors=Jacob Vlijm
-Copyright=© 2017-2018 Ubuntu Budgie Developers
-Website=https://ubuntubudgie.org
-Icon=budgie-showtime-symbolic
diff -Nru budgie-extras-0.8.0/budgie-showtime/budgie_showtime.py budgie-extras-0.8.1/budgie-showtime/budgie_showtime.py
--- budgie-extras-0.8.0/budgie-showtime/budgie_showtime.py 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/budgie_showtime.py 1970-01-01 00:00:00.000000000 +0000
@@ -1,298 +0,0 @@
-import gi.repository
-
-gi.require_version('Budgie', '1.0')
-from gi.repository import Budgie, GObject, Gtk, Gio
-import os
-import clocktools as clt
-
-"""
-Budgie ShowTime
-Author: Jacob Vlijm
-Copyright © 2017-2019 Ubuntu Budgie Developers
-Website=https://ubuntubudgie.org
-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 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 .
-"""
-
-css_data = """
-.colorbutton {
- border-color: transparent;
- background-color: hexcolor;
- padding: 0px;
- border-width: 1px;
- border-radius: 4px;
-}
-.colorbutton:hover {
- border-color: hexcolor;
- background-color: hexcolor;
- padding: 0px;
- border-width: 1px;
- border-radius: 4px;
-}
-"""
-
-colorpicker = os.path.join(clt.app_path, "colorpicker")
-cpos_file = clt.pos_file
-
-
-class BudgieShowTime(GObject.GObject, Budgie.Plugin):
- """ This is simply an entry point into your Budgie Applet implementation.
- Note you must always override Object, and implement Plugin.
- """
-
- # Good manners, make sure we have unique name in GObject type system
- __gtype_name__ = "BudgieShowTime"
-
- def __init__(self):
- """ Initialisation is important.
- """
- GObject.Object.__init__(self)
-
- def do_get_panel_widget(self, uuid):
- """ This is where the real fun happens. Return a new Budgie.Applet
- instance with the given UUID. The UUID is determined by the
- BudgiePanelManager, and is used for lifetime tracking.
- """
- return BudgieShowTimeApplet(uuid)
-
-
-class BudgieShowTimeSettings(Gtk.Grid):
- def __init__(self, setting):
-
- super().__init__()
- self.setting = setting
-
- # files & colors
- self.tcolorfile = clt.timecolor
- self.dcolorfile = clt.datecolor
- self.mute_time = clt.mute_time
- self.mute_date = clt.mute_date
- self.twelvehrs = clt.twelve_hrs
- # grid & layout
- self.set_row_spacing(12)
- element_hsizer1 = self.h_spacer(13)
- self.attach(element_hsizer1, 0, 0, 1, 7)
- element_hsizer2 = self.h_spacer(25)
- self.attach(element_hsizer2, 2, 0, 1, 7)
- # time section
- self.runtime = Gtk.CheckButton("Show time")
- self.attach(self.runtime, 1, 1, 1, 1)
- self.twelve_hrs = Gtk.CheckButton("Twelve hours display")
- self.attach(self.twelve_hrs, 1, 2, 1, 1)
- # time color
- self.bholder1 = Gtk.Box()
- self.attach(self.bholder1, 1, 3, 1, 1)
- self.t_color = Gtk.Button()
- self.t_color.connect("clicked", self.pick_color, self.tcolorfile)
- self.t_color.set_size_request(10, 10)
- self.bholder1.pack_start(self.t_color, False, False, 0)
- timelabel = Gtk.Label(" Set time color")
- self.bholder1.pack_start(timelabel, False, False, 0)
- spacer1 = Gtk.Label("")
- self.attach(spacer1, 1, 4, 1, 1)
- # date section
- self.rundate = Gtk.CheckButton("Show date")
- self.attach(self.rundate, 1, 5, 1, 1)
- # date color
- self.bholder2 = Gtk.Box()
- self.attach(self.bholder2, 1, 6, 1, 1)
- self.d_color = Gtk.Button()
- self.d_color.connect("clicked", self.pick_color, self.dcolorfile)
- self.d_color.set_size_request(10, 10)
- self.bholder2.pack_start(self.d_color, False, False, 0)
- datelabel = Gtk.Label(" Set date color")
- self.bholder2.pack_start(datelabel, False, False, 0)
- spacer2 = Gtk.Label("")
- self.attach(spacer2, 1, 7, 1, 1)
- # position section
- # checkbox custom position
- self.setposbutton = Gtk.CheckButton("Set custom position (px)")
- self.attach(self.setposbutton, 1, 8, 1, 1)
- # position
- posholder = Gtk.Box()
- self.xpos = Gtk.Entry()
- self.xpos.set_width_chars(4)
- self.xpos_label = Gtk.Label("x: ")
- self.ypos = Gtk.Entry()
- self.ypos.set_width_chars(4)
- self.ypos_label = Gtk.Label(" y: ")
- self.apply = Gtk.Button("OK")
- for item in [
- self.xpos_label, self.xpos, self.ypos_label, self.ypos,
- ]:
- posholder.pack_start(item, False, False, 0)
- posholder.pack_end(self.apply, False, False, 0)
- self.attach(posholder, 1, 9, 1, 1)
- self.twelve_hrs.set_active(os.path.exists(self.twelvehrs))
- # set initial states
- timeshows = not os.path.exists(self.mute_time)
- dateshows = not os.path.exists(self.mute_date)
- self.runtime.set_active(timeshows)
- self.rundate.set_active(dateshows)
- self.set_timestate(timeshows)
- self.set_datestate(dateshows)
- self.runtime.connect("toggled", self.toggle_show, self.mute_time)
- self.rundate.connect("toggled", self.toggle_show, self.mute_date)
- self.twelve_hrs.connect("toggled", self.toggle_12, self.twelvehrs)
- # color buttons & labels
- distlabel = Gtk.Label("")
- self.attach(distlabel, 1, 10, 1, 1)
- noicon = Gtk.Label("Applet runs without a panel icon")
- self.attach(noicon, 1, 11, 1, 1)
- self.set_initialstate()
- self.setposbutton.connect("toggled", self.toggle_cuspos)
- self.apply.connect("clicked", self.get_xy)
- self.update_color()
- self.show_all()
-
- def set_timestate(self, val=None):
- val = val if val else not os.path.exists(self.mute_time)
- for item in [
- self.twelve_hrs, self.bholder1, self.t_color,
- ]:
- item.set_sensitive(val)
-
- def set_datestate(self, val=None):
- # could be included in set_timestate but, well...
- val = val if val else not os.path.exists(self.mute_date)
- for item in [self.bholder2, self.d_color]:
- item.set_sensitive(val)
-
- def set_initialstate(self):
- # set initial state of items in the custom position section
- state_data = clt.get_textposition()
- state = state_data[0]
- if state:
- self.xpos.set_text(str(state_data[1]))
- self.ypos.set_text(str(state_data[2]))
- for entr in [
- self.ypos, self.xpos, self.apply, self.xpos_label, self.ypos_label
- ]:
- entr.set_sensitive(state)
- self.setposbutton.set_active(state)
-
- def get_xy(self, button):
- x = self.xpos.get_text()
- y = self.ypos.get_text()
- # check for correct input
- try:
- newpos = [str(int(p)) for p in [x, y]]
- open(cpos_file, "wt").write("\n".join(newpos))
- except (FileNotFoundError, ValueError, IndexError):
- pass
- clt.restart_clock()
-
- def toggle_cuspos(self, button):
- newstate = button.get_active()
- for widget in [
- self.ypos, self.xpos, self.xpos_label, self.ypos_label, self.apply
- ]:
- widget.set_sensitive(newstate)
- if newstate is False:
- self.xpos.set_text("")
- self.ypos.set_text("")
- try:
- os.remove(cpos_file)
- except FileNotFoundError:
- pass
- else:
- clt.restart_clock()
-
- def h_spacer(self, addwidth):
- # horizontal spacer
- spacegrid = Gtk.Grid()
- if addwidth:
- label1 = Gtk.Label()
- label2 = Gtk.Label()
- spacegrid.attach(label1, 0, 0, 1, 1)
- spacegrid.attach(label2, 1, 0, 1, 1)
- spacegrid.set_column_spacing(addwidth)
- return spacegrid
-
- def toggle_12(self, button, file):
- # cannot be included in toggle_show, flipped boolean
- if not button.get_active():
- try:
- os.remove(file)
- except FileNotFoundError:
- pass
- else:
- open(file, "wt").write("")
- clt.restart_clock()
-
- def toggle_show(self, button, file):
- try:
- corr_file = [self.mute_time, self.mute_date].index(file)
- except ValueError:
- pass
- newstate = button.get_active()
- if newstate:
- try:
- os.remove(file)
- except FileNotFoundError:
- pass
- else:
- open(file, "wt").write("")
- try:
- if corr_file == 0:
- self.set_timestate()
- elif corr_file == 1:
- self.set_datestate()
- except UnboundLocalError:
- pass
- clt.restart_clock()
-
- def set_css(self, hexcol):
- provider = Gtk.CssProvider.new()
- provider.load_from_data(
- css_data.replace("hexcolor", hexcol).encode()
- )
- return provider
-
- def color_button(self, button, hexcol):
- provider = self.set_css(hexcol)
- color_cont = button.get_style_context()
- color_cont.add_class("colorbutton")
- Gtk.StyleContext.add_provider(
- color_cont,
- provider,
- Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION,
- )
-
- def update_color(self, *args):
- self.tcolor = clt.hexcolor(clt.read_color(self.tcolorfile))
- self.dcolor = clt.hexcolor(clt.read_color(self.dcolorfile))
- self.color_button(self.d_color, self.dcolor)
- self.color_button(self.t_color, self.tcolor)
-
- def pick_color(self, button, f):
- wdata = clt.get(["wmctrl", "-l"])
- if "ShowTime - set color" not in wdata:
- subprocess = Gio.Subprocess.new([colorpicker, f], 0)
- subprocess.wait_check_async(None, self.update_color)
- self.update_color()
-
-
-class BudgieShowTimeApplet(Budgie.Applet):
- """ Budgie.Applet is in fact a Gtk.Bin """
-
- def __init__(self, uuid):
- Budgie.Applet.__init__(self)
- self.uuid = uuid
- clt.restart_clock()
-
- def do_get_settings_ui(self):
- """Return the applet settings with given uuid"""
- return BudgieShowTimeSettings(self.get_applet_settings(self.uuid))
-
- def do_supports_settings(self):
- """Return True if support setting through Budgie Setting,
- False otherwise.
- """
- return True
diff -Nru budgie-extras-0.8.0/budgie-showtime/budgie-showtime-symbolic.svg budgie-extras-0.8.1/budgie-showtime/budgie-showtime-symbolic.svg
--- budgie-extras-0.8.0/budgie-showtime/budgie-showtime-symbolic.svg 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/budgie-showtime-symbolic.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,35 +0,0 @@
-
-
diff -Nru budgie-extras-0.8.0/budgie-showtime/clocktools.py budgie-extras-0.8.1/budgie-showtime/clocktools.py
--- budgie-extras-0.8.0/budgie-showtime/clocktools.py 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/clocktools.py 1970-01-01 00:00:00.000000000 +0000
@@ -1,115 +0,0 @@
-#!/usr/bin/env python3
-import os
-import subprocess
-import time
-import gi
-gi.require_version('Pango', '1.0')
-gi.require_version('Gdk', '3.0')
-from gi.repository import Pango, Gdk
-
-"""
-Budgie ShowTime
-Author: Jacob Vlijm
-Copyright © 2017-2019 Ubuntu Budgie Developers
-Website=https://ubuntubudgie.org
-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 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 .
-"""
-
-# paths
-prefspath = os.path.join(
- os.environ["HOME"], ".config", "budgie-extras", "showtime"
-)
-
-app_path = os.path.dirname(os.path.abspath(__file__))
-user = os.environ["USER"]
-
-
-try:
- os.makedirs(prefspath)
-except FileExistsError:
- pass
-
-# files
-timecolor = os.path.join(prefspath, "timecolor")
-datecolor = os.path.join(prefspath, "datecolor")
-mute_time = os.path.join(prefspath, "mute_time")
-mute_date = os.path.join(prefspath, "mute_date")
-pos_file = os.path.join(prefspath, "position")
-twelve_hrs = os.path.join(prefspath, "twelve_hrs")
-clock = os.path.join(app_path, "ShowTime")
-panelrunner = os.path.join(app_path, "bshowtime_panelrunner")
-
-
-def get(command):
- try:
- return subprocess.check_output(command).decode("utf-8").strip()
- except subprocess.CalledProcessError:
- pass
-
-
-def get_pid(proc):
- return get(["pgrep", "-f", "-u", user, proc]).splitlines()
-
-
-def restart_clock():
- for proc in [clock, panelrunner]:
- try:
- for p in get_pid(proc):
- subprocess.Popen(["kill", p])
- except AttributeError:
- pass
- subprocess.Popen(panelrunner)
-
-
-def get_area():
- # width of the primary screen.
- dspl = Gdk.Display()
- dsp = dspl.get_default()
- prim = dsp.get_primary_monitor()
- geo = prim.get_geometry()
- return [geo.width, geo.height]
-
-
-def get_textposition():
- try:
- pos = [int(p) for p in open(pos_file).readlines()][:2]
- x = pos[0]
- y = pos[1]
- custom = True
- except (FileNotFoundError, ValueError, IndexError):
- scr = get_area()
- x = (scr[0] * 0.75) - 100
- y = scr[1] * 0.75
- custom = False
- return (custom, x, y)
-
-
-def read_color(f):
- try:
- return [int(n) for n in open(f).read().splitlines()]
- except FileNotFoundError:
- return [65535, 65535, 65535]
-
-
-def write_settings(file, newval):
- subj = os.path.join(prefspath, file)
- open(subj, "wt").write(newval)
-
-
-def hexcolor(rgb):
- c = [int((int(n) / 65535) * 255) for n in rgb]
- return '#%02x%02x%02x' % (c[0], c[1], c[2])
-
-
-def get_font():
- key = ["org.gnome.desktop.wm.preferences", "titlebar-font"]
- fontdata = get(["gsettings", "get", key[0], key[1]]).strip("'")
- fdscr = Pango.FontDescription(fontdata)
- return Pango.FontDescription.get_family(fdscr)
diff -Nru budgie-extras-0.8.0/budgie-showtime/colorpicker budgie-extras-0.8.1/budgie-showtime/colorpicker
--- budgie-extras-0.8.0/budgie-showtime/colorpicker 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/colorpicker 1970-01-01 00:00:00.000000000 +0000
@@ -1,76 +0,0 @@
-#!/usr/bin/env python3
-import gi
-
-gi.require_version('Gtk', '3.0')
-from gi.repository import Gtk, Gdk
-import clocktools as clt
-import sys
-
-f = sys.argv[1]
-
-"""
-Budgie ShowTime
-Author: Jacob Vlijm
-Copyright=Copyright © 2017-2018 Ubuntu Budgie Developers
-Website=https://ubuntubudgie.org
-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 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 .
-"""
-
-
-class ColorChooser(Gtk.Window):
- def __init__(self):
- Gtk.Window.__init__(self, title="ShowTime - set color")
- maingrid = Gtk.Grid()
- maingrid.set_border_width(10)
- self.set_focus()
- self.set_skip_taskbar_hint(True)
- self.add(maingrid)
- self.color = Gtk.ColorSelection()
- self.color.set_has_palette(False)
- currc = clt.read_color(f)
- suggested = Gdk.Color(red=currc[0], green=currc[1], blue=currc[2])
- self.color.set_current_color(suggested)
- maingrid.attach(self.color, 0, 0, 1, 1)
-
- buttonbox = Gtk.Box()
- maingrid.attach(buttonbox, 0, 1, 1, 1)
-
- choose = Gtk.Button("Choose")
- choose.connect("clicked", self.set_newcolor)
- choose.set_size_request(90, 20)
- buttonbox.pack_end(choose, False, False, 0)
-
- cancel = Gtk.Button("Cancel")
- cancel.connect("clicked", self.close_window)
- cancel.set_size_request(90, 20)
- buttonbox.pack_end(cancel, False, False, 0)
-
- def set_newcolor(self, *args):
- newcolor = str(self.color.get_current_color()).split()
- rgb = [
- s.split("=")[1].replace(",", "").replace(")", "")
- for s in newcolor
- ]
- clt.write_settings(f, "\n".join(rgb))
- clt.restart_clock()
- self.close_window()
-
- def close_window(self, *args):
- Gtk.main_quit()
-
-
-def chooser():
- window = ColorChooser()
- window.connect("destroy", Gtk.main_quit)
- window.show_all()
- Gtk.main()
-
-
-chooser()
Binary files /tmp/tmp3l998Z/ZbvL4dB0Hb/budgie-extras-0.8.0/budgie-showtime/desktop.png and /tmp/tmp3l998Z/quUymYRPf0/budgie-extras-0.8.1/budgie-showtime/desktop.png differ
diff -Nru budgie-extras-0.8.0/budgie-showtime/icons/meson.build budgie-extras-0.8.1/budgie-showtime/icons/meson.build
--- budgie-extras-0.8.0/budgie-showtime/icons/meson.build 1970-01-01 00:00:00.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/icons/meson.build 2019-02-17 22:08:25.000000000 +0000
@@ -0,0 +1,5 @@
+
+install_data(
+ 'showtimenew-symbolic.svg',
+ install_dir: PIXMAPS_DIR
+)
diff -Nru budgie-extras-0.8.0/budgie-showtime/icons/showtimenew-symbolic.svg budgie-extras-0.8.1/budgie-showtime/icons/showtimenew-symbolic.svg
--- budgie-extras-0.8.0/budgie-showtime/icons/showtimenew-symbolic.svg 1970-01-01 00:00:00.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/icons/showtimenew-symbolic.svg 2019-02-17 22:08:25.000000000 +0000
@@ -0,0 +1,32 @@
+
+
Binary files /tmp/tmp3l998Z/ZbvL4dB0Hb/budgie-extras-0.8.0/budgie-showtime/menu.png and /tmp/tmp3l998Z/quUymYRPf0/budgie-extras-0.8.1/budgie-showtime/menu.png differ
diff -Nru budgie-extras-0.8.0/budgie-showtime/meson.build budgie-extras-0.8.1/budgie-showtime/meson.build
--- budgie-extras-0.8.0/budgie-showtime/meson.build 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/meson.build 2019-02-17 22:08:25.000000000 +0000
@@ -1,18 +1,32 @@
-#gnome = import('gnome')
+am_cflags = [
+ '-fstack-protector',
+ '-pedantic',
+ '-Wstrict-prototypes',
+ '-Wundef',
+ '-Werror-implicit-function-declaration',
+ '-Wformat',
+ '-Wformat-security',
+ '-Werror=format-security',
+ '-Wconversion',
+ '-Wunused-variable',
+ '-Wunreachable-code',
+ '-Wall',
+ '-W',
+]
+
+#add_global_arguments(am_cflags, language: 'c')
PLUGIN = 'budgie-showtime'
-install_data(
- 'BudgieShowTime.plugin',
- 'budgie_showtime.py',
- 'clocktools.py',
- 'colorpicker',
- 'ShowTime',
- 'bshowtime_panelrunner',
- install_dir: join_paths(PLUGINS_INSTALL_DIR, PLUGIN)
+install_data('schema/org.ubuntubudgie.plugins.budgie-showtime.gschema.xml',
+ install_dir: '/usr/share/glib-2.0/schemas'
)
-install_data(
- 'budgie-showtime-symbolic.svg',
- install_dir: PIXMAPS_DIR
-)
+LIB_INSTALL_DIR = join_paths(prefix, libdir, 'budgie-desktop', 'plugins', PLUGIN)
+
+message('Installing applet...')
+
+subdir('src')
+subdir('icons')
+
+meson.add_install_script('meson_post_install')
diff -Nru budgie-extras-0.8.0/budgie-showtime/meson_post_install budgie-extras-0.8.1/budgie-showtime/meson_post_install
--- budgie-extras-0.8.0/budgie-showtime/meson_post_install 1970-01-01 00:00:00.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/meson_post_install 2019-02-17 22:08:25.000000000 +0000
@@ -0,0 +1,12 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+schemadir = os.path.join(os.environ["MESON_INSTALL_PREFIX"],
+ "share", "glib-2.0", "schemas")
+
+if not os.environ.get("DESTDIR"):
+ print("Compiling gsettings schemas...")
+ subprocess.call(["glib-compile-schemas", schemadir])
+
diff -Nru budgie-extras-0.8.0/budgie-showtime/README.md budgie-extras-0.8.1/budgie-showtime/README.md
--- budgie-extras-0.8.0/budgie-showtime/README.md 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/README.md 2019-02-17 22:08:25.000000000 +0000
@@ -1,9 +1,29 @@
# Budgie ShowTime
-Budgie Showtime is a digital desktop clock, showing time and/or date. Textcolor of both the displayed time and dat can be set separately from the applet's menu.
+Budgie Showtime is a digital desktop clock, showing time, and optionally, date. Textcolor of both can be set separately from the applet's menu.
-![menu](https://github.com/UbuntuBudgie/budgie-extras/blob/master/budgie-showtime/menu.png)
+Settings from Budgie Settings include text alignment, -color, -size, temporarily make the applet dragable for custom positioning, 12 hrs format, custom data formatting according to:
-![desktop](https://github.com/UbuntuBudgie/budgie-extras/blob/master/budgie-showtime/desktop.png)
+https://valadoc.org/glib-2.0/GLib.DateTime.format.html
+Furthermore, gsettings overrides can be done for font (-family), left or right bottom positioning.
+
+To set left-bottom:
+xposition = 1
+yposition = -1
+
+To set right-bottom:
+xposition = 2
+yposition = -1
+
+# Install
+Run from the repo's folder:
+
+- `mkdir build && cd build`
+
+- `meson --buildtype plain --prefix=/usr --libdir=/usr/lib`
+
+- `ninja`
+
+- `sudo ninja install`
diff -Nru budgie-extras-0.8.0/budgie-showtime/schema/org.ubuntubudgie.plugins.budgie-showtime.gschema.xml budgie-extras-0.8.1/budgie-showtime/schema/org.ubuntubudgie.plugins.budgie-showtime.gschema.xml
--- budgie-extras-0.8.0/budgie-showtime/schema/org.ubuntubudgie.plugins.budgie-showtime.gschema.xml 1970-01-01 00:00:00.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/schema/org.ubuntubudgie.plugins.budgie-showtime.gschema.xml 2019-02-17 22:08:25.000000000 +0000
@@ -0,0 +1,71 @@
+
+
+
+
+ Custom date format
+ Optional dateformat. Use string formatting conform the -date- command
+ ""
+
+
+ Font for desktop time
+ The font, showing on the desktop's time representation
+ "Sans"
+
+
+ Font for desktop date
+ The font, showing on the desktop's date representation
+ "Sans"
+
+
+ Color of the displayed time
+ Text color of the applet's desktop representation
+ ["255", "255", "255"]
+
+
+ Color of the displayed time
+ Text color of the applet's desktop representation
+ ["255", "255", "255"]
+
+
+ X- position of the desktop window
+ Sets the X position, if y is also -1, x=1 positions to the left and x=2 positions to the right
+ 1
+
+
+ Fontsize for date
+ The fontsize of the desktop data representation
+ 35
+
+
+ Fontsize for time
+ The fontsize of the desktop time representation
+ 91
+
+
+ Y- position of the desktop window
+ Sets the Y position, -1 sets to default (bottom left or right)
+ -1
+
+
+ Use 12 hrs time format
+ Display time in 12hr format
+ false
+
+
+ Show the date on the desktop
+ Show a dynamically updated forecast in the applet's popover
+ true
+
+
+ Desktop text alignment
+ Text should be aligned on the left side (true)
+ true
+
+
+ draggable by Super + drag
+ The window can be dragged temporarily by Super + drag
+ false
+
+
+
diff -Nru budgie-extras-0.8.0/budgie-showtime/ShowTime budgie-extras-0.8.1/budgie-showtime/ShowTime
--- budgie-extras-0.8.0/budgie-showtime/ShowTime 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/ShowTime 1970-01-01 00:00:00.000000000 +0000
@@ -1,145 +0,0 @@
-#!/usr/bin/env python3
-import gi
-gi.require_version("Gtk", "3.0")
-gi.require_version("Gdk", "3.0")
-from gi.repository import Gtk, Gdk, GObject, Pango
-from threading import Thread
-import cairo
-import time
-import signal
-import os
-import clocktools as clt
-
-
-"""
-Budgie ShowTime
-Author: Jacob Vlijm
-Copyright=Copyright © 2017-2018 Ubuntu Budgie Developers
-Website=https://ubuntubudgie.org
-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 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 .
-"""
-
-time_color = clt.hexcolor(clt.read_color(clt.timecolor))
-date_color = clt.hexcolor(clt.read_color(clt.datecolor))
-posfile = os.path.join(clt.prefspath, "position")
-font = clt.get_font()
-
-
-class ShowTimeWin(Gtk.Window):
- def __init__(self):
-
- Gtk.Window.__init__(self, title="PrVflash")
-
- # window props, bindings
- self.set_keep_below(True)
- self.set_wmclass("Showtime", "showtime")
- self.set_type_hint(Gdk.WindowTypeHint.DESKTOP)
- self.set_decorated(False)
- self.connect("destroy", Gtk.main_quit)
- self.set_skip_taskbar_hint(True)
- # transparency
- screen = self.get_screen()
- visual = screen.get_rgba_visual()
- if all([visual, screen.is_composited()]):
- self.set_visual(visual)
- self.set_app_paintable(True)
- self.connect("draw", self.area_draw)
- # main grid
- self.timegrid = Gtk.Grid()
- self.timelabel = Gtk.Label("")
- self.datelabel = Gtk.Label("")
-
- self.timelabel.modify_font(Pango.FontDescription(font + " 60"))
- self.timelabel.modify_fg(Gtk.StateFlags.NORMAL,
- Gdk.color_parse(time_color))
- self.timelabel.set_xalign(1)
-
- self.datelabel.modify_font(Pango.FontDescription(font + " 25"))
- self.datelabel.modify_fg(Gtk.StateFlags.NORMAL,
- Gdk.color_parse(date_color))
- self.datelabel.set_xalign(1)
- self.timegrid.attach(self.timelabel, 0, 0, 1, 1)
- self.timegrid.attach(self.datelabel, 0, 1, 1, 1)
- self.add(self.timegrid)
- # create rows
- self.set_textposition()
- self.show_all()
- self.update = Thread(target=self.show_time)
- # daemonize the thread to make the indicator stopable
- self.update.setDaemon(True)
- self.update.start()
-
- def set_textposition(self):
- pos = clt.get_textposition()
- self.move(pos[1], pos[2])
-
- def check_12hrs(self, timedate):
- if twelvehrs:
- time = timedate[0].split(":")
- hrs = int(time[0])
- add = " PM" if 12 <= hrs < 24 else " AM"
- hrs = hrs - 12 if hrs > 12 else hrs
- hrs = hrs + 12 if hrs < 1 else hrs
- newtime = ":".join([str(hrs), time[1]]) + add
- timedate[0] = newtime
- return timedate
-
- def fix_leadingzeros(self, currtime):
- tofix = currtime[1].split()
- currtime[1] = " ".join([it.lstrip("0") for it in tofix])
- return currtime
-
- def show_time(self):
- wait = 1
- while True:
- time.sleep(wait)
- wait = 61 - int(time.time()) % 60
- currtime = time.strftime('%H:%M-%d %B %Y')
- timedate = self.fix_leadingzeros(currtime.split("-"))
- if not mutetime:
- timedate = self.check_12hrs(timedate)
- GObject.idle_add(
- self.timelabel.set_text,
- timedate[0],
- priority=GObject.PRIORITY_DEFAULT
- )
- if not mutedate:
- GObject.idle_add(
- self.datelabel.set_text,
- timedate[1],
- priority=GObject.PRIORITY_DEFAULT
- )
-
- def stop(self, *args):
- Gtk.main_quit()
-
- def area_draw(self, widget, cr):
- # set transparent color
- cr.set_source_rgba(0.2, 0.2, 0.2, 0)
- cr.set_operator(cairo.OPERATOR_SOURCE)
- cr.paint()
- cr.set_operator(cairo.OPERATOR_OVER)
-
-
-def show():
- ShowTimeWin()
- GObject.threads_init()
- signal.signal(signal.SIGINT, signal.SIG_DFL)
- Gtk.main()
-
-
-mutetime = os.path.exists(clt.mute_time)
-mutedate = os.path.exists(clt.mute_date)
-twelvehrs = os.path.exists(clt.twelve_hrs)
-
-
-# only run clock if it should actually show something
-if not all([mutetime, mutedate]):
- show()
diff -Nru budgie-extras-0.8.0/budgie-showtime/src/meson.build budgie-extras-0.8.1/budgie-showtime/src/meson.build
--- budgie-extras-0.8.0/budgie-showtime/src/meson.build 1970-01-01 00:00:00.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/src/meson.build 2019-02-17 22:08:25.000000000 +0000
@@ -0,0 +1,2 @@
+subdir('showtime')
+subdir('showtime_desktop')
diff -Nru budgie-extras-0.8.0/budgie-showtime/src/showtime/BudgieShowTime.vala budgie-extras-0.8.1/budgie-showtime/src/showtime/BudgieShowTime.vala
--- budgie-extras-0.8.0/budgie-showtime/src/showtime/BudgieShowTime.vala 1970-01-01 00:00:00.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/src/showtime/BudgieShowTime.vala 2019-02-17 22:08:25.000000000 +0000
@@ -0,0 +1,322 @@
+using Gtk;
+using Gdk;
+
+/*
+* BudgieShowTimeII
+* Author: Jacob Vlijm
+* Copyright © 2017-2019 Ubuntu Budgie Developers
+* Website=https://ubuntubudgie.org
+* 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 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
+* .
+*/
+
+
+namespace BudgieShowTimeApplet {
+
+ private string moduledir;
+
+ public class BudgieShowTimeSettings : Gtk.Grid {
+
+ /* Budgie Settings -section */
+ GLib.Settings? settings = null;
+ Button dragbutton;
+ CheckButton leftalign;
+ CheckButton twelve_hrs;
+ Gtk.SpinButton timefont;
+ Gtk.SpinButton datefont;
+ Gtk.ColorButton timecolor;
+ Gtk.ColorButton datecolor;
+ GLib.Settings showtime_settings;
+ Label draghint;
+ string position;
+ string dragposition;
+ string fixposition;
+
+ public BudgieShowTimeSettings(GLib.Settings? settings) {
+
+ this.settings = settings;
+
+ // translated strings
+ position = (_("Position"));
+ dragposition = (_("Drag position"));
+ fixposition = (_("Save position"));
+
+ string stsettings_css = """
+ .st_header {
+ font-weight: bold;
+ }
+ """;
+
+ string dragtext = (_(
+ "Enable Super + drag to set time position. Click ´Save position´ to save."
+ ));
+
+ showtime_settings = new GLib.Settings(
+ "org.ubuntubudgie.plugins.budgie-showtime"
+ );
+
+ var screen = this.get_screen();
+ // window content
+ //var grid = new Gtk.Grid ();
+ this.set_row_spacing(10);
+ var position_header = new Gtk.Label(position);
+ position_header.xalign = 0;
+ this.attach(position_header, 0, 0, 10, 1);
+ // drag button
+ dragbutton = new Gtk.Button();
+ dragbutton.set_tooltip_text(dragtext);
+ dragbutton.set_label(_("Drag position"));
+ this.attach(dragbutton, 0, 2, 1, 1);
+ //
+ draghint = new Gtk.Label("");
+ this.attach(draghint, 0, 4, 1, 1);
+ // time font settings
+ var time_header = new Gtk.Label(_("Time font, size & color"));
+ time_header.xalign = 0;
+ this.attach(time_header, 0, 5, 10, 1);
+ timefont = new Gtk.SpinButton.with_range (10, 255, 1);
+ this.attach(timefont, 0, 6, 1, 1);
+ var spacelabel2 = new Gtk.Label("");
+ this.attach(spacelabel2, 1, 6, 1, 1);
+ timecolor = new Gtk.ColorButton();
+ this.attach(timecolor, 2, 6, 1, 1);
+ var spacelabel3 = new Gtk.Label("");
+ this.attach(spacelabel3, 1, 7, 1, 1);
+
+ // date font settings
+ var date_header = new Gtk.Label(_("Date font, size & color"));
+ date_header.xalign = 0;
+ this.attach(date_header, 0, 10, 10, 1);
+ datefont = new Gtk.SpinButton.with_range (10, 255, 1);
+ this.attach(datefont, 0, 11, 1, 1);
+ var spacelabel4 = new Gtk.Label("");
+ this.attach(spacelabel4, 1, 11, 1, 1);
+ datecolor = new Gtk.ColorButton();
+ this.attach(datecolor, 2, 11, 1, 1);
+ var spacelabel5 = new Gtk.Label("");
+ this.attach(spacelabel5, 1, 12, 1, 1);
+ // miscellaneous section
+ var general_header = new Gtk.Label(_("Miscellaneous"));
+ general_header.xalign = 0;
+ this.attach(general_header, 0, 20, 10, 1);
+ leftalign = new Gtk.CheckButton.with_label(_("Left align text"));
+ this.attach(leftalign, 0, 21, 10, 1);
+ twelve_hrs = new Gtk.CheckButton.with_label(_("Use 12hr time format"));
+ this.attach(twelve_hrs, 0, 22, 10, 1);
+ var spacelabel6 = new Gtk.Label("\n");
+ this.attach(spacelabel6, 1, 23, 1, 1);
+
+ // Set style on headers
+ position_header.get_style_context().add_class("st_header");
+ Gtk.CssProvider css_provider = new Gtk.CssProvider();
+ try {
+ css_provider.load_from_data(stsettings_css);
+ Gtk.StyleContext.add_provider_for_screen(
+ screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER
+ );
+ }
+ catch (Error e) {
+ }
+ Label[] boldones = {
+ time_header, date_header, general_header, position_header
+ };
+ foreach (Label l in boldones) {
+ l.get_style_context().add_class("st_header");
+ };
+ set_initialvals();
+ connect_widgets();
+ this.show_all();
+ }
+
+ private void set_initialvals () {
+ // fetch current settings, set widgets
+ set_initialdrag();;
+ set_initialcolor(timecolor, "timecolor");
+ set_initialcolor(datecolor, "datecolor");
+ set_initialfontsize(timefont, "timefontsize");
+ set_initialfontsize(datefont, "datefontsize");
+ set_initialcheck(leftalign, "leftalign");
+ set_initialcheck(twelve_hrs, "twelvehrs");
+ }
+
+ private void set_initialcheck (CheckButton button, string setting) {
+ // checkboxes - initials
+ bool currval = showtime_settings.get_boolean(setting);
+ button.set_active(currval);
+ }
+
+ private void connect_widgets () {
+ // as the name sais
+ dragbutton.clicked.connect(toggle_drag);
+ timefont.value_changed.connect (() => {
+ set_newfontsize(timefont, "timefontsize");
+ });
+ datefont.value_changed.connect (() => {
+ set_newfontsize(datefont, "datefontsize");
+ });
+ timecolor.color_set.connect (() => {
+ set_newcolor(timecolor, "timecolor");
+ });
+ datecolor.color_set.connect (() => {
+ set_newcolor(datecolor, "datecolor");
+ });
+ leftalign.toggled.connect (() => {
+ toggle_value(leftalign, "leftalign");
+ });
+ twelve_hrs.toggled.connect (() => {
+ toggle_value(twelve_hrs, "twelvehrs");
+ });
+ }
+
+ private void toggle_value (CheckButton button, string setting) {
+ // toggle callback
+ bool newval = button.get_active();
+ showtime_settings.set_boolean(setting, newval);
+ }
+
+ private void set_newcolor (ColorButton button, string setting) {
+ // color buttons callback
+ RGBA newval = button.get_rgba();
+ string[] rgb = {
+ ((int)(newval.red * 255)).to_string(),
+ ((int)(newval.green * 255)).to_string(),
+ ((int)(newval.blue * 255)).to_string()
+ };
+ showtime_settings.set_strv(setting, rgb);
+ }
+
+ private void set_initialcolor (ColorButton button, string setting) {
+ // get current settings from gsetting, set button color
+ string[] currset = showtime_settings.get_strv(setting);
+ RGBA currcolor = Gdk.RGBA () {
+ red = int.parse(currset[0]) / 255.0,
+ green = int.parse(currset[1]) / 255.0,
+ blue = int.parse(currset[2]) / 255.0,
+ alpha = 1
+ };
+ button.set_rgba(currcolor);
+ }
+
+ private void set_newfontsize (SpinButton button, string setting) {
+ // get current settings from button, set gsetings
+ int newval = (int)button.get_value();
+ showtime_settings.set_int(setting, newval);
+ }
+
+ private void set_initialfontsize (SpinButton button, string setting) {
+ // get current settings from gsettinsg, set spinbutton
+ int fontsize = showtime_settings.get_int(setting);
+ button.set_value(fontsize);
+ }
+
+ private void set_initialdrag () {
+ // get current settings from gsettinsg, set dragbutton label
+ bool curr_draggable = showtime_settings.get_boolean("draggable");
+ dragbutton.set_label(dragposition);
+ if (curr_draggable) {
+ dragbutton.set_label(fixposition);
+ }
+ }
+
+ private void toggle_drag () {
+ // act on toggling drag, chage label
+ bool curr_draggable = showtime_settings.get_boolean("draggable");
+ showtime_settings.set_boolean("draggable", !curr_draggable);
+ if (curr_draggable) {
+ dragbutton.set_label(dragposition);
+ draghint.set_text("");
+ }
+ else {
+ dragbutton.set_label(fixposition);
+ draghint.set_text(_("Super + drag"));
+ }
+ }
+ }
+
+
+ public class Plugin : Budgie.Plugin, Peas.ExtensionBase {
+
+ public Budgie.Applet get_panel_widget(string uuid) {
+ var info = this.get_plugin_info();
+ moduledir = info.get_module_dir();
+ return new Applet();
+ }
+ }
+
+
+ public class Applet : Budgie.Applet {
+
+ public string uuid { public set; public get; }
+ public override bool supports_settings()
+ {
+ return true;
+ }
+ public override Gtk.Widget? get_settings_ui()
+ {
+ return new BudgieShowTimeSettings(this.get_applet_settings(uuid));
+ }
+
+ private void open_window(string path) {
+ // call the set-color window
+ bool win_exists = check_onwindow(path);
+ if (!win_exists) {
+ try {
+ Process.spawn_command_line_async(path);
+ }
+ catch (SpawnError e) {
+ /* nothing to be done */
+ }
+ }
+ }
+
+ private bool check_onwindow(string path) {
+ string cmd_check = "pgrep -f " + path;
+ string output;
+ try {
+ GLib.Process.spawn_command_line_sync(cmd_check, out output);
+ if (output == "") {
+ return false;
+ }
+ }
+ catch (SpawnError e) {
+ /* let's say it always works */
+ return false;
+ }
+ return true;
+ }
+
+ public Applet() {
+ open_window(moduledir.concat("/showtime_desktop"));
+ initialiseLocaleLanguageSupport();
+ }
+
+ public void initialiseLocaleLanguageSupport() {
+ // Initialize gettext
+ GLib.Intl.setlocale(GLib.LocaleCategory.ALL, "");
+ GLib.Intl.bindtextdomain(
+ Config.GETTEXT_PACKAGE, Config.PACKAGE_LOCALEDIR
+ );
+ GLib.Intl.bind_textdomain_codeset(
+ Config.GETTEXT_PACKAGE, "UTF-8"
+ );
+ GLib.Intl.textdomain(Config.GETTEXT_PACKAGE);
+ }
+ }
+}
+
+
+[ModuleInit]
+public void peas_register_types(TypeModule module){
+ /* boilerplate - all modules need this */
+ var objmodule = module as Peas.ObjectModule;
+ objmodule.register_extension_type(typeof(
+ Budgie.Plugin), typeof(BudgieShowTimeApplet.Plugin)
+ );
+}
\ No newline at end of file
diff -Nru budgie-extras-0.8.0/budgie-showtime/src/showtime/config.h.in budgie-extras-0.8.1/budgie-showtime/src/showtime/config.h.in
--- budgie-extras-0.8.0/budgie-showtime/src/showtime/config.h.in 1970-01-01 00:00:00.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/src/showtime/config.h.in 2019-02-17 22:08:25.000000000 +0000
@@ -0,0 +1,7 @@
+#ifndef _CONFIG_H
+#define _CONFIG_H
+
+#define GETTEXT_PACKAGE "@PACKAGE_NAME@"
+#define PACKAGE_LOCALEDIR "@LOCALE_DIR@"
+
+#endif
diff -Nru budgie-extras-0.8.0/budgie-showtime/src/showtime/meson.build budgie-extras-0.8.1/budgie-showtime/src/showtime/meson.build
--- budgie-extras-0.8.0/budgie-showtime/src/showtime/meson.build 1970-01-01 00:00:00.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/src/showtime/meson.build 2019-02-17 22:08:25.000000000 +0000
@@ -0,0 +1,49 @@
+configurationData = configuration_data()
+configurationData.set('PACKAGE_NAME', meson.project_name())
+configurationData.set('LOCALE_DIR', LOCALE_DIR)
+configure_file(input: 'config.h.in', output: 'config.h', configuration: configurationData)
+
+custom_target('plugin-file-showtime',
+ input : 'ShowTime.plugin.in',
+ output : 'ShowTime.plugin',
+ command : [intltool, '--desktop-style', podir, '@INPUT@', '@OUTPUT@'],
+ install : true,
+ install_dir : LIB_INSTALL_DIR)
+
+BudgieShowTimeSources = [
+'BudgieShowTime.vala'
+]
+
+BudgieShowTimeDependencies = [
+dependency('gtk+-3.0'),
+dependency('budgie-1.0'),
+dependency('gio-2.0'),
+dependency('gdk-3.0'),
+meson.get_compiler('c').find_library('m', required: false)
+]
+
+BudgieShowTimeValaArgs = [
+'--pkg=config',
+'--vapidir=' + VAPI_DIR,
+'--target-glib=2.38',
+]
+
+BudgieShowTimeCArgs = [
+'-include',
+'config.h',
+'-lm'
+]
+
+shared_library(
+ 'budgieshowtime',
+ BudgieShowTimeSources,
+ dependencies: BudgieShowTimeDependencies,
+ vala_args: BudgieShowTimeValaArgs,
+ c_args: BudgieShowTimeCArgs,
+ install: true,
+ install_dir: LIB_INSTALL_DIR
+)
+
+
+
+
diff -Nru budgie-extras-0.8.0/budgie-showtime/src/showtime/ShowTime.plugin.in budgie-extras-0.8.1/budgie-showtime/src/showtime/ShowTime.plugin.in
--- budgie-extras-0.8.0/budgie-showtime/src/showtime/ShowTime.plugin.in 1970-01-01 00:00:00.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/src/showtime/ShowTime.plugin.in 2019-02-17 22:08:25.000000000 +0000
@@ -0,0 +1,8 @@
+[Plugin]
+Module=budgieshowtime.so
+Name=ShowTime
+Description=Desktop time & date
+Authors=Jacob Vlijm
+Copyright=© 2017-2019 Ubuntu Budgie Developers
+Website=https://ubuntubudgie.org
+Icon=showtimenew-symbolic
diff -Nru budgie-extras-0.8.0/budgie-showtime/src/showtime_desktop/meson.build budgie-extras-0.8.1/budgie-showtime/src/showtime_desktop/meson.build
--- budgie-extras-0.8.0/budgie-showtime/src/showtime_desktop/meson.build 1970-01-01 00:00:00.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/src/showtime_desktop/meson.build 2019-02-17 22:08:25.000000000 +0000
@@ -0,0 +1,52 @@
+#configurationData = configuration_data()
+#configurationData.set('PACKAGE_NAME', meson.project_name())
+#configurationData.set('LOCALE_DIR', LOCALE_DIR)
+#configure_file(input: 'config.h.in', output: 'config.h', configuration: configurationData)
+
+#install_data('WeatherShow.plugin', install_dir: LIB_INSTALL_DIR)
+
+BudgieShowTimeSources = [
+'showtime_desktop.vala'
+]
+
+BudgieShowTimeDependencies = [
+dependency('gtk+-3.0'),
+meson.get_compiler('c').find_library('m', required: false)
+]
+
+BudgieShowTimeValaArgs = [
+'--pkg=config',
+'--vapidir=' + VAPI_DIR,
+'--target-glib=2.38',
+]
+
+BudgieShowTimeCArgs = [
+'-include',
+'config.h',
+'-lm'
+]
+
+BudgieShowTimeCArgs = [
+'-lm'
+]
+
+#shared_library(
+# 'weathershow',
+# WeatherShowSources,
+# dependencies: WeatherShowDependencies,
+# vala_args: WeatherShowValaArgs,
+# c_args: WeatherShowCArgs,
+# install: true,
+# install_dir: LIB_INSTALL_DIR
+#)
+
+
+executable(
+ 'showtime_desktop', BudgieShowTimeSources,
+ dependencies: BudgieShowTimeDependencies,
+ install: true,
+ vala_args: BudgieShowTimeValaArgs,
+ c_args: BudgieShowTimeCArgs,
+ install_dir: LIB_INSTALL_DIR,
+)
+
diff -Nru budgie-extras-0.8.0/budgie-showtime/src/showtime_desktop/showtime_desktop.vala budgie-extras-0.8.1/budgie-showtime/src/showtime_desktop/showtime_desktop.vala
--- budgie-extras-0.8.0/budgie-showtime/src/showtime_desktop/showtime_desktop.vala 1970-01-01 00:00:00.000000000 +0000
+++ budgie-extras-0.8.1/budgie-showtime/src/showtime_desktop/showtime_desktop.vala 2019-02-17 22:08:25.000000000 +0000
@@ -0,0 +1,361 @@
+using Gtk;
+using Math;
+using Cairo;
+
+
+namespace ShowTime {
+
+ private Label timelabel;
+ private Label datelabel;
+ GLib.Settings showtime_settings;
+ private class ShowTimeappearance {
+ private string css_template = """
+ .timelabel {
+ font-size: bigfontpx;
+ color: xxx-xxx-xxx;
+ font-family: "Timefont";
+ }
+ .datelabel {
+ font-size: smallfontpx;
+ color: yyy-yyy-yyy;
+ font-family: "Datefont";
+ }
+ """;
+
+ public void get_css (Gdk.Screen screen) {
+ string[] tcolor = showtime_settings.get_strv("timecolor");
+ string[] dcolor = showtime_settings.get_strv("datecolor");
+ string bigfont = showtime_settings.get_int("timefontsize").to_string();
+ string smallfont = showtime_settings.get_int("datefontsize").to_string();
+ string fontfamily_time = showtime_settings.get_string("timefont");
+ string fontfamily_date = showtime_settings.get_string("datefont");
+ string showtime_css = css_template.replace(
+ "xxx-xxx-xxx", "rgb(".concat(string.joinv(", ", tcolor), ")")
+ ).replace(
+ "yyy-yyy-yyy", "rgb(".concat(string.joinv(", ", dcolor), ")")
+ ).replace(
+ "bigfont", bigfont
+ ).replace(
+ "smallfont", smallfont
+ ).replace(
+ "Timefont", fontfamily_time
+ ).replace(
+ "Datefont", fontfamily_date
+ );
+
+ // set / update time label
+ Gtk.CssProvider css_provider = new Gtk.CssProvider();
+ timelabel.get_style_context().remove_class("timelabel");
+ datelabel.get_style_context().remove_class("datelabel");
+
+ try {
+ css_provider.load_from_data(showtime_css);
+ Gtk.StyleContext.add_provider_for_screen(
+ screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER
+ );
+ timelabel.get_style_context().add_class("timelabel");
+ datelabel.get_style_context().add_class("datelabel");
+ }
+ catch (Error e) {
+ // not much to be done
+ print("Error loading css data\n");
+ }
+ }
+ }
+
+
+ public class TimeWindow : Gtk.Window {
+ int next_time;
+ bool twelvehrs;
+ bool showdate;
+ string dateformat;
+ ShowTimeappearance appearance;
+ bool skip_update = false;
+ int root_x;
+ int root_y;
+
+ public TimeWindow () {
+ // define stuff
+ check_res();
+
+ showtime_settings = new GLib.Settings(
+ "org.ubuntubudgie.plugins.budgie-showtime"
+ );
+ dateformat = get_dateformat();
+ appearance = new ShowTimeappearance();
+ // window
+ this.title = "desktop_showtime";
+ this.set_type_hint(Gdk.WindowTypeHint.DESKTOP);
+ //this.stick();
+ this.destroy.connect(Gtk.main_quit);
+ this.set_decorated(false);
+ var screen = this.get_screen();
+ var maingrid = new Grid();
+ timelabel = new Label("");
+ datelabel = new Label("");
+ // position
+ set_windowposition();
+ //root_x = showtime_settings.get_int("xposition");
+ //root_y = showtime_settings.get_int("yposition");
+ //this.move(root_x, root_y);
+ maingrid.attach(timelabel, 0, 0, 1, 1);
+ maingrid.attach(datelabel, 0, 1, 1, 1);
+ this.add(maingrid);
+ string[] bind = {
+ "datecolor", "datefont", "datefontsize", "leftalign",
+ "showdate", "timecolor", "timefont", "timefontsize",
+ "twelvehrs", "xposition", "yposition"
+ };
+ foreach (string s in bind) {
+ showtime_settings.changed[s].connect(update_appearance);
+ }
+ showtime_settings.changed["draggable"].connect(update_positionsettings);
+ update_appearance();
+ appearance.get_css(screen);
+ bool skip_update = true;
+ //update_positionsettings ();
+ skip_update = false;
+ // transparency
+ this.set_app_paintable(true);
+ var visual = screen.get_rgba_visual();
+ this.set_visual(visual);
+ this.draw.connect(on_draw);
+ this.show_all();
+ new Thread ("oldtimer", run_time);
+ }
+ private void set_windowposition () {
+ root_x = showtime_settings.get_int("xposition");
+ root_y = showtime_settings.get_int("yposition");
+ int[] geodata = check_res();
+ if (root_x == 1 && root_y == -1) {
+ root_x = geodata[2] + 150;
+ root_y = geodata[3] + geodata[1] - 320;
+ }
+ else if (root_x == 2 && root_y == -1) {
+ root_x = geodata[2] + geodata[0] - 400;
+ root_y = geodata[3] + geodata[1] - 320;
+ }
+ this.move(root_x, root_y);
+ }
+
+ private int[] check_res() {
+ /* see what is the resolution on the primary monitor */
+ var prim = Gdk.Display.get_default().get_primary_monitor();
+ var geo = prim.get_geometry();
+ int width = geo.width;
+ int height = geo.height;
+ int screen_xpos = geo.x;
+ int screen_ypos = geo.y;
+ return {width, height, screen_xpos, screen_ypos};
+ }
+
+ private bool on_draw (Widget da, Context ctx) {
+ // needs to be connected to transparency settings change
+ ctx.set_source_rgba(0, 0, 0, 0);
+ ctx.set_operator(Cairo.Operator.SOURCE);
+ ctx.paint();
+ ctx.set_operator(Cairo.Operator.OVER);
+ return false;
+ }
+
+ private int get_stringindex (string[] arr, string lookfor) {
+ // get index of string in list
+ for (int i=0; i < arr.length; i++) {
+ if(lookfor == arr[i]) return i;
+ }
+ return -1;
+ }
+
+ /* private string capitalize (string s) {
+ string header = s.substring(0, 1).up();
+ string remaining = s.substring(1, s.length - 1);
+ return header.concat(remaining);
+ } */
+
+ private string fix_mins(int minutes) {
+ // make sure the minutes are displayed in double digits
+ string minsdisplay = minutes.to_string();
+ if (minsdisplay.length == 1) {
+ return "0".concat(minsdisplay);
+ }
+ return minsdisplay;
+ }
+
+ private string get_localtime (DateTime newtime) {
+ int mins = newtime.get_minute();
+ int hrs = newtime.get_hour();
+ int newhrs = hrs;
+ string add = "";
+ string showmins = fix_mins(mins);
+ // hrs to double digits
+ if (twelvehrs) {
+ add = " ".concat("AM"); //translate!!
+ if (hrs > 12) {
+ newhrs = hrs - 12;
+ }
+ else if (hrs < 1) {
+ newhrs = hrs + 12;
+ }
+ if (12 <= hrs < 24) {
+ add = " ".concat("PM");
+ }
+ }
+ string hrs_display = fix_mins(newhrs);
+ return @"$hrs_display:$showmins$add";
+ }
+
+ private string get_dateformat () {
+ string date_fmt = showtime_settings.get_string("dateformat");
+ if (date_fmt == "") {
+ return read_dateformat();
+ }
+ return date_fmt;
+ }
+
+ private string read_dateformat () {
+ string[] date_data = {"%a", "%e", "%b"};
+ string[] full_data = {"%A", "%e", "%B"};
+ string cmd = "locale date_fmt";
+ string output = "";
+ string match = "";
+ try {
+ StringBuilder builder = new StringBuilder ();
+ GLib.Process.spawn_command_line_sync(cmd, out output);
+ string[] output_data = output.split(" ");
+ foreach (string s in output_data) {
+ int index = get_stringindex(date_data, s);
+ if (index != -1) {
+ match = full_data[index];
+ builder.append (match).append (" ");
+ }
+ }
+ return builder.str;
+ }
+ catch (Error e) {
+ return ""; // fallback to default (edit!!)
+ }
+ }
+
+ private void update_positionsettings () {
+ bool draggable = showtime_settings.get_boolean("draggable");
+ if (draggable) {
+ this.set_type_hint(Gdk.WindowTypeHint.NORMAL);
+ }
+ else if (!skip_update) {
+ this.set_type_hint(Gdk.WindowTypeHint.DESKTOP);
+ int newroot_x;
+ int newroot_y;
+ this.get_position (out newroot_x, out newroot_y);
+ root_x = newroot_x;
+ root_y = newroot_y;
+ showtime_settings.set_int("xposition", newroot_x);
+ showtime_settings.set_int("yposition", newroot_y);
+ }
+ }
+
+ private void update_appearance () {
+ // text align
+ int al = 1;
+ if (showtime_settings.get_boolean("leftalign")) {
+ al = 0;
+ }
+ timelabel.xalign = al;
+ datelabel.xalign = al;
+ // showdate
+ showdate = showtime_settings.get_boolean("showdate");
+ twelvehrs = showtime_settings.get_boolean("twelvehrs");
+ appearance.get_css(screen);
+ update_interface();
+ }
+
+ private void update_interface () {
+ var now = new DateTime.now_local();
+ // get_localtime(now), now.format(dateformat)
+ timelabel.set_label(get_localtime(now));
+ string datestring = now.format(dateformat);
+ if (!showdate) {
+ datestring = "";
+ }
+ datelabel.set_label(datestring);
+ }
+
+ private bool check_onapplet () {
+ /* check if the applet still runs */
+ string cmd = "dconf dump /com/solus-project/budgie-panel/applets/";
+ string output;
+ try {
+ GLib.Process.spawn_command_line_sync(cmd, out output);
+ }
+ /* on an occasional exception, don't break the loop */
+ catch (SpawnError e) {
+ return true;
+ }
+ bool check = output.contains("ShowTime");
+ return check;
+ }
+
+ private int convert_remainder_topositive (double subj, double rem) {
+ // Math.remainder possibly gives a negative output, seems silly
+ if (rem < 0) {
+ return (int)(subj + rem);
+ }
+ return (int)rem;
+ }
+
+ private int[] calibrate_time () {
+ /*
+ the cycle is double-layered: once per 6 seconds, there is a
+ dconf check to see if the applet is still on the panel
+ (kill the thread & window if not), once per minute fine-
+ tune the minute-sync. On startup, we need to synchroonize
+ the cycle so that time update is done exactly on minute-
+ switch. additionally, once per minute we sync with real clock
+ */
+ var curr_time = new DateTime.now_local();
+ int curr_sec = curr_time.get_second();
+ int curr_remaining = convert_remainder_topositive(
+ 6, Math.remainder (60 - (double)curr_sec, 6)
+ );
+ int remaining_cycles = (int)((60 - curr_sec) / 6);
+ return {curr_remaining, remaining_cycles};
+ }
+
+ private bool run_time () {
+ // make sure time shows instantly
+ update_interface();
+ calibrate_time();
+ // this is the main time-loop
+ int[] calibrated_loopdata = calibrate_time();
+ int loopcycle = 0;
+ while (true) {
+ if (!check_onapplet()) {
+ // exiting if applet is removed
+ Gtk.main_quit();
+ break;
+ }
+ if (loopcycle == 0){
+ next_time = calibrated_loopdata[0];
+ }
+ if (loopcycle >= calibrated_loopdata[1]) {
+ calibrated_loopdata = calibrate_time();
+ loopcycle = 0;
+ Idle.add ( () => {
+ update_interface();
+ return false;
+ });
+ }
+ loopcycle += 1;
+ Thread.usleep(next_time * 1000000);
+ next_time = 6;
+ }
+ return false;
+ }
+ }
+
+ public static void main (string[] args) {
+ Gtk.init(ref args);
+ new TimeWindow();
+ Gtk.main();
+ }
+
+}
\ No newline at end of file
diff -Nru budgie-extras-0.8.0/ChangeLog budgie-extras-0.8.1/ChangeLog
--- budgie-extras-0.8.0/ChangeLog 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/ChangeLog 2019-02-17 22:08:25.000000000 +0000
@@ -1,3 +1,7 @@
+v0.8.1 Time is a changing
+ - ShowTime has now been rewritten in Vala with configurable options via dconf.
+ - This allows overriding of fonts, position, size, colour etc.
+ - See showtime README for details.
v0.8.0 Take-a-break
- New Pomodoro applet called Take-a-break
- Correctly deal with new icons from OWM for budgie-weathershow-applet
diff -Nru budgie-extras-0.8.0/debian/budgie-showtime-applet.install budgie-extras-0.8.1/debian/budgie-showtime-applet.install
--- budgie-extras-0.8.0/debian/budgie-showtime-applet.install 2019-02-12 16:43:49.000000000 +0000
+++ budgie-extras-0.8.1/debian/budgie-showtime-applet.install 2019-02-17 20:36:49.000000000 +0000
@@ -1,2 +1,3 @@
usr/lib/budgie-desktop/plugins/budgie-showtime
-usr/share/pixmaps/budgie-showtime-symbolic.svg
+usr/share/pixmaps/showtimenew-symbolic.svg
+usr/share/glib-2.0/schemas/org.ubuntubudgie.plugins.budgie-showtime.gschema.xml
\ No newline at end of file
diff -Nru budgie-extras-0.8.0/debian/changelog budgie-extras-0.8.1/debian/changelog
--- budgie-extras-0.8.0/debian/changelog 2019-02-12 16:43:49.000000000 +0000
+++ budgie-extras-0.8.1/debian/changelog 2019-02-17 20:36:49.000000000 +0000
@@ -1,3 +1,13 @@
+budgie-extras (0.8.1-0ubuntu1) disco; urgency=medium
+
+ * New release
+ - Change from python to vala version of ShowTime applet
+ * Packaging Changes
+ - Control: swap python dependencies for ShowTime to vala based
+ dependencies, architecture changed to any
+
+ -- David Mohammed Sun, 17 Feb 2019 20:36:49 +0000
+
budgie-extras (0.8.0-0ubuntu1) disco; urgency=medium
* New release
diff -Nru budgie-extras-0.8.0/debian/control budgie-extras-0.8.1/debian/control
--- budgie-extras-0.8.0/debian/control 2019-02-12 16:43:49.000000000 +0000
+++ budgie-extras-0.8.1/debian/control 2019-02-17 20:36:49.000000000 +0000
@@ -176,19 +176,10 @@
and the window will move to that workspace.
Package: budgie-showtime-applet
-Architecture: all
-Depends: python3,
- python3-gi,
- wmctrl,
- gir1.2-budgie-1.0,
- gir1.2-glib-2.0,
- gir1.2-gtk-3.0,
- gir1.2-peas-1.0,
- python3-psutil,
- python3-cairo,
- python3-gi-cairo,
- dconf-cli,
- ${misc:Depends}, ${python3:Depends}
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends},
+ budgie-extras-common,
+ dconf-cli
Description: Applet displaying date and time on the Budgie Desktop
This is part of a suite of python3 and Vala based applets for the Budgie
Desktop that provide additional user orientated capabilities.
diff -Nru budgie-extras-0.8.0/meson.build budgie-extras-0.8.1/meson.build
--- budgie-extras-0.8.0/meson.build 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/meson.build 2019-02-17 22:08:25.000000000 +0000
@@ -1,6 +1,6 @@
project('budgie-extras',
['vala', 'c'],
- version: '0.8.0',
+ version: '0.8.1',
meson_version: '>= 0.40.0'
)
diff -Nru budgie-extras-0.8.0/mkrelease.sh budgie-extras-0.8.1/mkrelease.sh
--- budgie-extras-0.8.0/mkrelease.sh 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/mkrelease.sh 2019-02-17 22:08:25.000000000 +0000
@@ -1,7 +1,7 @@
#!/bin/bash
set -e
-VERSION="0.8.0"
+VERSION="0.8.1"
NAME="budgie-extras"
git-archive-all.sh --format tar --prefix ${NAME}-${VERSION}/ --verbose -t HEAD ${NAME}-${VERSION}.tar
xz -9 "${NAME}-${VERSION}.tar"
diff -Nru budgie-extras-0.8.0/po/budgie-extras.pot budgie-extras-0.8.1/po/budgie-extras.pot
--- budgie-extras-0.8.0/po/budgie-extras.pot 2019-02-12 12:40:01.000000000 +0000
+++ budgie-extras-0.8.1/po/budgie-extras.pot 2019-02-17 22:08:25.000000000 +0000
@@ -8,57 +8,94 @@
msgstr ""
"Project-Id-Version: budgie-extras 10.4\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-12-06 12:57+0000\n"
+"POT-Creation-Date: 2019-02-17 20:09+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"Language: \n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: budgie-hotcorners/src/HotCornersApplet.vala:127
-msgid "Set pressure (0 = no pressure)"
+#: budgie-quicknote/QuickNoteApplet.vala:47
+msgid "Welcome to QuickNote."
msgstr ""
-#. Corner label
-#: budgie-hotcorners/src/HotCornersApplet.vala:207
-msgid "Corner"
+#: budgie-quicknote/QuickNoteApplet.vala:48
+msgid "Text will be saved automatically while typing."
msgstr ""
-#. Action label
-#: budgie-hotcorners/src/HotCornersApplet.vala:211
-msgid "Action"
+#. Gtk stuff, widgets etc. here
+#: budgie-quicknote/QuickNoteApplet.vala:143
+msgid "Text area width"
msgstr ""
-#. Custom label
-#: budgie-hotcorners/src/HotCornersApplet.vala:215
-msgid "Custom"
+#: budgie-quicknote/QuickNoteApplet.vala:150
+msgid "Text area height"
msgstr ""
-#: budgie-hotcorners/src/HotCornersApplet.vala:233
-msgid "Top-left"
+#: budgie-quicknote/QuickNoteApplet.vala:166
+msgid "Set a custom directory"
msgstr ""
-#: budgie-hotcorners/src/HotCornersApplet.vala:233
-msgid "Top-right"
+#: budgie-quicknote/QuickNoteApplet.vala:179
+msgid "Choose directory"
msgstr ""
-#: budgie-hotcorners/src/HotCornersApplet.vala:233
-msgid "Bottom-left"
+#: budgie-quicknote/QuickNoteApplet.vala:201
+#: budgie-trash/src/widgets/TrashPopover.vala:140
+#: budgie-weathershow/src/get_color/get_color.vala:88
+msgid "Cancel"
msgstr ""
-#: budgie-hotcorners/src/HotCornersApplet.vala:233
-msgid "Bottom-right"
+#: budgie-quicknote/QuickNoteApplet.vala:201
+msgid "Use"
msgstr ""
-#: budgie-hotcorners/src/HotCornersApplet.vala:316
-msgid "Missing applet"
+#. translated strings
+#: budgie-showtime/src/showtime/BudgieShowTime.vala:47
+msgid "Position"
msgstr ""
-#. WindowPreviews is the name of a Budgie Applet and does not need to be translated
-#: budgie-hotcorners/src/HotCornersApplet.vala:318
-msgid "Please add WindowPreviews"
+#: budgie-showtime/src/showtime/BudgieShowTime.vala:48
+#: budgie-showtime/src/showtime/BudgieShowTime.vala:75
+msgid "Drag position"
+msgstr ""
+
+#: budgie-showtime/src/showtime/BudgieShowTime.vala:49
+msgid "Save position"
+msgstr ""
+
+#: budgie-showtime/src/showtime/BudgieShowTime.vala:58
+msgid ""
+"Enable Super + drag to set time position. Click ´Save position´ to save."
+msgstr ""
+
+#. time font settings
+#: budgie-showtime/src/showtime/BudgieShowTime.vala:81
+msgid "Time font, size & color"
+msgstr ""
+
+#. date font settings
+#: budgie-showtime/src/showtime/BudgieShowTime.vala:94
+msgid "Date font, size & color"
+msgstr ""
+
+#. miscellaneous section
+#: budgie-showtime/src/showtime/BudgieShowTime.vala:106
+msgid "Miscellaneous"
+msgstr ""
+
+#: budgie-showtime/src/showtime/BudgieShowTime.vala:109
+msgid "Left align text"
+msgstr ""
+
+#: budgie-showtime/src/showtime/BudgieShowTime.vala:111
+msgid "Use 12hr time format"
+msgstr ""
+
+#: budgie-showtime/src/showtime/BudgieShowTime.vala:238
+msgid "Super + drag"
msgstr ""
#. spinbutton section (menu length)
@@ -78,8 +115,8 @@
#. tooltip
#: budgie-recentlyused/src/budgie-recentlyused.vala:177
-#: budgie-trash/src/widgets/TrashPopover.vala:79
#: budgie-trash/src/widgets/MenuRow.vala:52
+#: budgie-trash/src/widgets/TrashPopover.vala:79
msgid "Open"
msgstr ""
@@ -95,12 +132,6 @@
msgid "All items in the Trash will be permanently deleted."
msgstr ""
-#: budgie-trash/src/widgets/TrashPopover.vala:140
-#: budgie-weathershow/src/get_color/get_color.vala:88
-#: budgie-quicknote/QuickNoteApplet.vala:201
-msgid "Cancel"
-msgstr ""
-
#: budgie-trash/src/widgets/TrashPopover.vala:147
msgid "Empty Trash"
msgstr ""
@@ -131,83 +162,56 @@
msgid "Restore"
msgstr ""
-#. get weekday by index
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:121
-msgid "Monday"
-msgstr ""
-
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:121
-msgid "Tuesday"
-msgstr ""
-
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:121
-msgid "Wednesday"
-msgstr ""
-
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:121
-msgid "Thursday"
-msgstr ""
-
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:122
-msgid "Friday"
+#: budgie-hotcorners/src/HotCornersApplet.vala:127
+msgid "Set pressure (0 = no pressure)"
msgstr ""
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:122
-msgid "Saturday"
+#. Corner label
+#: budgie-hotcorners/src/HotCornersApplet.vala:207
+msgid "Corner"
msgstr ""
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:122
-msgid "Sunday"
+#. Action label
+#: budgie-hotcorners/src/HotCornersApplet.vala:211
+msgid "Action"
msgstr ""
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:734
-msgid "General"
+#. Custom label
+#: budgie-hotcorners/src/HotCornersApplet.vala:215
+msgid "Custom"
msgstr ""
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:740
-msgid "Desktop"
+#: budgie-hotcorners/src/HotCornersApplet.vala:233
+msgid "Top-left"
msgstr ""
-#. set city section
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:752
-msgid "City"
+#: budgie-hotcorners/src/HotCornersApplet.vala:233
+msgid "Top-right"
msgstr ""
-#. show on desktop
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:775
-msgid "Show on desktop"
+#: budgie-hotcorners/src/HotCornersApplet.vala:233
+msgid "Bottom-left"
msgstr ""
-#. dynamic icon
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:782
-msgid "Show dynamic panel icon"
+#: budgie-hotcorners/src/HotCornersApplet.vala:233
+msgid "Bottom-right"
msgstr ""
-#. forecast
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:789
-msgid "Show forecast in popover"
+#: budgie-hotcorners/src/HotCornersApplet.vala:316
+msgid "Missing applet"
msgstr ""
-#. optional settings: show on desktop
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:810
-msgid "Transparency"
+#. WindowPreviews is the name of a Budgie Applet and does not need to be translated
+#: budgie-hotcorners/src/HotCornersApplet.vala:318
+msgid "Please add WindowPreviews"
msgstr ""
#. window props
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:836
#: budgie-weathershow/src/get_color/get_color.vala:50
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:872
msgid "Set text color"
msgstr ""
-#. checkbox custom position
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:843
-msgid "Set custom position (px)"
-msgstr ""
-
-#: budgie-weathershow/src/weathershow/WeatherShow.vala:989
-msgid "Please enter at least 3 characters"
-msgstr ""
-
#. spinbuttons - labels
#: budgie-weathershow/src/get_color/get_color.vala:64
msgid "Red"
@@ -225,37 +229,79 @@
msgid "Choose"
msgstr ""
-#: budgie-quicknote/QuickNoteApplet.vala:47
-msgid "Welcome to QuickNote."
+#. get weekday by index
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:142
+msgid "Monday"
msgstr ""
-#: budgie-quicknote/QuickNoteApplet.vala:48
-msgid "Text will be saved automatically while typing."
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:142
+msgid "Tuesday"
msgstr ""
-#. Gtk stuff, widgets etc. here
-#: budgie-quicknote/QuickNoteApplet.vala:143
-msgid "Text area width"
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:142
+msgid "Wednesday"
msgstr ""
-#: budgie-quicknote/QuickNoteApplet.vala:150
-msgid "Text area height"
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:142
+msgid "Thursday"
msgstr ""
-#: budgie-quicknote/QuickNoteApplet.vala:166
-msgid "Set a custom directory"
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:143
+msgid "Friday"
msgstr ""
-#: budgie-quicknote/QuickNoteApplet.vala:179
-msgid "Choose directory"
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:143
+msgid "Saturday"
msgstr ""
-#: budgie-quicknote/QuickNoteApplet.vala:201
-msgid "Use"
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:143
+msgid "Sunday"
msgstr ""
-#: budgie-hotcorners/src/HotCorners.plugin.in.h:1
-msgid "Set hotcorner actions"
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:770
+msgid "General"
+msgstr ""
+
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:776
+msgid "Desktop"
+msgstr ""
+
+#. set city section
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:788
+msgid "City"
+msgstr ""
+
+#. show on desktop
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:811
+msgid "Show on desktop"
+msgstr ""
+
+#. dynamic icon
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:818
+msgid "Show dynamic panel icon"
+msgstr ""
+
+#. forecast
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:825
+msgid "Show forecast in popover"
+msgstr ""
+
+#. optional settings: show on desktop
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:846
+msgid "Transparency"
+msgstr ""
+
+#. checkbox custom position
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:879
+msgid "Set custom position (px)"
+msgstr ""
+
+#: budgie-weathershow/src/weathershow/WeatherShow.vala:1025
+msgid "Please enter at least 3 characters"
+msgstr ""
+
+#: budgie-quicknote/QuickNoteApplet.plugin.in.h:1
+msgid "Quick & Easy Notes"
msgstr ""
#: budgie-recentlyused/src/BudgieRecentlyUsed.plugin.in.h:1
@@ -266,10 +312,10 @@
msgid "Trash"
msgstr ""
-#: budgie-weathershow/src/weathershow/WeatherShow.plugin.in.h:1
-msgid "Show weather & forecast"
+#: budgie-hotcorners/src/HotCorners.plugin.in.h:1
+msgid "Set hotcorner actions"
msgstr ""
-#: budgie-quicknote/QuickNoteApplet.plugin.in.h:1
-msgid "Quick & Easy Notes"
+#: budgie-weathershow/src/weathershow/WeatherShow.plugin.in.h:1
+msgid "Show weather & forecast"
msgstr ""