├── .gitattributes
├── .gitignore
├── Far3.bat
├── LICENSE
├── README.md
├── VERSION
├── bin
└── README
├── clink.bat
├── doublecmd.bat
├── etc
├── ConEmu
│ ├── Far3.xml
│ ├── Prompt.xml
│ └── QuakePanel.xml
├── ConsoleZ
│ ├── Far3.xml
│ └── Prompt.xml
├── Far3
│ ├── Default.farconfig
│ ├── Far.exe.ini
│ ├── FarColorer
│ │ ├── schemes.hrc
│ │ ├── schemes
│ │ │ ├── gen
│ │ │ │ ├── perl-brackets.ent.hrc
│ │ │ │ └── sh-brackets.ent.hrc
│ │ │ ├── perl-heredoc.ent.hrc
│ │ │ ├── perl-keyword-pack.ent.hrc
│ │ │ ├── perl-keywords.ent.hrc
│ │ │ ├── perl-vars.ent.hrc
│ │ │ ├── perl-vars.pkg.ent.hrc
│ │ │ ├── perl-vars.pkg.hrc
│ │ │ ├── perl.hrc
│ │ │ ├── rare-ium
│ │ │ │ └── ium.config.hrc
│ │ │ ├── sh-keywords.ent.hrc
│ │ │ └── sh.hrc
│ │ ├── styles.xml
│ │ └── styles
│ │ │ ├── gentle-console.hrd
│ │ │ └── gentle-rgb.hrd
│ └── Profile
│ │ ├── FarMenu.Ini
│ │ └── Macros
│ │ ├── modules
│ │ └── macroEx.lua
│ │ └── scripts
│ │ ├── AutoStart.Shell.lua
│ │ ├── Common.Translit.lua
│ │ ├── Common.ViewUserScreen.lua
│ │ ├── Dialog.ConcurrentHotkeys.lua
│ │ ├── Editor.BlockIndent.lua
│ │ ├── Editor.IncSearch.lua
│ │ ├── Editor.Notepad.lua
│ │ ├── Editor.ReloadFile.lua
│ │ ├── Editor.SmartHomeEnd.lua
│ │ ├── Editor.scite_like.lua
│ │ ├── Plugin.Common.Calc.lua
│ │ ├── Plugin.Common.S&R.lua
│ │ ├── Plugin.ConEmu.TabList.lua
│ │ ├── Plugin.Editor.AutoWrap.lua
│ │ ├── Plugin.Editor.EditCase.lua
│ │ ├── Plugin.Editor.FarColorer.lua
│ │ ├── Plugin.Editor.Visualizer.lua
│ │ ├── Plugin.Panel.VisualCompare.lua
│ │ ├── Plugin.Shell.EMenu.lua
│ │ ├── Shell.AutoCompletion.lua
│ │ ├── Shell.CdUp.Light.lua
│ │ ├── Shell.CdUp.lua
│ │ ├── Shell.CmdLine.CursorMovement.lua
│ │ ├── Shell.CtrlBackSlash.lua
│ │ ├── Shell.DeepTarball.lua
│ │ ├── Shell.EnterEmptyLine.lua
│ │ ├── Shell.HiddenFiles.lua
│ │ ├── Shell.History.lua
│ │ ├── Shell.Rename.lua
│ │ └── Viewer.PgDn.lua
├── PuTTY
│ ├── README
│ ├── config
│ │ ├── create-putty-sessions.bat
│ │ ├── sessions-list.txt
│ │ └── sessions
│ │ │ └── #default-settings.session
│ └── putty.conf
├── README
├── candy-for-tea.bat
├── candy-for-tea.enabled
├── clink
│ ├── .gitignore
│ ├── clink_inputrc
│ ├── clink_settings
│ └── clink_start.cmd
├── distrib
│ └── README
├── images
│ ├── ConEmu.ico
│ ├── Cygwin.ico
│ ├── Far2.ico
│ ├── Far3.bmp
│ ├── Far3.ico
│ ├── Prompt.bmp
│ ├── Prompt.ico
│ ├── git-for-windows.ico
│ ├── git.ico
│ └── msysgit.ico
├── mintty
│ └── default.settings
├── misc
│ ├── SumatraPDF
│ │ ├── SumatraPDF-default.bat
│ │ ├── SumatraPDF-default.txt
│ │ └── SumatraPDF-register.bat
│ └── __TIPS
│ │ └── firefox-profile-notifications.txt
├── notepad
│ ├── Notepad.ini
│ └── Notepad3.ini
├── postinstall
│ ├── calc-display-issue.txt
│ ├── cygwin-update.txt
│ ├── fstab
│ ├── home-link.bat
│ ├── home-link.cyglink
│ ├── home-link.winlink
│ ├── keyboard-layout-rus-eng.reg
│ ├── notepad-replace-win10.bat
│ ├── notepad-replace-win11.bat
│ ├── notepad-txtfile.bat
│ └── synaptics-middle-click.reg
├── shell
│ ├── cygwin.bat
│ ├── detect_winpty.bat
│ ├── msys32.bat
│ └── msys64.bat
└── xsrv
│ └── xsrv-multiwindow.xlaunch
├── home
├── .XWinrc
├── .bash
│ ├── aliases
│ ├── environ
│ ├── functions-cd
│ ├── functions-datetime
│ ├── functions-jump
│ ├── functions-misc
│ ├── functions-pipe
│ ├── functions-proxy
│ ├── functions-strings
│ ├── settings-git
│ └── settings-prompt
├── .bash_profile
├── .bashrc
├── .git-completion.bash
├── .git-prompt.sh
├── .gitconfig
├── .inputrc
├── .minttyrc
├── .perl5
│ └── 000-make-runners
└── .profile
├── javaenv.bat
├── libexec
├── README
└── identify.bat
├── opt
└── README
├── shell.bat
├── shellenv.bat
├── shellenv.cfg-EXAMPLE
└── shellinfo.bat
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=lf
2 |
3 | *.bat text eol=crlf
4 | *.cmd text eol=crlf
5 |
6 | *.txt text
7 | *.xml text
8 | *.properties text
9 | *.pl text
10 | *.sh text
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | shellenv.cfg
2 |
3 | bin/*
4 | !bin/README*
5 |
6 | etc/candy-for-tea.enabled
7 | etc/*.log
8 | etc/ConEmu/
9 | etc/distrib/
10 | etc/misc/
11 | !etc/**/README*
12 |
13 | etc/clink/.history
14 |
15 | etc/Far3/Profile/Plugins/*
16 | etc/Far3/Profile/PluginsData/*
17 | etc/Far3/Profile/*.db*
18 | etc/Far3/ProfileLocal
19 |
20 | GUI/
21 |
22 | home/*
23 | !home/.bash_profile
24 | !home/.bashrc
25 | !home/.git-completion.bash
26 | !home/.git-prompt.sh
27 | !home/.gitconfig
28 | !home/.inputrc
29 | !home/.profile
30 |
31 | libexec/*
32 | !libexec/README*
33 | !libexec/identify.bat
34 |
35 | opt/*
36 | !opt/README*
37 |
38 | var/
39 |
40 | vendors/
41 |
--------------------------------------------------------------------------------
/Far3.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | setlocal
4 |
5 | set "FAR_NAME=Far3"
6 |
7 | if exist "%~dp0libexec\identify.bat" call "%~dp0libexec\identify.bat" app Far3
8 |
9 | if defined FAR_NAME if exist "%~dp0libexec\%FAR_NAME%\Far.exe" goto :continue
10 |
11 | call :error "Can't identify Far3 by name %FAR_NAME%"
12 | goto :EOF
13 |
14 | :: ========================================================================
15 |
16 | :continue
17 | set "FAR_HOME=%~dp0libexec\%FAR_NAME%"
18 |
19 | :: Path to the common directory for all FAR-related stuffs
20 | set "FAR_CONF=%~dp0etc\Far3"
21 |
22 | :: FAR startup options
23 | set "FAR_OPTS=%FAR_HOME%\Plugins;%FAR_CONF%\Profile\Plugins"
24 | if defined ConEmuDir if exist "%ConEmuDir%" set "FAR_OPTS=%FAR_OPTS%;%ConEmuDir%\Plugins\ConEmu"
25 | set "FAR_OPTS=/w /p"%FAR_OPTS%""
26 |
27 | if exist "%~dp0shellenv.bat" call "%~dp0shellenv.bat"
28 |
29 | if exist "%~dp0shellinfo.bat" call "%~dp0shellinfo.bat" conemu far home path
30 |
31 | :: ========================================================================
32 |
33 | if not exist "%FAR_HOME%\Far.exe.ini" (
34 | echo:
35 | echo:*** "%FAR_HOME%\Far.exe.ini" not found
36 | if exist "%FAR_CONF%\Far.exe.ini" (
37 | echo:*** Copying from "%FAR_CONF%\Far.exe.ini"
38 | copy /b "%FAR_CONF%\Far.exe.ini" "%FAR_HOME%\Far.exe.ini"
39 | ) else (
40 | echo:*** Creating
41 | call :far.exe.ini_create >"%FAR_HOME%\Far.exe.ini"
42 | )
43 | if errorlevel 1 (
44 | call :error "Cannot create %FAR_CONF%\Far.exe.ini"
45 | goto :EOF
46 | )
47 | )
48 |
49 | :: ========================================================================
50 |
51 | echo:Starting %FAR_NAME%
52 | echo:[ %DATE% %TIME% ]
53 |
54 | "%FAR_HOME%\Far.exe" %FAR_OPTS% %*
55 |
56 | echo:Terminating...
57 | goto :EOF
58 |
59 | :: ========================================================================
60 |
61 | :error
62 | >&2 (
63 | echo:CRITICAL ERROR: %~1
64 | pause
65 | )
66 | goto :EOF
67 |
68 | :: ========================================================================
69 |
70 | :far.exe.ini_create
71 | echo:
72 | echo:[General]
73 | echo:
74 | echo:UseSystemProfiles=0
75 | echo:
76 | echo:UserProfileDir=%%FARHOME%%\..\..\etc\Far3\Profile
77 | echo:UserLocalProfileDir=%%FARHOME%%\..\..\etc\Far3\Profile
78 | echo:
79 | echo:TemplateProfile=%%FARHOME%%\..\..\etc\Far3\Default.farconfig
80 | echo:
81 | echo:GlobalUserMenuDir=%%FARHOME%%\..\..\etc\Far3
82 | echo:
83 | echo:DefaultLanguage=Russian
84 | echo:
85 | echo:ReadOnlyConfig=0
86 | goto :EOF
87 |
88 | :: ========================================================================
89 |
90 | :: EOF
91 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 ildar-shaimordanov
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Tea set
2 |
3 | this development arisen from the own set of the constantly updated scripts and tools collected for comfortable work under Windows. Some good ideas were invented by me, others were borrowed from different places. After installing on PC it puts 7-Zip, ConEmu, ConsoleZ, Clink, Far3, unix ports, Notepad3 and allows to deploy others.
4 |
--------------------------------------------------------------------------------
/VERSION:
--------------------------------------------------------------------------------
1 | 0.4.9 Beta
2 |
--------------------------------------------------------------------------------
/bin/README:
--------------------------------------------------------------------------------
1 | Common place for tools
2 |
--------------------------------------------------------------------------------
/clink.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | set "CLINK_NAME=clink"
4 |
5 | if exist "%~dp0libexec\identify.bat" call "%~dp0libexec\identify.bat" app clink
6 |
7 | if exist "%~dp0shellenv.bat" call "%~dp0shellenv.bat"
8 | set "HOME=%~dp0home"
9 |
10 | if not defined CLINK_NAME goto :EOF
11 | if not exist "%~dp0libexec\%CLINK_NAME%\clink.bat" goto :EOF
12 |
13 | :: ========================================================================
14 |
15 | :: Inject clink
16 | call "%~dp0libexec\%CLINK_NAME%\clink.bat" inject --quiet --profile "%~dp0etc\clink"
17 |
18 | :: ========================================================================
19 |
20 | :: EOF
21 |
--------------------------------------------------------------------------------
/doublecmd.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | start "Starting..." /b "%~dp0libexec\doublecmd\doublecmd.exe" --no-splash --config-dir="%~dp0etc\misc\doublecmd"
4 |
--------------------------------------------------------------------------------
/etc/Far3/Far.exe.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/Far3/Far.exe.ini
--------------------------------------------------------------------------------
/etc/Far3/FarColorer/schemes.hrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | /\.(config)$/i
8 |
9 |
10 |
14 |
15 |
27 |
28 |
34 |
35 |
41 |
42 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/etc/Far3/FarColorer/schemes/gen/sh-brackets.ent.hrc:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/etc/Far3/FarColorer/schemes/perl-heredoc.ent.hrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
50 |
51 |
55 |
59 |
63 |
64 |
--------------------------------------------------------------------------------
/etc/Far3/FarColorer/schemes/perl-vars.ent.hrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | На выходе юзаются две схемы:
5 | Vars - для всего.
6 | VarsEx - для строк.
7 | Остальное - internal.
8 |
9 | SubProt - отдельная песня: прототип ф-ций
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 |
43 |
44 |
45 |
46 |
50 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
--------------------------------------------------------------------------------
/etc/Far3/FarColorer/schemes/perl-vars.pkg.ent.hrc:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
18 |
21 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/etc/Far3/FarColorer/schemes/perl-vars.pkg.hrc:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | ]>
7 |
8 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | &perl-vars-pkg;
19 |
20 |
21 |
22 |
23 |
24 | &perl-vars-pkg;
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/etc/Far3/FarColorer/schemes/rare-ium/ium.config.hrc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/Far3/FarColorer/schemes/rare-ium/ium.config.hrc
--------------------------------------------------------------------------------
/etc/Far3/FarColorer/schemes/sh-keywords.ent.hrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
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 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
--------------------------------------------------------------------------------
/etc/Far3/FarColorer/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
16 |
30 |
--------------------------------------------------------------------------------
/etc/Far3/FarColorer/styles/gentle-console.hrd:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/etc/Far3/FarColorer/styles/gentle-rgb.hrd:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
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 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/FarMenu.Ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/Far3/Profile/FarMenu.Ini
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/modules/macroEx.lua:
--------------------------------------------------------------------------------
1 | local break_sequence_on_mod_release = true
2 |
3 | --http://forum.farmanager.com/viewtopic.php?f=15&t=8764
4 |
5 | local RAlt, LAlt = 0x1,0x2
6 | local RCtrl,LCtrl = 0x4,0x8
7 | --[[
8 | local Shift = 0x10
9 | local NumLock,ScrollLock,CapsLock = 0x20,0x40,0x80
10 | local ENHANCED_KEY = 0x100
11 | --]]
12 | local Mods = {
13 | RAlt =RAlt, LAlt =LAlt, Alt =bor(RAlt, LAlt),
14 | RCtrl=RCtrl, LCtrl=LCtrl, Ctrl=bor(RCtrl,LCtrl),
15 | }
16 |
17 | local function isReleased(Mod) return band(Mouse.LastCtrlState,Mod)==0 end -- State after last mf.waitkey!!
18 | local function guessMod(mod,AKey)
19 | mod = mod or AKey:match"Ctrl" or AKey:match"Alt" or error"unable to guess modifier key"
20 | return assert(Mods[mod],"wrong modifier specified")
21 | end
22 |
23 | local function exec(f,...)
24 | if type(f)=="function" then
25 | return f(...)
26 | else
27 | Keys(f)
28 | end
29 | end
30 |
31 | local F,C = far.Flags,far.Colors
32 | local Color2 = far.AdvControl(F.ACTL_GETCOLOR,C.COL_MENUHIGHLIGHT)
33 | local Color1 = far.AdvControl(F.ACTL_GETCOLOR,C.COL_MENUTITLE)
34 | local function setStatus(text,Color)
35 | if text and type(text)=="string" then
36 | far.Text(1,0,Color," "..text.." ")
37 | far.Text()
38 | end
39 | end
40 |
41 | local getMod = regex.new"^((?:[LR]?Ctrl)?(?:[LR]?Alt)?(?:Shift)?).+$"
42 |
43 | local Delay = 300
44 | local SeqDelay = 1000
45 | return function(Macro)
46 | return function(t)
47 | local action, condition, hold, doubletap, sequence, delay, mod =
48 | t.action,t.condition,t.hold,t.doubletap,t.sequence,t.delay,t.mod
49 | if not (hold or doubletap or sequence) then return Macro(t) end
50 | local busy
51 | local function KeysEx(key)
52 | if key and key~="" then
53 | busy = true
54 | if eval(key,2)==-2 then Keys(key) end
55 | busy = false
56 | end
57 | end
58 | t.priority=t.priority or 60;
59 | t.condition=function(...)
60 | return not busy and (not condition or condition(...))
61 | end;
62 | t.action=function(...)
63 | local AKey = akey(1)
64 | local mod = guessMod(mod,AKey)
65 | if sequence then setStatus(sequence.status,Color1) end
66 | local key = ""
67 | local timeout
68 | -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
69 | local start = Far.UpTime
70 | delay = not (hold or doubletap) and SeqDelay or delay or Delay
71 | while not (timeout or key~="" or isReleased(mod)) do
72 | key = mf.waitkey(10)
73 | timeout = Far.UpTime-start>delay
74 | end
75 | if hold and timeout then
76 | return exec(hold,"hold")
77 | elseif doubletap and key==AKey then
78 | return exec(doubletap,"doubletap")
79 | end
80 | -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
81 | local h
82 | if sequence then
83 | setStatus(sequence.status,Color2)
84 | local getKey = regex.new("^"..getMod:match(AKey).."(.+)$")
85 | local seq = sequence
86 | while not (isReleased(mod) and break_sequence_on_mod_release) do
87 | if timeout then
88 | if seq.help and not h then
89 | h = far.SaveScreen()
90 | far.Message(seq.help,seq.status,"","l")
91 | end
92 | end
93 | if key~="" then
94 | local key2 = getKey:match(key) or key:len()==1 and key:upper() or key
95 | local action = seq[key2]
96 | if action then
97 | if h then far.RestoreScreen(h); h = nil end
98 | if type(action)=="table" then
99 | seq = action
100 | setStatus(seq.status,Color2)
101 | timeout = true --todo??
102 | else
103 | return exec(action,key2)
104 | end
105 | else
106 | break
107 | end
108 | end
109 | key = mf.waitkey(10)
110 | timeout = timeout or Far.UpTime-start>delay
111 | end
112 | end
113 | -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
114 | if h then far.RestoreScreen(h) end
115 | if timeout then elseif action then exec(action,...) else KeysEx(AKey) end
116 | KeysEx(key)
117 | end
118 | return Macro(t)
119 | end
120 | end
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/AutoStart.Shell.lua:
--------------------------------------------------------------------------------
1 | Macro {
2 | description = "Display date/time of Far invocation";
3 | area = "Shell";
4 | key = "";
5 | flags = "RunAfterFARStart";
6 | action = function()
7 | -- http://forum.farmanager.com/viewtopic.php?p=138007#p138007
8 | -- Скрыть "вводимую" команду при старте FAR
9 | -- Hide an "entered" command at starting of FAR
10 | panel.GetUserScreen()
11 | win.system("echo:Started Far3")
12 | win.system("echo:[ %DATE% %TIME% ]")
13 | panel.SetUserScreen()
14 | -- workaround to avoid unexpected keystroke printing
15 | -- https://forum.farmanager.com/viewtopic.php?p=168784#p168784
16 | win.Sleep(3000)
17 | end;
18 | }
19 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Common.Translit.lua:
--------------------------------------------------------------------------------
1 |
2 | Macro {
3 | area = "Common";
4 | key = "CtrlShiftApps";
5 | flags = "";
6 | description = "Common: Transliterate Rus<->Lat";
7 | action = function()
8 | Keys('xlat')
9 | end;
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Common.ViewUserScreen.lua:
--------------------------------------------------------------------------------
1 | local Info = Info or package.loaded.regscript or function(...) return ... end --luacheck: ignore 113/Info
2 | local nfo = Info { _filename or ...,
3 | name = "Ctrl+O ultimate";
4 | description = "View UserScreen from any area";
5 | version = "0.3"; --http://semver.org/lang/ru/
6 | author = "jd";
7 | url = "https://forum.farmanager.com/viewtopic.php?f=15&t=10983";
8 | id = "0698713F-35CF-4B47-98E4-C281E700C7DF";
9 | minfarversion = {3,0,0,5067,0}; --desktop
10 | helpstr = [[
11 | Хотя в редакторе/вьювере "из коробки" заявлена возможность по Ctrl+O посмотреть
12 | пользовательский экран, реализована она неполноценно, например невозможно использовать
13 | граббер, не работают макросы http://bugs.farmanager.com/view.php?id=3523
14 |
15 | Предлагаемый набор макросов даёт возможность полноценного просмотра пользовательского экрана
16 | из любой области.
17 | По желанию отдельные области можно исключить, перечислив их в параметре "exclude".
18 |
19 | Если активное окно немодально, то по нажатию Ctrl+O происходит переключение в окно Desktop.
20 | Если модально, то для просмотра используются функции GetUserScreen/SetUserScreen.
21 | Обратно можно вернуться нажав Ctrl+O, Esc или Ctrl+Tab.
22 | ]];
23 | help = function(nfo) far.Message(nfo.helpstr,nfo.name,nil,"l") end;
24 | options = {
25 | exclude = "Grabber ShellAutoCompletion DialogAutoCompletion";
26 | };
27 | --disabled = true;
28 | }
29 | if not nfo or nfo.disabled then return end
30 | local O = nfo.options
31 |
32 | local Exclude = {}
33 | if O.exclude and type(O.exclude=="string") then
34 | for area in O.exclude:gmatch"%S+" do Exclude[area] = true end
35 | end
36 |
37 | local F = far.Flags
38 | local actl, GetWindowInfo, SetCurrentWindow
39 | = far.AdvControl,F.ACTL_GETWINDOWINFO,F.ACTL_SETCURRENTWINDOW
40 |
41 | local function isModal(wi)
42 | return band(wi.Flags,F.WIF_MODAL)~=0
43 | end
44 |
45 | -- 0003523: Полноценный просмотр пользовательского экрана в редакторе/вьювере
46 | -- http://bugs.farmanager.com/view.php?id=3523
47 |
48 | Macro { description="CtrlO: view UserScreen from any area";
49 | area="Common"; key="CtrlO"; priority=40;
50 | id="51E14530-08AA-4134-9488-4AD5EF8B6EDE";
51 | condition=function()
52 | return not Exclude[Area.Current]
53 | and actl(GetWindowInfo).Type~=F.WTYPE_PANELS
54 | end;
55 | action=function()
56 | local wi = actl(GetWindowInfo)
57 | if isModal(wi) then
58 | panel.GetUserScreen(nil,1)
59 | else
60 | for i=1,wi.Pos-1 do
61 | if actl(GetWindowInfo,i).Type==F.WTYPE_DESKTOP then
62 | actl(SetCurrentWindow,i)
63 | return
64 | end
65 | end
66 | end
67 | end;
68 | }
69 |
70 | -- 0003496: Desktop: реализовать выход по Esc/Ctrl-O
71 | -- http://bugs.farmanager.com/view.php?id=3496
72 |
73 | Macro { description="CtrlO/Esc - quit Desktop";
74 | area="Desktop"; key="Esc CtrlTab CtrlO"; priority=45;
75 | id="6AB9F806-45E5-46E2-8146-8136CC2F275D";
76 | action=function()
77 | local wi = actl(GetWindowInfo)
78 | if isModal(wi) then
79 | panel.SetUserScreen(nil,1)
80 | else
81 | actl(SetCurrentWindow,wi.Pos-1)
82 | end
83 | end;
84 | }
85 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Dialog.ConcurrentHotkeys.lua:
--------------------------------------------------------------------------------
1 | --http://forum.farmanager.com/viewtopic.php?f=15&t=9197
2 | -- requires FAR 3 build 4215 (http://bugs.farmanager.com/view.php?id=2878)
3 | --http://bugs.farmanager.com/view.php?id=2877
4 | --http://bugs.farmanager.com/view.php?id=2879
5 | --http://bugs.farmanager.com/view.php?id=2881
6 |
7 | local F = far.Flags
8 | local checkHK,getHK = Object.CheckHotkey,Object.GetHotkey
9 | local RAlt,LAlt,RCtrl,LCtrl,Shift = 0x1,0x2,0x4,0x8,0x10
10 | local Ctrl,Alt = bor(RCtrl,LCtrl),bor(RAlt,LAlt)
11 |
12 | local function P2p(hDlg, ID) --"visible" Pos -> "total" pos
13 | local P,p,ii = {},{},0
14 | for i,item in ipairs(far.GetDlgItem(hDlg, ID)[6]) do --[6] Selected/ListItems: integer/table
15 | if band(item.Flags,F.LIF_HIDDEN)==0 then
16 | ii = ii+1
17 | P[i],p[ii] = ii,i
18 | end
19 | end
20 | return p,P
21 | end
22 |
23 | Event { group="DialogEvent"; description="Ctrl- to run hotkey";
24 | uid="5EB2CC1A-D563-4362-ACC2-20BE350EDDA4";
25 | condition=function(Event,param)
26 | local ID,Input = param.Param1,param.Param2
27 | return param.Msg==F.DN_CONTROLINPUT and Event==F.DE_DLGPROCINIT
28 | and Input.EventType==F.KEY_EVENT and Input.UnicodeChar~="\0"
29 | and far.GetDlgItem(param.hDlg, ID)[1]==F.DI_LISTBOX
30 | end;
31 | action=function(Event,param)
32 | local hDlg,ID,Input = param.hDlg,param.Param1,param.Param2
33 | local Mods = Input.ControlKeyState
34 | if band(Mods,Ctrl)~=0 and band(Mods,Alt)==0
35 | and checkHK(Input.UnicodeChar)~=0 then
36 | local hk,char = getHK():lower(),Input.UnicodeChar:lower()
37 | if hk~=char and hk~=far.XLat(char) then
38 | local Pos = checkHK(char)
39 | if Pos==0 then return end
40 | hDlg:send(F.DM_LISTSETCURPOS,ID,{SelectPos=P2p(hDlg,ID)[Pos]})
41 | end
42 | return param.hDlg:send"DM_CLOSE"
43 | end
44 | end;
45 | }
46 |
47 | local InitPos
48 | Event { group="DialogEvent"; description="Alt- to pos to menu item (cycle through same hotkeys)";
49 | uid="D91B58E5-4C32-4384-B205-D7895A4EC037";
50 | condition=function(Event,param) return Event==F.DE_DLGPROCINIT end;
51 | action=function(Event,param)
52 | local hDlg,ID = param.hDlg,param.Param1
53 | if param.Msg==F.DN_CONTROLINPUT and param.Param2.EventType==F.KEY_EVENT then
54 | if far.GetDlgItem(hDlg, ID)[1]==F.DI_LISTBOX then
55 | InitPos = hDlg:send(F.DM_LISTINFO,ID).SelectPos
56 | end
57 | elseif param.Msg==F.DN_LISTHOTKEY then
58 | local hk,ItemIndex = getHK(),param.Param2
59 | local p,P = P2p(hDlg, ID)
60 | if checkHK(hk,P[ItemIndex]+1)==0 and band(Mouse.LastCtrlState,Alt)==0 then return end
61 | local Pos = checkHK(hk,P[InitPos]+1)
62 | if Pos==0 then Pos = checkHK(hk) end
63 | mf.postmacro(far.SendDlgMessage,hDlg,F.DM_LISTSETCURPOS,ID,{SelectPos=p[Pos]})
64 | return 0
65 | end
66 | end;
67 | }
68 |
69 | Event { group="DialogEvent"; description="Concurrent hotkeys menu filter";
70 | uid="33E83694-4F10-44A0-8CAD-C7DE90F5621C";
71 | condition=function(Event,param)
72 | return param.Msg==F.DN_LISTHOTKEY and Event==F.DE_DLGPROCINIT
73 | and band(Mouse.LastCtrlState,Alt)==0
74 | and 60
75 | end;
76 | action=function(Event,param)
77 | local hDlg,ID,ItemIndex = param.hDlg,param.Param1,param.Param2
78 | if hDlg:send(F.DM_LISTINFO,ID).ItemsNumber~=Object.ItemCount then return end --macro api item indexes does not count hidden items
79 | --local P = select(2,P2p(hDlg, ID)); ItemIndex = P[ItemIndex]
80 | local hk = getHK() --ItemIndex
81 | if checkHK(hk,ItemIndex+1)~=0 then
82 | hDlg:send(F.DM_SHOWDIALOG,0)
83 | local list = far.GetDlgItem(hDlg, ID)[6] --[6] Selected/ListItems: integer/table
84 | local item
85 | for i=#list,1,-1 do
86 | if getHK(i)~=hk then
87 | item = list[i]
88 | hDlg:send(F.DM_LISTUPDATE, ID,{Index=i,Text=item.Text,Flags=bor(item.Flags,F.LIF_HIDDEN)})
89 | end
90 | end
91 | hDlg:send(F.DM_SHOWDIALOG,1)
92 | Menu.Filter(4) --подправить высоту списка под количество элементов
93 | if Object.ItemCount==1 then return param.hDlg:send"DM_CLOSE" end
94 | return item and 0 or nil
95 | end
96 | end;
97 | }
98 |
99 | local hDlg,ID
100 | Macro { description="Reset filters";
101 | area="Dialog Menu UserMenu Disks"; key="Esc F10";
102 | uid="3DE219F0-7B83-453B-A1FA-E780640F7093";
103 | condition=function()
104 | hDlg = far.AdvControl"ACTL_GETWINDOWINFO".Id
105 | ID = Area.Dialog and Dlg.CurPos or 1
106 | if Area.Dialog and Dlg.ItemType~=F.DI_LISTBOX then return end
107 | return hDlg:send(F.DM_LISTINFO,ID).ItemsNumber~=Object.ItemCount
108 | end;
109 | action=function()
110 | if Menu.Filter(0)==1 then Menu.Filter(0,0); return end
111 | hDlg:send(F.DM_SHOWDIALOG,0)
112 | for i,item in ipairs(far.GetDlgItem(hDlg,ID)[6]) do--[6] Selected/ListItems: integer/table
113 | if band(item.Flags,F.LIF_HIDDEN)~=0 then
114 | hDlg:send(F.DM_LISTUPDATE,ID,{Index=i,Text=item.Text,Flags=band(item.Flags,bnot(F.LIF_HIDDEN))})
115 | end
116 | end
117 | hDlg:send(F.DM_SHOWDIALOG,1)
118 | Menu.Filter(4) --подправить высоту списка под количество элементов
119 | end;
120 | }
121 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Editor.BlockIndent.lua:
--------------------------------------------------------------------------------
1 |
2 | -- http://forum.farmanager.com/viewtopic.php?f=15&t=7703
3 | -- http://evil-programmers.googlecode.com/svn/trunk/BlockIndent/BlockIndent.lua
4 |
5 | --[[
6 | Block Indent for Far Manager
7 | Version: 2.1
8 | Copyright (C) 2001 Alex Yaroslavsky
9 |
10 | This program is free software; you can redistribute it and/or modify
11 | it under the terms of the GNU General Public License as published by
12 | the Free Software Foundation; either version 2 of the License, or
13 | (at your option) any later version.
14 |
15 | This program is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU General Public License for more details.
19 |
20 | You should have received a copy of the GNU General Public License
21 | along with this program; if not, write to the Free Software
22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 |
24 | Features:
25 | - Right or Left Indentation of the selected block (or the current line) by
26 | a tab or a space.
27 | - Each line in the block is indented relatively to its own position with no
28 | respect to other lines in the block.
29 | - Tab indentation as in Borland Turbo IDE, text is indented to the nearest
30 | tab position and not just by tab size.
31 | - Works correctly with any editor settings (expand tabs or not, inserts real
32 | tabs).
33 | --]]
34 |
35 | local Indent = function (IndentByTabSize, Forward)
36 | local F = far.Flags
37 | local ei = editor.GetInfo(nil);
38 | local IndentSize = IndentByTabSize and ei.TabSize or 1
39 | local IndentStr = IndentByTabSize and "\t" or " "
40 |
41 | local line = ei.CurLine;
42 | local loop = false
43 | if ei.BlockType ~= F.BTYPE_NONE then
44 | local s = editor.GetString()
45 | if s.SelStart ~= 0 then
46 | loop = true;
47 | line = ei.BlockStartLine;
48 | end
49 | end
50 |
51 | editor.UndoRedo(nil, F.EUR_BEGIN)
52 |
53 | repeat
54 | editor.SetPosition(nil, line, 1, 0, 0, 1, ei.Overtype)
55 | -- patch 2.7 at http://forum.farmanager.com/viewtopic.php?p=125167#p125167
56 | -- local s = editor.GetString(nil, 0, 0)
57 | local s = editor.GetString(nil, line, 0)
58 | if not s or (loop and ((s.SelStart == 0) or (s.SelEnd ~= -1 and s.SelStart > s.SelEnd))) then
59 | break
60 | end
61 | local j = s.StringText:find("[^ \t]")
62 | if j and (j>1 or Forward) then
63 | local TabPos = editor.RealToTab(nil, nil, j) - 1
64 | local x = math.floor(TabPos/IndentSize)
65 | if ((TabPos%IndentSize) == 0) and not Forward then
66 | x = x - 1
67 | end
68 | x = Forward and x + 1 or x
69 | -- patch 2.7 at http://forum.farmanager.com/viewtopic.php?p=125167#p125167
70 | -- editor.SetString(nil, nil, s.StringText:sub(j), s.StringEOL)
71 | -- for i=1,x,1 do editor.InsertText(nil,IndentStr) end
72 | editor.SetString(nil, nil, IndentStr:rep(x)..s.StringText:sub(j), s.StringEOL)
73 | end
74 | line = line + 1
75 | -- http://forum.farmanager.com/viewtopic.php?p=125170#p125170
76 | loop = ei.TotalLines >= line
77 | until not loop
78 |
79 | editor.SetPosition(nil, ei.CurLine, ei.CurPos, 0, ei.TopScreenLine, ei.LeftPos, ei.Overtype)
80 | editor.UndoRedo(nil, F.EUR_END)
81 | end
82 |
83 | -- patch for Far 3.0 build 4444
84 | -- comment or remove unsupported flags = "DisableOutput"
85 | -- http://forum.farmanager.com/viewtopic.php?p=133237#p133237
86 |
87 | Macro {
88 | area = "Editor";
89 | key = "ShiftTab";
90 | --flags = "DisableOutput";
91 | description = "Editor: Indent right by tab size";
92 | action = function()
93 | Indent(true, true)
94 | end;
95 | }
96 |
97 | Macro {
98 | area = "Editor";
99 | key = "ShiftBS";
100 | --flags = "DisableOutput";
101 | description = "Editor: Indent left by tab size";
102 | action = function()
103 | Indent(true, false)
104 | end;
105 | }
106 |
107 | NoMacro {
108 | area = "Editor";
109 | key = "";
110 | --flags = "DisableOutput";
111 | description = "Editor: Indent right by space";
112 | action = function()
113 | Indent(false, true)
114 | end;
115 | }
116 |
117 | NoMacro {
118 | area = "Editor";
119 | key = "";
120 | --flags = "DisableOutput";
121 | description = "Editor: Indent left by space";
122 | action = function()
123 | Indent(false, false)
124 | end;
125 | }
126 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Editor.IncSearch.lua:
--------------------------------------------------------------------------------
1 | --http://forum.farmanager.com/viewtopic.php?f=15&t=8802
2 | --v2
3 | local useEdtFind = true --false
4 | local options = "WholeWords:0 RegExp:0 CaseSensitive:0 HighLight:1"
5 | local ExtraQuick --= true
6 | local useBM = false
7 |
8 | local F = far.Flags
9 | local SearchMode, str
10 | local last, appendable = ""
11 | local OriginalPos,OriginalSel
12 |
13 | local srhInit,srhFin,srhStart,srhFwd,srhBwd
14 | local function SetSelection(sel)
15 | editor.Select(nil,sel and {
16 | BlockType=F.BTYPE_STREAM,
17 | BlockStartPos=sel.StartPos,
18 | BlockWidth=sel.EndPos-sel.StartPos+1,
19 | BlockStartLine=sel.StartLine,
20 | BlockHeight=sel.EndLine-sel.StartLine+1,
21 | })
22 | end
23 |
24 | local function MessagePopup(msg,title,flags,delay)
25 | local s = far.SaveScreen()
26 | far.Message(msg,title or "","",flags)
27 | win.Sleep(delay or 500); far.RestoreScreen(s)
28 | far.Text()
29 | end
30 |
31 | local function EdtFind(arg)
32 | return Plugin.SyncCall("E4ABD267-C2F9-4158-818F-B0E040A2AB9F",arg)
33 | end
34 |
35 | local function search(f,str,options,dir)
36 | local pos = editor.GetString().SelStart
37 | editor.SetPosition(nil,0,pos)
38 | if str=="" then
39 | editor.SetPosition(nil,0,pos)
40 | editor.Select(nil, F.BTYPE_NONE)
41 | EdtFind"Highlight:0"
42 | far.Text()
43 | return
44 | end
45 | local sel = editor.GetSelection()
46 | Keys(dir)
47 | local found = f(str,options)
48 | if not found then
49 | mf.beep()
50 | win.Sleep(200)
51 | editor.SetPosition(nil,0,pos)
52 | SetSelection(sel) --restore selection
53 | elseif false then
54 | -------------------------------
55 | local si = editor.GetString()
56 | local word = si.StringText:match("%w+",si.SelEnd)
57 | local ei = editor.GetInfo()
58 | local LeftPos = si.SelEnd+word:len()-ei.WindowSizeX
59 | if LeftPos>ei.LeftPos then
60 | ei.LeftPos = LeftPos
61 | editor.SetPosition(nil,ei)
62 | end
63 | end
64 | editor.Redraw()
65 | far.Text()
66 | appendable = found
67 | end
68 |
69 | if useEdtFind and EdtFind() then
70 | srhInit = function() EdtFind"Highlight:0" end
71 | srhFin = function() end
72 | srhStart = function(str,extra)
73 | return EdtFind((extra or '')..options..' Error:0 Loop:0 Find:"'..str..'"')
74 | end
75 | srhFwd = function(str) return srhStart(str) end
76 | srhBwd = function(str) return srhStart(str,"Reverse:1 ") end
77 | srhToggleOption = function(opt)
78 | options = options:gsub(("(%s:)(%%d)"):format(opt),function(opt,value)
79 | local new = opt..(1-value)
80 | MessagePopup(new,"IncSearch.lua",nil,300)
81 | return new
82 | end,1)
83 | search(srhStart,str)
84 | end
85 | else -------------------------
86 | local SearchSelFound,getValue = 17,-1
87 | local SelFoundInitState
88 | srhInit = function()
89 | SelFoundInitState = Editor.Set(SearchSelFound,getValue) --save init state of [x] Select found
90 | Editor.Set(SearchSelFound,1)
91 | end
92 | srhFin = function()
93 | Editor.Set(SearchSelFound,SelFoundInitState) --restore init state of [x] Select found
94 | if SelFoundInitState==0 then editor.Select(nil,{BlockStartPos=0}) end
95 | end
96 | srhStart = function(str,options)
97 | Far.DisableHistory(-1)
98 | Keys"F7 CtrlY"; print(str); if options then options() end; Keys"Enter"
99 | if not Area.Editor then far.Text(); Keys"Esc" else return true end
100 | end
101 | local function searchNext(key)
102 | Keys(key)
103 | if not Area.Editor then far.Text(); Keys"Esc" else return true end
104 | end
105 | srhFwd = function() return searchNext"ShiftF7" end
106 | srhBwd = function() return searchNext"AltF7" end
107 | local optpos = {
108 | ["CaseSensitive"] = 5;
109 | ["WholeWords"] = 6;
110 | ["RegExp"] = 7;
111 | }
112 | srhToggleOption = function(opt)
113 | if not optpos[opt] then return end
114 | local value
115 | search(srhStart,str,function()
116 | Dlg.SetFocus(optpos[opt])
117 | Keys"Space"
118 | value = Dlg.GetValue()
119 | end)
120 | MessagePopup(opt..":"..value,"IncSearch.lua",nil,300)
121 | end
122 | end
123 |
124 | local xform = {
125 | Tab =" ";
126 | Space =" ";
127 | Divide ="/";
128 | Multiply="*";
129 | Subtract="-";
130 | Add ="+";
131 | Decimal =".";
132 | --
133 | RCtrl ="Shift"; --skip
134 | -- ="BS"; --backspace/restore
135 | -- ="CtrlBS"; --clear/restore
136 | CtrlV ="ShiftIns"; --insert
137 | -- ="Esc"; --quit and restore pos
138 | RAlt ="Alt"; --quit
139 | -- CtrlI ="Alt"; --quit
140 | F3 ="ShiftF7"; --next
141 | Enter ="ShiftF7";
142 | ShiftF3 ="AltF7"; --prev
143 | ShiftEnter ="AltF7";
144 | }
145 |
146 | local function setStatus(str)
147 | editor.SetTitle(nil,str and " ↓"..str:gsub(" ","∙") or nil)
148 | end
149 |
150 | local function enterSearchMode()
151 | srhInit()
152 | if useBM then BM.Add() end
153 | OriginalPos,OriginalSel = editor.GetInfo(),editor.GetSelection()
154 | str = ""; SearchMode = true; appendable = true
155 | local s1 = editor.GetString(nil,0,0)
156 | if s1.SelStart>0 then
157 | local sel = OriginalSel
158 | if sel.StartLine==sel.EndLine then
159 | str = s1.StringText:sub(s1.SelStart,s1.SelEnd)
160 | editor.SetPosition (nil,0,s1.SelStart)
161 | search(srhStart,str)
162 | else
163 | editor.Select(nil,{BlockStartPos=0})
164 | end
165 | end
166 | setStatus(str)
167 | end
168 |
169 | local function quitSearchMode(restorePos)
170 | SearchMode = false
171 | if str~="" then last = str end
172 | setStatus()
173 | srhFin()
174 | if restorePos then
175 | editor.SetPosition(nil,OriginalPos)
176 | SetSelection(OriginalSel)
177 | end
178 | end
179 | ----------------------------------------------
180 |
181 | local function append(text)
182 | str = appendable and str..text or str
183 | setStatus(str)
184 | search(srhStart,str,nil,ExtraQuick and appendable and text~="" and "Right")
185 | end
186 |
187 | local actions = {
188 | --skip
189 | Shift=function() Keys"Shift" end;
190 | --backspace/restore
191 | BS=function()
192 | str = str:len()>0 and str:sub(1,-2) or last
193 | appendable = true
194 | return "" --return value in order to append it to search string
195 | end;
196 | --clear/restore
197 | CtrlBS=function()
198 | str = str:len()>0 and "" or last
199 | appendable = true
200 | return ""
201 | end;
202 | --insert
203 | ShiftIns=function()
204 | return far.PasteFromClipboard():match"[^\r\n]+"
205 | end;
206 | --quit and restore pos
207 | Esc=function() quitSearchMode(not useBM) end;
208 | --quit
209 | Alt=function() quitSearchMode() end;
210 | --next
211 | ShiftF7=function()
212 | if str~="" then
213 | search(srhFwd,str,nil,"Right")
214 | end
215 | end;
216 | --prev
217 | AltF7=function()
218 | if str~="" then
219 | search(srhBwd,str,nil,"Left")
220 | end
221 | end;
222 | AltC=function() srhToggleOption"CaseSensitive" end;
223 | AltW=function() srhToggleOption"WholeWords" end;
224 | AltG=function() srhToggleOption"RegExp" end;
225 | AltH=function() srhToggleOption"HighLight" end;
226 | AltQ=function()
227 | ExtraQuick = not ExtraQuick
228 | local txt = "ExtraQuick:"..(ExtraQuick and 1 or 0)
229 | MessagePopup(txt,"IncSearch.lua",nil,300)
230 | end;
231 | }
232 |
233 | Macro {
234 | area="Editor"; key="RAlt"; description="incremental search mode";
235 | uid="9CDB70B8-2774-491C-9F7C-46B4B0BC14CE";
236 | action=function()
237 | enterSearchMode()
238 | repeat
239 | local key = mf.waitkey()
240 | key = xform[key] or key
241 | if actions[key] then
242 | local text = actions[key](key)
243 | if text then append(text) end
244 | elseif key:len()>1 then
245 | quitSearchMode()
246 | if eval(key,2)==-2 then Keys(key) end
247 | else
248 | append(key)
249 | end
250 | until not SearchMode
251 | end;
252 | }
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Editor.Notepad.lua:
--------------------------------------------------------------------------------
1 |
2 | -- Modification of the original script taken from:
3 | -- https://code.google.com/p/farmanager/source/browse/trunk/addons/Macros/Edit.Notepad.lua
4 |
5 | --[[
6 | Macro {
7 | area = "Editor";
8 | key = "CtrlN";
9 | flags = "";
10 | description = "Editor: Open New File";
11 | action = function()
12 | Keys("ShiftF4 Del Enter")
13 | end
14 | }
15 |
16 | Macro {
17 | area = "Editor";
18 | key = "CtrlO";
19 | flags = "";
20 | description = "Editor: Open...";
21 | action = function()
22 | Keys("ShiftF4")
23 | end
24 | }
25 | ]]
26 |
27 | Macro {
28 | area = "Editor";
29 | key = "CtrlS";
30 | flags = "";
31 | description = "Editor: Save a File";
32 | action = function()
33 | Keys("F2")
34 | end
35 | }
36 |
37 | Macro {
38 | area = "Editor";
39 | key = "CtrlW";
40 | flags = "";
41 | description = "Editor: Save a File and Exit";
42 | action = function()
43 | Keys("ShiftF10")
44 | end
45 | }
46 |
47 | --[[
48 | Macro {
49 | area = "Editor";
50 | key = "CtrlG";
51 | flags = "";
52 | description = "Editor: Go To...";
53 | action = function()
54 | Keys("AltF8")
55 | end
56 | }
57 | ]]
58 |
59 | --[[
60 | Macro {
61 | area = "Editor";
62 | key = "CtrlF";
63 | flags = "";
64 | description = "Editor: Find...";
65 | action = function()
66 | Keys("F7")
67 | end
68 | }
69 |
70 | Macro {
71 | area = "Editor";
72 | key = "F3";
73 | flags = "";
74 | description = "Editor: Find Next";
75 | action = function()
76 | Keys("ShiftF7")
77 | end
78 | }
79 | ]]
80 |
81 | --[[
82 | Macro {
83 | area = "Editor";
84 | key = "CtrlH";
85 | flags = "";
86 | description = "Editor: Replace...";
87 | action = function()
88 | Keys("CtrlF7")
89 | end
90 | }
91 | ]]
92 |
93 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Editor.ReloadFile.lua:
--------------------------------------------------------------------------------
1 | --[[
2 |
3 | Editor: Reload a file
4 | http://forum.farmanager.com/viewtopic.php?f=57&t=10599
5 |
6 | This macro allows to reload a file from the disk.
7 | Any changes made in the editor may be lost.
8 |
9 | ]]
10 |
11 | ---------------------------------------------------------------------------
12 |
13 | local EDITOR_MODIFIED = 0x00000008
14 |
15 | local MSG_WARNING = 0x00000001
16 | local MSG_OKCANCEL = 0x00020000
17 |
18 | ---------------------------------------------------------------------------
19 |
20 | local msg_title = "Warning"
21 | local msg_text = "FIle modified, everything will be lost"
22 |
23 | ---------------------------------------------------------------------------
24 |
25 | Macro {
26 | area = "Editor";
27 | key = "CtrlR";
28 | flags = "";
29 | description = "Editor: Reload a file";
30 | action = function()
31 | local state = bit.band(Editor.State, EDITOR_MODIFIED)
32 | if state ~= 0 then
33 | local answer = msgbox(msg_title, msg_text, MSG_WARNING + MSG_OKCANCEL)
34 | if answer ~= 1 then return end
35 | end
36 |
37 | local history = Far.DisableHistory()
38 | Far.DisableHistory(-1)
39 |
40 | -- Avoid saving the file
41 | Keys("F6 " .. ( state ~= 0 and "Right Enter" or "" ) .. " F6")
42 |
43 | Far.DisableHistory(history)
44 | end;
45 | }
46 |
47 | ---------------------------------------------------------------------------
48 |
49 | -- EOF
50 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Editor.SmartHomeEnd.lua:
--------------------------------------------------------------------------------
1 |
2 | -- http://forum.farmanager.com/viewtopic.php?f=15&t=8421
3 | -- https://github.com/Firebie/FarScripts/blob/master/Editor/Editor.SmartHomeEnd.lua
4 |
5 | -- version 1.4
6 |
7 | local function EditorSelect(editorId, blockType, startLine, startPos, linesCount, posCount)
8 | editor.Select(
9 | editorId,
10 | blockType,
11 | startLine,
12 | startPos,
13 | linesCount,
14 | posCount)
15 | end
16 |
17 | local function EditorClearSelection(editorId)
18 | editor.Select(editorId, 0)
19 | end
20 |
21 | local function SelectBlock(info, sel, curPos, blockType, persistentBlocks)
22 |
23 | local curLine = info.CurLine
24 |
25 | if sel and not persistentBlocks then
26 |
27 | -- we either had cursor at the block begin or at the block end
28 | if curLine == sel.StartLine and info.CurPos == sel.StartPos then
29 |
30 | -- so, cursor was the block begin,
31 | -- so, we lock block end
32 | if curLine == sel.EndLine and curPos == sel.EndPos then
33 | EditorClearSelection(info.EditorId)
34 | elseif curLine < sel.EndLine or (curLine == sel.EndLine and (curPos - 1) < sel.EndPos) then
35 | -- mark from curPos to block end
36 | EditorSelect(info.EditorId, blockType, curLine, curPos, sel.EndPos - curPos + 1, sel.EndLine - curLine + 1)
37 | else
38 | -- mark from block end to curPos
39 | EditorSelect(info.EditorId, blockType, sel.EndLine, sel.EndPos + 1, curPos - sel.EndPos - 1, curLine - sel.EndLine + 1)
40 | end
41 | else
42 | -- so, cursor was the block end
43 | -- so, we lock block begin
44 | if curLine == sel.StartLine and curPos == sel.StartPos then
45 | EditorClearSelection(info.EditorId)
46 | elseif curLine < sel.StartLine or (curLine == sel.StartLine and curPos < sel.StartPos) then
47 | -- mark from curPos to block begin
48 | EditorSelect(info.EditorId, blockType, curLine, curPos, sel.StartPos - curPos, sel.StartLine - curLine + 1)
49 | else
50 | -- mark from block begin to curPos
51 | EditorSelect(info.EditorId, blockType, sel.StartLine, sel.StartPos, curPos - sel.StartPos, curLine - sel.StartLine + 1)
52 | end
53 | end
54 | else
55 | -- no selection block
56 |
57 | if curPos == info.CurPos then
58 | EditorClearSelection(info.EditorId)
59 | elseif curPos < info.CurPos then
60 | EditorSelect(info.EditorId, blockType, curLine, curPos, info.CurPos - curPos, 1)
61 | else
62 | EditorSelect(info.EditorId, blockType, curLine, info.CurPos, curPos - info.CurPos, 1)
63 | end
64 | end
65 |
66 | end;
67 |
68 | local function SmartHome(select, blockType)
69 |
70 | blockType = blockType or far.Flags.BTYPE_STREAM
71 |
72 | local info = editor.GetInfo()
73 | local sel = editor.GetSelection()
74 | local persistentBlocks = band(info.Options, far.Flags.EOPT_PERSISTENTBLOCKS) ~= 0;
75 |
76 | if info then
77 | local str = editor.GetString(-1, info.CurLine)
78 | local s = str.StringText
79 | local len = s:len()
80 | local pos = 1
81 |
82 | for i = 1, len do
83 | local c = s:sub(i, i)
84 | if not c:match("%s") then
85 |
86 | pos = i
87 | if pos == info.CurPos then
88 | pos = 1
89 | end
90 |
91 | break
92 | end
93 | end
94 |
95 | editor.SetPosition(info.EditorId, info.CurLine, pos)
96 | if (select) then
97 | SelectBlock(info, sel, pos, blockType, persistentBlocks)
98 | elseif band(info.Options, far.Flags.EOPT_PERSISTENTBLOCKS) == 0 then
99 | editor.Select(info.EditorId, 0)
100 | end
101 |
102 | end
103 | end
104 |
105 | local function SmartEnd(select, blockType)
106 |
107 | blockType = blockType or far.Flags.BTYPE_STREAM
108 |
109 | local info = editor.GetInfo()
110 | local sel = editor.GetSelection()
111 | local persistentBlocks = band(info.Options, far.Flags.EOPT_PERSISTENTBLOCKS) ~= 0;
112 |
113 | if info then
114 | local str = editor.GetString(-1, info.CurLine)
115 | local s = str.StringText
116 | local len = s:len()
117 | local pos = len + 1
118 |
119 | for i = len, 1, -1 do
120 | local c = s:sub(i, i)
121 | if not c:match("%s") then
122 |
123 | pos = i + 1
124 | if pos == info.CurPos then
125 | pos = len + 1
126 | end
127 |
128 | break
129 | end
130 | end
131 |
132 | editor.SetPosition(info.EditorId, info.CurLine, pos)
133 |
134 | if (select) then
135 | SelectBlock(info, sel, pos, blockType, persistentBlocks)
136 | elseif band(info.Options, far.Flags.EOPT_PERSISTENTBLOCKS) == 0 then
137 | editor.Select(info.EditorId, 0)
138 | end
139 |
140 | end
141 | end
142 |
143 |
144 | Macro {
145 | area = "Editor";
146 | key = "Home Num7";
147 | flags = "";
148 | description = "Editor: Smart Move: Home";
149 | action = function()
150 | SmartHome(false)
151 | end;
152 | }
153 |
154 | Macro {
155 | area = "Editor";
156 | key = "End Num1";
157 | flags = "";
158 | description = "Editor: Smart Move: End";
159 | action = function()
160 | SmartEnd(false)
161 | end;
162 | }
163 |
164 | Macro {
165 | area = "Editor";
166 | key = "ShiftHome ShiftNum7";
167 | flags = "";
168 | description = "Editor: Smart Select: ShiftHome";
169 | action = function()
170 | SmartHome(true)
171 | end;
172 | }
173 |
174 | Macro {
175 | area = "Editor";
176 | key = "ShiftEnd ShiftNum1";
177 | flags = "";
178 | description = "Editor: Smart Select: ShiftEnd";
179 | action = function()
180 | SmartEnd(true)
181 | end;
182 | }
183 |
184 | --[[
185 |
186 | Macro {
187 | area = "Editor";
188 | key = "AltShiftHome AltShiftNum7";
189 | flags = "";
190 | description = "Editor: Smart AltShiftHome";
191 | action = function()
192 | SmartHome(true, far.Flags.BTYPE_COLUMN)
193 | end;
194 | }
195 |
196 | ]]
197 |
198 | --[[
199 |
200 | Macro {
201 | area = "Editor";
202 | key = "AltShiftEnd AltShiftNum1";
203 | flags = "";
204 | description = "Editor: Smart AltShiftEnd";
205 | action = function()
206 | SmartEnd(true, far.Flags.BTYPE_COLUMN)
207 | end;
208 | }
209 |
210 | ]]
211 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Editor.scite_like.lua:
--------------------------------------------------------------------------------
1 | -- Started 2014-12-01 by Shmuel Zeigerman
2 | -- http://forum.farmanager.com/viewtopic.php?f=15&t=9191
3 | -- http://forum.farmanager.com/viewtopic.php?p=126100#p126100
4 |
5 | -- Imitate the feature of typing/erasing on multiple lines at once (like the SciTE editor does).
6 | -- * Select a vertical block 0 or 1 character wide.
7 | -- * Position the cursor on any line covered with the block.
8 | -- * Type or delete (Del, BS) the text.
9 |
10 | -- OPTIONS -----------------------------------------------------------------------------------------
11 |
12 | -- Replace the block with entered character; delete the block contents on pressing Del or BS.
13 | -- This option works for vertical blocks with width >= 2.
14 | local OptReplaceBlock = true
15 |
16 | -- Use Alt codes e.g. Alt+64 --> @. (This feature is still experimental).
17 | local OptUseAltCodes = false
18 |
19 | -- Reset selection on cursor key moves (only with non-persistent blocks)
20 | local OptCursorMoveResetsBlock = true
21 |
22 | -- END OF OPTIONS ----------------------------------------------------------------------------------
23 |
24 | local F = far.Flags
25 | local band = (bit or bit64).band
26 | local CharMap = {Space=" ", ShiftSpace=" ", Tab="\t", BackSlash="\\",
27 | Add="+", Subtract="-", Multiply="*", Divide="/", Decimal="."}
28 | local KeyMap = {Num2="Down", Num4="Left", Num6="Right", Num8="Up", NumDel="Del", ShiftIns="CtrlV", ShiftNum0="CtrlV"}
29 |
30 | Event {
31 | group="EditorInput";
32 | action=function(Rec)
33 | if Rec.EventType ~= F.KEY_EVENT then return false end
34 |
35 | local EI = editor.GetInfo()
36 | if not (EI and EI.BlockType==F.BTYPE_COLUMN and band(EI.CurState,F.ECSTATE_LOCKED)==0) then return false end
37 |
38 | local uc = Rec.UnicodeChar
39 | local altchar = OptUseAltCodes and not Rec.KeyDown and Rec.VirtualKeyCode==18 and uc~="" and uc~="\0" and uc
40 | local key = not altchar and far.InputRecordToName(Rec)
41 | key = KeyMap[key] or key
42 |
43 | if OptCursorMoveResetsBlock and band(EI.Options,F.EOPT_PERSISTENTBLOCKS)==0 then
44 | if key=="Left" or key=="Right" or key=="Up" or Key=="Down" then return false end
45 | end
46 |
47 | if not (altchar or key=="CtrlV" or (Rec.KeyDown and band(Rec.ControlKeyState,0x0F)==0)) then return false end
48 | local cur = editor.GetString()
49 | local BlockWidth = cur and cur.SelStart>0 and cur.SelEnd-cur.SelStart+1
50 | if not (BlockWidth and (OptReplaceBlock or BlockWidth<=1)) then return false end
51 |
52 | local char = altchar or key and (CharMap[key] or key:match("^.$"))
53 | local text = char
54 | if key=="CtrlV" then
55 | local clip = far.PasteFromClipboard()
56 | text = clip and clip:match("^([^\r\n]*)\r?\n?$")
57 | if not text then return false end
58 | end
59 | local textlen = text and text:len() or 0
60 |
61 | local delblock = OptReplaceBlock and BlockWidth>1
62 | if delblock and not (text or key=="Del" or key=="BS") then return false end
63 |
64 | if not (text or key=="Del" or key=="BS" or key=="Left" or key=="Right" or key=="Up" or key=="Down") then return false end
65 |
66 | if (key=="BS" or key=="Left") and EI.CurPos==1 then return true end
67 |
68 | if key=="Up" then
69 | if EI.CurLine==1 then return true end
70 | if EI.CurLine==EI.BlockStartLine then return false end
71 | elseif key=="Down" then
72 | if EI.CurLine==EI.TotalLines then return true end
73 | local line = editor.GetString(nil,EI.CurLine+1)
74 | if not line or line.SelStart <= 0 then return false end
75 | end
76 |
77 | local lnum = EI.BlockStartLine
78 | local clean = true
79 | local BlockStartRealPos, BlockStartTabPos
80 | while true do
81 | local line = editor.GetString(nil,lnum)
82 | if not line or line.SelStart <= 0 then break end
83 | BlockStartRealPos = BlockStartRealPos or line.SelStart
84 | BlockStartTabPos = BlockStartTabPos or editor.RealToTab(nil,lnum,BlockStartRealPos)
85 | local pos = editor.TabToReal(nil,lnum,EI.CurTabPos)
86 | local s, len, newS = line.StringText, line.StringLength, nil
87 | if delblock then
88 | if key == "Del" or key == "BS" then
89 | if line.SelStart <= len then newS = s:sub(1,line.SelStart-1)..s:sub(line.SelEnd+1) end
90 | elseif text then
91 | if line.SelStart > len+1 then newS = s..(" "):rep(line.SelStart-len-1)..text
92 | else newS = s:sub(1,line.SelStart-1)..text..s:sub(line.SelEnd+1)
93 | end
94 | end
95 | else
96 | if key == "Del" then
97 | if pos <= len then newS = s:sub(1,pos-1)..s:sub(pos+1) end
98 | elseif key == "BS" then
99 | if pos <= len+1 then newS = s:sub(1,pos-2)..s:sub(pos) end
100 | elseif text then
101 | if pos > len+1 then newS = s..(" "):rep(pos-len-1)..text
102 | else newS = s:sub(1,pos-1)..text..s:sub(pos+(EI.Overtype~=0 and textlen or 0))
103 | end
104 | end
105 | end
106 | if newS then
107 | if clean then editor.UndoRedo(nil,F.EUR_BEGIN); clean=false; end
108 | editor.SetString(nil, lnum, newS)
109 | end
110 | lnum = lnum + 1
111 | end
112 | if not clean then editor.UndoRedo(nil,F.EUR_END) end
113 |
114 | local textlen = text and text:len() or 0
115 | local realX, tabX, newY
116 | if delblock then
117 | realX = BlockStartRealPos + textlen
118 | tabX = BlockStartTabPos + textlen
119 | newY = EI.CurLine
120 | else
121 | realX = math.max(1, EI.CurPos + ((key=="Right") and 1 or (key=="BS" or key=="Left") and -1 or textlen))
122 | tabX = editor.RealToTab(nil, EI.CurLine, realX)
123 | newY = math.max(1, EI.CurLine + (key=="Up" and -1 or key=="Down" and 1 or 0))
124 | end
125 | editor.SetPosition(nil, newY, realX)
126 | editor.Select(nil, "BTYPE_COLUMN", EI.BlockStartLine, tabX, 1, lnum-EI.BlockStartLine)
127 | editor.Redraw()
128 | return true
129 | end;
130 | }
131 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Plugin.Common.Calc.lua:
--------------------------------------------------------------------------------
1 |
2 | local guid = '894EAABB-C57F-4549-95FC-4AC6F3102A36';
3 |
4 | Macro {
5 | area = "Shell Viewer Editor";
6 | key = "Alt=";
7 | flags = "";
8 | description = "Common: Calulator";
9 | action = function()
10 | Plugin.Call(guid, 1);
11 | -- Keys("F11 = Enter");
12 | end
13 | }
14 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Plugin.Common.S&R.lua:
--------------------------------------------------------------------------------
1 |
2 | --[[
3 | Macro {
4 | area = "Shell Viewer Editor";
5 | key = "CtrlF";
6 | flags = "";
7 | description = "Common: CTRL+F to Find by S & R";
8 | action = function()
9 | if Area.Shell then Keys('F11 & 2') end
10 | if Area.Viewer then Keys('F11 & 1') end
11 | if Area.Editor then Keys('F11 & 1') end
12 | end
13 | }
14 |
15 | Macro {
16 | area = "Shell Editor";
17 | key = "CtrlH";
18 | flags = "";
19 | description = "Common: CTRL+H to Replace by S & R";
20 | action = function()
21 | if Area.Shell then Keys('F11 & 3') end
22 | if Area.Editor then Keys("F11 & 2") end
23 | end
24 | }
25 |
26 | Macro {
27 | area = "Viewer Editor";
28 | key = "F3";
29 | flags = "";
30 | description = "Common: F3 to continue Find/Replace by S & R";
31 | action = function()
32 | if Area.Viewer then Keys('F11 & 2') end
33 | if Area.Editor then Keys('F11 & 3') end
34 | end
35 | }
36 | ]]
37 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Plugin.ConEmu.TabList.lua:
--------------------------------------------------------------------------------
1 |
2 | -- Place this file into your %FARPROFILE%\Macros\scripts
3 |
4 |
5 | -- Show all windows list from all consoles
6 |
7 | local ConEmu = "4b675d80-1d4a-4ea9-8436-fdc23f2fc14b"
8 |
9 | Macro
10 | {
11 | area="Shell QView Info Tree Search Dialog Editor Viewer";
12 | key="F12";
13 | flags="NoSendKeysToPlugins";
14 | description="ConEmu: Show all windows list from all consoles";
15 | action = function()
16 | local k = Plugin.Menu(ConEmu) and "T" or "F12"
17 | Keys(k)
18 | -- if Plugin.Menu(ConEmu) then
19 | -- Keys("T")
20 | -- end
21 | end
22 | }
23 |
24 | Macro
25 | {
26 | area="Shell QView Info Tree Search Dialog Editor Viewer";
27 | key="CtrlShiftF12";
28 | flags="NoSendKeysToPlugins";
29 | description="ConEmu: Standard Far windows list";
30 | action = function()
31 | Keys("F12")
32 | end
33 | }
34 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Plugin.Editor.AutoWrap.lua:
--------------------------------------------------------------------------------
1 |
2 | local guid = 'DEEC52C3-AC76-4AD3-A6EF-CAFC33BD4C05';
3 |
4 | Macro {
5 | area = "Editor";
6 | key = "AltBackSlash";
7 | flags = "";
8 | description = "Editor: Toggle AutoWrap";
9 | action = function()
10 | Plugin.Call(guid);
11 | -- Keys("F11 BackSlash");
12 | end
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Plugin.Editor.EditCase.lua:
--------------------------------------------------------------------------------
1 |
2 | -- http://forum.farmanager.com/viewtopic.php?p=125855#p125855
3 |
4 | local shortcuts = {
5 | ["CtrlAltL"] = "Lower",
6 | ["CtrlAltT"] = "Title",
7 | ["CtrlAltU"] = "Upper",
8 | ["CtrlAltG"] = "Toggle",
9 | ["CtrlAltC"] = "Cyclic",
10 | }
11 |
12 | local desc = "Editor: Change Case";
13 |
14 | local guid = "0E92FC81-4888-4297-A85D-31C79E0E0CEE";
15 |
16 | Macro {
17 | description = desc .. ": Menu";
18 | area = "Editor";
19 | key = "F4";
20 | action = function()
21 | Plugin.Call(guid);
22 | end
23 | }
24 |
25 | for key, cmd in pairs(shortcuts) do
26 | Macro {
27 | description = desc .. ": " .. cmd;
28 | area = "Editor";
29 | key = key;
30 | action = function()
31 | Plugin.Call(guid, cmd);
32 | end
33 | }
34 | end
35 |
36 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Plugin.Editor.FarColorer.lua:
--------------------------------------------------------------------------------
1 |
2 | --local guid = 'D2F36B62-A470-418D-83A3-ED7A3710E5B5';
3 | --local guid_main_menu = "45453CAC-499D-4B37-82B8-0A77F7BD087C";
4 | local ColorerGUID = "D2F36B62-A470-418D-83A3-ED7A3710E5B5";
5 |
6 | Macro {
7 | area = "Editor";
8 | key = "AltL";
9 | flags = "";
10 | description = "Editor: List of types";
11 | condition = function()
12 | return Plugin.Exist(ColorerGUID)
13 | end;
14 | action = function()
15 | Plugin.Call(ColorerGUID, "Types", "Menu")
16 | -- Plugin.Call(guid, 1);
17 | -- -- universal workaround for Far3 > 4242 and between 4499 and 4545
18 | -- -- Issue somewhere in FarColorer 1.2.1.8, 1.2.2 or 1.2.4
19 | -- if Menu.Id == guid_main_menu then Keys("Enter"); end;
20 | -- -- Keys("F11 c 1");
21 | end
22 | }
23 |
24 | Macro {
25 | area = "Editor";
26 | key = "Alt[";
27 | flags = "";
28 | description = "Editor: Find pair brackets";
29 | condition = function()
30 | return Plugin.Exist(ColorerGUID)
31 | end;
32 | action = function()
33 | Plugin.Call(ColorerGUID, "Brackets", "Match")
34 | -- Plugin.Call(guid, 2);
35 | -- -- Keys("F11 c 2")
36 | end
37 | }
38 |
39 | Macro {
40 | area = "Editor";
41 | key = "Alt]";
42 | flags = "";
43 | description = "Editor: Select a block with brackets";
44 | condition = function()
45 | return Plugin.Exist(ColorerGUID)
46 | end;
47 | action = function()
48 | Plugin.Call(ColorerGUID, "Brackets", "SelectAll")
49 | -- Plugin.Call(guid, 3);
50 | -- -- Keys("F11 c 3")
51 | end
52 | }
53 |
54 | Macro {
55 | area = "Editor";
56 | key = "AltP";
57 | flags = "";
58 | description = "Editor: Select a block within brackets";
59 | condition = function()
60 | return Plugin.Exist(ColorerGUID)
61 | end;
62 | action = function()
63 | Plugin.Call(ColorerGUID, "Brackets", "SelectIn")
64 | -- Plugin.Call(guid, 4);
65 | -- -- Keys("F11 c 4")
66 | end
67 | }
68 |
69 | Macro {
70 | area = "Editor";
71 | key = "Alt;";
72 | flags = "";
73 | description = "Editor: List of functions";
74 | condition = function()
75 | return Plugin.Exist(ColorerGUID)
76 | end;
77 | action = function()
78 | Plugin.Call(ColorerGUID, "Functions", "Show")
79 | -- Plugin.Call(guid, 5);
80 | -- -- Keys("F11 c 5")
81 | end
82 | }
83 |
84 | Macro {
85 | area = "Editor";
86 | key = "Alt'";
87 | flags = "";
88 | description = "Editor: List of errors";
89 | condition = function()
90 | return Plugin.Exist(ColorerGUID)
91 | end;
92 | action = function()
93 | Plugin.Call(ColorerGUID, "Errors", "Show")
94 | -- Plugin.Call(guid, 6);
95 | -- -- Keys("F11 c 6")
96 | end
97 | }
98 |
99 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Plugin.Editor.Visualizer.lua:
--------------------------------------------------------------------------------
1 |
2 | Macro {
3 | area = "Editor";
4 | key = "CtrlShift8";
5 | flags = "";
6 | description = "Editor: Show/Hide EOL";
7 | action = function()
8 | Keys("F11 Space Enter")
9 | end
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Plugin.Panel.VisualCompare.lua:
--------------------------------------------------------------------------------
1 | -- https://forum.farmanager.com/viewtopic.php?p=165567#p165567
2 | -----------------------------------------------------------------------------------------
3 | -- Panel.VisualCompare, v1.5, (c) 2014, LanKing.
4 | --
5 | -- 2021/03/17
6 | -- Обновление от siberia-man: дальнейшее развитие скрипта:
7 | -- Возможность указать свой любимый "сравниватель"
8 | -- Вывел основную логику обработки в отдельную функцию
9 | -- Горячие клавиши вынесены наверх скрипта для "простоты конфигурирования"
10 | -- Косметические изменения в коде
11 | --
12 | -- 2015/01/26
13 | -- Подправлено fml2: добавлена возможность сравнивать с помощью BeyondCompare
14 | --
15 | -- 2014/12/20
16 | -- Сравнение файлов с помощью плагина Visual Compare с поддержкой Branch панелей
17 |
18 | -- Плагин является продвинутой версией плагина от AleXH, переписанного LanKing
19 | -- Пофикшены некоторые баги, добавлены дополнительные условия и дополнения по интерфейсу
20 | -- В разработке также использовались наработки SimSU (локализация)
21 |
22 |
23 | -- Варианты работы:
24 | -- 1. На активной панели выделено 2 файла или 2 директории - сравнить их
25 | -- 2. На обоих панелях выделено по 1 файлу - сравнить их
26 | -- 3. Иные случаи: Курсор на обеих панелях на файлах: Если пути не одинаковые, сравнить их;
27 | -- 4. Если в предидущем пункте пути одинаковые -- запустить меню плагина;
28 |
29 | -- Также если попытаться сравнить файл и папку, что невозможно: будет выведено сообщение
30 | -- об ошибке с предложением стандартного диалога Visual Compare
31 |
32 | -----------------------------------------------------------------------------------------
33 |
34 | -- External application parameters
35 | --local ExtComp = "BCompare"
36 | --local ExtCompOpts = ""
37 |
38 | --local ExtComp = "ExamDiff"
39 | --local ExtCompOpts = "/t"
40 |
41 | local ExtComp = "winmerge"
42 | local ExtCompOpts = ""
43 |
44 | ---------------------------------------------------------------------------
45 |
46 | -- Hotkeys to launch VisualCompare and external tool
47 |
48 | local hotkeys = {
49 | VisComp = "Ctrl/";
50 | ExtComp = "CtrlShift/";
51 | }
52 |
53 | ---------------------------------------------------------------------------
54 |
55 | ---- Локализация
56 | _G.far.lang = far.lang or win.GetEnv("farlang")
57 |
58 | -- Встроенные языки / Buildin laguages
59 | local function Messages()
60 | if far.lang == "Russian" then
61 | return {
62 | Description = "Сравнение 2 выделенных файлов/каталогов (VisualCompare)";
63 | DescriptionAlt = "Сравнение 2 выделенных файлов/каталогов ("..ExtComp..")";
64 | MsgSameFiles = "Visual Compare: Обнаружены одинаковые объекты.";
65 | MsgStandartDlg = 'Запустить стандартный диалог сравнения?';
66 | MsgDifferent = "Visual Compare: Невозможно сравнить файл и папку";
67 | }
68 | else
69 | return{
70 | Description = "Compare files/dirs with VisualCompare";
71 | DescriptionAlt = "Compare files/dirs with "..ExtComp.."";
72 | MsgSameFiles = "Visual Compare: Objects are equal.";
73 | MsgStandartDlg = 'Start standart compare dialog?';
74 | MsgDifferent = "Visual Compare: Can't compare file and folder";
75 | }
76 | end;
77 | end;
78 |
79 | local M = Messages();
80 |
81 | ---------------------------------------------------------------------------
82 |
83 | local VisComp = "AF4DAB38-C00A-4653-900E-7A8230308010"
84 |
85 | ---------------------------------------------------------------------------
86 |
87 | local function getNamesToCompare()
88 | -- Can't compare file and folder message
89 | local function badattr(f1, f2)
90 | if msgbox(M.MsgDifferent, "\n"..f1.."\n"..f2.."\n\n"..M.MsgStandartDlg.."\n\n", 0x00040000) == 1 then Plugin.Menu(VisComp) end;
91 | return false;
92 | end;
93 |
94 | local AP, PP, AC, PC, fn, attrChecked = APanel.Path0, PPanel.Path0, APanel.Current, PPanel.Current ,"", false
95 |
96 | -- 2 files on active panel
97 | if APanel.SelCount == 2 then
98 | PP, AC, PC = AP, panel.GetSelectedPanelItem(nil, 1, 1), panel.GetSelectedPanelItem(nil, 1, 2)
99 |
100 | if mf.index(AC.FileAttributes, 'd') ~= mf.index(PC.FileAttributes, 'd') then return badattr(AC.FileName, PC.FileName, true); end;
101 | AC, PC, attrChecked = AC.FileName, PC.FileName, true
102 |
103 | -- selected one file on active and one on passive
104 | elseif APanel.SelCount == 1 and PPanel.SelCount == 1 then
105 | AC, PC = panel.GetSelectedPanelItem(nil, 1, 1), panel.GetSelectedPanelItem(nil, 0, 1)
106 |
107 | if mf.index(AC.FileAttributes, 'd') ~= mf.index(PC.FileAttributes, 'd') then return badattr(AC.FileName, PC.FileName, true); end;
108 | AC, PC, attrChecked = AC.FileName, PC.FileName, true
109 | end
110 |
111 | if AC:match("^[A-Z]:") then AP = AC elseif AP == "" then AP = "\\" elseif AC ~= ".." then AP = AP.."\\"..AC end
112 | if PC:match("^[A-Z]:") then PP = PC elseif PP == "" then PP = "\\" elseif PC ~= ".." then PP = PP.."\\"..PC end -- тут может быть условие для ..
113 |
114 | if (not attrChecked and not APanel.Folder == PPanel.Folder) then return badattr(AP, PP); end;
115 |
116 | if AP == PP then
117 | if msgbox(M.MsgSameFiles, "\n"..AP.."\n\n"..M.MsgStandartDlg.."\n\n", 0x00040000) == 1 then Plugin.Menu(VisComp) end;
118 | else
119 | if (APanel.SelCount ~= 2 and not APanel.Left) then fn = PP..'" "'..AP else fn = AP..'" "'..PP end
120 | return '"'..fn..'"';
121 | end
122 | end;
123 |
124 | ---------------------------------------------------------------------------
125 |
126 | local function callCompare(mode)
127 | local fn = getNamesToCompare()
128 | if fn == false then return false; end;
129 |
130 | if mode == 0 then
131 | Plugin.Command(VisComp, fn)
132 | else
133 | win.system(ExtComp..' '..ExtCompOpts..' '..fn)
134 | end
135 | end
136 |
137 | ---------------------------------------------------------------------------
138 |
139 | Macro {
140 | description = M.Description;
141 | area = "Shell Tree";
142 | key = hotkeys.VisComp;
143 | action = function()
144 | callCompare(0)
145 | end
146 | }
147 |
148 | Macro {
149 | description = M.DescriptionAlt;
150 | area = "Shell Tree";
151 | key = hotkeys.ExtComp;
152 | action = function()
153 | callCompare(1)
154 | end
155 | }
156 |
157 | ---------------------------------------------------------------------------
158 |
159 | -- EOF
160 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Plugin.Shell.EMenu.lua:
--------------------------------------------------------------------------------
1 |
2 | Macro {
3 | area = "Shell";
4 | key = "Apps";
5 | flags = "";
6 | description = "Shell: Windows Context Menu";
7 | action = function()
8 | Keys("F11 o")
9 | end
10 | }
11 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Shell.AutoCompletion.lua:
--------------------------------------------------------------------------------
1 |
2 | -- http://forum.farmanager.com/viewtopic.php?f=60&t=8013
3 |
4 | --[[
5 | Macro { description="Shell: Don't steal important keys!";
6 | area="ShellAutoCompletion DialogAutoCompletion"; key="Up Down Home End Num7 Num1";
7 | action=function() Keys("Esc AKey") end;
8 | }
9 |
10 | Macro { description="Shell: Use Ctrl- to navigate in list";
11 | area="ShellAutoCompletion DialogAutoCompletion"; key="/^[LR]Ctrl(Up|Down|Home|Num7)$/";
12 | action=function() Keys(akey(1):match("Ctrl(.+)")) end;
13 | }
14 |
15 | Macro { description="Shell: CtrlEnd acts like in panels/dialog";
16 | area="ShellAutoCompletion DialogAutoCompletion"; key="/^[LR]Ctrl(End|Num1)$/";
17 | action=function() Keys("Down") end;
18 | }
19 |
20 | Macro { description="Shell: Esc to close list and discard all changes"; --you can use F10 or CtrlTab to close and keep text
21 | area="ShellAutoCompletion DialogAutoCompletion"; key="Esc";
22 | action=function()
23 | if Menu.Filter(2)~=0 then Menu.Filter(0,0) end --turn filter off
24 | Keys("Home Esc")
25 | end;
26 | }
27 | ]]
28 |
29 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Shell.CdUp.Light.lua:
--------------------------------------------------------------------------------
1 |
2 | -- https://forum.farmanager.com/viewtopic.php?p=149194#p149194
3 |
4 | ---------------------------------------------------------------------------
5 |
6 | local FARPANEL_BRODER_WIDTH_LEFT = 1
7 | local FARPANEL_BRODER_WIDTH_RIGHT = 1
8 |
9 | local FARMENU_BORDER_WIDTH_LEFT = 5
10 | local FARMENU_BORDER_WIDTH_RIGHT = 6
11 |
12 | ---------------------------------------------------------------------------
13 |
14 | local OMIT = "..."
15 | local oLen = string.len(OMIT)
16 |
17 | function string.shrink(s, width)
18 | local sLen = string.len(s)
19 | return sLen <= width and s or OMIT .. string.sub(s, sLen - width + oLen + 1)
20 | end
21 |
22 | ---------------------------------------------------------------------------
23 |
24 | local function FillTable(t, path, width)
25 | local pLen = string.len(path)
26 | local pos = 0
27 |
28 | repeat
29 | pos = string.find(path, "\\", pos + 1, true)
30 |
31 | local s = string.sub(path, 1, pos and pos or pLen)
32 | if s == "" then s = "\\" end
33 |
34 | local sLen = string.len(s)
35 | table.insert(t, {
36 | path = s;
37 | text = string.shrink(s, width);
38 | })
39 | until not pos or pos >= pLen
40 | end
41 |
42 | ---------------------------------------------------------------------------
43 |
44 | local function ShowMenu()
45 | local items = {}
46 |
47 | -- max width for the menu items
48 | local width = APanel.Width - FARMENU_BORDER_WIDTH_LEFT - FARMENU_BORDER_WIDTH_RIGHT
49 |
50 | FillTable(items, APanel.Path0, width)
51 |
52 | if APanel.Plugin then
53 | table.insert(items, { separator = true })
54 | FillTable(items, APanel.Path, width)
55 | end
56 |
57 | local item = far.Menu({
58 | Title = "Go to...";
59 | SelectIndex = #items;
60 | -- Fit the menu into the width of the active panel taking into account the border widths
61 | X = ( APanel.Left and 0 or PPanel.Width ) + FARPANEL_BRODER_WIDTH_LEFT + FARPANEL_BRODER_WIDTH_RIGHT;
62 | }, items)
63 |
64 | if item then Panel.SetPath(0, item.path) end
65 | end
66 |
67 | ---------------------------------------------------------------------------
68 |
69 | if Macro == nil then
70 | ShowMenu()
71 | return
72 | end
73 |
74 | Macro {
75 | description = "Shell: Cd Up (Light)";
76 | area = "Shell";
77 | key = "AltPgUp";
78 | --condition = function() return APanel.Visible end;
79 | action = ShowMenu;
80 | }
81 |
82 | ---------------------------------------------------------------------------
83 |
84 | -- EOF
85 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Shell.CdUp.lua:
--------------------------------------------------------------------------------
1 |
2 | -- http://forum.farmanager.com/viewtopic.php?f=60&t=6542
3 |
4 | local function FillTable(t, path)
5 | while true do
6 | path = path:match("(.*)\\[^\\]+$")
7 | if path==nil then break end
8 | t[#t+1] = {path=path.."\\"}
9 | end
10 | end
11 |
12 | local function ShowMenu()
13 | local items = {}
14 | if APanel.Plugin then
15 | FillTable(items, APanel.Path)
16 | if items[1] then items[#items+1] = { separator=true } end
17 | items[#items+1] = { path=APanel.Path0 }
18 | end
19 | FillTable(items, APanel.Path0)
20 | if items[1] then
21 | for k,v in ipairs(items) do
22 | if v.path then
23 | local extra = v.path:len() - Far.Width + 8
24 | v.text = extra<=0 and v.path or "..."..v.path:sub(extra+4)
25 | end
26 | end
27 | local item = far.Menu({Title="Go to ..."}, items)
28 | if item then Panel.SetPath(0, item.path) end
29 | end
30 | end
31 |
32 | Macro {
33 | area = "Shell";
34 | key = "CtrlBS";
35 | description = "Shell: Menu with list of parent directories (CD up)";
36 | condition = function()
37 | return CmdLine.Empty and APanel.Visible
38 | end;
39 | action = ShowMenu;
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Shell.CmdLine.CursorMovement.lua:
--------------------------------------------------------------------------------
1 | --[[
2 |
3 | This macro is simplified and improved version of the macro
4 | Shell_CmdLine.lua having the same functionality and borrowed here:
5 | https://forum.farmanager.com/viewtopic.php?p=93265#p93265
6 |
7 | ]]
8 |
9 | local function CursorMoveHome(SelectText)
10 | local SelStart, SelEnd = 0, 0
11 |
12 | if SelectText then
13 | SelStart, SelEnd = panel.GetCmdLineSelection()
14 | local Pos = panel.GetCmdLinePos()
15 |
16 | if Pos == SelEnd + 1 then
17 | SelEnd = SelStart - 1
18 | elseif Pos ~= SelStart then
19 | SelEnd = Pos - 1
20 | end
21 |
22 | SelStart = 1
23 |
24 | -- Pos = Pos == SelStart and SelEnd + 1 or Pos == SelEnd + 1 and SelStart or Pos
25 | end
26 |
27 | panel.SetCmdLineSelection(nil, SelStart, SelEnd)
28 | panel.SetCmdLinePos(nil, 1)
29 | end
30 |
31 | local function CursorMoveEnd(SelectText)
32 | local SelStart, SelEnd = 0, 0
33 | local Len = panel.GetCmdLine():len()
34 |
35 | if SelectText then
36 | SelStart, SelEnd = panel.GetCmdLineSelection()
37 | local Pos = panel.GetCmdLinePos()
38 |
39 | if Pos == SelStart then
40 | SelStart = SelEnd + 1
41 | elseif Pos ~= SelEnd + 1 then
42 | SelStart = Pos
43 | end
44 |
45 | SelEnd = Len
46 |
47 | -- Pos = Pos == SelStart and SelEnd + 1 or Pos == SelEnd + 1 and SelStart or Pos
48 | end
49 |
50 | panel.SetCmdLineSelection(nil, SelStart, SelEnd)
51 | panel.SetCmdLinePos(nil, Len + 1)
52 | end
53 |
54 | Macro {
55 | area = "Shell Info QView Tree";
56 | key = "Home Num7";
57 | description = "CmdLine.CursorMovement.Home";
58 | flags = "NotEmptyCommandLine";
59 | action = function() CursorMoveHome() end;
60 | }
61 |
62 | Macro {
63 | area = "Shell Info QView Tree";
64 | key = "ShiftHome ShiftNum7";
65 | description = "CmdLine.CursorMovement.ShiftHome";
66 | flags = "NotEmptyCommandLine";
67 | action = function() CursorMoveHome(1) end;
68 | }
69 |
70 | Macro {
71 | area = "Shell Info QView Tree";
72 | key = "End Num1";
73 | description = "CmdLine.CursorMovement.End";
74 | flags = "NotEmptyCommandLine";
75 | action = function() CursorMoveEnd() end;
76 | }
77 |
78 | Macro {
79 | area = "Shell Info QView Tree";
80 | key = "ShiftEnd ShiftNum1";
81 | description = "CmdLine.CursorMovement.ShiftEnd";
82 | flags = "NotEmptyCommandLine";
83 | action = function() CursorMoveEnd(1) end;
84 | }
85 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Shell.CtrlBackSlash.lua:
--------------------------------------------------------------------------------
1 | -- https://forum.farmanager.com/viewtopic.php?p=154581#p154581
2 |
3 | Macro {
4 | area = "Shell";
5 | key = "CtrlBackSlash";
6 | description = "Shell: Cd \\ and highlght the upper level dir of the previous location";
7 | action = function()
8 | local path = APanel.Path
9 | local root, dir
10 | if APanel.Plugin then -- plugin panel
11 | path = APanel.Current:find("\\") and APanel.Current or path
12 | root, dir = path:match("([^\\]*\\)([^\\]*)")
13 | elseif APanel.Path:find("^\\\\") then -- network share
14 | root, dir = path:match("^(\\\\[^\\]*\\%w%$\\)([^\\]*)")
15 | else -- local directory
16 | root, dir = path:match("([^\\]*\\)([^\\]*)")
17 | end
18 | if root then
19 | Panel.SetPath(0, root, dir)
20 | else
21 | Keys("CtrlBackSlash") -- default Far action
22 | end
23 | end;
24 | }
25 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Shell.DeepTarball.lua:
--------------------------------------------------------------------------------
1 | -- https://forum.farmanager.com/viewtopic.php?f=15&t=11109
2 |
3 | -- Enable or disable the macros
4 | local enabled = false
5 |
6 | ---------------------------------------------------------------------------
7 |
8 | -- *.tar
9 | local tar_ext = {
10 | "%.tar",
11 | }
12 |
13 | -- *.tgz or *.gz
14 | -- *.tbz or *.bz
15 | -- *.tbz2 or *.bz2
16 | -- *.txz or *.xz
17 | local zip_ext = {
18 | "%.t?gz",
19 | "%.t?bz2?",
20 | "%.t?xz",
21 | }
22 |
23 | -- *.tgz or *.tar.gz
24 | -- *.tbz or *.tar.bz
25 | -- *.tbz2 or *.tar.bz2
26 | -- *.txz or *.tar.xz
27 | local tarball_ext = {
28 | "%.tgz", "%.tar%.gz",
29 | "%.tbz2?", "%.tar%.bz2?",
30 | "%.txz", "%.tar%.xz",
31 | }
32 |
33 | local function is_file(f, ext)
34 | f = f:lower()
35 | for i = 1, #ext do
36 | if f:match("("..ext[i]..")$") then return true end
37 | end
38 | return false
39 | end
40 |
41 | local function is_tar(f)
42 | return is_file(f, tar_ext)
43 | end
44 |
45 | local function is_zip(f)
46 | return is_file(f, zip_ext)
47 | end
48 |
49 | local function is_tarball(f)
50 | return is_file(f, tarball_ext)
51 | end
52 |
53 | ---------------------------------------------------------------------------
54 |
55 | Macro {
56 | area = "Shell";
57 | key = "Enter CtrlPgDn";
58 | description = "Deep Tarball: Enter the archive";
59 | condition = function()
60 | return enabled and is_tarball(APanel.Current)
61 | end;
62 | action = function()
63 | Keys("AKey Down AKey")
64 | end;
65 | }
66 |
67 | Macro {
68 | area = "Shell";
69 | key = "Enter CtrlPgUp";
70 | description = "Deep Tarball: Exit the archive";
71 | condition = function()
72 | return enabled and ( APanel.Current == ".." or is_tar(APanel.HostFile) )
73 | end;
74 | action = function()
75 | Keys("AKey")
76 | if APanel.Plugin and is_zip(APanel.HostFile) then Keys("Up AKey") end
77 | end;
78 | }
79 |
80 | ---------------------------------------------------------------------------
81 |
82 | -- EOF
83 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Shell.EnterEmptyLine.lua:
--------------------------------------------------------------------------------
1 | -- http://forum.farmanager.com/viewtopic.php?p=127121#p127121
2 |
3 | -- This script scrolls the console (where program output goes)
4 | -- when the user presses Enter while the panels are hidden and
5 | -- the command line is empty.
6 |
7 | -- Whether the command prompt should be displayed in the inserted lines
8 | local leave_prompt = false
9 |
10 | Macro {
11 | description="Line feed via Enter in Userscreen";
12 | area="Shell Tree Info QView";
13 | key="Enter";
14 | uid="3A6A0C4A-BBC8-4751-922D-09B59084DC5A";
15 | condition=function()
16 | return not APanel.Visible and CmdLine.Empty
17 | end;
18 | action=function()
19 | local toggleKeyBar = Far.GetConfig"Screen.KeyBar" and "CtrlB"
20 | Keys(toggleKeyBar)
21 | if not leave_prompt then panel.GetUserScreen() end
22 | io.write("\n")
23 | panel.SetUserScreen()
24 | Keys(toggleKeyBar)
25 | end;
26 | }
27 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Shell.HiddenFiles.lua:
--------------------------------------------------------------------------------
1 |
2 | Macro {
3 | area = "Shell";
4 | key = "CtrlShiftH";
5 | flags = "";
6 | description = "Shell: Show/hide hidden files";
7 | action = function()
8 | Keys("CtrlH")
9 | end
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Shell.History.lua:
--------------------------------------------------------------------------------
1 |
2 | Macro {
3 | area = "Shell Tree";
4 | key = "CtrlUp";
5 | flags = "";
6 | -- flags = "EmptyCommandLine";
7 | description = "Shell: Command History";
8 | action = function()
9 | Keys("AltF8")
10 | end
11 | }
12 |
13 | Macro {
14 | area = "Shell Tree";
15 | key = "CtrlDown";
16 | flags = "";
17 | -- flags = "EmptyCommandLine";
18 | description = "Shell: Command History";
19 | action = function()
20 | Keys("AltF8")
21 | end
22 | }
23 |
24 |
25 | Macro {
26 | area = "Shell Tree";
27 | key = "CtrlLeft";
28 | flags = "EmptyCommandLine";
29 | description = "Shell: View & Edit History";
30 | action = function()
31 | Keys("AltF11")
32 | end
33 | }
34 |
35 |
36 | Macro {
37 | area = "Shell Tree";
38 | key = "CtrlRight";
39 | flags = "EmptyCommandLine";
40 | description = "Shell: Folder History";
41 | action = function()
42 | Keys("AltF12")
43 | end
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Shell.Rename.lua:
--------------------------------------------------------------------------------
1 |
2 | local NoFolders = true;
3 |
4 | Macro {
5 | area = "Shell";
6 | -- key = "ShiftF6";
7 | key = "/ShiftF[56]/";
8 | flags = "";
9 | description = "Shell: Highlight the filename of the file to be renamed";
10 | action = function()
11 | if APanel.Current == ".." then
12 | return;
13 | end;
14 |
15 | Keys("AKey Home ShiftEnd");
16 |
17 | if APanel.Folder and NoFolders then
18 | return;
19 | end;
20 |
21 | local text = Dlg.GetValue();
22 | if regex.match(text, ".+\\..+") then
23 | Keys("CtrlShiftLeft ShiftLeft");
24 | end;
25 | end;
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/etc/Far3/Profile/Macros/scripts/Viewer.PgDn.lua:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/Far3/Profile/Macros/scripts/Viewer.PgDn.lua
--------------------------------------------------------------------------------
/etc/PuTTY/README:
--------------------------------------------------------------------------------
1 | Default settings for the portable version of PuTTY by Jacub Kotrla:
2 | https://jakub.kotrla.net/putty/
3 |
4 | Copy the content of this directory into the place on your computer where
5 | you have deployed PuTTY.
6 |
7 | The "#default-settings.session" file contains all PuTTY settings with some
8 | changes I found in my practice useful and convenient (see them below). You
9 | can modify this file as you want. The better way is to run PuTTY, load the
10 | session, change parameters and save again. Further these settings are
11 | spreaded on other sessions by executing the "create-putty-sessions.bat"
12 | script.
13 |
14 | The script reads the "putty.conf" configuration file to retreive the
15 | directory configured to store PuTTY sessions and the extension for
16 | sessions filenames. The list of hosts or sessions is read from the
17 | "sessions-list.txt" file.
18 |
19 | Both files "create-putty-sessions.bat" and "sessions-list.txt" MUST be
20 | placed in the same directory, next each other.
21 |
22 | # FILES
23 |
24 | The content of this directory:
25 |
26 | putty.conf
27 | The main PuTTY configuration file
28 | README
29 | This file
30 | config/create-putty-sessions.bat
31 | The script to create PuTTY sessions files
32 | config/sessions-list.txt
33 | The sessions list file
34 | config/sessions/#default-settings.session
35 | The default settings for other PuTTY sessions
36 |
37 | # SETTINGS
38 |
39 | The "#default-settings.session" file provides the following changed
40 | parameters:
41 |
42 | Window
43 | Lines of scrollback
44 | 2000000
45 |
46 | Window/Behaviour
47 | System menu appears on ALT Space
48 | on
49 |
50 | Connection
51 | Seconds between keepalives (0 to turn off)
52 | 10
53 |
54 | Connection/SSH/X11
55 | Enable X11 forwarding
56 | on
57 |
--------------------------------------------------------------------------------
/etc/PuTTY/config/create-putty-sessions.bat:
--------------------------------------------------------------------------------
1 | 0*! ::
2 | @echo off
3 | cscript //nologo //e:javascript "%~f0" %*
4 | goto :EOF
5 | */0;
6 |
7 | var putty_file = '../putty.conf';
8 | var sessions_file = 'sessions-list.txt';
9 | var defaults_filename = '#default-settings';
10 |
11 | // ========================================================================
12 |
13 | var here_dir = WScript.ScriptFullName.replace(/[\\\/][^\\\/]+$/, '');
14 | var putty_dir = here_dir.replace(/[\\\/][^\\\/]+$/, '');
15 |
16 | var fso = new ActiveXObject('Scripting.FileSystemObject');
17 |
18 | // ========================================================================
19 |
20 | var putty_conf = get_file_content(here_dir + '/' + putty_file);
21 |
22 | var m = putty_conf.match(/^\s*sessions\s*=\s*(.*?)\s*$/mi);
23 | var sessions_dir = m ? m[1] : 'sessions';
24 | if ( ! /^([A-Z]:)?[\\\/]/i.test(sessions_dir) ) {
25 | sessions_dir = putty_dir + '/' + sessions_dir;
26 | }
27 |
28 | var m = putty_conf.match(/^\s*sessionsuffix\s*=\s*(.*?)\s*$/mi);
29 | var sessions_ext = m ? m[1] : '';
30 |
31 | // ========================================================================
32 |
33 | var defaults = get_file_content(sessions_dir + '/' + defaults_filename + sessions_ext);
34 |
35 | var text = get_file_content(here_dir + '/' + sessions_file);
36 | var hosts = text.replace(/^\s*(#.*)?$/gm, '').split(/[\r\n]+/);
37 |
38 | for (var i = 0; i < hosts.length; i++) {
39 | var h = hosts[i].replace(/^\s+|\s+$/g, '').split(/[\r\n]+/);
40 | if ( h.length == 0 ) {
41 | continue;
42 | }
43 | var t = defaults.replace(/(HostName\\)([^\\]*)/, function($0, $1, $2) {
44 | return $1 + ( h[1] || h[0] );
45 | });
46 | put_file_content(sessions_dir + '/' + h[0] + sessions_ext, t);
47 | }
48 |
49 | // ========================================================================
50 |
51 | function print(value) {
52 | WScript.StdOut.WriteLine(value);
53 | }
54 |
55 | function warn(value) {
56 | WScript.StdErr.WriteLine(value);
57 | }
58 |
59 | function die(value) {
60 | warn(value);
61 | exit(1);
62 | }
63 |
64 | function exit(exitCode) {
65 | WScript.Quit(exitCode || 0);
66 | }
67 |
68 | function getclip() {
69 | return new ActiveXObject('htmlfile').parentWindow.clipboardData.getData('Text');
70 | }
71 |
72 | function get_file_content(file) {
73 | print('Reading file: ' + file);
74 |
75 | var e;
76 | try {
77 | var fh = fso.OpenTextFile(file);
78 | var text = fh.ReadAll();
79 | fh.Close();
80 | } catch(e) {
81 | throw new Error(e.message + ': ' + file);
82 | }
83 |
84 | return text;
85 | }
86 |
87 | function put_file_content(file, text) {
88 | print('Writing file: ' + file);
89 |
90 | var e;
91 | try {
92 | var fh = fso.OpenTextFile(file, 2, true);
93 | fh.Write(text);
94 | fh.Close();
95 | } catch(e) {
96 | throw new Error(e.message + ': ' + file);
97 | }
98 | }
99 |
100 | // ========================================================================
101 |
102 | // EOF
103 |
--------------------------------------------------------------------------------
/etc/PuTTY/config/sessions-list.txt:
--------------------------------------------------------------------------------
1 | # Usually host lists are documented and distributed as the lists of
2 | # entries where the first item is the host name and the second one is its
3 | # IP address. Sometimes they can be the simple lists of host names only.
4 | #
5 | # This file contains the mappings of session names (how they are supposed
6 | # to be stored in PuTTY) and host names (PuTTY connects to). If the host
7 | # name is not presented the session name is used.
8 | #
9 | # Examples:
10 | #
11 | # localhost 127.0.0.1
12 | # example.com
13 | # x.acme.com 1.2.3.4
14 | # y.acme.com 1.2.3.5
15 |
--------------------------------------------------------------------------------
/etc/PuTTY/config/sessions/#default-settings.session:
--------------------------------------------------------------------------------
1 | SUPDUPScrolling\0\
2 | SUPDUPMoreProcessing\0\
3 | SUPDUPCharset\0\
4 | SUPDUPLocation\The%20Internet\
5 | SSHManualHostKeys\\
6 | ConnectionSharingDownstream\1\
7 | ConnectionSharingUpstream\1\
8 | ConnectionSharing\0\
9 | WindowClass\\
10 | SerialFlowControl\1\
11 | SerialParity\0\
12 | SerialStopHalfbits\2\
13 | SerialDataBits\8\
14 | SerialSpeed\9600\
15 | SerialLine\COM1\
16 | ShadowBoldOffset\1\
17 | ShadowBold\0\
18 | WideBoldFontHeight\0\
19 | WideBoldFontCharSet\0\
20 | WideBoldFontIsBold\0\
21 | WideBoldFont\\
22 | WideFontHeight\0\
23 | WideFontCharSet\0\
24 | WideFontIsBold\0\
25 | WideFont\\
26 | BoldFontHeight\0\
27 | BoldFontCharSet\0\
28 | BoldFontIsBold\0\
29 | BoldFont\\
30 | ScrollbarOnLeft\0\
31 | LoginShell\1\
32 | StampUtmp\1\
33 | BugDropStart\1\
34 | BugChanReq\0\
35 | BugWinadj\0\
36 | BugOldGex2\0\
37 | BugMaxPkt2\0\
38 | BugRekey2\0\
39 | BugPKSessID2\0\
40 | BugRSAPad2\0\
41 | BugDeriveKey2\0\
42 | BugHMAC2\0\
43 | BugIgnore2\0\
44 | BugRSA1\0\
45 | BugPlainPW1\0\
46 | BugIgnore1\0\
47 | PortForwardings\\
48 | RemotePortAcceptAll\0\
49 | LocalPortAcceptAll\0\
50 | X11AuthFile\\
51 | X11AuthType\1\
52 | X11Display\\
53 | X11Forward\1\
54 | BlinkText\0\
55 | BCE\1\
56 | LockSize\0\
57 | EraseToScrollback\1\
58 | ScrollOnDisp\1\
59 | ScrollOnKey\0\
60 | ScrollBarFullScreen\0\
61 | ScrollBar\1\
62 | CapsLockCyr\0\
63 | Printer\\
64 | UTF8Override\1\
65 | CJKAmbigWide\0\
66 | LineCodePage\UTF-8\
67 | CtrlShiftCV\none\
68 | CtrlShiftIns\explicit\
69 | MousePaste\explicit\
70 | MouseAutocopy\1\
71 | Wordness224\2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2\
72 | Wordness192\2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2\
73 | Wordness160\1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\
74 | Wordness128\1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\
75 | Wordness96\1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1\
76 | Wordness64\1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2\
77 | Wordness32\0,1,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1\
78 | Wordness0\0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\
79 | MouseOverride\1\
80 | PasteControls\0\
81 | RectSelect\0\
82 | MouseIsXterm\0\
83 | PasteRTF\0\
84 | UTF8linedraw\0\
85 | RawCNP\0\
86 | Colour21\255,255,255\
87 | Colour20\187,187,187\
88 | Colour19\85,255,255\
89 | Colour18\0,187,187\
90 | Colour17\255,85,255\
91 | Colour16\187,0,187\
92 | Colour15\85,85,255\
93 | Colour14\0,0,187\
94 | Colour13\255,255,85\
95 | Colour12\187,187,0\
96 | Colour11\85,255,85\
97 | Colour10\0,187,0\
98 | Colour9\255,85,85\
99 | Colour8\187,0,0\
100 | Colour7\85,85,85\
101 | Colour6\0,0,0\
102 | Colour5\0,255,0\
103 | Colour4\0,0,0\
104 | Colour3\85,85,85\
105 | Colour2\0,0,0\
106 | Colour1\255,255,255\
107 | Colour0\187,187,187\
108 | BoldAsColour\1\
109 | TrueColour\1\
110 | Xterm256Colour\1\
111 | ANSIColour\1\
112 | TryPalette\0\
113 | UseSystemColours\0\
114 | FontVTMode\4\
115 | FontQuality\0\
116 | FontHeight\10\
117 | FontCharSet\0\
118 | FontIsBold\0\
119 | Font\Courier%20New\
120 | TermHeight\24\
121 | TermWidth\80\
122 | WinTitle\\
123 | WinNameAlways\1\
124 | DisableBidi\0\
125 | DisableArabicShaping\0\
126 | CRImpliesLF\0\
127 | LFImpliesCR\0\
128 | AutoWrapMode\1\
129 | DECOriginMode\0\
130 | ScrollbackLines\2000000\
131 | BellOverloadS\5000\
132 | BellOverloadT\2000\
133 | BellOverloadN\5\
134 | BellOverload\1\
135 | BellWaveFile\\
136 | BeepInd\0\
137 | Beep\1\
138 | BlinkCur\0\
139 | CurType\0\
140 | WindowBorder\1\
141 | SunkenEdge\0\
142 | HideMousePtr\0\
143 | FullScreenOnAltEnter\0\
144 | AlwaysOnTop\0\
145 | Answerback\PuTTY\
146 | LocalEdit\2\
147 | LocalEcho\2\
148 | TelnetRet\1\
149 | TelnetKey\0\
150 | CtrlAltKeys\1\
151 | ComposeKey\0\
152 | AltOnly\0\
153 | AltSpace\1\
154 | AltF4\1\
155 | NetHackKeypad\0\
156 | ApplicationKeypad\0\
157 | ApplicationCursorKeys\0\
158 | NoRemoteCharset\0\
159 | NoDBackspace\0\
160 | RemoteQTitleAction\1\
161 | NoRemoteClearScroll\0\
162 | NoRemoteWinTitle\0\
163 | NoAltScreen\0\
164 | NoRemoteResize\0\
165 | NoMouseReporting\0\
166 | NoApplicationCursors\0\
167 | NoApplicationKeys\0\
168 | ShiftedArrowKeys\0\
169 | LinuxFunctionKeys\0\
170 | RXVTHomeEnd\0\
171 | BackspaceIsDelete\1\
172 | PassiveTelnet\0\
173 | RFCEnviron\0\
174 | RemoteCommand\\
175 | PublicKeyFile\\
176 | SSH2DES\0\
177 | LogHost\\
178 | SshProt\3\
179 | SshNoShell\0\
180 | GSSCustom\\
181 | GSSLibs\gssapi32,sspi,custom\
182 | AuthGSSAPIKEX\1\
183 | AuthGSSAPI\1\
184 | AuthKI\1\
185 | AuthTIS\0\
186 | SshBanner\1\
187 | SshNoTrivialAuth\0\
188 | SshNoAuth\0\
189 | RekeyBytes\1G\
190 | GssapiRekey\2\
191 | RekeyTime\60\
192 | PreferKnownHostKeys\1\
193 | HostKey\ed448,ed25519,ecdsa,rsa,dsa,WARN\
194 | KEX\ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1\
195 | Cipher\aes,chacha20,3des,WARN,des,blowfish,arcfour\
196 | ChangeUsername\0\
197 | GssapiFwd\0\
198 | AgentFwd\0\
199 | TryAgent\1\
200 | Compression\0\
201 | NoPTY\0\
202 | LocalUserName\\
203 | UserNameFromEnvironment\0\
204 | UserName\\
205 | Environment\\
206 | ProxyLogToTerm\1\
207 | ProxyTelnetCommand\connect%20%25host%20%25port%5Cn\
208 | ProxyPassword\\
209 | ProxyUsername\\
210 | ProxyPort\80\
211 | ProxyHost\proxy\
212 | ProxyMethod\0\
213 | ProxyLocalhost\0\
214 | ProxyDNS\1\
215 | ProxyExcludeList\\
216 | AddressFamily\0\
217 | TerminalModes\CS7=A,CS8=A,DISCARD=A,DSUSP=A,ECHO=A,ECHOCTL=A,ECHOE=A,ECHOK=A,ECHOKE=A,ECHONL=A,EOF=A,EOL=A,EOL2=A,ERASE=A,FLUSH=A,ICANON=A,ICRNL=A,IEXTEN=A,IGNCR=A,IGNPAR=A,IMAXBEL=A,INLCR=A,INPCK=A,INTR=A,ISIG=A,ISTRIP=A,IUCLC=A,IUTF8=A,IXANY=A,IXOFF=A,IXON=A,KILL=A,LNEXT=A,NOFLSH=A,OCRNL=A,OLCUC=A,ONLCR=A,ONLRET=A,ONOCR=A,OPOST=A,PARENB=A,PARMRK=A,PARODD=A,PENDIN=A,QUIT=A,REPRINT=A,START=A,STATUS=A,STOP=A,SUSP=A,SWTCH=A,TOSTOP=A,WERASE=A,XCASE=A\
218 | TerminalSpeed\38400,38400\
219 | TerminalType\xterm\
220 | TCPKeepalives\0\
221 | TCPNoDelay\1\
222 | PingIntervalSecs\10\
223 | PingInterval\0\
224 | WarnOnClose\1\
225 | CloseOnExit\1\
226 | PortNumber\22\
227 | Protocol\ssh\
228 | SSHLogOmitData\0\
229 | SSHLogOmitPasswords\1\
230 | LogHeader\1\
231 | LogFlush\1\
232 | LogFileClash\-1\
233 | LogType\0\
234 | LogFileName\putty.log\
235 | HostName\\
236 | Present\1\
237 |
--------------------------------------------------------------------------------
/etc/PuTTY/putty.conf:
--------------------------------------------------------------------------------
1 | sessions=.\config\sessions
2 | sshhostkeys=.\config\hostkeys
3 | seedfile=.\config\putty.rnd
4 | sessionsuffix=.session
5 | keysuffix=.hostkey
6 | jumplist=.\config\jumplist.txt
7 |
--------------------------------------------------------------------------------
/etc/README:
--------------------------------------------------------------------------------
1 | Configure everything is possible
2 |
--------------------------------------------------------------------------------
/etc/candy-for-tea.bat:
--------------------------------------------------------------------------------
1 | <# :
2 | @echo off
3 | setlocal
4 | set "POWERSHELL_BAT_ARGS=%*"
5 | if defined POWERSHELL_BAT_ARGS set "POWERSHELL_BAT_ARGS=%POWERSHELL_BAT_ARGS:"=\"%"
6 | endlocal & powershell -NoLogo -NoProfile -Command "$_ = $input; Invoke-Expression $( '$input = $_; $_ = \"\"; $args = @( &{ $args } %POWERSHELL_BAT_ARGS% );' + [String]::Join( [char]10, $( Get-Content \"%~f0\" ) ) )"
7 | goto :EOF
8 | #>
9 |
10 | $packages = @(
11 |
12 | @{
13 | "name" = "7-zip";
14 | "home" = "http://7-zip.org/";
15 | "url" = "http://downloads.sourceforge.net/sevenzip/7za920.zip";
16 | "dir" = "..\opt\7za";
17 | "postinstall" = {
18 | $dir = $args[0];
19 | $script:7zip_exe = "$dir\7za.exe";
20 | };
21 | }
22 |
23 | @{
24 | "name" = "ConEmu";
25 | "home" = "https://github.com/Maximus5/ConEmu/";
26 | # "url" = "https://github.com/Maximus5/ConEmu/releases/download/v16.03.13/ConEmuPack.160313.7z";
27 | "url" = "https://github.com/Maximus5/ConEmu/releases/download/v20.11.23a/ConEmuPack.201123a.7z";
28 | "dir" = "ConEmu";
29 | }
30 |
31 | @{
32 | "Skip" = $True;
33 | "name" = "ConsoleZ";
34 | "home" = "https://github.com/cbucher/console";
35 | # "url" = "https://github.com/cbucher/console/releases/download/1.16.0/ConsoleZ.x86.1.16.0.16038.zip";
36 | # "url" = "https://github.com/cbucher/console/releases/download/1.16.0/ConsoleZ.x64.1.16.0.16038.zip";
37 | # "url" = "https://github.com/cbucher/console/releases/download/1.18.0/ConsoleZ.x64.1.18.0.17048.zip";
38 | # "url" = "https://github.com/cbucher/console/releases/download/1.18.0/ConsoleZ.x86.1.18.0.17048.zip";
39 | "dir" = "ConsoleZ";
40 | }
41 |
42 | @{
43 | "name" = "Clink";
44 | "home" = "http://mridgers.github.io/clink";
45 | "url" = "https://github.com/mridgers/clink/releases/download/0.4.8/clink_0.4.8.zip";
46 | "dir" = "clink";
47 | "onlyFiles" = $True;
48 | "postinstall" = {
49 | $dir = $args[0];
50 | ls $dir |
51 | ? { $_.Attributes -eq "Directory" } |
52 | % { rmdir -Force -Path "$dir\$_"; };
53 | };
54 | }
55 |
56 | @{
57 | "name" = "Far3";
58 | "home" = "http://www.farmanager.com/";
59 | "url" = "https://farmanager.com/files/Far30b5445.x64.20190807.7z"
60 | "dir" = "Far3";
61 | }
62 |
63 | @{
64 | "skip" = $True;
65 | "name" = "Notepad3";
66 | "home" = "https://www.rizonesoft.com/downloads/notepad3/";
67 | "url" = "https://github.com/rizonesoft/Notepad3/releases/download/RELEASE_4.18.512.992/Notepad3_4.18.512.992.zip";
68 | "dir" = "..\GUI\notepad";
69 | "postinstall" = {
70 | $dir = $args[0];
71 | $ini = "$dir\Notepad3.ini";
72 | mv -Force -Path "$ini" -Destination "$ini.orig";
73 | & {
74 | "[Notepad3]";
75 | "Notepad3.ini=..\..\etc\notepad\Notepad.ini";
76 | } | Out-File "$ini";
77 | };
78 | }
79 |
80 | @{
81 | "name" = "UnxUtils";
82 | "home" = "http://unxutils.sourceforge.met/";
83 | "url" = "http://downloads.sourceforge.net/project/unxutils/unxutils/current/UnxUtils.zip";
84 | "dir" = "unxutils";
85 | "postinstall" = {
86 | $dir = $args[0];
87 | $src = "$dir\usr\local\wbin\*";
88 | $dst = "$dir\bin";
89 | mv -Force -Path $src -Destination $dst;
90 | };
91 | }
92 |
93 | @{
94 | "name" = "UnxUtils Updates";
95 | "home" = "http://unxutils.sourceforge.met/";
96 | "url" = "http://unxutils.sourceforge.net/UnxUpdates.zip";
97 | "dir" = "unxutils\bin";
98 | }
99 |
100 | @{
101 | "name" = "Busybox";
102 | "home" = "https://frippery.org/busybox/";
103 | # "url" = "https://frippery.org/files/busybox/busybox.exe";
104 | "url" = "https://frippery.org/files/busybox/busybox64.exe";
105 | "dir" = "..\opt\busybox";
106 | }
107 | );
108 |
109 | # =========================================================================
110 |
111 | $libexecDir = [System.IO.Path]::GetFullPath("$pwd\..\libexec");
112 | $distribDir = "$pwd\distrib";
113 |
114 | $7zip_exe = "";
115 |
116 | # =========================================================================
117 |
118 | function download-archive( [string]$url, [string]$targetDir ) {
119 | $filename = "$targetDir\" + [System.IO.Path]::GetFileName($url);
120 | if ( ! ( Test-Path $filename ) ) {
121 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
122 | $webclient = New-Object System.Net.WebClient;
123 | $webclient.DownloadFile($url, $filename);
124 | }
125 | return $filename;
126 | }
127 |
128 | function extract-zip-v5( [string]$filename, [string]$targetDir ) {
129 | return Expand-Archive -Path $filename -DestinationPath $targetDir
130 | }
131 |
132 | function extract-zip( [string]$filename, [string]$targetDir ) {
133 | if ( $PSVersionTable.PSVersion.Major -gt 5 ) {
134 | return extract-zip-v5 $filename $targetDir
135 | }
136 |
137 | $shell = New-Object -com shell.application;
138 | $zip = $shell.NameSpace($filename);
139 | foreach ( $item in $zip.items() ) {
140 | $shell.Namespace($targetDir).CopyHere($item, 16);
141 | }
142 | }
143 |
144 | function extract-7z( [string]$filename, [string]$targetDir, [bool]$onlyFiles ) {
145 | $mode = if ( $onlyFiles ) { "e" } else { "x" };
146 | & "$script:7zip_exe" $mode "$filename" -y "-o$targetDir";
147 | }
148 |
149 | function extract-archive( [string]$filename, [string]$targetDir, [bool]$onlyFiles ) {
150 | if ( $script:7zip_exe ) {
151 | extract-7z $filename $targetDir $onlyFiles;
152 | } else {
153 | extract-zip $filename $targetDir;
154 | }
155 | }
156 |
157 | function install-package( $package ) {
158 | $dstDir = $script:libexecDir + "\" + $package.dir;
159 |
160 | "=================================================================";
161 | "Package : $($package.name)";
162 | "Destination : $dstDir";
163 |
164 | if ( $package.skip ) {
165 | "Skipped";
166 | return;
167 | }
168 |
169 | New-Item -Force -ItemType Directory -Path $dstDir >$null;
170 | $filename = download-archive $package.url $script:distribDir;
171 | extract-archive $filename $dstDir ( !! $package.onlyFiles );
172 |
173 | if ( ! $package.postinstall ) {
174 | return;
175 | }
176 |
177 | "`nInvoke command:";
178 | $package.postinstall;
179 | Invoke-Command -ScriptBlock $package.postinstall -ArgumentList $dstDir;
180 | }
181 |
182 | # =========================================================================
183 |
184 | $enabled = "$pwd\candy-for-tea.enabled";
185 | $logfile = "$pwd\candy-for-tea.log";
186 |
187 | if ( ! ( Test-Path "$enabled" ) ) {
188 | [System.Reflection.Assembly]::LoadWithPartialName( "System.Windows.Forms" ) >$Null;
189 | [System.Windows.Forms.MessageBox]::Show( "To enable execution create the file:`n$enabled.", "Disabled", 0, "Stop" ) >$Null;
190 | exit;
191 | }
192 |
193 | $packages | % { install-package $_; } | Out-File $logfile;
194 |
195 | if ( Test-Path $enabled ) {
196 | Remove-Item -Force -Path "$enabled";
197 | }
198 |
199 | # =========================================================================
200 |
201 | # EOF
202 |
--------------------------------------------------------------------------------
/etc/candy-for-tea.enabled:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/candy-for-tea.enabled
--------------------------------------------------------------------------------
/etc/clink/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | *.dmp
3 | clink_history*
4 |
--------------------------------------------------------------------------------
/etc/clink/clink_inputrc:
--------------------------------------------------------------------------------
1 | # When this file is named "default_inputrc" and is in the binaries
2 | # directory or profile directory, it provides enhanced default settings.
3 |
4 | # Override the built-in Readline defaults with ones that provide a more
5 | # enhanced Clink experience.
6 |
7 | set colored-completion-prefix on
8 | set colored-stats on
9 | set mark-symlinked-directories on
10 | set completion-auto-query-items on
11 | set history-point-at-end-of-anchored-search on
12 | set search-ignore-case on
13 |
14 |
--------------------------------------------------------------------------------
/etc/clink/clink_settings:
--------------------------------------------------------------------------------
1 | # name: Strips CR and LF chars on paste
2 | # type: enum
3 | # options: delete,space,ampersand,crlf
4 | clink.paste_crlf = space
5 |
6 | # name: Auto-answer terminate prompt
7 | # type: enum
8 | # options: off,answer_yes,answer_no
9 | cmd.auto_answer = off
10 |
11 | # name: Pressing Ctrl-D exits session
12 | # type: boolean
13 | cmd.ctrld_exits = True
14 |
15 | # name: Argument color
16 | # type: color
17 | color.arg = bold
18 |
19 | # name: Argument info color
20 | # type: color
21 | color.arginfo = yellow
22 |
23 | # name: Shell command completions
24 | # type: color
25 | color.cmd = bold
26 |
27 | # name: Color for comment row
28 | # type: color
29 | color.comment_row = bright white on cyan
30 |
31 | # name: Description completion color
32 | # type: color
33 | color.description = bright cyan
34 |
35 | # name: Doskey completions
36 | # type: color
37 | color.doskey = bold cyan
38 |
39 | # name: Filtered completion color
40 | # type: color
41 | color.filtered = bold
42 |
43 | # name: Flag color
44 | # type: color
45 | color.flag = default
46 |
47 | # name: For user-interaction prompts
48 | # type: color
49 | color.interact = bold
50 |
51 | # name: Message area color
52 | # type: color
53 | color.message = default
54 |
55 | # name: Prompt color
56 | # type: color
57 | color.prompt = bright red
58 |
59 | # name: Color for suggestion text
60 | # type: color
61 | color.suggestion = bright black
62 |
63 | # name: Unexpected argument color
64 | # type: color
65 | color.unexpected = default
66 |
67 | # name: Controls how duplicate entries are handled
68 | # type: enum
69 | # options: add,ignore,erase_prev
70 | history.dupe_mode = erase_prev
71 |
72 | # name: Sets how command history expansion is applied
73 | # type: enum
74 | # options: off,on,not_squoted,not_dquoted,not_quoted
75 | history.expand_mode = not_quoted
76 |
77 | # name: Skip adding lines prefixed with whitespace
78 | # type: boolean
79 | history.ignore_space = False
80 |
81 | # name: The number of history lines to save
82 | # type: integer
83 | history.max_lines = 10000
84 |
85 | # name: Save history between sessions
86 | # type: boolean
87 | history.save = True
88 |
89 | # name: Share history between instances
90 | # type: boolean
91 | history.shared = False
92 |
93 | # name: Controls VT emulation
94 | # type: enum
95 | # options: native,emulate,auto
96 | terminal.emulation = auto
97 |
98 | # name: Esc sends a literal escape character
99 | # type: boolean
100 | terminal.raw_esc = False
101 |
102 | # name: Support Windows' Ctrl-Alt substitute for AltGr
103 | # type: boolean
104 | terminal.use_altgr_substitute = True
105 |
106 |
107 |
108 | exec.cwd = 1
109 |
110 | exec.dirs = 1
111 |
112 | exec.enable = 1
113 |
114 | exec.path = 1
115 |
116 | exec.space_prefix = 1
117 |
118 |
--------------------------------------------------------------------------------
/etc/clink/clink_start.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | :: Customize the prompt
4 | :: - the current disk and path in light green
5 | :: - new line
6 | :: - the ">" character
7 | :: - the " " character
8 | prompt $E[92m$P$E[m$_$G$S
9 |
--------------------------------------------------------------------------------
/etc/distrib/README:
--------------------------------------------------------------------------------
1 | This directory for storing packages downloaded by zentea.
2 |
3 |
--------------------------------------------------------------------------------
/etc/images/ConEmu.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/images/ConEmu.ico
--------------------------------------------------------------------------------
/etc/images/Cygwin.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/images/Cygwin.ico
--------------------------------------------------------------------------------
/etc/images/Far2.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/images/Far2.ico
--------------------------------------------------------------------------------
/etc/images/Far3.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/images/Far3.bmp
--------------------------------------------------------------------------------
/etc/images/Far3.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/images/Far3.ico
--------------------------------------------------------------------------------
/etc/images/Prompt.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/images/Prompt.bmp
--------------------------------------------------------------------------------
/etc/images/Prompt.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/images/Prompt.ico
--------------------------------------------------------------------------------
/etc/images/git-for-windows.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/images/git-for-windows.ico
--------------------------------------------------------------------------------
/etc/images/git.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/images/git.ico
--------------------------------------------------------------------------------
/etc/images/msysgit.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/images/msysgit.ico
--------------------------------------------------------------------------------
/etc/mintty/default.settings:
--------------------------------------------------------------------------------
1 | BoldAsFont=no
2 | Rows=50
3 | ScrollbackLines=100000
4 | Transparency=low
5 | OpaqueWhenFocused=no
6 | ClicksPlaceCursor=no
7 | RightClickAction=paste
8 | FontHeight=10
9 | BellType=0
10 |
--------------------------------------------------------------------------------
/etc/misc/SumatraPDF/SumatraPDF-default.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | if not exist "SumatraPDF.exe" (
4 | echo:SumatraPDF not found here.
5 | echo:Re-run this script under the folder where SumatraPDF is located.
6 | goto :EOF
7 | )
8 |
9 | if not exist "%~dp0SumatraPDF-settings.txt" (
10 | copy /b "%~dp0SumatraPDF-settings-default.txt" "%~dp0SumatraPDF-settings.txt"
11 | )
12 |
13 | if not exist "%~dp0sumatrapdfcache" (
14 | md "%~dp0sumatrapdfcache"
15 | )
16 |
17 | mklink "SumatraPDF-settings.txt" "..\..\etc\misc\SumatraPDF\SumatraPDF-settings.txt"
18 | mklink /d "sumatrapdfcache" "..\..\etc\misc\SumatraPDF\sumatrapdfcache"
19 |
--------------------------------------------------------------------------------
/etc/misc/SumatraPDF/SumatraPDF-default.txt:
--------------------------------------------------------------------------------
1 | # For documentation, see http://www.sumatrapdfreader.org/settings3.2.html
2 |
3 | MainWindowBackground = #80fff200
4 | EscToExit = false
5 | ReuseInstance = false
6 | UseSysColors = false
7 | RestoreSession = true
8 |
9 | FixedPageUI [
10 | TextColor = #000000
11 | BackgroundColor = #ffffff
12 | SelectionColor = #f5fc0c
13 | WindowMargin = 2 4 2 4
14 | PageSpacing = 4 4
15 | ]
16 | EbookUI [
17 | FontName = Georgia
18 | FontSize = 12.5
19 | TextColor = #5f4b32
20 | BackgroundColor = #fbf0d9
21 | UseFixedPageUI = false
22 | ]
23 | ComicBookUI [
24 | WindowMargin = 0 0 0 0
25 | PageSpacing = 4 4
26 | CbxMangaMode = false
27 | ]
28 | ChmUI [
29 | UseFixedPageUI = false
30 | ]
31 | ExternalViewers [
32 | ]
33 | ShowMenubar = true
34 | ReloadModifiedDocuments = true
35 | FullPathInTitle = false
36 | ZoomLevels = 8.33 12.5 18 25 33.33 50 66.67 75 100 125 150 200 300 400 600 800 1000 1200 1600 2000 2400 3200 4800 6400
37 | ZoomIncrement = 0
38 |
39 | PrinterDefaults [
40 | PrintScale = shrink
41 | ]
42 | ForwardSearch [
43 | HighlightOffset = 0
44 | HighlightWidth = 15
45 | HighlightColor = #6581ff
46 | HighlightPermanent = false
47 | ]
48 | CustomScreenDPI = 0
49 |
50 | RememberStatePerDocument = true
51 | UiLanguage = en
52 | ShowToolbar = true
53 | ShowFavorites = false
54 | AssociateSilently = false
55 | CheckForUpdates = false
56 | RememberOpenedFiles = true
57 | EnableTeXEnhancements = false
58 | DefaultDisplayMode = automatic
59 | DefaultZoom = fit width
60 | WindowState = 2
61 | WindowPos = 424 0 673 872
62 | ShowToc = true
63 | SidebarDx = 166
64 | TocDy = 0
65 | ShowStartPage = true
66 | UseTabs = true
67 |
68 | FileStates [
69 | ]
70 | SessionData [
71 | ]
72 | TimeOfLastUpdateCheck = 0 0
73 | OpenCountWeek = 404
74 |
75 | # Settings after this line have not been recognized by the current version
76 |
--------------------------------------------------------------------------------
/etc/misc/SumatraPDF/SumatraPDF-register.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | if not exist "SumatraPDF.exe" (
4 | echo:SumatraPDF not found here.
5 | echo:Re-run this script under the folder where SumatraPDF is located.
6 | goto :EOF
7 | )
8 |
9 | SumatraPDF.exe -register-for-pdf
10 |
--------------------------------------------------------------------------------
/etc/misc/__TIPS/firefox-profile-notifications.txt:
--------------------------------------------------------------------------------
1 | # how do I stop firefox from notifying me about updates?
2 |
3 | https://superuser.com/a/1392487
4 |
5 | ## open
6 |
7 | about:config
8 |
9 | ## find
10 |
11 | app.update.url
12 | app.update.url.details
13 | app.update.url.manual
14 |
15 | ## modify each prepending "xxx-"
16 |
17 | ---
18 |
19 | # How do I remove the request for push notifications globally?
20 |
21 | https://www.reddit.com/r/firefox/comments/5augv2/how_do_i_remove_the_request_for_push/
22 |
23 | ## open
24 |
25 | about:config
26 |
27 | ## find
28 |
29 | dom.webnotifications.enabled
30 | dom.webnotifications.serviceworker.enabled
31 | dom.push.connection.enabled
32 | dom.push.enabled
33 |
34 | ## modify setting them to false
35 |
36 | ---
37 |
38 | # No More Notifications (If You Want)
39 |
40 | https://blog.mozilla.org/firefox/no-notifications/
41 |
42 | ## open
43 |
44 | about:preferences#privacy
45 |
46 | ## find
47 |
48 | Permissions
49 | Location and/or Notifications
50 |
51 | ## click the proper buttons
52 |
53 | Settings...
54 |
55 | ## check in the box
56 |
57 | Block new requests asking to access your location
58 | Block new requests asking to allow notifications
59 |
60 |
--------------------------------------------------------------------------------
/etc/notepad/Notepad.ini:
--------------------------------------------------------------------------------
1 | [Notepad3]
2 | ;Notepad3.ini=%USERPROFILE%\Notepad3.ini
3 | ;Notepad3.ini=%APPDATA%\Rizonesoft\Notepad3\Notepad3.ini
4 | [Settings]
5 | SettingsVersion=5
6 | TabWidth=8
7 | IndentWidth=8
8 | MarkLongLines=true
9 | LongLinesLimit=75
10 | SaveRecentFiles=false
11 | MarkOccurrencesMatchWholeWords=false
12 | SaveSettings=false
13 | AutoCloseTags=true
14 | [Settings2]
15 | ;IMEInteraction=0
16 | ;AutoReloadTimeout=2000
17 | ;DateTimeFormat= (-> $Date: $)
18 | ;TimeStampRegEx= (-> \$Date:[^\$]+\$)
19 | ;DefaultDirectory=
20 | ;DefaultExtension=txt
21 | ;DefaultWindowPosition=
22 | ;DenyVirtualSpaceAccess=0
23 | ;filebrowser.exe=minipath.exe
24 | ;grepWin.exe=grepWinNP3.exe
25 | ;FileCheckInverval=2000
26 | ;FileDlgFilters=
27 | ;FileLoadWarningMB=64
28 | ;MarkOccurrencesMaxCount=2000
29 | ;MultiFileArg=0
30 | ;NoCGIGuess=0
31 | ;NoCopyLineOnEmptySelection=0
32 | ;NoCutLineOnEmptySelection=0
33 | ;NoFadeHidden=0
34 | ;NoFileVariables=0
35 | ;NoHTMLGuess=0
36 | ;PortableMyDocs=1
37 | ;OpacityLevel=75
38 | ;FindReplaceOpacityLevel=50
39 | ;RelativeFileMRU=1
40 | ;ReuseWindow=0
41 | ;SciFontQuality=3
42 | ;SimpleIndentGuides=0
43 | ;SingleFileInstance=1
44 | ;ShellAppUserModelID=Rizonesoft.Notepad3
45 | ;ShellUseSystemMRU=1
46 | StickyWindowPosition=1
47 | PreferredLanguageLocaleName=en-US
48 | ;UseOldStyleBraceMatching=0
49 | ;WebTemplate1=https://google.com/search?q=%s
50 | ;WebTemplate2=https://en.wikipedia.org/w/index.php?search=%s
51 | ;ExtendedWhiteSpaceChars=
52 | ;AutoCompleteWordCharSet=
53 | ;AutoCompleteFillUpChars=
54 | ;LineCommentPostfixStrg=
55 | ;UpdateDelayMarkAllOccurrences=50
56 | ;CurrentLineHorizontalSlop=40
57 | ;CurrentLineVerticalSlop=5
58 | ;UndoTransactionTimeout=0
59 | ;AdministrationTool.exe=
60 | ;DevDebugMode=0
61 | ;AnalyzeReliableConfidenceLevel=92
62 | ;LocaleAnsiCodePageAnalysisBonus=33
63 | ;LexerSQLNumberSignAsComment=1
64 | ;ExitOnESCSkipLevel=2
65 | ;ZoomTooltipTimeout=3200
66 | [Statusbar Settings]
67 | ;VisibleSections=0 1 12 14 2 4 5 6 7 8 9 10 11
68 | ;SectionPrefixes=Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,
69 | ;SectionPostfixes=,,,,,,,,,,,,,,,
70 | ;SectionWidthSpecs=30 20 20 20 20 20 0 0 0 0 0 0 20 20 20
71 | ;ZeroBasedColumnIndex=0
72 | ;ZeroBasedCharacterCount=0
73 | [Toolbar Images]
74 | ;BitmapDefault=<[:|relative_]\path_to>\Toolbar.bmp
75 | ;BitmapHot=<[:|relative_]\path_to>\ToolbarHot.bmp
76 | ;BitmapDisabled=<[:|relative_]\path_to>\ToolbarDisabled.bmp
77 | [Toolbar Labels]
78 | ;01=New
79 | ;02=Open
80 | ;03=Browse
81 | ;04=Save
82 | ;05=Undo
83 | ;06=Redo
84 | ;07=Cut
85 | ;08=Copy
86 | ;09=Paste
87 | ;10=Find
88 | ;11=Replace
89 | ;12=Word Wrap
90 | ;13=Zoom In
91 | ;14=Zoom Out
92 | ;15=Scheme
93 | ;16=Customize Schemes
94 | ;17=Exit
95 | ;18=Save As
96 | ;19=Save Copy
97 | ;20=Delete
98 | ;21=Print
99 | ;22=Favorites
100 | ;23=Add to Favorites
101 | ;24=Toggle Folds
102 | ;25=Execute Document
103 | ;26=Focused View
104 | ;27=Monitoring Log
105 | ;28=History
106 | ;29=Always On Top
107 | [Custom Colors]
108 | [Styles]
109 | [Common Base]
110 | Default Style=font:Courier New; size:10; charset:204
111 | [2nd Common Base]
112 | [Text Files]
113 | [ANSI Art]
114 | [Apache Config Files]
115 | [Assembly Script]
116 | [AutoHotkey_L Script]
117 | [AutoIt3 Script]
118 | [AviSynth Script]
119 | [Awk Script]
120 | [Batch Files]
121 | [C# Source Code]
122 | [C/C++ Source Code]
123 | [Cmake Script]
124 | [Coffeescript]
125 | [Configuration Files]
126 | [CSS Style Sheets]
127 | [CSV Prism]
128 | [D Source Code]
129 | [Diff Files]
130 | [Go Source Code]
131 | [Inno Setup Script]
132 | [Java Source Code]
133 | [JavaScript]
134 | [JSON]
135 | [LaTeX Files]
136 | [Lua Script]
137 | [Makefiles]
138 | [Markdown]
139 | [MATLAB]
140 | [Nim Source Code]
141 | [NSIS Script]
142 | [Pascal Source Code]
143 | [Perl Script]
144 | [PowerShell Script]
145 | [Python Script]
146 | [Registry Files]
147 | [Resource Script]
148 | [R-S-SPlus Statistics Code]
149 | [Ruby Script]
150 | [Rust Source Code]
151 | [Shell Script]
152 | [SQL Query]
153 | [Tcl Script]
154 | [TOML Config]
155 | [VBScript]
156 | [VHDL]
157 | [Visual Basic]
158 | [Web Source Code]
159 | [XML Document]
160 | [YAML]
161 | [Window]
162 | 1600x900 HighDpiToolBar=0
163 | 1600x900 PosX=760
164 | 1600x900 PosY=35
165 | 1600x900 SizeX=760
166 | 1600x900 SizeY=845
167 | 1600x900 Maximized=false
168 | 1600x900 Zoom=100
169 | 1920x1080 HighDpiToolBar=0
170 | [Suppressed Messages]
171 | MsgFileUnknownExt=6
172 | [Recent Files]
173 | [Recent Find]
174 | [Recent Replace]
175 |
--------------------------------------------------------------------------------
/etc/notepad/Notepad3.ini:
--------------------------------------------------------------------------------
1 | [Notepad3]
2 | Notepad3.ini=..\..\etc\notepad\Notepad.ini
3 |
--------------------------------------------------------------------------------
/etc/postinstall/calc-display-issue.txt:
--------------------------------------------------------------------------------
1 | REGEDIT4
2 |
3 | [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
4 | "MS Shell Dlg"="Microsoft Sans Serif"
5 | "MS Shell Dlg 2"="Tahoma"
6 | "MS Shell Dlg,204"="Microsoft Sans Serif,204"
7 |
8 | ; Found at
9 | ; https://social.technet.microsoft.com/Forums/ru-RU/f2add0a5-fd64-4820-b33c-76e430744c58/windows-7-?forum=windows7ru
10 |
11 | ; if "Microsoft" words were changed to "MS"
12 | ; 1. revert "MS" to "Microsoft"
13 | ; 2. and log-off/log-on
14 |
15 | ; another solution
16 | ; 1. control panel
17 | ; 2. Apperance and Personalization
18 | ; 3. Dislpay
19 | ; 4. Set to "Medium - 125%"
20 | ; 5. Log-off/log-on
21 | ; 6. Repeat 1-3
22 | ; 7. Set to "Smaller - 100% (default)"
23 | ; 8. Repeat 5
24 |
--------------------------------------------------------------------------------
/etc/postinstall/cygwin-update.txt:
--------------------------------------------------------------------------------
1 |
2 | 1. Install Cygwin
3 |
4 | 2. Run Cygwin first time and perform post-install activity
5 |
6 | ---------------------------------------------------------------------------
7 |
8 | The simplest way (not portable)
9 |
10 | 3. Modify /etc/passwd
11 |
12 | cd "NEW-HOME-DIR"
13 | sed -i "/$USERNAME/ s|^\(.*\):.*:\(.*\)|\1:$(pwd):\2|" /etc/passwd
14 |
15 | 4. Close the current Cygwin session
16 |
17 | ---------------------------------------------------------------------------
18 |
19 | The more complicated but portable way
20 |
21 | 3. Remove the current home dir
22 |
23 | cd ~/..
24 | rm -rf "$HOME"
25 |
26 | 4. Create soft link to NEW-HOME-DIR
27 |
28 | ln -s "NEW-HOME-DIR" $USERNAME
29 |
30 | 5. Close the current Cygwin session
31 |
32 | ---------------------------------------------------------------------------
33 |
34 | Another and portable way
35 |
36 | 3. backup CYGWIN-DIR/etc/profile to here
37 |
38 | 4. open CYGWIN-DIR/etc/profile and add at the most beginning of the file
39 | the following lines
40 |
41 | # Set new home dir
42 | HOME="$( ../bin/cygpath -w / | ../bin/sed 's/libexec.*/home/' | ../bin/cygpath -uf - )"
43 |
44 |
45 | 5. Save the changes to the file
46 |
47 | ---------------------------------------------------------------------------
48 |
49 | Yet another way (git can't recognize /home/USERNAME as part of a repo)
50 |
51 | http://cygwin.com/cygwin-ug-net/using.html#mount-table
52 |
53 | 3. open CYGWIN-DIR/etc/fstab
54 |
55 | 4. add the following lines
56 |
57 | # This is for mapping new userhome
58 | TEA_HOME-DIR/home /home/USERNAME ntfs binary,noacl,posix=0,user 0 0
59 |
60 | 5. Close the current Cygwin session
61 |
62 |
--------------------------------------------------------------------------------
/etc/postinstall/fstab:
--------------------------------------------------------------------------------
1 | # /etc/fstab
2 | #
3 | # This file is read once by the first process in a Cygwin process tree.
4 | # To pick up changes, restart all Cygwin processes. For a description
5 | # see https://cygwin.com/cygwin-ug-net/using.html#mount-table
6 |
7 | # This is default mapping to paths like "/cygdrive/..."
8 | none /cygdrive cygdrive binary,noacl,posix=0,user 0 0
9 |
10 | # This is for mapping to paths like "/mnt/..."
11 | #none /mnt cygdrive binary,noacl,posix=0,user 0 0
12 |
13 | # This is for mapping to paths like "/..."
14 | #none / cygdrive binary,noacl,posix=0,user 0 0
15 |
16 | # This is for mapping to new userhome like "TEA_HOME/home"
17 | TEA_HOME/home /home/USERNAME ntfs binary,noacl,posix=0,user 0 0
18 |
--------------------------------------------------------------------------------
/etc/postinstall/home-link.bat:
--------------------------------------------------------------------------------
1 | :: Setup a TEA-SET home as Cygwin/MSYS2/MinGW user home
2 | ::
3 | :: Usage: home-link TYPE
4 | ::
5 | :: Available types:
6 | ::
7 | :: junction creates a directory junction.
8 | :: symlinkd creates a directory symbolic link. Elevated privileges
9 | :: could be required to complete this command.
10 | :: winlink creates symlinks as Windows shortcuts with a special header
11 | :: and the R/O attribute set.
12 | :: cyglink creates symlinks in the old-fashioned Cygwin style
13 | :: (a special file with the System attribute set).
14 | ::
15 | :: The script assumes the following directory tree structure and HAVE TO BE
16 | :: executed from within one of %TEA_SET%\libexec\*\home:
17 | :: %TEA_SET%\home
18 | :: %TEA_SET%\libexec\cygwin\home
19 | :: %TEA_SET%\libexec\msys32\home
20 | :: %TEA_SET%\libexec\msys64\home
21 | :: ... and so on
22 | @echo off
23 |
24 | if "%~1" == "" (
25 | findstr /b "::" "%~f0"
26 | goto :EOF
27 | )
28 |
29 | for %%n in (
30 | junction
31 | symlinkd
32 | winlink
33 | cyglink
34 | ) do if /i "%~1" == "%%~n" (
35 | call :create-%%~n
36 | if errorlevel 1 echo:Execution failed>&2
37 | goto :EOF
38 | )
39 |
40 | echo:Bad option: %~1>&2
41 | goto :EOF
42 |
43 | rem =======================================================================
44 |
45 | :create-junction
46 | mklink /j "%USERNAME%" "..\..\..\home"
47 | goto :EOF
48 |
49 | :create-symlinkd
50 | mklink /d "%USERNAME%" "..\..\..\home"
51 | goto :EOF
52 |
53 | rem =======================================================================
54 |
55 | :create-winlink
56 | copy /b "%~dpn0.winlink" "%USERNAME%.lnk" || exit /b %ERRORLEVEL%
57 | attrib +R "%USERNAME%.lnk"
58 | goto :EOF
59 |
60 | :create-cyglink
61 | copy /b "%~dpn0.cyglink" "%USERNAME%" || exit /b %ERRORLEVEL%
62 | attrib +S "%USERNAME%"
63 | goto :EOF
64 |
65 | rem =======================================================================
66 |
67 | :show_usage
68 | findstr /b "::" "%~f0"
69 | goto :EOF
70 |
71 | rem =======================================================================
72 |
73 | rem EOF
74 |
--------------------------------------------------------------------------------
/etc/postinstall/home-link.cyglink:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/postinstall/home-link.cyglink
--------------------------------------------------------------------------------
/etc/postinstall/home-link.winlink:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/postinstall/home-link.winlink
--------------------------------------------------------------------------------
/etc/postinstall/keyboard-layout-rus-eng.reg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ildar-shaimordanov/tea-set/4decb128dac4606e91edd2355aa167f588082958/etc/postinstall/keyboard-layout-rus-eng.reg
--------------------------------------------------------------------------------
/etc/postinstall/notepad-replace-win10.bat:
--------------------------------------------------------------------------------
1 | :: http://www.flos-freeware.ch/doc/notepad2-Replacement.html
2 | :: https://github.com/rizonesoft/Notepad3/issues/3742
3 |
4 | @echo off
5 |
6 | setlocal
7 |
8 | set "np_registry=HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe"
9 |
10 | for %%n in ( install uninstall show ) do if /i "%~1" == "%%~n" goto :np_%%~n
11 |
12 | echo:Usage: %~n0 install ^| uninstall ^| show>&2
13 |
14 | endlocal
15 | goto :EOF
16 |
17 |
18 | :np_setup
19 | set "np_fullpath="
20 | for %%f in (
21 | "%~dp0..\..\opt\notepad3\Notepad3.exe"
22 | "%~dp0..\..\opt\notepad\Notepad3.exe"
23 | "%~dp0..\..\GUI\notepad3\Notepad3.exe"
24 | "%~dp0..\..\GUI\notepad\Notepad3.exe"
25 | "%~dp0..\..\libexec\notepad3\Notepad3.exe"
26 | "%~dp0..\..\libexec\notepad\Notepad3.exe"
27 | ) do if exist "%%~ff" (
28 | set "np_fullpath=%%~ff"
29 | goto :EOF
30 | )
31 | echo:Notepad replacement not found>&2
32 | exit /b 1
33 |
34 |
35 | :np_install
36 | call :np_setup || goto :EOF
37 |
38 | reg add "%np_registry%" /v "Debugger" /t REG_SZ /d "\"%np_fullpath%\" /z" /f
39 | goto :EOF
40 |
41 |
42 | :np_uninstall
43 | reg delete "%np_registry%" /v "Debugger" /f
44 | goto :EOF
45 |
46 |
47 | :np_show
48 | reg query "%np_registry%" /s
49 | goto :EOF
50 |
51 |
--------------------------------------------------------------------------------
/etc/postinstall/notepad-replace-win11.bat:
--------------------------------------------------------------------------------
1 | :: http://www.flos-freeware.ch/doc/notepad2-Replacement.html
2 | :: https://github.com/rizonesoft/Notepad3/issues/3742
3 |
4 | @echo off
5 |
6 | setlocal
7 |
8 | set "np_registry=HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe"
9 |
10 | for %%n in ( install uninstall show ) do if /i "%~1" == "%%~n" goto :np_%%~n
11 |
12 | echo:Usage: %~n0 install ^| uninstall ^| show>&2
13 |
14 | endlocal
15 | goto :EOF
16 |
17 |
18 | :np_setup
19 | set "np_fullpath="
20 | for %%f in (
21 | "%~dp0..\..\opt\notepad3\Notepad3.exe"
22 | "%~dp0..\..\opt\notepad\Notepad3.exe"
23 | "%~dp0..\..\GUI\notepad3\Notepad3.exe"
24 | "%~dp0..\..\GUI\notepad\Notepad3.exe"
25 | "%~dp0..\..\libexec\notepad3\Notepad3.exe"
26 | "%~dp0..\..\libexec\notepad\Notepad3.exe"
27 | ) do if exist "%%~ff" (
28 | set "np_fullpath=%%~ff"
29 | goto :EOF
30 | )
31 | echo:Notepad replacement not found>&2
32 | exit /b 1
33 |
34 |
35 | :np_install
36 | call :np_setup || goto :EOF
37 |
38 | reg add "%np_registry%" /v "Debugger" /t REG_SZ /d "\"%np_fullpath%\" /z" /f
39 | reg add "%np_registry%" /v "UseFilter" /t REG_DWORD /d 0x0 /f
40 | goto :EOF
41 |
42 |
43 | :np_uninstall
44 | reg delete "%np_registry%" /v "Debugger" /f
45 | reg add "%np_registry%" /v "UseFilter" /t REG_DWORD /d 0x1 /f
46 | goto :EOF
47 |
48 |
49 | :np_show
50 | reg query "%np_registry%" /s
51 | goto :EOF
52 |
53 |
--------------------------------------------------------------------------------
/etc/postinstall/notepad-txtfile.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | setlocal
4 |
5 | for %%f in ( "%~dp0..\..\GUI\notepad\Notepad3.exe" ) do set "np_path=%%~ff"
6 |
7 | set "np_root=HKEY_CURRENT_USER\Software\Classes"
8 | :: set "np_root=HKEY_CLASSES_ROOT"
9 |
10 | set "np_txtid=%np_root%\.txt\OpenWithProgids"
11 |
12 | set "np_appid=000000Notepad3"
13 |
14 | for %%p in ( install uninstall show ) do if /i "%~1" == "%%~p" goto :np_%%~p
15 |
16 | echo:Usage: %~n0 install^|uninstall^|show
17 | goto :EOF
18 |
19 | :np_install
20 | :: reg add "%np_txtid%" /v "%np_appid%" /t "REG_SZ" /d " " /f
21 | reg add "%np_txtid%" /v "%np_appid%" /t "REG_NONE" /d "" /f
22 | reg add "%np_root%\%np_appid%\shell\new\command" /ve /t REG_SZ /d "\"%np_path%\" /q \"%%1\"" /f
23 | reg add "%np_root%\%np_appid%\shell\open\command" /ve /t REG_SZ /d "\"%np_path%\" \"%%1\"" /f
24 | goto :EOF
25 |
26 | :np_uninstall
27 | reg delete "%np_txtid%" /v "%np_appid%" /f
28 | reg delete "%np_root%\%np_appid%" /f
29 | goto :EOF
30 |
31 | :np_show
32 | reg query "%np_txtid%" /s
33 | reg query "%np_root%\%np_appid%" /s
34 | goto :EOF
35 |
--------------------------------------------------------------------------------
/etc/postinstall/synaptics-middle-click.reg:
--------------------------------------------------------------------------------
1 | REGEDIT4
2 |
3 | [HKEY_CURRENT_USER\Software\Synaptics\SynTP\Defaults]
4 | "HasBothButtonFeature"=dword:00000001
5 |
6 |
--------------------------------------------------------------------------------
/etc/shell/cygwin.bat:
--------------------------------------------------------------------------------
1 | set "CHERE_INVOKING=1"
2 |
3 | call "%~dp0detect_winpty.bat" cygwin 64
4 |
--------------------------------------------------------------------------------
/etc/shell/detect_winpty.bat:
--------------------------------------------------------------------------------
1 | ::: Usage: detect_winpty ENV BIT
2 | :::
3 | ::: ENV - cygwin or msys
4 | ::: BIT - 32 or 64
5 |
6 | @echo off
7 |
8 | if "%~1" == "" (
9 | findstr "^:::" "%~f0"
10 | goto :EOF
11 | )
12 |
13 | for /f "tokens=* delims=" %%n in ( '
14 | dir /ad /o-n /b "%~dp0..\..\libexec\winpty*%~1*%~2"
15 | ' ) do for %%d in ( "%~dp0..\..\libexec\%%~n" ) do if exist "%%~d\bin\winpty.exe" (
16 | set "PATH=%PATH%;%%~d\bin"
17 | goto :EOF
18 | )
19 |
--------------------------------------------------------------------------------
/etc/shell/msys32.bat:
--------------------------------------------------------------------------------
1 | set "CHERE_INVOKING=1"
2 | set "MSYS2_PATH_TYPE=inherit"
3 |
4 | call "%~dp0detect_winpty.bat" msys2 32
5 |
--------------------------------------------------------------------------------
/etc/shell/msys64.bat:
--------------------------------------------------------------------------------
1 | set "CHERE_INVOKING=1"
2 | set "MSYS2_PATH_TYPE=inherit"
3 |
4 | call "%~dp0detect_winpty.bat" msys2 64
5 |
--------------------------------------------------------------------------------
/etc/xsrv/xsrv-multiwindow.xlaunch:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/home/.XWinrc:
--------------------------------------------------------------------------------
1 | # XWin Server Resource File - EXAMPLE
2 | # Earle F. Philhower, III
3 |
4 | # Place in ~/.XWinrc or in /etc/X11/system.XWinrc
5 |
6 | # Keywords are case insensitive, comments legal pretty much anywhere
7 | # you can have an end-of-line
8 |
9 | # Comments begin with "#" or "//" and go to the end-of-line
10 |
11 | # Menus are defined as...
12 | # MENU {
13 | #