add local dir

This commit is contained in:
piotr
2022-01-15 02:36:53 +01:00
parent 7e041d4f8e
commit 4a707155e9
4 changed files with 111 additions and 9 deletions

View File

@@ -10,8 +10,7 @@ gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, GLib
from nwg_panel.tools import get_config_dir, local_dir, load_json, save_json, load_string, list_outputs, check_key, \
list_configs, \
local_dir, create_pixbuf, update_image, is_command, check_commands, cmd2string
list_configs, create_pixbuf, update_image, is_command, check_commands, cmd2string
from nwg_panel.__about__ import __version__

View File

@@ -0,0 +1,109 @@
{
"executor-cpuav": {
"script": "gopsuinfo -i a",
"interval": 2,
"tooltip-text": "CPU average load",
"on-left-click": "alacritty -e htop",
"on-middle-click": "",
"on-right-click": "",
"on-scroll-up": "",
"on-scroll-down": "",
"css-name": "",
"icon-size": 16,
"icon-placement": "right"
},
"executor-cpubar": {
"script": "gopsuinfo -c g",
"interval": 2,
"tooltip-text": "",
"on-left-click": "",
"on-middle-click": "",
"on-right-click": "",
"on-scroll-up": "",
"on-scroll-down": "",
"css-name": "",
"icon-size": 16,
"icon-placement": "left"
},
"executor-temp": {
"script": "gopsuinfo -i t",
"interval": 5,
"tooltip-text": "",
"on-left-click": "",
"on-middle-click": "",
"on-right-click": "",
"on-scroll-up": "",
"on-scroll-down": "",
"css-name": "",
"icon-size": 16,
"icon-placement": "left"
},
"executor-memory": {
"script": "gopsuinfo -i m",
"interval": 5,
"tooltip-text": "",
"on-left-click": "",
"on-middle-click": "",
"on-right-click": "",
"on-scroll-up": "",
"on-scroll-down": "",
"css-name": "",
"icon-size": 16,
"icon-placement": "left"
},
"executor-drives": {
"script": "gopsuinfo -i n",
"interval": 15,
"tooltip-text": "",
"on-left-click": "",
"on-middle-click": "",
"on-right-click": "",
"on-scroll-up": "",
"on-scroll-down": "",
"css-name": "",
"icon-size": 16,
"icon-placement": "left"
},
"executor-uptime": {
"script": "gopsuinfo -i u",
"interval": 60,
"tooltip-text": "",
"on-left-click": "",
"on-middle-click": "",
"on-right-click": "",
"on-scroll-up": "",
"on-scroll-down": "",
"css-name": "",
"icon-size": 16,
"icon-placement": "left"
},
"executor-weather": {
"script": "curl https://wttr.in/?format=1 -s",
"interval": 1800,
"css-name": "weather",
"on-right-click": "",
"icon-size": 16,
"show-icon": true,
"tooltip-text": "",
"on-left-click": "",
"on-middle-click": "",
"on-scroll-up": "",
"on-scroll-down": "",
"root-css-name": "",
"icon-placement": "left"
},
"executor-updates": {
"script": "sway-check-updates",
"interval": 900,
"icon-size": 16,
"on-left-click": "foot sway-update",
"tooltip-text": "",
"on-middle-click": "",
"on-right-click": "",
"on-scroll-up": "",
"on-scroll-down": "",
"css-name": "",
"root-css-name": "",
"icon-placement": "left"
}
}

View File

@@ -260,12 +260,6 @@ def main():
global sig_dwl
sig_dwl = args.sigdwl
"""# signal handlers
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)
# Will do nothing if no dwl-tags instance found
signal.signal(args.sigdwl, refresh_dwl)"""
catchable_sigs = set(signal.Signals) - {signal.SIGKILL, signal.SIGSTOP}
for sig in catchable_sigs:
signal.signal(sig, signal_handler)

View File

@@ -13,7 +13,7 @@ setup(
packages=find_packages(),
include_package_data=True,
package_data={
"": ["config/*", "icons_dark/*", "icons_light/*", "executors/*"]
"": ["config/*", "icons_dark/*", "icons_light/*", "executors/*", "local/*"]
},
url='https://github.com/nwg-piotr/nwg-panel',
license='MIT',