Skip to content

Commit 27a843d

Browse files
committed
유지보수
1 parent 81db395 commit 27a843d

File tree

2 files changed

+45
-29
lines changed

2 files changed

+45
-29
lines changed

.hammerspoon/init.lua

+31-29
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
-- Default
1212
-----------------------------------------------------------------------------
1313
local hyper = {'cmd', 'shift', 'ctrl'}
14+
local hyper2 = {'cmd', 'alt', 'ctrl'}
1415

1516
-- Make the alerts look nicer.
1617
hs.alert.defaultStyle.fillColor = {white = 0.05, alpha = 0.75}
@@ -172,34 +173,35 @@ hyperKey
172173
-- Window Management
173174
---- require('modules.window_move') -- windows control 창이동 컨트롤 // 미사용
174175
-----------------------------------------------------------------------------
175-
local hyper2 = {'cmd', 'alt', 'ctrl'}
176-
local wm = require('modules/window-management')
177-
178-
179-
hs.hotkey.bind(hyper2, "m", function() wm.windowMaximize(0) end)
180-
hs.hotkey.bind(hyper2, "f", function() wm.full_screen() end)
181-
182-
hs.hotkey.bind(hyper2, "left", function() wm.moveLeft() end)
183-
hs.hotkey.bind(hyper2, "right", function() wm.moveRight() end)
184-
hs.hotkey.bind(hyper2, "up", function() wm.moveTop() end)
185-
hs.hotkey.bind(hyper2, "down", function() wm.moveBottom() end)
186-
187-
hs.hotkey.bind(hyper2, "]", function() hs.window.focusedWindow():moveOneScreenEast() end)
188-
hs.hotkey.bind(hyper2, "[", function() hs.window.focusedWindow():moveOneScreenWest() end)
189-
hs.hotkey.bind(hyper2, "n", function() wm.move_next_screen() end)
190-
hs.hotkey.bind(hyper2, "p", function() wm.move_previous_screen() end)
191-
192-
hs.hotkey.bind(hyper2, "1", function() wm.moveWindowToPosition(wm.screenPositions.topLeft) end)
193-
hs.hotkey.bind(hyper2, "2", function() wm.moveWindowToPosition(wm.screenPositions.topRight) end)
194-
hs.hotkey.bind(hyper2, "3", function() wm.moveWindowToPosition(wm.screenPositions.bottomLeft) end)
195-
hs.hotkey.bind(hyper2, "4", function() wm.moveWindowToPosition(wm.screenPositions.bottomRight) end)
196-
hs.hotkey.bind(hyper2, "5", function() wm.moveWindowToPosition(wm.screenPositions.center) end)
197-
198-
hs.hotkey.bind(hyper2, "=", function() wm.size_plus() end)
199-
hs.hotkey.bind(hyper2, "-", function() wm.size_minus() end)
200-
201-
-- Revert to the original state
202-
hs.hotkey.bind(hyper2, "0", function() wm.revertOriginal() end)
176+
--
177+
-- #### rectangle 로 대체 ####
178+
--
179+
-- local wm = require('modules/window-management')
180+
181+
-- hs.hotkey.bind(hyper2, "m", function() wm.windowMaximize(0) end)
182+
-- hs.hotkey.bind(hyper2, "f", function() wm.full_screen() end)
183+
184+
-- hs.hotkey.bind(hyper2, "left", function() wm.moveLeft() end)
185+
-- hs.hotkey.bind(hyper2, "right", function() wm.moveRight() end)
186+
-- hs.hotkey.bind(hyper2, "up", function() wm.moveTop() end)
187+
-- hs.hotkey.bind(hyper2, "down", function() wm.moveBottom() end)
188+
189+
-- hs.hotkey.bind(hyper2, "]", function() hs.window.focusedWindow():moveOneScreenEast() end)
190+
-- hs.hotkey.bind(hyper2, "[", function() hs.window.focusedWindow():moveOneScreenWest() end)
191+
-- -- hs.hotkey.bind(hyper2, "n", function() wm.move_next_screen() end)
192+
-- hs.hotkey.bind(hyper2, "p", function() wm.move_previous_screen() end)
193+
194+
-- hs.hotkey.bind(hyper2, "1", function() wm.moveWindowToPosition(wm.screenPositions.topLeft) end)
195+
-- hs.hotkey.bind(hyper2, "2", function() wm.moveWindowToPosition(wm.screenPositions.topRight) end)
196+
-- hs.hotkey.bind(hyper2, "3", function() wm.moveWindowToPosition(wm.screenPositions.bottomLeft) end)
197+
-- hs.hotkey.bind(hyper2, "4", function() wm.moveWindowToPosition(wm.screenPositions.bottomRight) end)
198+
-- hs.hotkey.bind(hyper2, "5", function() wm.moveWindowToPosition(wm.screenPositions.center) end)
199+
200+
-- hs.hotkey.bind(hyper2, "=", function() wm.size_plus() end)
201+
-- hs.hotkey.bind(hyper2, "-", function() wm.size_minus() end)
202+
203+
-- -- Revert to the original state
204+
-- hs.hotkey.bind(hyper2, "0", function() wm.revertOriginal() end)
203205
-----------------------------------------------------------------------------
204206

205207
--03. Lock the screen. This may also be possible with hs.caffeinate.lockScreen.
@@ -208,4 +210,4 @@ hs.hotkey.bind(hyper2, "l", function()
208210
end)
209211

210212
-- Start Macros
211-
hello()
213+
hello()

bin/dev-cyberark.sh

+14
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ getIPfromAlias() {
6060
}
6161

6262
if [ $# -eq 0 ]; then
63+
cat "$IP_LIST_FILE"
64+
echo ""
6365
echo "Usage: "
6466
echo "$ dev slack"
6567
echo "$ dev 10.40.50.60"
@@ -88,7 +90,19 @@ elif [[ $1 = 'root' ]]; then
8890
echo "$2 -> $target_ip 로 접속합니다."
8991
sshpass -p ${AD_PASS} ssh ${AD_ID}@${ACCOUNT_ADMIN}@$target_ip@${IP_GATE}
9092
fi
93+
94+
elif [[ $1 = 'sftp' ]]; then
95+
if [[ $2 =~ ^[0-9]+ ]]; then
96+
echo "sftp ${AD_ID}@${ACCOUNT_ADMIN}@$2@${IP_GATE}"
97+
sshpass -p ${AD_PASS} sftp ${AD_ID}@${ACCOUNT_ADMIN}@$2@${IP_GATE}
98+
else
99+
target_ip=$(getIPfromAlias "$2")
100+
echo "$2 -> $target_ip 로 접속합니다."
101+
sshpass -p ${AD_PASS} sftp ${AD_ID}@${ACCOUNT_ADMIN}@$target_ip@${IP_GATE}
102+
fi
103+
91104
else
105+
echo "ssh $1"
92106
sshpass -p ${AD_PASS} ssh $1
93107
fi
94108

0 commit comments

Comments
 (0)