This commit is contained in:
elkowar 2020-11-18 17:46:53 +01:00
parent 6917abf785
commit 5c9c295d89
8 changed files with 6360 additions and 61 deletions

View file

@ -1,4 +1,4 @@
{
"optOut": false,
"lastUpdateCheck": 1605376581583
"lastUpdateCheck": 1605554831715
}

View file

@ -61,17 +61,16 @@ entry {
}
}
scale trough {
scale trough {
padding: 10px;
border-radius: 50px;
background-color: #ebdbb2;
highlight {
padding: 10px;
min-height: 30px;
min-width: 30px;
border-bottom-left-radius: 50px;
border-bottom-right-radius: 50px;
background-color: #8ec07c;
}
}
}

View file

@ -17,7 +17,7 @@ corner-radius = 0;
# Shadows -------------------------------- {{{
shadow = true;
shadow = false;
#shadow-radius = 20;
#shadow-offset-x = -20;
#shadow-offset-y = -20;

View file

@ -26,6 +26,7 @@
;background = #88282828
;background = #aa282c34
;background = #00282828
;background = #ff282828
background = #ff282828
;background = #222
background-alt = #444

View file

@ -30,7 +30,8 @@ import XMonad.Hooks.WindowSwallowing as WindowSwallowing
import XMonad.Hooks.WindowedFullscreenFix
--import XMonad.Util.ActionCycle
import Data.Foldable ( for_ )
@ -96,6 +97,8 @@ import qualified XMonad.Layout.PerScreen as PerScreen
import Data.Maybe (catMaybes, maybeToList, fromMaybe)
import qualified Data.Bifunctor
import Data.Bifunctor
import GHC.IO.Unsafe (unsafePerformIO)
import qualified Data.List.NonEmpty
{-# ANN module "HLint: ignore Redundant $" #-}
{-# ANN module "HLint: ignore Redundant bracket" #-}
{-# ANN module "HLint: ignore Move brackets to avoid $" #-}
@ -307,6 +310,13 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
onGroup W.focusDown'
windows W.focusMaster)
-- -- TODO remove
-- , ("M-S-l", do
-- result <- cycleActionWithResult "ree" $ Data.List.NonEmpty.fromList [ pure "hi", pure "Ho", pure "test" ]
-- spawn $ "notify-send 'teset' '" ++ result ++ "'"
-- )
]
multiMonitorBindings :: [(String, X ())]
@ -336,6 +346,9 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
, ("M-S-<Return>", spawn "alacritty")
--, ("M-S-<Return>", launchWithBackgroundInstance (className =? "Alacritty") "alacritty")
, ("M-S-<", spawn "flameshot gui")
, ("M-S-h", fuckshit)
]
miscBindings :: [(String, X ())]
@ -505,9 +518,6 @@ main = do
let monitorIndices = [0..currentScreenCount - 1]
foo <- getXrdbValue "*.color11"
spawn $ "notify-send 'fuck' '|" ++ foo ++ "|'"
-- create a fifo named pipe for every monitor (called /tmp/xmonad-state-bar0, etc)
for_ monitorIndices (\idx -> safeSpawn "mkfifo" ["/tmp/xmonad-state-bar" ++ show idx])
@ -537,7 +547,7 @@ main = do
, handleEventHook = mconcat [ mySwallowEventHook
, activateWindowEventHook
, handleEventHook Desktop.desktopConfig
, fullscreenFixEventHook
, windowedFullscreenFixEventHook
, Ewmh.ewmhDesktopsEventHook
]
--, handleEventHook = minimizeEventHook <+> handleEventHook def <+> hintsEventHook -- <+> Ewmh.fullscreenEventHook
@ -552,6 +562,7 @@ main = do
-- }}}
mySwallowEventHook = WindowSwallowing.swallowEventHook
(className =? "Alacritty" <||> className =? "Termite" <||> className =? "NOPE Thunar")
((not <$> (className =* "eww" <||> className =? "Dragon" <||> className =? "noswallow")) <||> className =? "re") -- remove that last part
@ -592,11 +603,6 @@ fullscreenFixEventHook (ClientMessageEvent _ _ _ dpy win typ (_:dats)) = do
withWindowAttributes dpy win $ \attrs ->
liftIO $ resizeWindow dpy win (fromIntegral $ wa_width attrs + 1) (fromIntegral $ wa_height attrs)
return $ All True
--fullscreenFixEventHook (ClientMessageEvent { ev_event_type, ev_window }) = do
--if ev_event_type == propertyNotify then
--spawn $ "notify-send 'hi'" ++ show ev_window
--else return ()
--return $ All True
fullscreenFixEventHook _ = return $ All True
@ -687,7 +693,7 @@ ifLayoutName check onLayoutA onLayoutB = do
layout <- getActiveLayoutDescription
if (check layout) then onLayoutA else onLayoutB
-- Get the name of the active layout.
-- | Get the name of the active layout.
getActiveLayoutDescription :: X String
getActiveLayoutDescription = (description . W.layout . W.workspace . W.current) <$> gets windowset
-- }}}
@ -698,42 +704,46 @@ getActiveLayoutDescription = (description . W.layout . W.workspace . W.current)
--
--
-- newtype ActionCycleState = ActionCycleState (M.Map String Int) deriving Typeable
-- instance ExtensionClass ActionCycleState where
-- initialValue = ActionCycleState mempty
--
-- getActionCycle :: String -> ActionCycleState -> Maybe Int
-- getActionCycle name (ActionCycleState s) = M.lookup name s
--
-- nextActionCycle :: String -> Int -> ActionCycleState -> ActionCycleState
-- nextActionCycle name maxNum (ActionCycleState s) = ActionCycleState $ M.update (\n -> Just $ (n + 1) `mod` maxNum) name s
--
-- setActionCycle :: String -> Int -> ActionCycleState -> ActionCycleState
-- setActionCycle name n (ActionCycleState s)= ActionCycleState $ M.insert name n s
--
-- cycleAction :: String -> [X ()] -> X ()
-- cycleAction _ [] = pure ()
-- cycleAction name actions = do
-- idx <- XS.gets (getActionCycle name) >>= \case
-- Just x -> do
-- XS.modify (nextActionCycle name (length actions))
-- pure x
-- Nothing -> do
-- XS.modify (setActionCycle name 1)
-- pure 0
--
-- sequence_ $ actions `safeIdx` idx
--
--
--
--
-- safeIdx :: [a] -> Int -> Maybe a
-- safeIdx list i
-- | i < length list = Just $ list !! i
-- | otherwise = Nothing
--
newtype ActionCycleState = ActionCycleState (M.Map String Int) deriving Typeable
instance ExtensionClass ActionCycleState where
initialValue = ActionCycleState mempty
getActionCycle :: String -> ActionCycleState -> Maybe Int
getActionCycle name (ActionCycleState s) = M.lookup name s
nextActionCycle :: String -> Int -> ActionCycleState -> ActionCycleState
nextActionCycle name maxNum (ActionCycleState s) = ActionCycleState $ M.update (\n -> Just $ (n + 1) `mod` maxNum) name s
setActionCycle :: String -> Int -> ActionCycleState -> ActionCycleState
setActionCycle name n (ActionCycleState s)= ActionCycleState $ M.insert name n s
cycleAction :: String -> [X ()] -> X ()
cycleAction _ [] = pure ()
cycleAction name actions = do
idx <- XS.gets (getActionCycle name) >>= \case
Just x -> do
XS.modify (nextActionCycle name (length actions))
pure x
Nothing -> do
XS.modify (setActionCycle name 1)
pure 0
sequence_ $ actions `safeIdx` idx
safeIdx :: [a] -> Int -> Maybe a
safeIdx list i
| i < length list = Just $ list !! i
| otherwise = Nothing
unsafeGetXrdbValue :: String -> String
unsafeGetXrdbValue = unsafePerformIO . getXrdbValue
getXrdbValue :: String -> IO String
getXrdbValue key = fromMaybe "" . findValue key <$> runProcessWithInput "xrdb" ["-query"] ""
@ -754,3 +764,10 @@ getXrdbValue key = fromMaybe "" . findValue key <$> runProcessWithInput "xrdb" [
trim :: String -> String
trim = Data.List.dropWhileEnd (Data.Char.isSpace) . Data.List.dropWhile (Data.Char.isSpace)
fuckshit = getActiveLayoutDescription >>= debugShit
debugShit :: MonadIO m => String -> m ()
debugShit x = spawn $ "notify-send 'Debug' '" ++ x ++ "'"

6252
files/Layers Normal file

File diff suppressed because it is too large Load diff

View file

@ -194,12 +194,43 @@
--scrollbar-chrome-size: /*[[scrollbar-chrome-size]]*/;
--elevation-1: /*[[elevation-1]]*/;
--elevation-2: /*[[elevation-2]]*/;
--color-notifications-row-read-bg: /*[[base-2]]*/;
--color-bg-canvas: /*[[base-2]]*/;
--color-border-primary: /*[[base-2]]*/;
}
}
@-moz-document regexp(".*github.*") {
}
@-moz-document domain("github.com"), domain("github.community") {
.notifications-v2.notification-shelf {
background: var(--base-3);
border-bottom: none !important;
box-shadow: none;
}
.gh-header-shadow {
border-bottom: none;
}
/*
.notifications-list-item, .notifications-list-item > * {
background-color: var(--base-3) !important;
}*/
.UnderlineNav {
box-shadow: none;
}
.btn, .social-count {
box-shadow: 0 0 5px 0 rgba(0,0,0, 0.1);
}
.Box > .bg-gray-dark:nth-child(2):last-of-type {
color: var(--text-primary) !important;
border-color: var(--base-1) !important;

View file

@ -1,5 +1,4 @@
#!/bin/bash
sudo chmod 666 /dev/ttyACM0
#~/Downloads/Bazecor-0.2.0.AppImage
~/Downloads/Bazecor-0.2.2.AppImage
~/Downloads/Bazecor-0.2.4.AppImage