Update xmonad.hs
c803df157036f2219d750185bf9ffe71d77c22dc
1 parent
b1d391c9
.xmonad/xmonad.hs
+4 -4
| 44 | 44 | confirmPrompt :: XPConfig -> String -> X () -> X () |
|
| 45 | 45 | confirmPrompt config app func = mkXPrompt (EnterPrompt app) config (mkComplFunFromList []) $ const func |
|
| 46 | 46 | ||
| 47 | 47 | screenshotPrompt :: String -> X () |
|
| 48 | 48 | screenshotPrompt home = do |
|
| 49 | - | str <- inputPrompt cfg "Screenshot" |
|
| 49 | + | str <- inputPrompt cfg "~/screenshots/" |
|
| 50 | 50 | case str of |
|
| 51 | - | Just s -> spawn $ printf "sleep 0.1 && scrot -u '%s.png' -e 'mv $f ~/screenshots'" s |
|
| 51 | + | Just s -> spawn $ printf "sleep 0.3 && scrot -u '%s.png' -e 'mv $f ~/screenshots'" s |
|
| 52 | 52 | Nothing -> pure () |
|
| 53 | 53 | where |
|
| 54 | 54 | cfg = myXPConfig { position = CenteredAt 0.5 0.3 |
|
| 55 | 55 | , defaultText = "" } |
|
| 56 | 56 | ||
| 57 | 57 | editPrompt :: String -> X () |
|
| 58 | 58 | editPrompt home = do |
|
| 59 | - | str <- inputPrompt cfg "✎ ~/" |
|
| 59 | + | str <- inputPrompt cfg "Edit ~/" |
|
| 60 | 60 | case str of |
|
| 61 | 61 | Just s -> openInEditor s |
|
| 62 | 62 | Nothing -> pure () |
|
| 63 | 63 | where |
|
| 64 | 64 | cfg = myXPConfig { position = CenteredAt 0.5 0.3 |
| 165 | 165 | , ((modMask .|. shiftMask, xK_Print), safeSpawn "screenshot-region" []) |
|
| 166 | 166 | , ((modMask, xK_0), windows $ greedyView "ω") |
|
| 167 | 167 | , ((modMask .|. shiftMask, xK_0), windows $ shift "ω") |
|
| 168 | 168 | , ((modMask, xK_Left), prevWS) |
|
| 169 | 169 | , ((modMask, xK_Right), nextWS) |
|
| 170 | - | , ((modMask .|. shiftMask, xK_q), confirmPrompt myXPConfig "Exit XMonad?" $ io (exitWith ExitSuccess)) |
|
| 170 | + | , ((modMask .|. shiftMask, xK_q), confirmPrompt myXPConfig "Exit?" $ io (exitWith ExitSuccess)) |
|
| 171 | 171 | ] |
|
| 172 | 172 | ||
| 173 | 173 | rofi :: String -> [String] -> X () |
|
| 174 | 174 | rofi mode opts = safeSpawn |
|
| 175 | 175 | "rofi" (opts ++ [ "-show", mode |