Advertisement
alaestor

shell.nss

Oct 20th, 2023 (edited)
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.85 KB | Software | 0 0
  1. settings
  2. {
  3. priority=1
  4. exclude.where = !process.is_explorer
  5. showdelay = 200
  6. // Options to allow modification of system items
  7. modify.remove.duplicate=1
  8. tip.enabled=true
  9. }
  10.  
  11. theme
  12. {
  13. name="modern"
  14. dark=auto
  15. view = view.compact
  16. background
  17. {
  18. color=auto
  19. opacity=50
  20. effect=default
  21. }
  22. image.align=2
  23. }
  24.  
  25. import 'imports/images.nss'
  26.  
  27. menu(title='Run' type='file' find='.exe|.ps1|.bat' mode='single' image=\uE0D6)
  28. {
  29. $tip_run_admin=["\xE1A7 Press SHIFT key to run " + this.title + " as administrator", tip.warning, 1.0]
  30. $has_admin=key.shift() or key.rbutton()
  31.  
  32. // Run with CMD
  33. item(
  34. mode='single'
  35. type='file'
  36. where=sel.file.ext!='.ps1'
  37. title='Run in Command Prompt'
  38. image
  39. admin=has_admin
  40. tip=tip_run_admin
  41. cmd-prompt=`/K TITLE Command Prompt &ver& PUSHD "@sel.dir" & @sel.name`
  42. //cmd='cmd.exe'
  43. //args='/K TITLE Command Prompt &ver& PUSHD "@sel.dir" & @sel.name'
  44. )
  45.  
  46. // Run with PS
  47. item(
  48. mode='single'
  49. type='file'
  50. where=sel.file.ext!='.bat'
  51. title='Run in Powershell'
  52. image
  53. admin=has_admin
  54. tip=tip_run_admin
  55. cmd-ps=`-noexit -command Set-Location -LiteralPath '@sel.dir';"./@sel.file.name"`
  56. //cmd='powershell.exe'
  57. //args='-noexit -command cd -LiteralPath "@sel.dir\."; "./@sel.file.name"'
  58. )
  59. }
  60.  
  61. modify(find='Run' parent='Run' position='top')
  62. modify(find='Edit' position='top')
  63. modify(find='Open' position='top')
  64.  
  65. // system
  66. menu(title='System' position='bottom' sep='before' image=\uE167)
  67. {
  68. separator
  69. item(mode='single' type='file' find='.exe|.ps1|.bat' image=\uE1E2
  70. title='Install "@sel.file.name" as an Application'
  71. cmd=path.lnk.create('@user.startmenu\Programs\@(sel.name + ".lnk")', sel.path))
  72.  
  73. item(type='file|dir|back.dir|drive' title='Take Ownership' image=[\uE194,#f00] admin
  74. cmd args='/K takeown /f "@sel.path" @if(sel.type==1,null,"/r /d y") && icacls "@sel.path" /grant *S-1-5-32-544:F @if(sel.type==1,"/c /l","/t /c /l /q")')
  75.  
  76. menu(type='file|dir|back.dir' mode="single" title='Attributes' image=\uE066)
  77. {
  78. $atrr = io.attributes(sel.path)
  79. item(title='Hidden' checked=io.attribute.hidden(atrr)
  80. cmd args='/c ATTRIB @if(io.attribute.hidden(atrr),"-","+")H "@sel.path"' window=hidden)
  81.  
  82. item(title='System' checked=io.attribute.system(atrr)
  83. cmd args='/c ATTRIB @if(io.attribute.system(atrr),"-","+")S "@sel.path"' window=hidden)
  84.  
  85. item(title='Read-Only' checked=io.attribute.readonly(atrr)
  86. cmd args='/c ATTRIB @if(io.attribute.readonly(atrr),"-","+")R "@sel.path"' window=hidden)
  87.  
  88. item(title='Archive' checked=io.attribute.archive(atrr)
  89. cmd args='/c ATTRIB @if(io.attribute.archive(atrr),"-","+")A "@sel.path"' window=hidden)
  90. separator
  91. item(title="CREATED" keys=io.dt.created(sel.path, 'y/m/d') cmd=io.dt.created(sel.path,2000,1,1))
  92. item(title="MODIFIED" keys=io.dt.modified(sel.path, 'y/m/d') cmd=io.dt.modified(sel.path,2000,1,1))
  93. item(title="ACCESSED" keys=io.dt.accessed(sel.path, 'y/m/d') cmd=io.dt.accessed(sel.path,2000,1,1))
  94. }
  95.  
  96. item(type='*' title='Empty recycle-bin' position='bottom' image=\uE0CE
  97. cmd='powershell.exe' args='-command Clear-RecycleBin;exit')
  98.  
  99. item(title=title.run image=\uE14B position='bottom' cmd='shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}')
  100.  
  101. menu(title=title.go_to type='*' where=window.is_taskbar||sel.count mode=mode.multiple position='bottom' sep='before' image=\uE14A)
  102. {
  103. item(title='Temp' cmd=user.temp)
  104. item(title='AppData' cmd=user.appdata)
  105. item(title='LocalAppData' cmd=user.localappdata)
  106. item(title='Startmenu' cmd=user.startmenu)
  107. item(title='Profile (@user.name)' cmd=user.dir)
  108. separator
  109. item(title='Users' cmd=sys.users)
  110. item(title='Windows' cmd=sys.dir)
  111. item(title='System32' cmd=sys.bin)
  112. item(title='ProgramData' cmd=sys.programdata)
  113. item(title='Program Files' cmd=sys.prog)
  114. item(title='Program Files x86' cmd=sys.prog32)
  115. }
  116. }
  117.  
  118. modify(find='Run' position=indexof('Open', 1))
  119. modify(find="What's using" parent='System')
  120. modify(find="Restore" parent='System')
  121. modify(find="Create Shortcut" parent='System')
  122.  
  123. menu(title='Operations' type='file|dir' mode='multiple' sep='before' image=\uE181)
  124. {}
  125.  
  126. menu(title=title.copy_path parent='Operations' image=\uE0AC )
  127. {
  128. item(where=sel.count > 1 title='Copy (@sel.count) items selected' cmd=command.copy(sel(false, "\n")))
  129. item(mode="single" title=@sel.path tip=sel.path cmd=command.copy(sel.path))
  130. item(mode="single" where=@sel.parent.len>3 title=sel.parent cmd=@command.copy(sel.parent))
  131. separator
  132. item(mode="single" type='file|dir|back.dir' title=sel.file.name cmd=command.copy(sel.file.name))
  133. item(mode="single" type='file' where=sel.file.len != sel.file.title.len title=@sel.file.title cmd=command.copy(sel.file.title))
  134. }
  135.  
  136. menu(
  137. title='Terminal'
  138. type='Back|Desktop'
  139. where=(sel.count or wnd.is_taskbar or wnd.is_edit)
  140. image=icon.run_with_powershell)
  141. {
  142. $tip_run_admin=["\xE1A7 Press SHIFT key to run " + this.title + " as administrator", tip.warning, 1.0]
  143. $has_admin=key.shift() or key.rbutton()
  144.  
  145. item(
  146. title="Open Command Prompt here"
  147. tip=tip_run_admin
  148. admin=has_admin
  149. image
  150. cmd-prompt=`/K TITLE Command Prompt &ver& PUSHD "@sel.dir"`
  151. )
  152. item(
  153. title="Open Powershell here"
  154. admin=has_admin
  155. tip=tip_run_admin
  156. image
  157. cmd-ps=`-noexit -command Set-Location -LiteralPath '@sel.dir'`
  158. )
  159. }
  160.  
  161. // submenu everything except...
  162. menu(title='Windows' position=indexof('System', 1) mode='multiple' image=\uE1B7){}
  163. modify(parent='Windows'
  164. where=!this.name(
  165. 'Open',
  166. "Open in",
  167. "Open with",
  168. "Open file location",
  169. "Open folder location",
  170. "Edit",
  171. "NanaZip",
  172. "New",
  173. "Properties",
  174. "More GpgEx options"
  175. )
  176. )
  177.  
  178. modify(find='nanazip' title='Archive' parent='Operations' image=\uE288)
  179. modify(find='More GpgEx options' parent='Operations' title='GpgEX' image=\uE19C)
  180. modify(find='properties' position=indexof('Windows', 1))
  181.  
Tags: Nilesoft
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement