mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-23 21:12:22 +00:00
asdf
This commit is contained in:
parent
637af563bf
commit
f9677f940e
19 changed files with 252 additions and 39 deletions
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"optOut": false,
|
||||
"lastUpdateCheck": 1605901143177
|
||||
"lastUpdateCheck": 1607799387166
|
||||
}
|
|
@ -74,3 +74,14 @@ scale trough {
|
|||
background-color: #8ec07c;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.this {
|
||||
border: 10px solid blue;
|
||||
}
|
||||
.shit {
|
||||
border: 10px solid green;
|
||||
}
|
||||
.fuck {
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<definitions>
|
||||
|
||||
<def name="test">
|
||||
<box space-evenly="false" spacing="10">
|
||||
<box class="{{some_var}}" space-evenly="false" spacing="10">
|
||||
testing {{shit}}
|
||||
<scale value="50" orientation="v" min="0" max="100" flipped="true" />
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
|||
</def>
|
||||
|
||||
<def name="music">
|
||||
<box orientation="h" valign="start" space-evenly="false" hexpand="true">
|
||||
<box class="hi ho" orientation="h" valign="start" space-evenly="false" hexpand="true">
|
||||
<image visible="{{song-image-visible}}" path="{{song-image}}" width="150" height="150" />
|
||||
<box orientation="v" halign="fill" space-evenly="false" vexpand="true" hexpand="true">
|
||||
<box class="data" vexpand="true">
|
||||
|
@ -73,6 +73,7 @@
|
|||
<var name="shit">
|
||||
shit
|
||||
</var>
|
||||
<var name="some_var"></var>
|
||||
|
||||
<var name="song-image"></var>
|
||||
<var name="song-image-visible">true</var>
|
||||
|
|
|
@ -17,7 +17,7 @@ corner-radius = 0;
|
|||
|
||||
|
||||
# Shadows -------------------------------- {{{
|
||||
shadow = false;
|
||||
shadow = true;
|
||||
#shadow-radius = 20;
|
||||
#shadow-offset-x = -20;
|
||||
#shadow-offset-y = -20;
|
||||
|
@ -38,7 +38,7 @@ shadow-opacity = 0.5;
|
|||
shadow-exclude = [
|
||||
"name = 'GLava'",
|
||||
"! name~=''",
|
||||
#"!focused && ! class_g ?='xfce4-notifyd'",
|
||||
"!focused && ! class_g ?='xfce4-notifyd'",
|
||||
#"name *= 'polybar'",
|
||||
"name = 'Notification'",
|
||||
"name = 'Plank'",
|
||||
|
|
|
@ -28,7 +28,9 @@ SINK_BLACKLIST=(
|
|||
# Maps PulseAudio sink names to human-readable names
|
||||
declare -A SINK_NICKNAMES
|
||||
SINK_NICKNAMES["alsa_output.usb-Native_Instruments_Komplete_Audio_6_77316682-00.analog-surround-21"]="📢"
|
||||
SINK_NICKNAMES["alsa_output.usb-Fujitsu_UC_C_USB_Value_Headset_Fujitsu_UC_C_USB_Value_Headset-00.analog-stereo"]="🎧"
|
||||
SINK_NICKNAMES["alsa_output.usb-Fujitsu_UC_C_USB_Value_Headset_Fujitsu_UC_C_USB_Value_Headset-00.analog-stereo"]="F🎧"
|
||||
SINK_NICKNAMES["alsa_output.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00.analog-stereo"]="🎧"
|
||||
|
||||
|
||||
|
||||
# Environment & global constants for the script
|
||||
|
|
|
@ -21,9 +21,11 @@ format_workspaces() {
|
|||
|
||||
|
||||
if [ "$MONITOR" = "HDMI-A-0" ]; then
|
||||
tail -F /tmp/xmonad-state-bar1 | stdbuf -o0 cat | format_workspaces
|
||||
else
|
||||
tail -F /tmp/xmonad-state-bar2 | stdbuf -o0 cat | format_workspaces
|
||||
elif [ "$MONITOR" = "DisplayPort-1" ]; then
|
||||
tail -F /tmp/xmonad-state-bar0 | stdbuf -o0 cat | format_workspaces
|
||||
else
|
||||
tail -F /tmp/xmonad-state-bar1 | stdbuf -o0 cat | format_workspaces
|
||||
fi
|
||||
|
||||
#while true; do
|
||||
|
|
|
@ -18,7 +18,6 @@ import Data.List ( isPrefixOf
|
|||
)
|
||||
import qualified Data.List
|
||||
import System.Exit (exitSuccess)
|
||||
import qualified XMonad.Util.ExtensibleState as XS
|
||||
import qualified Data.Char
|
||||
import qualified Rofi
|
||||
import qualified DescribedSubmap
|
||||
|
@ -73,6 +72,7 @@ import XMonad.Util.EZConfig ( additionalKeysP
|
|||
, checkKeymap
|
||||
)
|
||||
|
||||
|
||||
import XMonad.Util.NamedScratchpad
|
||||
import XMonad.Util.Run
|
||||
import XMonad.Util.SpawnOnce (spawnOnce)
|
||||
|
@ -110,12 +110,8 @@ import qualified Data.List.NonEmpty
|
|||
|
||||
myModMask = mod4Mask
|
||||
myLauncher = Rofi.asCommand def ["-show run"]
|
||||
--myTerminal = "termite --name törminell"
|
||||
--myTerminal = "alacritty"
|
||||
myTerminal = "st"
|
||||
myBrowser = "qutebrowser"
|
||||
myTerminal = "alacritty"
|
||||
useSharedWorkspaces = False
|
||||
--myBrowser = "google-chrome-stable"
|
||||
|
||||
{-| adds the scripts-directory path to the filename of a script |-}
|
||||
scriptFile :: String -> String
|
||||
|
@ -139,20 +135,8 @@ scratchpads =
|
|||
-- }}}
|
||||
|
||||
-- Colors ------ {{{
|
||||
fg = "#ebdbb2"
|
||||
bg = "#282828"
|
||||
gray = "#888974"
|
||||
bg1 = "#3c3836"
|
||||
bg2 = "#504945"
|
||||
bg3 = "#665c54"
|
||||
bg4 = "#7c6f64"
|
||||
|
||||
green = "#b8bb26"
|
||||
darkgreen = "#98971a"
|
||||
red = "#fb4934"
|
||||
darkred = "#cc241d"
|
||||
yellow = "#fabd2f"
|
||||
blue = "#83a598"
|
||||
purple = "#d3869b"
|
||||
aqua = "#8ec07c"
|
||||
-- }}}
|
||||
|
@ -236,9 +220,10 @@ myStartupHook = do
|
|||
--spawnOnce "nm-applet &"
|
||||
--spawnOnce "udiskie -s &" -- Mount USB sticks automatically. -s is smart systray mode: systray icon if something is mounted
|
||||
spawnOnce "xfce4-clipman &"
|
||||
spawnOnce "redshift -P -O 5000 &"
|
||||
--spawnOnce "redshift -P -O 5000 &"
|
||||
spawn "xset r rate 300 50 &" -- make key repeat quicker
|
||||
spawn "/home/leon/.screenlayout/dualscreen-stacked.sh"
|
||||
--spawn "/home/leon/.screenlayout/dualscreen-stacked.sh"
|
||||
spawn "/home/leon/.screenlayout/tripplescreen.sh"
|
||||
spawnOnce "xsetroot -cursor_name left_ptr"
|
||||
spawnOnce "xrdb -merge ~/.Xresources"
|
||||
io $ threadDelay $ 1000 * 100
|
||||
|
@ -323,9 +308,11 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
|
|||
|
||||
multiMonitorBindings :: [(String, X ())]
|
||||
multiMonitorBindings =
|
||||
[ ("M-s", multiMonitorOperation W.view 1)
|
||||
[ ("M-s", multiMonitorOperation W.view 2)
|
||||
, ("M-a", multiMonitorOperation W.view 1)
|
||||
, ("M-d", multiMonitorOperation W.view 0)
|
||||
, ("M-S-s", (multiMonitorOperation W.shift 1) >> multiMonitorOperation W.view 1)
|
||||
, ("M-S-s", (multiMonitorOperation W.shift 2) >> multiMonitorOperation W.view 2)
|
||||
, ("M-S-a", (multiMonitorOperation W.shift 1) >> multiMonitorOperation W.view 1)
|
||||
, ("M-S-d", (multiMonitorOperation W.shift 0) >> multiMonitorOperation W.view 0)
|
||||
, ("M-C-s", windows swapScreenContents)
|
||||
]
|
||||
|
@ -363,6 +350,11 @@ myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, program
|
|||
, ("M-S-C-c", kill1)
|
||||
, ("M-S-C-q", io exitSuccess)
|
||||
|
||||
|
||||
-- useless binding simply to not accidentally quit firefox
|
||||
, ("C-q", pure ())
|
||||
|
||||
|
||||
-- Binary space partitioning
|
||||
, ("M-<Delete>", sendMessage Swap)
|
||||
, ("M-M1-<Delete>", sendMessage Rotate)
|
||||
|
@ -610,12 +602,6 @@ fullscreenFixEventHook _ = return $ All True
|
|||
|
||||
|
||||
|
||||
foo :: X ()
|
||||
foo = do
|
||||
x <- ask
|
||||
pure ()
|
||||
|
||||
|
||||
-- POLYBAR Kram -------------------------------------- {{{
|
||||
|
||||
-- | Loghook for polybar on a given monitor.
|
||||
|
|
112
files/.xmonad/lib/WsContexts.hs
Normal file
112
files/.xmonad/lib/WsContexts.hs
Normal file
|
@ -0,0 +1,112 @@
|
|||
module WsContexts where
|
||||
|
||||
import Data.List (foldl', nub)
|
||||
import qualified Data.List
|
||||
import Data.List.NonEmpty ((<|), NonEmpty ((:|)))
|
||||
import qualified Data.List.NonEmpty as NE
|
||||
import XMonad
|
||||
import qualified XMonad.StackSet as W
|
||||
import qualified XMonad.Util.ExtensibleState as XS
|
||||
|
||||
createWorkspace :: Layout Window -> WorkspaceId -> W.Workspace WorkspaceId (Layout Window) a
|
||||
createWorkspace layout name =
|
||||
W.Workspace
|
||||
{ W.tag = name,
|
||||
W.layout = layout,
|
||||
W.stack = Nothing
|
||||
}
|
||||
|
||||
addWorkspaces :: [W.Workspace i l a] -> W.StackSet i l a s sid -> W.StackSet i l a s sid
|
||||
addWorkspaces new ws = foldl' (flip addNewWorkspace) ws new
|
||||
where
|
||||
addNewWorkspace :: W.Workspace i l a -> W.StackSet i l a s sid -> W.StackSet i l a s sid
|
||||
addNewWorkspace newWorkspace stackset =
|
||||
stackset
|
||||
{ W.current = (W.current stackset) {W.workspace = newWorkspace},
|
||||
W.hidden = W.workspace (W.current stackset) : W.hidden stackset
|
||||
}
|
||||
|
||||
|
||||
wsContextView :: WorkspaceId -> X ()
|
||||
wsContextView wspId = do
|
||||
(WsContext currentCtx) <- XS.gets (NE.head . contexts)
|
||||
windows (W.view $ annotateWspId currentCtx wspId)
|
||||
|
||||
pushContext :: WsContext -> X ()
|
||||
pushContext ctx = updateContexts $ \ctxState -> ctxState { contexts = ctx <| contexts ctxState }
|
||||
|
||||
|
||||
-- TODO: working dir
|
||||
newtype WsContext = WsContext String
|
||||
deriving (Show, Eq)
|
||||
|
||||
data WsContextsState = WsContextsState
|
||||
{ contexts :: NonEmpty WsContext,
|
||||
stickies :: [WorkspaceId]
|
||||
}
|
||||
deriving (Typeable, Show)
|
||||
|
||||
wsContexts :: XConfig l -> XConfig l
|
||||
wsContexts conf = conf {workspaces = map (annotateWspId "default") (workspaces conf)}
|
||||
|
||||
instance ExtensionClass WsContextsState where
|
||||
initialValue =
|
||||
WsContextsState
|
||||
{ contexts = WsContext "default" :| [],
|
||||
stickies = []
|
||||
}
|
||||
|
||||
updateContexts :: (WsContextsState -> WsContextsState) -> X ()
|
||||
updateContexts update = do
|
||||
oldState <- XS.get
|
||||
let newState = update oldState
|
||||
if NE.head (contexts oldState) /= NE.head (contexts newState)
|
||||
then applyWorkspaceContext $ NE.head (contexts oldState)
|
||||
else pure ()
|
||||
|
||||
annotateWspId :: String -> WorkspaceId -> WorkspaceId
|
||||
annotateWspId contextName wspId = wspId ++ "<" ++ contextName ++ ">"
|
||||
|
||||
unannotateWspId :: WorkspaceId -> (WorkspaceId, String)
|
||||
unannotateWspId wspId =
|
||||
let (actualId, rest) = splitWhere (== '<') wspId
|
||||
in (actualId, takeWhile (/= '>') rest)
|
||||
|
||||
applyWorkspaceContext :: WsContext -> X ()
|
||||
applyWorkspaceContext context = do
|
||||
contextAlreadyOpen <- withWindowSet $ pure . any (wspMatchesContext context) . W.workspaces
|
||||
if contextAlreadyOpen
|
||||
then windows (switchToWorkspacesOf context)
|
||||
else initializeWorkspacesFor context
|
||||
|
||||
initializeWorkspacesFor :: WsContext -> X ()
|
||||
initializeWorkspacesFor context = do
|
||||
defaultLayout <- asks (layoutHook . config)
|
||||
windows $ \ws -> addWorkspaces (map (createWorkspace defaultLayout) (baseWorkspaceNames ws)) ws
|
||||
windows (switchToWorkspacesOf context)
|
||||
|
||||
baseWorkspaceNames :: W.StackSet WorkspaceId l a s sid -> [WorkspaceId]
|
||||
baseWorkspaceNames = nub . fmap (fst . unannotateWspId . W.tag) . W.workspaces
|
||||
|
||||
switchToWorkspacesOf :: Eq s => WsContext -> W.StackSet WorkspaceId l a s sid -> W.StackSet WorkspaceId l a s sid
|
||||
switchToWorkspacesOf (WsContext context) ws =
|
||||
let (currentWspName, _) = unannotateWspId $ W.currentTag ws
|
||||
in W.view (annotateWspId context currentWspName) ws
|
||||
|
||||
wspMatchesContext :: WsContext -> W.Workspace WorkspaceId l a -> Bool
|
||||
wspMatchesContext (WsContext context) wsp = (snd . unannotateWspId $ W.tag wsp) == context
|
||||
|
||||
findWorkspaceByTag :: (i -> Bool) -> W.StackSet i l a s sid -> Maybe (W.Workspace i l a)
|
||||
findWorkspaceByTag cond = Data.List.find (cond . W.tag) . W.workspaces
|
||||
|
||||
splitWhere :: (a -> Bool) -> [a] -> ([a], [a])
|
||||
splitWhere cond list =
|
||||
( takeWhile (not . cond) list,
|
||||
goodTail $ dropWhile (not . cond) list
|
||||
)
|
||||
|
||||
goodTail :: [a] -> [a]
|
||||
goodTail [] = []
|
||||
goodTail (_ : xs) = xs
|
||||
|
||||
|
|
@ -13,13 +13,14 @@ executable my-xmonad
|
|||
TiledDragging
|
||||
WindowSwallowing
|
||||
FancyBorders
|
||||
WsContexts
|
||||
|
||||
default-language: Haskell2010
|
||||
ghc-options: -Wall -threaded -fno-warn-missing-signatures
|
||||
build-depends:
|
||||
base -any,
|
||||
xmonad >=0.13,
|
||||
xmonad-contrib >=0.13,
|
||||
xmonad >=0.15,
|
||||
xmonad-contrib >=0.16,
|
||||
dbus >=1.2.12,
|
||||
iwlib >=0.1.0,
|
||||
netlink >=1.1.1.0,
|
||||
|
|
1
files/.xmonad/prompt-history
Normal file
1
files/.xmonad/prompt-history
Normal file
|
@ -0,0 +1 @@
|
|||
fromList [("Eval: ",["pure $ show \"Hi\"","pure $ show \"Hi\"","pure $ show \"Hi\""])]
|
1
files/.xmonad/result
Symbolic link
1
files/.xmonad/result
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/g0342b3m9b0c8znl1s7xyibadadw0y0w-glibc-locales-2.32
|
|
@ -10,4 +10,3 @@ extra-deps:
|
|||
- netlink-1.1.1.0
|
||||
- dbus-1.2.12
|
||||
- text-1.2.4.0
|
||||
|
||||
|
|
|
@ -84,12 +84,19 @@ in
|
|||
gitAndTools.gitflow
|
||||
gitAndTools.tig
|
||||
gitAndTools.gitui
|
||||
#pakcs
|
||||
rlwrap
|
||||
irssi
|
||||
hexchat
|
||||
swiPrologWithGui
|
||||
kmonad
|
||||
]
|
||||
)
|
||||
(
|
||||
lib.mkIf cfg.includeHaskellDev [
|
||||
cabal2nix
|
||||
cabal-install
|
||||
ormolu
|
||||
]
|
||||
)
|
||||
];
|
||||
|
|
|
@ -82,6 +82,7 @@ in
|
|||
enable = true;
|
||||
settings.global = dunst_settings;
|
||||
settings.urgency_normal = dunst_settings;
|
||||
|
||||
settings.urgency_low = dunst_settings;
|
||||
};
|
||||
};
|
||||
|
@ -98,6 +99,7 @@ in
|
|||
"Xft.lcdfilter" = "lcddefault";
|
||||
|
||||
"st.font" = "Terminus (TTF):pixelsize=16";
|
||||
|
||||
"*.background" = primary.background;
|
||||
"*.foreground" = primary.foreground;
|
||||
"*.color0" = normal.black;
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
rec {
|
||||
#accent = bright.cyan;
|
||||
#accentDark = normal.cyan;
|
||||
|
||||
|
||||
|
||||
! black
|
||||
*.color0: #0f1010
|
||||
*.color8: #73665a
|
||||
|
||||
! red
|
||||
*.color1: #cc241d
|
||||
*.color9: #fb4934
|
||||
|
||||
! green
|
||||
*.color2: #98971a
|
||||
*.color10: #a7aa2e
|
||||
|
||||
! yellow
|
||||
*.color3: #ce8b3a
|
||||
*.color11: #fabd2f
|
||||
|
||||
! blue
|
||||
*.color4: #458588
|
||||
*.color12: #9f83a5
|
||||
|
||||
! magenta
|
||||
*.color5: #b16286
|
||||
*.color13: #d3869b
|
||||
|
||||
! cyan
|
||||
*.color6: #689d6a
|
||||
*.color14: #8ec07c
|
||||
|
||||
! white
|
||||
*.color7: #a89984
|
||||
*.color15: #cdbe96
|
||||
|
||||
#*.cursorColor: #d8c9a3
|
||||
primary = {
|
||||
foreground= "#d8c9a3";
|
||||
background= "#0f1010";
|
||||
#background= "#0f1010";
|
||||
bg_darker = "#1d2021";
|
||||
bg_lighter = "#3c3836";
|
||||
};
|
||||
|
||||
normal = {
|
||||
black = "#282828";
|
||||
red = "#cc241d";
|
||||
green = "#98971a";
|
||||
yellow = "#d79921";
|
||||
blue = "#458588";
|
||||
magenta = "#b16286";
|
||||
cyan = "#689d6a";
|
||||
white = "#a89984";
|
||||
};
|
||||
|
||||
bright = {
|
||||
black = "#928374";
|
||||
red = "#fb4934";
|
||||
green = "#b8bb26";
|
||||
yellow = "#fabd2f";
|
||||
blue = "#83a598";
|
||||
magenta = "#d3869b";
|
||||
cyan = "#8ec07c";
|
||||
white = "#ebdbb2";
|
||||
};
|
||||
|
||||
}
|
|
@ -167,6 +167,8 @@ in
|
|||
#zle -N deer
|
||||
#bindkey '\ek' deer
|
||||
|
||||
source ~/.profile
|
||||
|
||||
${fzf-tab-stuff}
|
||||
${fixedKeybinds}
|
||||
${makeAbbrs cfg.abbrs}
|
||||
|
|
|
@ -35,6 +35,18 @@
|
|||
"url": "https://github.com/Jomik/fish-gruvbox/archive/d8c0463518fb95bed8818a1e7fe5da20cffe6fbd.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"kmonad": {
|
||||
"branch": "master",
|
||||
"description": "An advanced keyboard manager",
|
||||
"homepage": null,
|
||||
"owner": "david-janssen",
|
||||
"repo": "kmonad",
|
||||
"rev": "9ea39845c722a0b7408abdbdc6d1d829c6af1e9d",
|
||||
"sha256": "1paxk2jslyx4hcyrawh6vj1bz5vq3z2bd7ag8jn2r6g6mh1bfb30",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/david-janssen/kmonad/archive/9ea39845c722a0b7408abdbdc6d1d829c6af1e9d.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"manix": {
|
||||
"branch": "master",
|
||||
"description": "A fast CLI documentation searcher for Nix.",
|
||||
|
|
|
@ -11,4 +11,5 @@ self: super: {
|
|||
nixGL = import sources.nixGL { };
|
||||
scr = super.callPackage ../packages/scr.nix { };
|
||||
my-st = super.callPackage ../packages/st/st-tanish2002 { };
|
||||
kmonad = import "${sources.kmonad}/nix";
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
-*) exit 0;;
|
||||
esac
|
||||
|
||||
case "$(file --mime-type "$1")" in
|
||||
*text*)
|
||||
|
|
Loading…
Reference in a new issue