/usr/lib/pd-gui/plugins-available/triggerize-plugin/triggerize-plugin.tcl is in pd-iemutils 0.0.20180206-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | # META helper plugin for triggerize-selection
# META DESCRIPTION adds menu to tell the 'triggerize' library to doit
# META AUTHOR IOhannes m zmölnig <zmoelnig@umlaeute.mur.at>
# META VERSION 0.1
package require pdwindow 0.1
if [catch {
package require msgcat
::msgcat::mcload po
}] { puts "iem::punish::triggerize: i18n failed" }
namespace eval ::iem::punish::triggerize:: {
variable label
proc focus {winid state} {
set menustate [expr $state?"normal":"disabled"]
.menubar.edit entryconfigure "$::iem::punish::triggerize::label" -state $menustate
}
proc register {} {
# create an entry for our "triggerize" in the "edit" menu
set ::iem::punish::triggerize::label [_ "Triggerize Selection"]
set accelerator $::pd_menus::accelerator
set mymenu .menubar.edit
if {$::windowingsystem eq "aqua"} {
set inserthere 8
set accelerator "$accelerator"
} else {
set inserthere 8
set accelerator "$accelerator"
}
set accelerator "$accelerator+T"
$mymenu insert $inserthere command \
-label $::iem::punish::triggerize::label \
-state disabled \
-accelerator "$accelerator" \
-command { menu_send $::focused_window triggerize }
bind all <$::modifier-Key-t> {menu_send %W triggerize}
bind PatchWindow <FocusIn> "+::iem::punish::triggerize::focus %W 1"
bind PdWindow <FocusIn> "+::iem::punish::triggerize::focus %W 0"
# attempt to load the 'triggerize' library from iem::punish
# (that does all the work)
set lib [string map {" " "\\ "} [file join $::current_plugin_loadpath triggerize]]
pdsend "pd-_float_template declare -lib $lib"
pdtk_post "loaded iem::punish::triggerize-plugin\n"
}
}
::iem::punish::triggerize::register
|