<commit_before>module XMonadContrib.MagicFocus (magicFocus) where

import XMonad
import StackSet

magicFocus l = l { doLayout = \s -> (doLayout l) s . swap
                 , modifyLayout = \x -> fmap magicFocus `fmap` modifyLayout l x }

swap :: Stack a -> Stack a
swap Empty = Empty
swap (Node f u d) = Node f [] (reverse u ++ d)<commit_msg>Update MagicFocus to the new StackSet<commit_after>module XMonadContrib.MagicFocus (magicFocus) where

import XMonad
import StackSet

magicFocus l = l { doLayout = \s -> (doLayout l) s . swap
                 , modifyLayout = \x -> fmap magicFocus `fmap` modifyLayout l x }

swap :: Stack a -> Stack a
swap (Stack f u d) = Stack f [] (reverse u ++ d)
{'fraction_non_alphanumeric': 0.10533910533910534, 'fraction_numerical': 0.0, 'mean_word_length': 3.0823529411764707, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1943680', 'n_tokens_mistral': 227, 'n_tokens_neox': 217, 'n_words': 87}