mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-26 09:41:52 -07:00
change XMonad.Prompt.AppendFile
to use mkAbsolutePath
This commit is contained in:
@@ -94,6 +94,11 @@
|
||||
|
||||
### Bug Fixes and Minor Changes
|
||||
|
||||
* `XMonad.Prompt.AppendFile`
|
||||
|
||||
- Use `XMonad.Prelude.mkAbsolutePath` to force names to be relative to the
|
||||
home directory and support `~/` prefixes.
|
||||
|
||||
* `XMonad.Prompt.OrgMode`
|
||||
|
||||
- Fixes the date parsing issue such that entries with format of
|
||||
@@ -225,6 +230,8 @@
|
||||
|
||||
- Added a `Default` instance for `UrgencyConfig` and `DzenUrgencyHook`.
|
||||
|
||||
[this PR]: https://github.com/xmonad/xmonad-contrib/pull/744
|
||||
|
||||
### Other changes
|
||||
|
||||
* Migrated the sample build scripts from the deprecated `xmonad-testing` repo to
|
||||
|
@@ -30,6 +30,7 @@ module XMonad.Prompt.AppendFile (
|
||||
|
||||
import XMonad.Core
|
||||
import XMonad.Prompt
|
||||
import XMonad.Prelude (mkAbsolutePath)
|
||||
|
||||
import System.IO
|
||||
|
||||
@@ -91,4 +92,4 @@ appendFilePrompt' c trans fn = mkXPrompt (AppendFile fn)
|
||||
|
||||
-- | Append a string to a file.
|
||||
doAppend :: (String -> String) -> FilePath -> String -> X ()
|
||||
doAppend trans fn = io . withFile fn AppendMode . flip hPutStrLn . trans
|
||||
doAppend trans fn s = mkAbsolutePath fn >>= \f -> (io . withFile f AppendMode . flip hPutStrLn . trans) s
|
||||
|
Reference in New Issue
Block a user