diff --git a/hosts/daedalus/hammerspoon.lua b/hosts/daedalus/hammerspoon.lua index 86d993ae..160bc7c9 100644 --- a/hosts/daedalus/hammerspoon.lua +++ b/hosts/daedalus/hammerspoon.lua @@ -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