**Widget wrapper on Linux Systems for easy embedding of the urxvt Terminal** An easy wrapper for the lightweight surf webbrowser on Linux systems to embed an htmlviewer into Tcl/Tk applications . Requires surf and xprop tools. Works on X but not on Wayland as Wayland does not support the Xembed protocol. *** Links *** * Urxvt: https://wiki.archlinux.org/index.php/Rxvt-unicode * Changing Urxvt fonts on the fly: [https://wiki.archlinux.org/index.php/Rxvt-unicode#Changing_font_size_on_the_fly] [WikiDBImage SnitXUrxvt.png] Source Code: ====== package require Tk package require snit package provide SnitXUrxvt 0.1 snit::widget SnitXUrxvt { option -multi 1,1 option -rxvtargs "" constructor {args} { $self configurelist $args if {$options(-multi) eq "1,2" || $options(-multi) eq "1,3"} { set pw1 [panedwindow $win.pw -orient horizontal] set st1 [$self term $win.pw.st1] set pw2 [panedwindow $win.pw.pw2 -orient vertical] set st2 [$self term $win.pw.pw2.st2] set st3 [$self term $win.pw.pw2.st3] if {$options(-multi) eq "1,3"} { set st4 [$self term $win.pw.pw2.st4] } pack $pw1 -side left -expand yes -fill both $pw1 add $st1 $pw2 if {$options(-multi) eq "1,3"} { $pw2 add $st2 $st3 $st4 } elseif {$options(-multi) eq "1,2"} { $pw2 add $st2 $st3 } } elseif {$options(-multi) eq "1"} { set st1 [$self term $win.st1] pack $st1 -side left -fill both -expand true } } method term {w} { frame $w -container 1 $w configure -width 100 -height 100 set pid [exec urxvt -rv -embed [scan [winfo id $w] %x] {*}$options(-rxvtargs) &] bind $w [list exec kill $pid] return $w } } if {$argv0 eq [info script]} { if {[llength $argv] <= 1 } { SnitXUrxvt .urxvt -multi 1,3 -rxvtargs "-fade 10 -cr red -sb -rv +bl" pack .urxvt -side top -fill both -expand true } } ====== ** Discussion ** [DDG] If you just need a embedded Terminal you can use a simple function. ====== package require Tk proc urxvterm {w} { frame $w -container 1 $w configure -width 100 -height 100 set pid [exec urxvt -rv -embed [scan [winfo id $w] %x] &] bind $w [list exec kill $pid] return $w } pack [urxvterm .term] -side top -fill both -expand yes ===== <> Application | Terminal | Snit Widgets | Snit