Bunch of updates
182514f70f081924dc66b9ef427f82aaff9ef3bc
1 parent
89892466
.config/kitty/kitty.conf
+2 -2
| 5 | 5 | font_size 14.0 |
|
| 6 | 6 | adjust_line_height -1 |
|
| 7 | 7 | adjust_column_width -1 |
|
| 8 | 8 | ||
| 9 | 9 | scrollback_lines 8192 |
|
| 10 | - | input_delay 3 |
|
| 11 | - | repaint_delay 10 |
|
| 10 | + | input_delay 8 |
|
| 11 | + | repaint_delay 16 |
|
| 12 | 12 | sync_to_monitor yes |
|
| 13 | 13 | draw_minimal_borders yes |
|
| 14 | 14 | cursor_blink_interval 0 |
|
| 15 | 15 | strip_trailing_spaces always |
|
| 16 | 16 | hide_window_decorations yes |
.xmonad/xmonad.hs
+16 -1
| 39 | 39 | ||
| 40 | 40 | screenshotPrompt :: String -> X () |
|
| 41 | 41 | screenshotPrompt home = do |
|
| 42 | 42 | str <- inputPrompt cfg "Screenshot" |
|
| 43 | 43 | case str of |
|
| 44 | - | Just s -> spawn $ printf "scrot -u '%s.png' -e 'mv $f ~/screenshots'" s |
|
| 44 | + | Just s -> spawn $ printf "sleep 0.1 && scrot -u '%s.png' -e 'mv $f ~/screenshots'" s |
|
| 45 | 45 | Nothing -> pure () |
|
| 46 | 46 | where |
|
| 47 | 47 | cfg = myXPConfig { position = CenteredAt 0.5 0.3 |
|
| 48 | 48 | , defaultText = "" } |
|
| 49 | 49 | ||
| 50 | + | editPrompt :: String -> X () |
|
| 51 | + | editPrompt home = do |
|
| 52 | + | str <- inputPrompt cfg "Edit (~)" |
|
| 53 | + | case str of |
|
| 54 | + | Just s -> openInEditor s |
|
| 55 | + | Nothing -> pure () |
|
| 56 | + | where |
|
| 57 | + | cfg = myXPConfig { position = CenteredAt 0.5 0.3 |
|
| 58 | + | , defaultText = "" } |
|
| 59 | + | ||
| 60 | + | openInEditor :: String -> X () |
|
| 61 | + | openInEditor path = |
|
| 62 | + | safeSpawn termName ["nvim", path] |
|
| 63 | + | ||
| 50 | 64 | termName :: FilePath |
|
| 51 | 65 | termName = "kitty" |
|
| 52 | 66 | ||
| 53 | 67 | main :: IO () |
|
| 54 | 68 | main = do |
| 134 | 148 | , ((modMask .|. shiftMask, xK_F12), safeSpawn "systemctl" ["hibernate"]) |
|
| 135 | 149 | , ((modMask, xK_F11), safeSpawn "slock" []) |
|
| 136 | 150 | , ((modMask, xK_F10), safeSpawn "toggle-displays" []) |
|
| 137 | 151 | , ((modMask, xK_F5), safeSpawn "refresh-display" []) |
|
| 138 | 152 | , ((modMask, xK_p), runExecutable) |
|
| 153 | + | , ((modMask .|. shiftMask, xK_p), editPrompt home) |
|
| 139 | 154 | , ((modMask, xK_o), switchWindow) |
|
| 140 | 155 | , ((modMask, xK_Tab), toggleWS) |
|
| 141 | 156 | , ((modMask .|. controlMask, xK_Return), toggleFloatNext >> (spawn $ XMonad.terminal conf)) |
|
| 142 | 157 | , ((modMask, xK_Print), screenshotPrompt home) |
|
| 143 | 158 | , ((modMask .|. shiftMask, xK_Print), safeSpawn "screenshot-region" []) |
bin/cargo-flow
+3 -1
| 5 | 5 | # |
|
| 6 | 6 | ||
| 7 | 7 | # Remove the "flow" argument. |
|
| 8 | 8 | shift |
|
| 9 | 9 | ||
| 10 | + | cmd="flow-check $@" |
|
| 11 | + | ||
| 10 | 12 | # Exec cargo-watch with `flow-once` |
|
| 11 | - | exec cargo watch -qc -i 'target/*' -i errors.err -x "flow-check $@" |
|
| 13 | + | exec cargo watch -qc -i 'target/*' -i errors.err -x "$cmd" |