#!/usr/bin/wish -f
# -*- Tcl -*-
+# Copyright 2016,2020 Ian Jackson
+# SPDX-License-Identifier: GPL-3.0-or-later
+# There is NO WARRANTY.
+
# usage:
# xbatmon-simple-tray
# [WISH-OPTIONS... [-- TRAY-EMBED-OPTIONS... [-- XBATMON-SIMPLE-OPTIONS...]]]
-source subproc.tcl
-source utils.tcl
-source args.tcl
+set lib .
+
+source $lib/subproc.tcl
+source $lib/utils.tcl
+source $lib/args.tcl
+source $lib/applet.tcl
proc cmdline {id orientation} {
global argv
#----- modes -----
proc mode/normal {} {
- uplevel #0 source applet.tcl
+ uplevel #0 { applet::become }
applet::setup-subproc cmdline
applet::setup-tooltip tt-show tt-invisible
}
#----- command line parsing -----
set mode normal
+set usersettings $env(HOME)/.config/xbatmon-simple-tray
while {[args::next_special arg]} {
switch -exact -- $arg {
}
}
+if {[file exists $usersettings]} {
+ source $usersettings
+}
+
mode/$mode