self.button_new_profile_create.set_sensitive(False) return elif text == name[:-4]: self.button_new_profile_create.set_sensitive(False) return for name in Theme.AVAILABLE_THEMES.keys(): if name == text: self.button_new_profile_create.set_sensitive(False) return self.button_new_profile_create.set_sensitive(True) AKBLConnection = Bindings() def main(): if not AKBLConnection.ping(): gtk_dialog_info(None, TEXT_GUI_CANT_DAEMON_OFF, icon=Paths().SMALL_ICON) else: GObject.threads_init() Gdk.threads_init() GUI() Gtk.main()
# the Free Software Foundation. # # 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, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import time from AKBL.Bindings import Bindings AKBLConnection = Bindings() if not AKBLConnection.ping(): print("The conection with the daemon is off") else: """ Each command is called as: print( <command_name>, <command> ) To check if the commands succeed. You don't really need to do this in your code! """ lights_test = True
# 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, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import sys import os from AKBL.Bindings import Bindings from AKBL.Configuration.Paths import Paths from AKBL.texts import (TEXT_ERROR_DAEMON_OFF, TEXT_HELP, TEXT_LICENSE, TEXT_WRONG_ARGUMENT) AKBLConnection = Bindings() PATHS = Paths() def send_command(command, *args): if not os.path.exists(PATHS.SYSTEMCTL_PATH) or not AKBLConnection.ping(): print(TEXT_ERROR_DAEMON_OFF) else: AKBLConnection._command(command, *args) if __name__ == '__main__': total = len(sys.argv) if total >= 2:
# it under the terms of the GNU General Public License 3 as published by # the Free Software Foundation. # # 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, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import time from AKBL.Bindings import Bindings AKBLConnection = Bindings() if not AKBLConnection.ping(): print("The conection with the daemon is off") else: """ Each command is called as: print( <command_name>, <command> ) To check if the commands succeed. You don't really need to do this in your code! """ lights_test = True profiles_test = True
gi.require_version('AppIndicator3', '0.1') from gi.repository import Gtk, GObject, Gdk from gi.repository import AppIndicator3 as appindicator import os import threading import Pyro4 from time import sleep from AKBL.utils import print_error from AKBL.Bindings import Bindings from AKBL.Configuration.Paths import Paths from AKBL.texts import (TEXT_PROFILES, TEXT_START_THE_GUI, TEXT_SWICH_STATE, TEXT_EXIT) AKBL_CONECTION = Bindings() def daemon_is_active(): if AKBL_CONECTION.ping(): return True return False class ConnectIndicator: def __init__(self): self.conected = False self.daemon = Pyro4.Daemon() self.uri = self.daemon.register(Indicator(self))