This commit is contained in:
Philipp Hochkamp 2022-03-04 16:36:46 +01:00
parent 31b1c03740
commit eb5617bc08
No known key found for this signature in database
GPG key ID: 3676AB4CB36E5641

View file

@ -56,22 +56,21 @@ end):start()
----------------------------------------------------------------------------------------------------
-- mount ds9 via tailscale
----------------------------------------------------------------------------------------------------
-- meesa broke
--function mountDS9()
-- local ssid = hs.wifi.currentNetwork()
-- if ssid ~= nil and ssid ~= 'vim' then -- not at home
-- if os.execute("mount | grep //ragon@ds9._smb._tcp.local/data") == nil then -- check if mounted via mdns
-- os.execute("diskutil umount /Volumes/data") -- umount share if it exists
-- hs.osascript.applescript('mount volume "smb://ragon@ds9.ragon000.github.beta.tailscale.net/data"') -- mount share via tailscale
-- end
-- end
--end
--
--mountDS9()
--
--hs.wifi.watcher.new(function(watcher, message, interface)
-- mountDS9()
--end):start()
function mountDS9()
local ssid = hs.wifi.currentNetwork()
if ssid ~= nil and ssid ~= 'vim' then -- not at home
if os.execute("mount | grep //ragon@ds9._smb._tcp.local/data") == nil then -- check if mounted via mdns
os.execute("diskutil umount /Volumes/data") -- umount share if it exists
hs.osascript.applescript('mount volume "smb://ragon@ds9.ragon000.github.beta.tailscale.net/data"') -- mount share via tailscale
end
end
end
mountDS9()
hs.wifi.watcher.new(function(watcher, message, interface)
mountDS9()
end):start()
----------------------------------------------------------------------------------------------------
-- Scratchpad
@ -90,6 +89,7 @@ end
local hyperModifier = {"cmd", "shift", "ctrl", "alt"}
hs.hotkey.bind(hyperModifier, "b", function() showHideBundleId("com.bitwarden.desktop") end)
hs.hotkey.bind(hyperModifier, "p", function() showHideBundleId("com.timeular.zei") end)
hs.hotkey.bind(hyperModifier, "l", function() showHideBundleId("com.electron.logseq") end)
----------------------------------------------------------------------------------------------------
-- Tiling