Copyright | (c) Colin Woodbury 2012 - 2020 |
---|---|
License | GPL3 |
Maintainer | Colin Woodbury <colin@fosskers.ca> |
Safe Haskell | None |
Language | Haskell2010 |
Interaction with the terminal.
Synopsis
- csi :: [Int] -> ByteString -> ByteString
- cursorUpLineCode :: Int -> ByteString
- getTrueUser :: Environment -> Maybe User
- isTrueRoot :: Environment -> Bool
- hasRootPriv :: Environment -> Bool
- getEditor :: Environment -> FilePath
- getLocale :: Environment -> Text
- chown :: MonadIO m => User -> FilePath -> [String] -> m ()
- hideCursor :: IO ()
- showCursor :: IO ()
- hideCursorCode :: ByteString
- showCursorCode :: ByteString
- raiseCursorBy :: Int -> IO ()
Documentation
csi :: [Int] -> ByteString -> ByteString Source #
Code borrowed from `ansi-terminal` library by Max Bolingbroke.
cursorUpLineCode :: Int -> ByteString Source #
Terminal code for raising the cursor.
getTrueUser :: Environment -> Maybe User Source #
This will get the true user name regardless of sudo-ing.
isTrueRoot :: Environment -> Bool Source #
Is the current user of Aura the true root
user, and not just a sudo user?
hasRootPriv :: Environment -> Bool Source #
Is the user root, or using sudo?
getEditor :: Environment -> FilePath Source #
vi
is a sensible default, it should be installed by
on any Arch system.
getLocale :: Environment -> Text Source #
This will get the locale variable for translations from the environment
chown :: MonadIO m => User -> FilePath -> [String] -> m () Source #
Mark some Path
as being owned by a User
.
hideCursor :: IO () Source #
Hide the cursor in a terminal.
showCursor :: IO () Source #
Restore a cursor to visiblity in the terminal.
raiseCursorBy :: Int -> IO () Source #
Raise the cursor by n
lines.