From 9c2ef357c8d2b1fad262109492d758c5403eb51a Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 3 Oct 2016 00:29:36 +0200 Subject: [PATCH] improve app detection --- .../onSwitchApplicationProfile/agetty.py | 31 +++++++++++++++++++ .../onSwitchApplicationProfile/bash.py | 31 +++++++++++++++++++ .../onSwitchApplicationProfile/default.py | 31 +++++++++++++++++++ .../onSwitchApplicationProfile/vim.py | 31 +++++++++++++++++++ 4 files changed, 124 insertions(+) create mode 100644 src/fenrir-package/commands/onSwitchApplicationProfile/agetty.py create mode 100644 src/fenrir-package/commands/onSwitchApplicationProfile/bash.py create mode 100644 src/fenrir-package/commands/onSwitchApplicationProfile/default.py create mode 100644 src/fenrir-package/commands/onSwitchApplicationProfile/vim.py diff --git a/src/fenrir-package/commands/onSwitchApplicationProfile/agetty.py b/src/fenrir-package/commands/onSwitchApplicationProfile/agetty.py new file mode 100644 index 00000000..dbd5250d --- /dev/null +++ b/src/fenrir-package/commands/onSwitchApplicationProfile/agetty.py @@ -0,0 +1,31 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug + +class command(): + def __init__(self): + pass + def initialize(self, environment): + self.env = environment + def shutdown(self): + pass + def getDescription(self): + return 'No description found' + def load(self): + print('--------------') + print('agetty') + print('load new',self.env['screenData']['newApplication']) + print('--------------') + + def unload(self): + print('--------------') + print('agetty') + print('unload old',self.env['screenData']['oldApplication']) + print('--------------') + + def setCallback(self, callback): + pass diff --git a/src/fenrir-package/commands/onSwitchApplicationProfile/bash.py b/src/fenrir-package/commands/onSwitchApplicationProfile/bash.py new file mode 100644 index 00000000..d82b6e9d --- /dev/null +++ b/src/fenrir-package/commands/onSwitchApplicationProfile/bash.py @@ -0,0 +1,31 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug + +class command(): + def __init__(self): + pass + def initialize(self, environment): + self.env = environment + def shutdown(self): + pass + def getDescription(self): + return 'No description found' + def load(self): + print('--------------') + print('bash') + print('load new',self.env['screenData']['newApplication']) + print('--------------') + + def unload(self): + print('--------------') + print('bash') + print('unload old',self.env['screenData']['oldApplication']) + print('--------------') + + def setCallback(self, callback): + pass diff --git a/src/fenrir-package/commands/onSwitchApplicationProfile/default.py b/src/fenrir-package/commands/onSwitchApplicationProfile/default.py new file mode 100644 index 00000000..40255936 --- /dev/null +++ b/src/fenrir-package/commands/onSwitchApplicationProfile/default.py @@ -0,0 +1,31 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug + +class command(): + def __init__(self): + pass + def initialize(self, environment): + self.env = environment + def shutdown(self): + pass + def getDescription(self): + return 'No description found' + def load(self): + print('--------------') + print('default') + print('load new',self.env['screenData']['newApplication']) + print('--------------') + + def unload(self): + print('--------------') + print('default') + print('unload old',self.env['screenData']['oldApplication']) + print('--------------') + + def setCallback(self, callback): + pass diff --git a/src/fenrir-package/commands/onSwitchApplicationProfile/vim.py b/src/fenrir-package/commands/onSwitchApplicationProfile/vim.py new file mode 100644 index 00000000..74ae0c40 --- /dev/null +++ b/src/fenrir-package/commands/onSwitchApplicationProfile/vim.py @@ -0,0 +1,31 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug + +class command(): + def __init__(self): + pass + def initialize(self, environment): + self.env = environment + def shutdown(self): + pass + def getDescription(self): + return 'No description found' + def load(self): + print('--------------') + print('vim') + print('load new',self.env['screenData']['newApplication']) + print('--------------') + + def unload(self): + print('--------------') + print('vim') + print('unload old',self.env['screenData']['oldApplication']) + print('--------------') + + def setCallback(self, callback): + pass