Remove obsolete stuffs

This commit is contained in:
leokhoa
2025-10-05 17:33:37 +02:00
parent 71b1fe4850
commit 1c759708e4
15680 changed files with 4890893 additions and 139873 deletions

View File

@@ -0,0 +1,55 @@
-- Place this file into your %FARPROFILE%\Macros\scripts
-- When tab switching in ConEmu is configured to Ctrl+Number
-- this macro will help to use Ctrl+Number combinations
Macro
{
area="Shell";
key="/[LR]CtrlShift[0-9]/";
description="Panels: Switch panel modes with LCtrl+Shift+Number";
action = function()
-- BUG? Following is expected to be working, but it doesn't... Far Panels ignores LCtrl+key posted this way
-- Keys("LCtrl"..akey(1):sub(-1))
Keys("Ctrl"..akey(1):sub(-1))
-- it would be nice to have macro API
-- far.PanelControl(far.Flags.FCTL_SETVIEWMODE, mf.atoi(akey(1):sub(-1)))
end
}
Macro
{
area="Shell";
-- key="/RCtrlShift[0-9]/";
description="Panels: No action";
action = function()
return
end
}
Macro
{
area="Editor Viewer";
key="/RCtrlShift[0-9]/";
description="Editor: Set std.bookmark with RCtrl+Shift+Number +++";
action = function()
-- Extend std.bookmarks with stack bookmarks
BM.Add()
-- And set new std.bookmark
Keys("CtrlShift"..akey(1):sub(-1))
end
}
Macro
{
area="Editor Viewer";
key="/RCtrl[0-9]/";
description="Editor: Jump to std.bookmark with RCtrl+Number";
action = function()
-- Store previous position in stack bookmarks
BM.Add()
-- And jump to std.bookmark
Keys("Ctrl"..akey(1):sub(-1))
end
}

View File

@@ -0,0 +1,58 @@
-- Place this file into your %FARPROFILE%\Macros\scripts
-- Show output of last console command
-- Checkbox 'Long console output' must be checked in
-- ConEmu Settings -> Features
-- OpenType=1 - Open in editor, OpenType=2 - Open in viewer
local OpenType = 1
local ConEmu = "4b675d80-1d4a-4ea9-8436-fdc23f2fc14b"
Macro
{
area="Shell";
key="CtrlO";
flags="NoSendKeysToPlugins";
description="ConEmu: Show console output in editor";
action = function()
Plugin.Call(ConEmu,OpenType) Keys("CtrlEnd")
end;
}
-- Area="Editor.'CEM*.tmp'"
-- Area="Viewer.'CEM*.tmp'"
Macro
{
area="Editor Viewer";
key="CtrlO";
flags="NoSendKeysToPlugins";
description="ConEmu: Return to panels from console output";
condition = function(Key)
-- Only our temp files: "CEM*.tmp"
if Area.Editor then f=Editor.FileName; else f=Viewer.FileName; end
return (mf.lcase(mf.fsplit(f,8))==".tmp" and mf.ucase(mf.substr(mf.fsplit(f,4),0,3))=="CEM")
end;
action = function()
-- Close
Keys("F10")
-- Skip save confirmation
if Area.Dialog and Dlg.Id=="F776FEC0-50F7-4E7E-BDA6-2A63F84A957B" then
Keys("Right Enter")
end
end;
}
Macro
{
area="Shell";
key="CtrlAltO";
flags="NoSendKeysToPlugins";
description="Hide/Show panels (standard FAR CtrlO)";
action = function()
Keys("CtrlO")
end;
}

View File

@@ -0,0 +1,19 @@
-- Place this file into your %FARPROFILE%\Macros\scripts
-- Switch visibility of tab/toolbar panel.
-- Look at 'Enable Tabs' checkbox in ConEmu Settings -> Tabs
local ConEmu = "4b675d80-1d4a-4ea9-8436-fdc23f2fc14b"
Macro
{
area="";
key="CtrlShiftT";
flags="";
description="ConEmu: Switch tabs visibility";
action = function()
Plugin.Call(ConEmu,3)
end;
}

View File

