Compare commits
No commits in common. "5da22eed8e6fc9305d311bd469d03d085c628f62" and "2682af069be3d4d021b356ac38f29c266cb016d8" have entirely different histories.
5da22eed8e
...
2682af069b
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
|
||||
import os
|
||||
|
||||
home_dir = os.getenv('HOME')
|
||||
|
||||
env = {
|
||||
"HOME_DIR": home_dir,
|
||||
"CONFIG_DIR": os.path.join(home_dir, '.config'),
|
||||
"CACHE_DIR": os.path.join(home_dir, '.cache'),
|
||||
"LANG": os.environ['LANG'] or "en_US.UTF-8"
|
||||
}
|
|
@ -18,7 +18,6 @@ class Inject:
|
|||
code = open(self.abspath('./inject.js'), 'r').read()
|
||||
frame = WebKit2.UserContentInjectedFrames.ALL_FRAMES
|
||||
time = WebKit2.UserScriptInjectionTime.END
|
||||
|
||||
code = code.replace("'{{env}}'", json.dumps(env))
|
||||
code = code.replace("{{uuid}}", webview.uuid)
|
||||
code = code.replace("{{app_name}}", webview.app_name)
|
||||
|
|
|
@ -7,9 +7,6 @@ import gi
|
|||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import GdkPixbuf
|
||||
|
||||
def noop():
|
||||
pass
|
||||
|
||||
def get_monitor_info(monitor):
|
||||
return {
|
||||
"model": monitor.props.model,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
build = (0, 6, 1)
|
||||
build = (0, 6, 0)
|
||||
version = '.'.join(map(str, build))
|
|
@ -31,13 +31,24 @@ try:
|
|||
except:
|
||||
Keybinder = None
|
||||
|
||||
from ._env import env
|
||||
from ._version import version
|
||||
from ._settings import create_setting
|
||||
from ._protocal import create_protocal
|
||||
from ._notify import create_notify
|
||||
from ._inject import Inject
|
||||
from ._utils import noop, get_monitor_info, pixbuf_to_dict, dict_to_pixbuf
|
||||
from ._utils import get_monitor_info, pixbuf_to_dict, dict_to_pixbuf
|
||||
|
||||
|
||||
|
||||
env = {
|
||||
"HOME_DIR": os.getenv('HOME'),
|
||||
"CONFIG_DIR": os.path.join(os.getenv('HOME'), '.config'),
|
||||
"CACHE_DIR": os.path.join(os.getenv('HOME'), '.cache')
|
||||
}
|
||||
|
||||
|
||||
def noop():
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
@ -359,9 +370,6 @@ class WebEngine(WebKit2.WebView):
|
|||
case 'isdir':
|
||||
output = os.path.isdir(filepath)
|
||||
|
||||
case 'mkdir':
|
||||
output = os.makedirs(filepath)
|
||||
|
||||
return (_error, output)
|
||||
|
||||
|
||||
|
|
|
@ -103,15 +103,6 @@ function _postMessage(data = {}, uuid = null) {
|
|||
window.dispatchEvent(ev)
|
||||
}
|
||||
|
||||
function readonly(obj, key, value) {
|
||||
Object.defineProperty(obj, key, {
|
||||
get() {
|
||||
return value
|
||||
},
|
||||
enumerable: false
|
||||
})
|
||||
}
|
||||
|
||||
class NativeImage {
|
||||
#origin
|
||||
|
||||
|
@ -212,7 +203,7 @@ class EventEmitter {
|
|||
}
|
||||
}
|
||||
|
||||
readonly(window, 'native', new EventEmitter())
|
||||
window.native = new EventEmitter()
|
||||
|
||||
native.$on('opener_message', (data, uuid) => _postMessage(data, uuid))
|
||||
|
||||
|
@ -226,9 +217,6 @@ Object.assign(native, {
|
|||
},
|
||||
relaunch() {
|
||||
return handler('app', { action: 'relaunch' }, NO_CALLBACK)
|
||||
},
|
||||
getLocale() {
|
||||
return native.env.LANG
|
||||
}
|
||||
},
|
||||
fs: {
|
||||
|
@ -277,9 +265,6 @@ Object.assign(native, {
|
|||
},
|
||||
copy(filepath, target) {
|
||||
return handler('fs', { action: 'copy', filepath, target })
|
||||
},
|
||||
mkdir(filepath) {
|
||||
return handler('fs', { action: 'mkdir', filepath })
|
||||
}
|
||||
},
|
||||
image(filepath) {
|
||||
|
|
Loading…
Reference in New Issue