ctwmrc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. #
  2. # $NetBSD: system.ctwmrc,v 1.1.2.3 2021/03/09 15:44:50 martin Exp $
  3. #
  4. # ctwmrc by nia
  5. #
  6. # An attempt to strike a usability balance that makes keys and buttons
  7. # do the thing users of various operating systems expect them to do.
  8. #
  9. # Most things should be possible to accomplish with only the keyboard.
  10. #
  11. # Also, mostly inoffensive colours (avoiding potentially inaccessible
  12. # combinations like red-green).
  13. #
  14. # don't use the default buttons or key bindings, we define our own
  15. NoDefaults
  16. ShowWorkSpaceManager
  17. ShowIconManager
  18. # 3D icon managers do not seemingly honor IconManagerHighlight,
  19. # which makes them slightly less useful
  20. #UseThreeDIconManagers
  21. #UseThreeDWMap
  22. UseThreeDBorders
  23. #UseThreeDMenus
  24. UseThreeDTitles
  25. ThreeDBorderWidth 3
  26. # TODO: we can use syscmd() in combination with xdpyinfo to detect
  27. # HiDPI screens and set appropiate fonts.
  28. #
  29. # need some good scaled bitmap fonts imported - terminus or spleen
  30. # would be good candidates
  31. MenuFont "-misc-fixed-medium-r-*-*-14-*-*-*-*-*-*-*"
  32. TitleFont "-misc-fixed-bold-r-*-*-18-*-*-*-*-*-*-*"
  33. IconManagerFont "-misc-fixed-medium-r-*-*-14-*-*-*-*-*-*-*"
  34. IconFont "-misc-fixed-bold-r-*-*-18-*-*-*-*-*-*-*"
  35. ResizeFont "-misc-fixed-medium-r-*-*-18-*-*-*-*-*-*-*"
  36. WorkSpaceFont "-misc-fixed-medium-r-*-*-14-*-*-*-*-*-*-*"
  37. RestartPreviousState
  38. DecorateTransients
  39. # hide window contents while altering windows for performance
  40. NoOpaqueMove
  41. NoOpaqueResize
  42. AutoOccupy
  43. AutoRelativeResize
  44. CenterFeedbackWindow
  45. NoGrabServer
  46. RaiseOnClick
  47. DontMoveOff
  48. MoveOffResistance 150
  49. ConstrainedMoveTime 0
  50. IgnoreLockModifier
  51. # Not actually that random.
  52. # Means that windows do not have to be placed by hand with a mouse,
  53. # which helps if you are using a keyboard only.
  54. RandomPlacement "all"
  55. MoveDelta 3
  56. ClearShadowContrast 40
  57. DarkShadowContrast 60
  58. MovePackResistance 100
  59. RaiseWhenAutoUnSqueeze
  60. ShortAllWindowsMenus
  61. #BeNiceToColorMap
  62. NoStackMode
  63. StayUpMenus
  64. WarpToDefaultMenuEntry
  65. MenuShadowDepth 1
  66. #TitleFocus
  67. # warp through all windows in the current workspace
  68. WindowRing
  69. WarpRingOnScreen
  70. NoTitleHighlight
  71. TitleButtonShadowDepth 1
  72. TitleShadowDepth 1
  73. TitleButtonBorderWidth 0
  74. TitlePadding 0
  75. TitleJustification "left"
  76. ButtonIndent 0
  77. FramePadding 0
  78. LeftTitleButton ":xpm:dot" = f.menu "titleops"
  79. RightTitleButton ":xpm:resize" = f.resize
  80. RightTitleButton ":xpm:cross" = f.delete
  81. BorderWidth 4
  82. BorderShadowDepth 2
  83. BorderResizeCursors
  84. MaxIconTitleWidth 120
  85. NoIconManagerFocus
  86. IconManagerShadowDepth 1
  87. IconManagerGeometry "700x14+3-1" 7
  88. #IconManagerGeometry "200x-1-1+0" 1
  89. IconifyByUnmapping
  90. ReallyMoveInWorkspaceManager
  91. MapWindowCurrentWorkSpace { "black" "firebrick" }
  92. DontToggleWorkSpaceManagerState
  93. DontWarpCursorInWMap
  94. NoShowOccupyAll
  95. ReverseCurrentWorkspace
  96. StartInMapState
  97. WMgrHorizButtonIndent 0
  98. WMgrVertButtonIndent 0
  99. WorkSpaceManagerGeometry "190x22+852+745" 4
  100. #WorkSpaceManagerGeometry "60x240-1-1" 1
  101. NoWarpToMenuTitle
  102. WarpCursor
  103. WorkSpaces
  104. {
  105. "1" { "lavender" "black" "darkslateblue" "white" }
  106. "2" { "lavender" "black" "darkslateblue" "white" }
  107. "3" { "lavender" "black" "darkslateblue" "white" }
  108. "4" { "lavender" "black" "darkslateblue" "white" }
  109. # "5" { "lavender" "black" "darkslateblue" "white" }
  110. }
  111. Cursors
  112. {
  113. Frame "left_ptr"
  114. Title "left_ptr"
  115. Icon "left_ptr"
  116. IconMgr "left_ptr"
  117. Move "fleur"
  118. Resize "fleur"
  119. Menu "left_ptr"
  120. Button "hand2"
  121. Wait "watch"
  122. Select "dot"
  123. Destroy "pirate"
  124. }
  125. Color
  126. {
  127. BorderColor "firebrick"
  128. BorderTileBackground "steelblue"
  129. BorderTileForeground "steelblue"
  130. DefaultBackground "grey70"
  131. DefaultForeground "black"
  132. TitleBackground "lavender"
  133. TitleForeground "black"
  134. MenuBackground "lavender"
  135. MenuForeground "black"
  136. MenuTitleBackground "darkorange"
  137. MenuTitleForeground "black"
  138. MenuShadowColor "gray15"
  139. IconBackground "black"
  140. IconForeground "white"
  141. IconBorderColor "gray45"
  142. IconManagerBackground "lavender"
  143. IconManagerForeground "black"
  144. IconManagerHighlight "firebrick"
  145. MapWindowBackground "lavender"
  146. MapWindowForeground "black"
  147. }
  148. Monochrome
  149. {
  150. BorderColor "black"
  151. BorderTileForeground "black"
  152. BorderTileBackground "white"
  153. TitleForeground "black"
  154. TitleBackground "white"
  155. MenuForeground "black"
  156. MenuBackground "white"
  157. MenuTitleForeground "black"
  158. MenuTitleBackground "white"
  159. MapWindowForeground "white"
  160. MapWindowBackground "white"
  161. }
  162. syscmd(/usr/X11R7/libexec/ctwm_app_menu)
  163. menu "appmenu"
  164. {
  165. "pkgsrc Applications" f.title
  166. " accessories" f.menu "Accessories"
  167. " games" f.menu "Games"
  168. " graphics" f.menu "Graphics"
  169. " internet" f.menu "Internet"
  170. " multimedia" f.menu "Multimedia"
  171. " office" f.menu "Office"
  172. " programming" f.menu "Programming"
  173. " system" f.menu "System"
  174. " Mmisc" f.menu "Misc"
  175. }
  176. menu "NetBSD"
  177. {
  178. "NetBSD" f.title
  179. "" f.separator
  180. " badwolf" !"badwolf &"
  181. " passmenu" !"passmenu --type &"
  182. " xlock" !"xlock -mode star -trek 1000 &"
  183. " uxterm" !"uxterm &"
  184. " ait" !"uxterm -e ait &"
  185. " calculator" !"xcalc &"
  186. # " Clock" !"xclock -digital &"
  187. # " XEyes" !"xeyes &"
  188. "" f.separator
  189. " applications" f.menu "appmenu"
  190. "" f.separator
  191. " restart CTWM" f.twmrc
  192. " quit" f.quit
  193. }
  194. menu "titleops"
  195. {
  196. "Window" f.title
  197. "" f.separator
  198. " Iconify" f.iconify
  199. " Resize" f.resize
  200. " Move" f.move
  201. "" f.separator
  202. " Occupy ..." f.occupy
  203. " Occupy All" f.occupyall
  204. "" f.separator
  205. " Raise" f.raise
  206. " Lower" f.lower
  207. "" f.separator
  208. " Zoom" f.fullzoom
  209. " Zoom-V" f.zoom
  210. " Zoom-H" f.horizoom
  211. "" f.separator
  212. " Kill" f.destroy
  213. " Close" f.delete
  214. }
  215. IconManagerDontShow
  216. {
  217. "xclock"
  218. "wmbattery"
  219. "wmmixer"
  220. "wmnd"
  221. "xload"
  222. }
  223. OccupyAll
  224. {
  225. "xclock"
  226. "wmbattery"
  227. "wmmixer"
  228. "wmnd"
  229. "xload"
  230. }
  231. AlwaysOnTop
  232. {
  233. # "xclock"
  234. "wmbattery"
  235. }
  236. NoTitle
  237. {
  238. "TWM Icon Manager"
  239. "WorkSpaceManager"
  240. "wmbattery"
  241. "wmmixer"
  242. "wmnd"
  243. "xload"
  244. "xclock"
  245. }
  246. WindowRingExclude
  247. {
  248. "TWM Icon Manager"
  249. "WorkSpaceManager"
  250. "xclock"
  251. "xsm"
  252. "xconsole"
  253. "wmbattery"
  254. "wmmixer"
  255. "wmnd"
  256. "xload"
  257. }
  258. StartIconified
  259. {
  260. }
  261. NoBorder
  262. {
  263. "TWM Icon Manager"
  264. "WorkSpaceManager"
  265. "wmbattery"
  266. "wmmixer"
  267. "wmnd"
  268. "xload"
  269. "xclock"
  270. }
  271. Function "raise-move" { f.raise f.deltastop f.forcemove }
  272. Function "raise-and-resize" { f.raise f.deltastop f.resize }
  273. # These are basically essential for basic functionality.
  274. Button1 = : title : f.function "raise-move"
  275. Button2 = : title : f.function "raise-and-resize"
  276. Button3 = : title | frame : f.menu "titleops"
  277. Button1 = : frame : f.function "raise-and-resize"
  278. Button1 = : icon | iconmgr : f.iconify
  279. Button2 = : icon : f.move
  280. Button3 = : icon | iconmgr : f.raiselower
  281. Button1 = : root : f.menu "NetBSD"
  282. Button2 = : root : f.menu "TwmAllWindows"
  283. Button3 = : root : f.menu "NetBSD"
  284. #
  285. # Mod1 is the "Alt/Meta" key.
  286. # Mod4 is the "OS" key.
  287. #
  288. Button1 = mod1 : window : f.forcemove
  289. Button1 = mod4 : window : f.forcemove
  290. Button3 = mod1 : window : f.resize
  291. Button3 = mod4 : window : f.resize
  292. Button1 = mod4 | s : window : f.resize
  293. "Up" = mod4 : all : f.upworkspace
  294. "Down" = mod4 : all : f.downworkspace
  295. "Left" = mod4 : all : f.prevworkspace
  296. "Right" = mod4 : all : f.nextworkspace
  297. "Up" = mod1 | control : all : f.upworkspace
  298. "Down" = mod1 | control : all : f.downworkspace
  299. "Left" = mod1 | control : all : f.prevworkspace
  300. "Right" = mod1 | control : all : f.nextworkspace
  301. "1" = mod1 | control : all : f.gotoworkspace "1"
  302. "2" = mod1 | control : all : f.gotoworkspace "2"
  303. "3" = mod1 | control : all : f.gotoworkspace "3"
  304. "4" = mod1 | control : all : f.gotoworkspace "4"
  305. "5" = mod1 | control : all : f.gotoworkspace "5"
  306. "6" = mod1 | control : all : f.gotoworkspace "6"
  307. "7" = mod1 | control : all : f.gotoworkspace "7"
  308. "8" = mod1 | control : all : f.gotoworkspace "8"
  309. "9" = mod1 | control : all : f.gotoworkspace "9"
  310. "1" = mod4 : all : f.gotoworkspace "1"
  311. "2" = mod4 : all : f.gotoworkspace "2"
  312. "3" = mod4 : all : f.gotoworkspace "3"
  313. "4" = mod4 : all : f.gotoworkspace "4"
  314. "5" = mod4 : all : f.gotoworkspace "5"
  315. "6" = mod4 : all : f.gotoworkspace "6"
  316. "7" = mod4 : all : f.gotoworkspace "7"
  317. "8" = mod4 : all : f.gotoworkspace "8"
  318. "9" = mod4 : all : f.gotoworkspace "9"
  319. "XF86AudioRaiseVolume" = : all : !"mixerctl -w outputs.master+=5"
  320. "XF86AudioLowerVolume" = : all : !"mixerctl -w outputs.master-=5"
  321. "XF86AudioMute" = : all : !"mixerctl -w outputs.master=0"
  322. #
  323. # "Windows" style keyboard shortcuts
  324. #
  325. "Tab" = mod4 : all : f.warpring "next"
  326. "Tab" = mod4 | s : all : f.warpring "prev"
  327. "space" = mod4 | s : window : f.menu "titleops"
  328. "F4" = mod4 : window : f.delete
  329. #
  330. # "Mac" style keyboard shortcuts
  331. #
  332. "w" = mod4 : window : f.delete
  333. "m" = mod4 : window : f.iconify
  334. #
  335. # "evilwm" style keyboard shortcuts
  336. #
  337. "Return" = mod4 | s : all : !"uxterm &"
  338. "space" = mod4 : all : !"dmenu_run &"
  339. # TODO: Fix tihs
  340. # "XF86Eject" = : all : !"sh ~/bin/rotate-screen inverted"
  341. "i" = mod4 | s : all : !"sh ~/bin/rotate-screen inverted"
  342. "XF86RotateWindows" = : all : !"sh ~/bin/rotate-screen right"
  343. # s for screensaver
  344. "s" = mod4 | s : all : !"xlock -mode star -trek 1000 &"
  345. "slash" = mod4 : all : f.menu "TwmAllWindows"
  346. "p" = mod4 : all : f.menu "NetBSD"
  347. "Menu" = mod1 : all : f.menu "NetBSD"
  348. "Menu" = mod4 : all : f.menu "NetBSD"
  349. Function "top-left-corner" { f.topzoom f.changesize "960x540" }
  350. Function "top-right-corner" { f.rightzoom f.changesize "960x540" }
  351. Function "bottom-left-corner" { f.bottomzoom f.changesize "960x540" }
  352. Function "bottom-right-corner" { f.bottomzoom f.changesize "960x540" f.jumpright "1000000" }
  353. # vi-style directions
  354. "j" = mod4 : window : f.jumpdown "10"
  355. "k" = mod4 : window : f.jumpup "10"
  356. "h" = mod4 : window : f.jumpleft "10"
  357. "l" = mod4 : window : f.jumpright "10"
  358. "f" = mod4 | s : window : f.fullzoom
  359. "j" = mod4 | s : window : f.bottomzoom
  360. "k" = mod4 | s : window : f.topzoom
  361. "h" = mod4 | s : window : f.leftzoom
  362. "l" = mod4 | s : window : f.rightzoom
  363. "y" = mod4 | s : window : f.function "top-left-corner"
  364. "u" = mod4 | s : window : f.function "top-right-corner"
  365. "b" = mod4 | s : window : f.function "bottom-left-corner"
  366. "n" = mod4 | s : window : f.function "bottom-right-corner"