@@ -0,0 +1,61 @@
-- Place this file into your %FARPROFILE%\Macros\scripts
-- Several Far instances may be opened in ConEmu tabs.
-- This macro activates existing Editor/Viewer, wich
-- may be opened in then inactive instance of Far.
local ConEmu = "4b675d80-1d4a-4ea9-8436-fdc23f2fc14b"
Macro
{
area="Shell Search";
key="F3 F4";
flags="NoPluginPanels";
description="ConEmu: Auto switch to Editor Tab";
condition = function(Key)
return (not APanel.Empty and (APanel.Current~=".."));
end;
action = function()
k = akey(1,1);
s=APanel.Path;
s=s..mf.iif(mf.substr(s,mf.len(s)-1)=="\\","","\\")..APanel.Current;
--msgbox("Current item", s)
c = mf.substr(k,mf.len(k)-1,1);
cmd = mf.iif(c=="4","FindEditor:","FindViewer:")..s;
r = Plugin.SyncCall(ConEmu,cmd);
--msgbox("EditOpen result", "Plugin.SyncCall="..r)
if r then
if mf.substr(r,0,5)=="Found" then
exit() -- OK
elseif mf.substr(r,0,6)=="Active" then
iWnd = mf.atoi(mf.substr(r,7),10)+101
Plugin.SyncCall(ConEmu,iWnd);
Plugin.SyncCall(ConEmu,100);
exit() -- Ok
elseif r=="Blocked" then
-- msgbox("ConEmu macro","Tab can't be activated now\n"..spname);
end
end
-- history.enable(0xF) ?
-- Do the F3/F4 key press
Keys(k)
-- As we get here, Far will try to open viewer or editor window.
-- But, it may be already opened in the current Far instance.
-- When it's exists, Far show messagebox with confirmation and buttons:
-- { Current } [ New instance ] [ Reload ]
-- Next macro line depress { Current } button
if Area.Dialog and Dlg.Id=="AFDAD388-494C-41E8-BAC6-BBE9115E1CC0" then
if Dlg.ItemCount==7 and Dlg.CurPos==5 and Dlg.ItemType==7 then
Keys("Enter")
end
end
end;
}

View File

@@ -0,0 +1,32 @@
-- Place this file into your %FARPROFILE%\Macros\scripts
-- Note! This is just an example of calling GuiMacro from Far Manager
-- Note! Ctrl+Wheel may be already binded in ConEmu Keys&Macro settings
-- Increase/decrease font size in ConEmu window with Ctrl+Wheel
local ConEmu = "4b675d80-1d4a-4ea9-8436-fdc23f2fc14b"
Macro
{
area="Common";
key="AltMsWheelUp";
flags="";
description="ConEmu: Increase ConEmu font size";
action = function()
Plugin.Call(ConEmu,"FontSetSize(1,2)")
end;
}
Macro
{
area="Common";
key="AltMsWheelDown";
flags="";
description="ConEmu: Decrease ConEmu font size";
action = function()
Plugin.Call(ConEmu,"FontSetSize(1,-2)")
end;
}

View File

@@ -0,0 +1,20 @@
-- Place this file into your %FARPROFILE%\Macros\scripts
-- Show all windows list from all consoles
-- May be useful when you want to copy a file(s) from one Far panel
-- to another folder from another Far instance
local ConEmu = "4b675d80-1d4a-4ea9-8436-fdc23f2fc14b"
Macro
{
area="Dialog Editor";
key="ShiftF11";
flags="";
description="ConEmu: Show all panels/dirs from all consoles";
action = function()
Plugin.Call(ConEmu,11)
end
}

View File

