Skip to content

Commit

Permalink
XMonad wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed Jan 27, 2025
1 parent 1b02b32 commit e105266
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions driver/XMonad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ addTag (Tag name) (XWindowId wid) = do

let
tags :: String
tags = if "not found" `elem` words result then "" else extractTags result
tags = if strip result == "_XMONAD_TAGS: not found." then "" else extractTags result

newTags :: String
newTags = if null tags then name else tags <> " " <> name
Expand All @@ -74,5 +74,7 @@ tagSelfWith name = do
pid <- PID . show <$> getProcessID
result <- findAncestorWindowId pid
case result of
Just wid -> addTag name wid
Just wid -> do
addTag name wid
-- callProcess "xrefresh" [] -- FIXME
Nothing -> exitFailure
2 changes: 1 addition & 1 deletion driver/sensei.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import Run

main :: IO ()
main = do
XMonad.tagSelfWith "sensei"
XMonad.tagSelfWith "left"
getArgs >>= run

0 comments on commit e105266

Please sign in to comment.