Steffen Rademacker 3 months ago
parent 0b308cf94b
commit cc57092845

@ -1,10 +1,8 @@
local alert = require('hs.alert')
local app = require('hs.application') local app = require('hs.application')
local eventtap = require('hs.eventtap') local eventtap = require('hs.eventtap')
local geometry = require('hs.geometry') local geometry = require('hs.geometry')
local hotkey = require('hs.hotkey') local hotkey = require('hs.hotkey')
local layout = require('hs.layout') local layout = require('hs.layout')
local screen = require('hs.screen')
local win = require('hs.window') local win = require('hs.window')
-- Custom variables -- Custom variables
@ -51,7 +49,7 @@ local layoutSingle = {
{ "Firefox", nil, laptopMonitor, screenPositions.full, nil, nil }, { "Firefox", nil, laptopMonitor, screenPositions.full, nil, nil },
{ "ForkLift", nil, laptopMonitor, screenPositions.full, nil, nil }, { "ForkLift", nil, laptopMonitor, screenPositions.full, nil, nil },
{ "Mail", nil, laptopMonitor, screenPositions.full, nil, nil }, { "Mail", nil, laptopMonitor, screenPositions.full, nil, nil },
{ "Microsoft Teams (work or school)", nil, laptopMonitor, screenPositions.full, nil, nil }, { "Microsoft Teams", nil, laptopMonitor, screenPositions.full, nil, nil },
{ "Signal", nil, laptopMonitor, screenPositions.full, nil, nil }, { "Signal", nil, laptopMonitor, screenPositions.full, nil, nil },
{ "Strongbox", nil, laptopMonitor, screenPositions.full, nil, nil }, { "Strongbox", nil, laptopMonitor, screenPositions.full, nil, nil },
{ "TIDAL", nil, laptopMonitor, screenPositions.full, nil, nil }, { "TIDAL", nil, laptopMonitor, screenPositions.full, nil, nil },
@ -101,6 +99,7 @@ end
-- Key-trap (cat/baby-mode) -- Key-trap (cat/baby-mode)
-------------------- --------------------
local function babymode() local function babymode()
local alert = require('hs.alert')
alert('Babymode activated') alert('Babymode activated')
Mousetrap = eventtap.new({ Mousetrap = eventtap.new({
@ -147,8 +146,9 @@ app.enableSpotlightForNameSearches(true)
-- Applying main two layouts -- Applying main two layouts
hotkey.bind(hyper, 'q', function() layout.apply(layoutSingle) end) hotkey.bind(hyper, 'q', function() layout.apply(layoutSingle) end)
hotkey.bind(hyper, 'w', function() hotkey.bind(hyper, 'w', function()
if(tablelength(screen.allScreens()) == 2) local screen = require('hs.screen')
then
if (tablelength(screen.allScreens()) == 2) then
layout.apply(layoutDouble) layout.apply(layoutDouble)
else else
layout.apply(layoutSingle) layout.apply(layoutSingle)

@ -48,6 +48,7 @@ webvideo () {
} }
pdf () { pdf () {
gallery
convert *.jpg -auto-orient -monochrome temp.pdf convert *.jpg -auto-orient -monochrome temp.pdf
ocrmypdf --rotate-pages --optimize 3 --jpeg-quality 70 temp.pdf document.pdf ocrmypdf --rotate-pages --optimize 3 --jpeg-quality 70 temp.pdf document.pdf
rm temp.pdf rm temp.pdf

Loading…
Cancel
Save