@@ -0,0 +1,136 @@
-- Place this file into your %FARPROFILE%\Macros\scripts
-- Run 'File under cursor' or 'Command line' in new console of ConEmu.
-- 'Press enter to close console' will be displayed after command completion.
-- Note! If you want to disable this confirmation,
-- set 'DisableCloseConfirm = true'
local DisableCloseConfirm = false
-- AltEnter - run command and activate new ConEmu tab
-- Note! You must enable "Alt+Enter" option in ConEmu Settings->Keys.
-- ShiftEnter - run command in background ConEmu tab
-- Note! If you want to activate new tab on ShiftEnter,
-- set 'UseBackgroundTab = false'
local UseBackgroundTab = true
-- While starting command in background tab, there may be a flicker on panels.
-- If you want to disable flicker, set 'DisableFlicker = true'.
-- Note! ConEmu plugin reqired for 'DisableFlicker = true'.
local DisableFlicker = false
-- Descr="Run <File under cursor> or <Command line> in new console of ConEmu"
-- Key="ShiftEnter AltEnter"
-- Area="Shell Search ShellACompl"
Macro
{
area="Shell Search ShellAutoCompletion";
key="ShiftEnter AltEnter";
flags="NoSendKeysToPlugins";
description="ConEmu: Run <File under cursor> or <Command line> in new console of ConEmu";
action = function()
-- history.enable(0xff)
add = " -new_console"
if akey(1,1)=="ShiftEnter" and UseBackgroundTab then
add = add .. ":b";
if DisableCloseConfirm then
add = add .. ":n";
end
else
-- AltEnter creates foreground console(tab)
if DisableCloseConfirm then
add = add .. ":n";
end
--add = add .. ":s40V"; -- split vertically for example
end
oldcmd = "";
if Area.ShellAutoCompletion then
Keys("Esc") -- close autocompletion
else
if Area.Search then
-- Save and clear command line - about to execute panel(!) item
oldcmd = CmdLine.Value; oldpos = CmdLine.CurPos;
Keys("Esc Esc") -- First - close search, second - clear command line
end
end
if not CmdLine.Empty then
-- already closed
--if Area.Current=="Shell.AutoCompletion" then
-- Keys("Esc") -- Close autocompletion
--end
if CmdLine.Value=="." or CmdLine.Value==".." or CmdLine.Value=="..." then
Keys("ShiftEnter")
exit()
else
--if Area.Current=="Shell.AutoCompletion" then
-- Keys("Del") -- Remove autocompletion selection
--end
-- CtrlEnd - fails, because of AutoCompletion
-- Just move the cursor to the end of command line
for RCounter=CmdLine.ItemCount,1,-1 do Keys("CtrlD") end
-- Append "-new_console" if not exists
if mf.index(CmdLine.Value,"-new_console")<0 then
print(add)
end
end
elseif APanel.FilePanel and not APanel.Plugin and not APanel.Empty and not APanel.Folder and mf.len(APanel.Current)>4 then
-- The command line was empty
-- Get the list of "executable" extensions
exec = mf.ucase(mf.env("PATHEXT"));
if exec=="" then exec = ".COM;.EXE;.BAT;.CMD"; end
-- And compare them to current panel item
ext = mf.ucase(mf.fsplit(APanel.Current,8));
if ext~="" and mf.index(";"..exec..";",";"..ext..";")>=0 then
Keys("CtrlEnter")
--Keys("Del") -- Remove possible autocompletion selection
-- Append "-new_console"
print(add)
else
if akey(1,1)=="ShiftEnter" then
Keys("ShiftEnter")
end
exit()
end
else
if akey(1,1)=="ShiftEnter" then
Keys("ShiftEnter")
end
exit()
end
--Keys("Del") -- Remove possible autocompletion selection
if DisableFlicker and Plugin.Call("4B675D80-1D4A-4EA9-8436-FDC23F2FC14B","IsConEmu") then
for RCounter=CmdLine.ItemCount,1,-1 do Keys("CtrlS") end
print("ConEmu:run:")
end
Keys("Enter") -- Execute
-- Restore old command line state (running file from Panel in QSearch mode)
if oldcmd ~= "" then
print(oldcmd)
if oldpos>=1 and oldpos<=CmdLine.ItemCount then
Keys("CtrlHome")
for RCounter=oldpos-1,1,-1 do Keys("CtrlD") end
end
end
end
}

View File

@@ -0,0 +1,31 @@
-- Place this file into your %FARPROFILE%\Macros\scripts
-- Show all windows list from all consoles
local ConEmu = "4b675d80-1d4a-4ea9-8436-fdc23f2fc14b"
Macro
{
area="Shell QView Info Tree Search Dialog Editor Viewer";
key="F12";
flags="NoSendKeysToPlugins";
description="ConEmu: Show all windows list from all consoles";
action = function()
if Plugin.Menu(ConEmu) then
Keys("T")
end
end
}
Macro
{
area="Shell QView Info Tree Search Dialog Editor Viewer";
key="CtrlShiftF12";
flags="NoSendKeysToPlugins";
description="ConEmu: Standard Far windows list";
action = function()
Keys("F12")
end
}

View File

@@ -0,0 +1,41 @@
-- Place this file into your %FARPROFILE%\Macros\scripts
-- Switch visibility of ConEmu Panel Views
-- You may customize Panel Views display in ConEmu Settings -> Views
local ConEmuTh = "bd454d48-448e-46cc-909d-b6cf789c2d65"
Macro
{
area="Shell";
key="CtrlShiftF1";
flags="";
description="ConEmu: Switch Thumbnails view on active panel";
action = function()
Plugin.Call(ConEmuTh,1)
end
}
Macro
{
area="Shell";
key="CtrlShiftF2";
flags="";
description="ConEmu: Switch Tiles view on active panel";
action = function()
Plugin.Call(ConEmuTh,2)
end
}
Macro
{
area="Shell";
--key="CtrlAltF2";
flags="";
description="ConEmu: Turn off Tiles or Thumbnails on active panel";
action = function()
Plugin.Call(ConEmuTh,256)
end
}

View File

@@ -0,0 +1,72 @@
-- Place this file into your %FARPROFILE%\Macros\scripts
-- This macros was created to simplify Far Editor usage on tablets
-- Mapped to MsRClick (or long tap on tablets) it will show menu
-- ┌───────────────────────┐
-- │ Copy whole line │
-- │ Copy single word │
-- │ Paste from clipboard │
-- └───────────────────────┘
Macro
{
area="Dialog Editor";
key="MsRClick";
flags="";
description="ConEmu: Clipboard actions menu";
action = function()
CopyLine="Copy whole line";
CopyWord="Copy single word";
Paste="Paste from clipboard";
if Area.Editor then
Keys("MsLClick CtrlU") Keys("SelWord")
else
dx=Dlg.GetValue(0,2); dy=Dlg.GetValue(0,3); c=Dlg.GetValue(0,0);
if c<1 then exit() end
i=1;
while i<=c do
t=Dlg.GetValue(i,1);
if t==4 or t==6 then
f=Dlg.GetValue(i,8);
if not (band(f,0xD0000000)) then
if (dy+Dlg.GetValue(i,3))==Mouse.Y then
if ((dx+Dlg.GetValue(i,2))<=Mouse.X) and ((dx+Dlg.GetValue(i,4))>=Mouse.X) then
Dlg.SetFocus(i)
c=0;
end
end
end
end
i=i+1;
end
if c~=0 then
Keys("MsRClick") exit()
end
end
Menu__RENAMED=CopyLine.."\n";
if Editor.SelValue~="" then
Menu__RENAMED=Menu__RENAMED..CopyWord.."\n";
end
Menu__RENAMED=Menu__RENAMED..Paste;
s = Menu.Show(Menu__RENAMED,"",0x3,"",Mouse.X,Mouse.Y+1);
if s=="" then exit() end
if s==CopyLine then
if Area.Dialog then Keys("Home") else Editor.Pos(1,2,1) end Keys("ShiftEnd")
Keys("CtrlIns") exit()
end
if s==CopyWord then
Keys("CtrlIns") exit()
end
if s==Paste then
Keys("ShiftIns") exit()
end
end
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Description.
This Far TechInfo's replace key bar label for macroses from ConEmu.Thumbnails.lua
CtrlShiftF1 - switches Thumbnails view, CtrlShiftF2 - Tiles view
Use: "%FARHOME%\Far.exe" /import Thumbnails_KeyBar.farconfig
-->
<farconfig version="3.0.2102">
<generalconfig>
<setting key="KeyBarLabels.English.Shell" name="CtrlShiftF1" type="text" value="Thumb" />
<setting key="KeyBarLabels.English.Shell" name="CtrlShiftF2" type="text" value="Tiles" />
<setting key="KeyBarLabels.Russian.Shell" name="CtrlShiftF1" type="text" value="Эскиз" />
<setting key="KeyBarLabels.Russian.Shell" name="CtrlShiftF2" type="text" value="Плитка" />
</generalconfig>
</farconfig>