Advertisement
brickviking

.twscreenrc (2 of 7)

Aug 16th, 2020
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.18 KB | None | 0 0
  1. # Should be included from .twinrc
  2. # vim:ww=0:tw=0:
  3.  
  4. # Screen stuff
  5. #
  6. # set screen background
  7. Background 1 High Black On Blue (
  8. "\xb2"
  9. )
  10. AddScreen 2
  11. Background 2 High Black On Green (
  12. "\xb1"
  13. )
  14. AddScreen 3
  15. Background 3 High Black On Cyan (
  16. "\xb0"
  17. )
  18. # the screen `1' is created by twin at startup,
  19. # so we do not need to `AddScreen 1',
  20. # and `High Black On Blue' means `high intensity black' (i.e. gray) foreground
  21. # on `blue' background.
  22. #
  23. # AddScreen 2
  24. # AddScreen 3
  25. # the complete list of colors is:
  26. # Black Blue Green Cyan Red Magenta Yellow White
  27. #
  28. # and `High' can be applied both to foreground and background.
  29. # depending on the display you use, `High' background may actually blink.
  30. #
  31. # the strings inside ( ) are just the screen background,
  32. # each string representing a line.
  33. #
  34. # every time you must write a string, you can use hexadecimal codes like "\xb1"
  35. # or octal codes like "\261", and double quotes surrounding the string
  36. # are only needed to protect special characters (i.e. parentheses,
  37. # non-alphanumerical chars, etc.). Sequences like "\?" where ? is a character
  38. # have the same meaning as in C language:
  39. # "\"" is a string containing a double quote,
  40. # "\n" is a newline, and so on.
  41. #
  42. # create the common part of all menus
  43. #
  44. # you need quotes to protect reserved names
  45. # or strings containing non-alphanumerical chars.
  46. # again, parenthesis '(' and ')' are used to group together a list
  47. #
  48. # this creates the menuitem " Window ", shared by all applications,
  49. # with the contents you see below.
  50. #
  51. # the command `Nop' is a do-nothing command used to insert a linebreak.
  52. # `_Next' is a user function (all other ones are predefined by twin) and
  53. # is defined below.
  54. #
  55. AddToFunc ONEScreen (
  56. Window 0
  57. SendToScreen 1
  58. )
  59.  
  60. AddToFunc TWOScreen (
  61. Window 0
  62. SendToScreen 2
  63. )
  64.  
  65. AddToFunc THREEScreen (
  66. Window 0
  67. SendToScreen 3
  68. )
  69.  
  70. AddToMenu " Window " (
  71. " Full Screen " FullScreen
  72. " UnFocus " Focus Off
  73. " Refresh " Refresh
  74. " Move " Interactive Move
  75. " Resize " Interactive Resize
  76. " Scroll " Interactive Scroll
  77. " Center " Center
  78. " Maximize " Maximize
  79. " Roll Up " Roll Toggle
  80. "" Nop
  81. " Raise/Lower " RaiseLower
  82. " Next " _Next
  83. " Prev " _Prev
  84. " First Screen " ONEScreen
  85. " Second Screen " TWOScreen
  86. # " Third Screen " THREEScreen
  87. " List... " WindowList
  88. "" Nop
  89. " Send Pause " SyntheticKey Pause
  90. #
  91. # this is a user contributed idea: ALT-TAB to cycle through windows.
  92. # feel free to uncomment this line and the `Key Alt Tab _Next' far below
  93. #
  94. " Send Alt-Tab " SyntheticKey Alt Tab
  95. " Send F10 " SyntheticKey F10
  96. " Send F11 " SyntheticKey F11
  97. " Send F12 " SyntheticKey F12
  98. #
  99. "" Nop
  100. " Close " Close
  101. "" Nop
  102. " Kill Client " Kill
  103. )
  104.  
  105. #AddToMenu " Keys 1 " (
  106. # " Send \x80 " SyntheticKey "Ç"
  107. # " Send \x81 " SyntheticKey "ü"
  108. # " Send \x82 " SyntheticKey "é"
  109. # " Send \x83 " SyntheticKey "â"
  110. # " Send \x84 " SyntheticKey "ä"
  111. # " Send \x85 " SyntheticKey "à"
  112. # " Send \x86 " SyntheticKey "å"
  113. # " Send \x87 " SyntheticKey "ç"
  114. # " Send \x88 " SyntheticKey "ê"
  115. # " Send \x89 " SyntheticKey "ë"
  116. # " Send \x8A " SyntheticKey "è"
  117. # " Send \x8B " SyntheticKey "ï"
  118. # " Send \x8C " SyntheticKey "î"
  119. # " Send \x8D " SyntheticKey "ì"
  120. # " Send \x8E " SyntheticKey "Ä"
  121. # " Send \x8F " SyntheticKey "Å"
  122. #)
  123.  
  124. #AddToMenu " Keys 2 " (
  125. # " Send \x90 " SyntheticKey "É"
  126. # " Send \x91 " SyntheticKey "æ"
  127. # " Send \x92 " SyntheticKey "Æ"
  128. # " Send \x93 " SyntheticKey "ô"
  129. # " Send \x94 " SyntheticKey "É"
  130. # " Send \x95 " SyntheticKey "É"
  131. # " Send \x96 " SyntheticKey "É"
  132. # " Send \x97 " SyntheticKey "É"
  133. # " Send \x98 " SyntheticKey "É"
  134. # " Send \x99 " SyntheticKey "É"
  135. # " Send \x9A " SyntheticKey "É"
  136. # " Send \x9B " SyntheticKey "É"
  137. # " Send \x9C " SyntheticKey "É"
  138. # " Send \x9D " SyntheticKey "É"
  139. # " Send \x9E " SyntheticKey "É"
  140. # " Send \x9F " SyntheticKey "É"
  141. #)
  142.  
  143. #
  144. # define the user function `_Next' :
  145. # group commands in '(' ')' and put either a newline or a ';'
  146. # after each command. `Window 1' means first window, while
  147. # `Window 0' is the currently focused window.
  148. #
  149. AddToFunc _Next ( Lower; Window 1; Focus; )
  150. # AddToFunc _Prev ( Lower; Window -1; Focus; Raise; )
  151.  
  152. # this would be exactly the same
  153. #
  154. # AddToFunc _Next (
  155. # Lower
  156. # Window 1
  157. # Focus
  158. # )
  159. #
  160. # or you can even split the function definition:
  161. #
  162. # AddToFunc _Next ( Lower; Window 1; )
  163. # AddToFunc _Next (
  164. # Focus
  165. # )
  166. #
  167.  
  168.  
  169. #
  170. # These are not needed... and they override
  171. # the borders defined by Alternate Font
  172. #
  173. # Border "*" Inactive (
  174. # "ÚÄ¿"
  175. # "³ ³"
  176. # "ÀÄÙ"
  177. # )
  178. #
  179. # Border "*" Active (
  180. # "ÉÍ»"
  181. # "º º"
  182. # "Èͼ"
  183. # )
  184. #
  185. # But maybe you feel funky and want different borders
  186. # for different windows:
  187. #
  188. # Border "*Term*" Inactive (
  189. # " ß "
  190. # "Ý Þ"
  191. # " Ü "
  192. # )
  193. #
  194. # Border "Clock" Active (
  195. # " "
  196. # " "
  197. # " "
  198. # )
  199. #
  200. # Border "Tw*" Active (
  201. # "ÖÍ·"
  202. # "³ ³"
  203. # "Óͽ"
  204. # )
  205. #
  206. # menu windows have no name... and are always considered Inactive
  207. #
  208. # Border "" Inactive (
  209. # "ÛßÛ"
  210. # "Û Û"
  211. # "ÛÜÛ"
  212. # )
  213. #
  214. # create the buttons on window top border.
  215. # allowed buttons range from 0 to 9.
  216. #
  217. # syntax:
  218. # Button <number> "shape" {Left|Right} [[+|-]<position>]
  219. #
  220. # creates button <number> with given "shape", either on Left or Right
  221. # of window title. Optionally, you can control where exactly to place it:
  222. #
  223. # `Left +<n>' or `Right +<n>' leaves <n> free spaces between this button
  224. # and the last one on the same side.
  225. #
  226. # `Left <n>' or `Right <n>' specifies exact distance between button and
  227. # window Left (Right) edge.
  228. #
  229. # `Left -<n>' or `Right -<n>' says to place the button <n> characters nearer
  230. # to the border than just `Left' or `Right', possibly intersecting
  231. # other buttons.
  232.  
  233. #
  234. # WARNING: Button 0 must ALWAYS be the close button...
  235. #
  236. Button 0 "XX" Left
  237. Button 1 "\x12\x12" Right
  238. Button 2 "^^" Right
  239. #
  240. # a maximize/fullscreen button. feel free to uncomment :-)
  241. Button 3 "+-" Right
  242.  
  243.  
  244. #
  245. # override the Options specified at compile time
  246. #
  247. # set shadows to 3x2 and enable them
  248. GlobalFlags Shadows 1 1 +Shadows
  249. #
  250. # enable blink/high background
  251. GlobalFlags -Blink
  252. #
  253. # do not force cursor always visible
  254. GlobalFlags -CursorAlways
  255. #
  256. # disable edge screen scrolling
  257. GlobalFlags -ScreenScroll
  258. #
  259. # don't hide the menu, it's the only way we can get to the screens
  260. GlobalFlags -MenuHide
  261. #
  262. # disable menu information row
  263. GlobalFlags -MenuInfo
  264. #
  265. # don't relax menu navigation
  266. GlobalFlags -MenuRelax
  267. GlobalFlags +AltFont
  268. #
  269. #
  270. # choose the mouse button used for click-to-focus,
  271. # for text selection and to activate window gadgets.
  272. # 1 means Left, 2 means Middle, 3 means Right.
  273. # this also implies a 'Focus' action when clicking in a non-focused window.
  274. #
  275. GlobalFlags ButtonSelection 1
  276. #
  277. # choose the mouse button used to paste text selection
  278. #
  279. GlobalFlags ButtonPaste 2
  280.  
  281. #
  282. # keyboard bindings syntax:
  283. #
  284. # Key <flags> <name> <function>
  285. #
  286. # <flags> is optional and can be one or more of
  287. # Shift
  288. # Ctrl
  289. # Alt
  290. # remember anyway that except on X11 display twin can detect these flags
  291. # only deducing them from the ASCII sequences it receives from the keyboard,
  292. # so Shift is almost useless and not all keys combined with Ctrl and Alt
  293. # make sense (i.e. they must produce a unique, identificable ASCII sequence)
  294. #
  295. # <name> is the name of the key as in libTwkeys.h, without the TW_ prefix.
  296. # some examples:
  297. # Tab Return Escape BackSpace
  298. # Left Up Right Down
  299. # Prior (Page_Up) Next (Page_Down)
  300. # Home End Insert Delete
  301. # Pause Num_Lock
  302. # F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
  303. # or any ASCII character in double quotes:
  304. # "A" "[" "\xFF" and so on
  305. #
  306.  
  307. # Pause pops up the menu
  308. # Key Pause Interactive Menu
  309. # Key Shift "Tab" Interactive Menu (doesn't seem to work)
  310. # Key Shift "F11" _Next
  311. Key Shift F11 WindowList
  312. #Key Shift F12 Interactive Menu
  313. Key F12 Interactive Menu
  314.  
  315. # this is a user contributed idea: ALT-TAB to cycle through windows.
  316. # feel free to uncomment this line and the one far above saying this
  317. # same comment.
  318. #
  319.  
  320. #Key Shift "Tab" _Next
  321. Key Alt Home Refresh
  322. Key Alt Down _Next
  323. #Key Alt "Up" _Prev
  324. Key Alt "Next" Focus Off
  325.  
  326. #Key F10 "Send vqd"
  327.  
  328. #AddToFunc _MySize ( FullScreen; Resize +0 -6; Move 0 +6; )
  329. AddToFunc _MySize ( FullScreen; Refresh; )
  330. AddToFunc _MiniSize ( FullScreen; Resize 80 6; Refresh; )
  331. AddToFunc _MyRadioSize ( FullScreen; Resize 80 35; Refresh; )
  332. AddToFunc _MaxTwTerm ( ExecTty bash "-login"; Wait bash; _MySize; )
  333. AddToFunc _MaxRemoteTerm ( ExecTty "/usr/local/bin/myterm"; Wait myterm; _MySize; Refresh; )
  334. # I commented this next line and renumbered the F10 above to F11
  335. # seeing as we now have a menu entry to create my own shell
  336. #Key F11 _MaxTwTerm
  337. # First command:
  338. _MaxTwTerm
  339. #
  340. # ALT-UP spawns a new terminal.
  341. #
  342. #Key Alt "Insert" _MaxTwTerm
  343. Key Alt "Prior" _MaxTwTerm
  344. #
  345. # SHIFT-PAGEUP scrolls up focused window
  346. #
  347. Key Shift "Prior" Scroll +0 -10
  348. #
  349. # SHIFT-PAGEDOWN scrolls down focused window
  350. #
  351. Key Shift "Next" Scroll +0 +10
  352. #
  353. # mouse bindings syntax:
  354. #
  355. # Mouse <buttons-list> <context> <function>
  356. #
  357. #
  358. # context is a string consisting of one or more of the following:
  359. # 0..9 corresponding button in window title
  360. # C window resize corner
  361. # T window title bar
  362. # S window sides
  363. # B window scroll bars
  364. # W one of T,S,B (i.e. window border except buttons and corner)
  365. # I window inside
  366. # M menu
  367. # R root (screen background)
  368. # A any of the above
  369. #
  370.  
  371. #
  372. # mouse bindings: left click on button 0 graciously closes the window
  373. #
  374. Mouse 1 0 Close
  375.  
  376. # this is subtle: doing
  377. # Mouse H1 0 Close
  378. # instead of
  379. # Mouse 1 0 Close
  380. # would close the window when you PRESS mouse left button on window close button,
  381. # NOT when you CLICK (i.e. PRESS, then RELEASE) on it!
  382. #
  383. # (note: `H' means `hold'. there is also `C' which means `click',
  384. # but it's the default and can be omitted, unless you want you want to use
  385. # them together, meaning to execute on PRESS and again on CLICK,
  386. # by specifying `HC' )
  387. #
  388.  
  389. # any mouse click on button 1 does RaiseLower
  390. Mouse 123 1 RaiseLower
  391.  
  392. # any mouse click on button 2 does Roll / UnRoll
  393. Mouse 123 2 Roll Toggle
  394.  
  395. # these are do-nothing if Button 3 above is commented out
  396. #
  397. # mouse left click on button 3 does Maximize
  398. Mouse 1 3 Maximize
  399. # mouse middle click on button 3 does FullScreen
  400. Mouse 2 3 FullScreen
  401.  
  402. # holding mouse left button on window title or sides does interactive move
  403. Mouse H1 TS Interactive Move
  404.  
  405. # mouse left on window resize corner does interactive resize
  406. # mouse-based window resize works "as expected" only on window resize corner
  407. # (try yourself to bind some window button to Interactive Resize and see...)
  408. #
  409. Mouse H1 C Interactive Resize
  410.  
  411. # mouse left on window bars does interactive scroll
  412. # unluckily, mouse-based window scrolling works properly ONLY
  413. # on window bars...
  414. #
  415. Mouse H1 B Interactive Scroll
  416.  
  417. # mouse left on root unfocuses currently focused window
  418. #
  419. # you can create functions as complex as you like and use them
  420. # just like built-in functions...
  421. AddToFunc _UnFocus ( Window 0; Focus Off; )
  422. Mouse H1 R _UnFocus
  423.  
  424. # middle button on root opens window list
  425. Mouse H2 R WindowList
  426.  
  427. # Choose your favorite setup... for twin-classic menus, which appear only
  428. # after you press right mouse button, use this:
  429. #
  430. # GlobalFlags +MenuInfo
  431. # right button always opens the menu
  432. # Mouse H3 A Interactive Menu
  433. # mouse left on menu-bar does screen resize
  434. # Mouse H1 M Interactive Screen
  435.  
  436.  
  437. # # Otherwise you can use turbovision style menus:
  438. # # they always stay visible and are selected with left button
  439. # # _on_menu_bar_
  440. # #
  441. # GlobalFlags -MenuInfo
  442. # # left button on menu-bar opens the menu
  443. Mouse H1 M Interactive Menu
  444. # # in this case, use mouse right button on menu-bar for screen resize
  445. Mouse H3 M Interactive Screen
  446.  
  447. # # Or better yet, create your personal style!
  448. # #
  449.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement