├── LICENSE ├── README.md ├── bin ├── cdg.bat ├── cdr.bat ├── cdz.bat ├── draft │ ├── d.bat │ ├── f.bat │ └── ff.bat ├── gc.bat ├── gcr.bat ├── gfx.bat ├── gm.bat ├── iresize.bat ├── r.bat ├── vimd.bat └── vimf.bat ├── config ├── cdz.lua ├── powerline_git.lua └── powerline_prompt.lua └── docs ├── cdg.gif ├── cdr.gif ├── cdz.gif ├── gc.gif └── powerline.png /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Tadashi Aikawa 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Owl Cmder Tools 2 | =============== 3 | 4 | Support tools for cmder 🦉 5 | 6 | 7 | Prerequirements 8 | --------------- 9 | 10 | * [Cmder](http://cmder.net/) 11 | * Use `cmd.exe` (Not bash!) 12 | 13 | 14 | Amazing powerline 15 | ----------------- 16 | 17 | ![Image](./docs/powerline.png) 18 | 19 | ### Prerequirements 20 | 21 | * [AmrEldib/cmder-powerline-prompt](https://github.com/AmrEldib/cmder-powerline-prompt) 22 | 23 | ### Install 24 | 25 | Copy `config/powerline_git.lua` to `%cmder_root%/config/` 26 | 27 | 28 | Always show home directory as `~` 29 | --------------------------------- 30 | 31 | ### Install 32 | 33 | Copy `config/powerline_prompt.lua` to `%cmder_root%/config/` 34 | 35 | 36 | Useful commands 37 | --------------- 38 | 39 | ### Prerequirements 40 | 41 | * Add `bin` to your Path environment variable 42 | * Install some tools 43 | 44 | | Command | Required Tools | Advanced settings | 45 | | ------- | --------------------------- | ----------------------------------------------- | 46 | | cdg | [fzf], [gowl] | | 47 | | cdr | [fzf], [fd] | | 48 | | cdz | [fzf] | Copy `config/cdz.lua` to `%cmder_root%/config/` | 49 | | gc | [fzf] | | 50 | | gcr | [fzf] | | 51 | | r | [fzf] | | 52 | | vimd | [fzf], [fd] | | 53 | | vimf | [fzf], [fd] | | 54 | | iresize | [IrfanView] (64bit version) | | 55 | 56 | [fd]: https://github.com/sharkdp/fd 57 | [fzf]: https://github.com/junegunn/fzf 58 | [gowl]: https://github.com/tadashi-aikawa/gowl 59 | [IrfanView]: https://www.irfanview.net 60 | 61 | ### cdg 62 | 63 | Move to git repositories with interactive fzf interface. 64 | 65 | ![Image](./docs/cdg.gif) 66 | 67 | 68 | ### cdr 69 | 70 | Move to under the current directory with interactive fzf interface. 71 | 72 | ![Image](./docs/cdr.gif) 73 | 74 | 75 | ### cdz 76 | 77 | Move to the directory visited recently with interactive fzf interface. 78 | 79 | ![Image](./docs/cdz.gif) 80 | 81 | 82 | ### gc 83 | 84 | Checkout local branch with interactive fzf interface. (git) 85 | 86 | ![Image](./docs/gc.gif) 87 | 88 | 89 | ### gcr 90 | 91 | Checkout remote branch with interactive fzf interface. (git) 92 | 93 | ### r 94 | 95 | Search history with interactive fzf interface. 96 | 97 | ### vimd 98 | 99 | Open a directory under the current ones by vim with interactive fzf interface. 100 | 101 | ### vimf 102 | 103 | Open files under the current directory by vim with interactive fzf interface. 104 | 105 | ### iresize 106 | 107 | Resize images. 108 | 109 | When you have `sample1.png` and `sample2.png` which sizes are `w480*h360`, and if you execute the following commands... then 110 | 111 | | Command | Result | 112 | | ------------------------- | ------------------------------------------------------------------ | 113 | | `iresize 240 sample1.png` | Change size of `sample1.png`to `w240*h180` | 114 | | `iresize 240 *.png` | Change size both of `sample1.png` and `sample2.png` to `w240*h180` | 115 | | `iresize 1280 *.png` | Nothing to change | 116 | -------------------------------------------------------------------------------- /bin/cdg.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if "%~1" == "" ( 4 | set word=".*" 5 | ) else ( 6 | set word=%~1 7 | ) 8 | 9 | FOR /F "usebackq" %%t IN (`gowl list ^| grep -iE %word% ^| fzf --select-1`) DO @cd %%t 10 | -------------------------------------------------------------------------------- /bin/cdr.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if "%~1" == "" ( 4 | set word=".*" 5 | ) else ( 6 | set word=%~1 7 | ) 8 | 9 | FOR /F "usebackq" %%t IN (`fd -t d -pL ^| grep -iE %word% ^| fzf --select-1`) DO cd %%t 10 | -------------------------------------------------------------------------------- /bin/cdz.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if "%~1" == "" ( 4 | set word=".*" 5 | ) else ( 6 | set word=%~1 7 | ) 8 | 9 | FOR /F "usebackq" %%t IN (`tac %home%/.cdz ^| grep -iE %word% ^| awk '!a[$0]++' ^| fzf --no-sort --select-1`) DO @cd %%t 10 | -------------------------------------------------------------------------------- /bin/draft/d.bat: -------------------------------------------------------------------------------- 1 | @FOR /F "usebackq" %%t IN (`fd -t d -pL ^ 2 | ^| grep -Ev "^(\.|vendor|node_modules)" ^ 3 | ^| fzf`) DO %* %%t 4 | -------------------------------------------------------------------------------- /bin/draft/f.bat: -------------------------------------------------------------------------------- 1 | @FOR /F "usebackq" %%t IN (`fd -t f -t l -pL ^ 2 | ^| grep -Ev "^\./(\.|vendor|node_modules)" ^ 3 | ^| fzf`) DO %* %%t 4 | -------------------------------------------------------------------------------- /bin/draft/ff.bat: -------------------------------------------------------------------------------- 1 | set word=%~1 2 | set command=%2 %3 %4 %5 %6 %7 %8 %9 3 | @FOR /F "usebackq" %%t IN (`fd -t f -t l %word% -pL ^ 4 | ^| grep -Ev "^\./(\.|vendor|node_modules)" ^ 5 | ^| fzf`) DO %command% %%t 6 | -------------------------------------------------------------------------------- /bin/gc.bat: -------------------------------------------------------------------------------- 1 | @FOR /F "usebackq" %%t IN (`git branch -l ^ 2 | ^| grep -vE '^\*' ^ 3 | ^| awk '{print $1}' ^ 4 | ^| fzf`) DO git checkout %%t 5 | -------------------------------------------------------------------------------- /bin/gcr.bat: -------------------------------------------------------------------------------- 1 | @FOR /F "usebackq" %%t IN (`git branch -rl ^ 2 | ^| grep -vE "HEAD|master" ^ 3 | ^| awk '{print $1}' ^ 4 | ^| sed -r 's@origin/@@g' ^ 5 | ^| fzf`) DO git checkout -b %%t origin/%%t 6 | 7 | -------------------------------------------------------------------------------- /bin/gfx.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tadashi-aikawa/owl-cmder-tools/e300cc8b44ed371301795293d7ba39ca28f9ef4c/bin/gfx.bat -------------------------------------------------------------------------------- /bin/gm.bat: -------------------------------------------------------------------------------- 1 | @FOR /F "usebackq" %%t IN (`git branch -l ^ 2 | ^| grep -vE '^\*' ^ 3 | ^| tr -d " " ^ 4 | ^| fzf`) DO git merge --no-ff %%t 5 | -------------------------------------------------------------------------------- /bin/iresize.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | 4 | set PX=%~1 5 | ( 6 | echo [Batch] 7 | echo AdvCanvas=0 8 | echo AdvNoEnlarge=1 9 | echo AdvResample=1 10 | echo AdvResize=1 11 | echo AdvResizeOpt=1 12 | echo AdvResizeRatio=1 13 | echo AdvResizeL=%PX% 14 | echo AdvSaveOldDate=1 15 | echo UseAdvanced=1 16 | echo\ 17 | echo [PNG] 18 | echo SavePNGTransp=0 19 | echo SavePNGAlpha=0 20 | echo PngWndColor=1 21 | echo PngOut=0 22 | echo CompressionLevel=6 23 | echo\ 24 | echo [JPEG] 25 | echo KeepCom=1 26 | echo KeepExif=1 27 | echo KeepIptc=1 28 | echo KeepQuality=1 29 | echo KeepXmp=1 30 | echo Save Progressive=1 31 | echo Save Quality=95 32 | ) >"%Temp%\i_view64.ini" 33 | 34 | set /A ARGI=1 35 | for %%f in (%*) do ( 36 | if !ARGI! GTR 1 ( 37 | "C:\Program Files\IrfanView\i_view64.exe" %%f /ini="%Temp%" /advancedbatch /convert=%%f 38 | ) 39 | set /A ARGI=ARGI+1 40 | ) 41 | 42 | del "%Temp%\i_view64.ini" 43 | -------------------------------------------------------------------------------- /bin/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if "%~1" == "" ( 4 | set word=".*" 5 | ) else ( 6 | set word=%~1 7 | ) 8 | 9 | FOR /F "tokens=* usebackq" %%t IN (`tac %cmder_root%/config/.history ^ 10 | ^| grep -iE %word% ^ 11 | ^| fzf --no-sort`) DO %cmder_root%\vendor\git-for-windows\usr\bin\echo.exe -n '%%t' | clip 12 | 13 | -------------------------------------------------------------------------------- /bin/vimd.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if "%~1" == "" ( 4 | set word=".*" 5 | ) else ( 6 | set word=%~1 7 | ) 8 | 9 | FOR /F "usebackq" %%t IN (`fd -t d -t l %word% -pL ^ 10 | ^| grep -iE %word% ^ 11 | ^| fzf`) DO vim %%t 12 | -------------------------------------------------------------------------------- /bin/vimf.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if "%~1" == "" ( 4 | set word=".*" 5 | ) else ( 6 | set word=%~1 7 | ) 8 | 9 | FOR /F "usebackq" %%t IN (`fd -t f -t l %word% -pL ^ 10 | ^| grep -iE %word% ^ 11 | ^| fzf -m`) DO vim %%t 12 | -------------------------------------------------------------------------------- /config/cdz.lua: -------------------------------------------------------------------------------- 1 | local function init() 2 | os.execute("cd >> %home%/.cdz") 3 | end 4 | 5 | -- Register this addon with Clink 6 | clink.prompt.register_filter(init, 66) 7 | 8 | os.execute("tac %home%/.cdz | awk '!a[$0]++' | tac | tail -1000 > .cdz.tmp") 9 | os.execute("mv .cdz.tmp %home%/.cdz") -------------------------------------------------------------------------------- /config/powerline_git.lua: -------------------------------------------------------------------------------- 1 | -- Constants 2 | local segmentColors = { 3 | clean = { 4 | fill = colorGreen, 5 | text = colorWhite 6 | }, 7 | conflict = { 8 | fill = colorYellow, 9 | text = colorWhite 10 | }, 11 | dirtyLocal = { 12 | fill = colorRed, 13 | text = colorWhite 14 | }, 15 | dirtyStaged = { 16 | fill = colorMagenta, 17 | text = colorWhite 18 | }, 19 | dirtyRemote = { 20 | fill = colorCyan, 21 | text = colorWhite 22 | } 23 | } 24 | 25 | function get_git_branch(git_dir) 26 | git_dir = git_dir or get_git_dir() 27 | 28 | -- If git directory not found then we're probably outside of repo 29 | -- or something went wrong. The same is when head_file is nil 30 | local head_file = git_dir and io.open(git_dir..'/HEAD') 31 | if not head_file then return end 32 | 33 | local HEAD = head_file:read() 34 | head_file:close() 35 | 36 | -- if HEAD matches branch expression, then we're on named branch 37 | -- otherwise it is a detached commit 38 | local branch_name = HEAD:match('ref: refs/heads/(.+)') 39 | 40 | return branch_name or 'HEAD detached at '..HEAD:sub(1, 7) 41 | end 42 | 43 | function get_git_status() 44 | local file = io.popen("git --no-optional-locks status --porcelain | cut -c-2 | c:\\tools\\Cmder\\vendor\\git-for-windows\\usr\\bin\\sort | uniq -c 2>nul") 45 | local add, add_staged, modify, modify_staged, delete, delete_staged, rename, unknown = 0, 0, 0, 0, 0, 0, 0, 0 46 | for line in file:lines() do 47 | num, kindStaged, kind = string.match(line, ".+(%d+) (.)(.)") 48 | if kind == "A" then 49 | add = add + num 50 | elseif kind == "M" then 51 | modify = modify + num 52 | elseif kind == "D" then 53 | delete = delete + num 54 | elseif kind == "?" then 55 | unknown = unknown + num 56 | end 57 | 58 | if kindStaged == "A" then 59 | add_staged = add_staged + num 60 | elseif kindStaged == "M" then 61 | modify_staged = modify_staged + num 62 | elseif kindStaged == "D" then 63 | delete_staged = delete_staged + num 64 | elseif kindStaged == "R" then 65 | rename = rename + num 66 | end 67 | end 68 | file:close() 69 | 70 | return add, add_staged, modify, modify_staged, delete, delete_staged, rename, unknown 71 | end 72 | 73 | 74 | function git_ahead_behind_module() 75 | local file = io.popen("git rev-list --count --left-right @{upstream}...HEAD 2>nul") 76 | local ahead, behind = "0", "0" 77 | for line in file:lines() do 78 | ahead, behind = string.match(line, "(%d+).+(%d+)") 79 | end 80 | file:close() 81 | 82 | return ahead, behind 83 | end 84 | 85 | function get_git_conflict() 86 | local file = io.popen("git diff --name-only --diff-filter=U 2>nul") 87 | for line in file:lines() do 88 | file:close() 89 | return true; 90 | end 91 | file:close() 92 | return false 93 | end 94 | 95 | local segment = { 96 | isNeeded = false, 97 | text = "", 98 | textColor = 0, 99 | fillColor = 0 100 | } 101 | local segmentStaged = { 102 | isNeeded = false, 103 | text = "", 104 | textColor = 0, 105 | fillColor = 0 106 | } 107 | local segmentRemote = { 108 | isNeeded = false, 109 | text = "", 110 | textColor = 0, 111 | fillColor = 0 112 | } 113 | 114 | --- 115 | -- Sets the properties of the Segment object, and prepares for a segment to be added 116 | --- 117 | local function init() 118 | segment.isNeeded = get_git_dir() 119 | segmentStaged.isNeeded = false 120 | segmentRemote.isNeeded = false 121 | 122 | if not segment.isNeeded then 123 | return 124 | end 125 | 126 | local branch = get_git_branch(git_dir) 127 | if not branch then 128 | return 129 | end 130 | 131 | local add, add_staged, modify, modify_staged, delete, delete_staged, rename, unknown = get_git_status() 132 | local ahead, behind = git_ahead_behind_module() 133 | local gitConflict = get_git_conflict() 134 | 135 | -- Local 136 | segment.text = " "..plc_git_branchSymbol.." "..branch.." " 137 | segment.textColor = segmentColors.clean.text 138 | segment.fillColor = segmentColors.clean.fill 139 | 140 | if gitConflict then 141 | segment.textColor = segmentColors.conflict.text 142 | segment.fillColor = segmentColors.conflict.fill 143 | if plc_git_conflictSymbol then 144 | segment.text = segment.text..plc_git_conflictSymbol 145 | end 146 | return 147 | end 148 | if add ~= 0 then 149 | segment.textColor = segmentColors.dirtyLocal.text 150 | segment.fillColor = segmentColors.dirtyLocal.fill 151 | segment.text = segment.text.."+"..add.." " 152 | end 153 | if modify ~= 0 then 154 | segment.textColor = segmentColors.dirtyLocal.text 155 | segment.fillColor = segmentColors.dirtyLocal.fill 156 | segment.text = segment.text.."*"..modify.." " 157 | end 158 | if delete ~= 0 then 159 | segment.textColor = segmentColors.dirtyLocal.text 160 | segment.fillColor = segmentColors.dirtyLocal.fill 161 | segment.text = segment.text.."-"..delete.." " 162 | end 163 | if unknown ~= 0 then 164 | segment.textColor = segmentColors.dirtyLocal.text 165 | segment.fillColor = segmentColors.dirtyLocal.fill 166 | segment.text = segment.text.."?"..unknown.." " 167 | end 168 | 169 | segmentStaged.isNeeded = add_staged ~= 0 or modify_staged ~= 0 or delete_staged ~= 0 or rename ~= 0 170 | if segmentStaged.isNeeded then 171 | -- Staged 172 | segmentStaged.text = " ↗ " 173 | segmentStaged.textColor = segmentColors.clean.text 174 | segmentStaged.fillColor = segmentColors.clean.fill 175 | if add_staged ~= 0 then 176 | segmentStaged.textColor = segmentColors.dirtyStaged.text 177 | segmentStaged.fillColor = segmentColors.dirtyStaged.fill 178 | segmentStaged.text = segmentStaged.text.."+"..add_staged.." " 179 | end 180 | if modify_staged ~= 0 then 181 | segmentStaged.textColor = segmentColors.dirtyStaged.text 182 | segmentStaged.fillColor = segmentColors.dirtyStaged.fill 183 | segmentStaged.text = segmentStaged.text.."*"..modify_staged.." " 184 | end 185 | if delete_staged ~= 0 then 186 | segmentStaged.textColor = segmentColors.dirtyStaged.text 187 | segmentStaged.fillColor = segmentColors.dirtyStaged.fill 188 | segmentStaged.text = segmentStaged.text.."-"..delete_staged.." " 189 | end 190 | if rename ~= 0 then 191 | segmentStaged.textColor = segmentColors.dirtyStaged.text 192 | segmentStaged.fillColor = segmentColors.dirtyStaged.fill 193 | segmentStaged.text = segmentStaged.text.."🎃"..rename.." " 194 | end 195 | end 196 | 197 | -- Remote 198 | segmentRemote.isNeeded = ahead ~= "0" or behind ~= "0" 199 | if segmentRemote.isNeeded then 200 | segmentRemote.text = " ☁ " 201 | segmentRemote.textColor = segmentColors.clean.text 202 | segmentRemote.fillColor = segmentColors.clean.fill 203 | if ahead ~= "0" then 204 | segmentRemote.textColor = segmentColors.dirtyRemote.text 205 | segmentRemote.fillColor = segmentColors.dirtyRemote.fill 206 | segmentRemote.text = segmentRemote.text.."↓"..ahead.." " 207 | end 208 | if behind ~= "0" then 209 | segmentRemote.textColor = segmentColors.dirtyRemote.text 210 | segmentRemote.fillColor = segmentColors.dirtyRemote.fill 211 | segmentRemote.text = segmentRemote.text.."↑"..behind.." " 212 | end 213 | end 214 | end 215 | 216 | --- 217 | -- Uses the segment properties to add a new segment to the prompt 218 | --- 219 | local function addAddonSegment() 220 | init() 221 | if segment.isNeeded then 222 | addSegment(segment.text, segment.textColor, segment.fillColor) 223 | end 224 | if segmentStaged.isNeeded then 225 | addSegment(segmentStaged.text, segmentStaged.textColor, segmentStaged.fillColor) 226 | end 227 | if segmentRemote.isNeeded then 228 | addSegment(segmentRemote.text, segmentRemote.textColor, segmentRemote.fillColor) 229 | end 230 | end 231 | 232 | clink.prompt.register_filter(addAddonSegment, 61) 233 | -------------------------------------------------------------------------------- /config/powerline_prompt.lua: -------------------------------------------------------------------------------- 1 | -- Configurations 2 | --- plc_prompt_type is whether the displayed prompt is the full path or only the folder name 3 | -- Use: 4 | -- "full" for full path like C:\Windows\System32 5 | local promptTypeFull = "full" 6 | -- "folder" for folder name only like System32 7 | local promptTypeFolder = "folder" 8 | -- "smart" to switch in git repo to folder name instead of full path 9 | local promptTypeSmart = "smart" 10 | 11 | -- default is promptTypeFull 12 | -- Set default value if no value is already set 13 | if not plc_prompt_type then 14 | plc_prompt_type = promptTypeFull 15 | end 16 | if not plc_prompt_useHomeSymbol then 17 | plc_prompt_useHomeSymbol = true 18 | end 19 | 20 | -- Extracts only the folder name from the input Path 21 | -- Ex: Input C:\Windows\System32 returns System32 22 | --- 23 | local function get_folder_name(path) 24 | local reversePath = string.reverse(path) 25 | local slashIndex = string.find(reversePath, "\\") 26 | return string.sub(path, string.len(path) - slashIndex + 2) 27 | end 28 | 29 | -- * Segment object with these properties: 30 | ---- * isNeeded: sepcifies whether a segment should be added or not. For example: no Git segment is needed in a non-git folder 31 | ---- * text 32 | ---- * textColor: Use one of the color constants. Ex: colorWhite 33 | ---- * fillColor: Use one of the color constants. Ex: colorBlue 34 | local segment = { 35 | isNeeded = true, 36 | text = "", 37 | textColor = colorWhite, 38 | fillColor = colorBlue 39 | } 40 | 41 | --- 42 | -- Sets the properties of the Segment object, and prepares for a segment to be added 43 | --- 44 | local function init() 45 | -- fullpath 46 | cwd = clink.get_cwd() 47 | 48 | -- show just current folder 49 | if plc_prompt_type == promptTypeFolder then 50 | cwd = get_folder_name(cwd) 51 | else 52 | -- show 'smart' folder name 53 | -- This will show the full folder path unless a Git repo is active in the folder 54 | -- If a Git repo is active, it will only show the folder name 55 | -- This helps users avoid having a super long prompt 56 | local git_dir = get_git_dir() 57 | -- a = cwd 58 | -- b = clink.get_env("HOME") 59 | homedir = string.gsub(clink.get_env("HOME"), "%-", "%%-") 60 | if plc_prompt_useHomeSymbol and string.find(cwd, homedir) then 61 | -- in both smart and full if we are in home, behave like a proper command line 62 | cwd = string.gsub(cwd, homedir, plc_prompt_homeSymbol) 63 | end 64 | if git_dir == nil then 65 | -- either not in home or home not supported then check the smart path 66 | if plc_prompt_type == promptTypeSmart then 67 | if git_dir then 68 | cwd = get_folder_name(cwd) 69 | if plc_npm_gitSymbol then 70 | cwd = gitSymbol.." "..cwd 71 | end 72 | end 73 | -- if not git dir leave the full path 74 | end 75 | end 76 | end 77 | 78 | segment.text = " "..cwd.." " 79 | end 80 | 81 | --- 82 | -- Uses the segment properties to add a new segment to the prompt 83 | --- 84 | local function addAddonSegment() 85 | init() 86 | addSegment(segment.text, segment.textColor, segment.fillColor) 87 | end 88 | 89 | -- Register this addon with Clink 90 | clink.prompt.register_filter(addAddonSegment, 55) 91 | -------------------------------------------------------------------------------- /docs/cdg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tadashi-aikawa/owl-cmder-tools/e300cc8b44ed371301795293d7ba39ca28f9ef4c/docs/cdg.gif -------------------------------------------------------------------------------- /docs/cdr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tadashi-aikawa/owl-cmder-tools/e300cc8b44ed371301795293d7ba39ca28f9ef4c/docs/cdr.gif -------------------------------------------------------------------------------- /docs/cdz.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tadashi-aikawa/owl-cmder-tools/e300cc8b44ed371301795293d7ba39ca28f9ef4c/docs/cdz.gif -------------------------------------------------------------------------------- /docs/gc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tadashi-aikawa/owl-cmder-tools/e300cc8b44ed371301795293d7ba39ca28f9ef4c/docs/gc.gif -------------------------------------------------------------------------------- /docs/powerline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tadashi-aikawa/owl-cmder-tools/e300cc8b44ed371301795293d7ba39ca28f9ef4c/docs/powerline.png --------------------------------------------------------------------------------