feat: add vm workspace

This commit is contained in:
Max Hohlfeld 2024-05-21 08:14:24 +02:00
parent 03c3ccec72
commit d8154df97f
3 changed files with 12 additions and 4 deletions

View File

@ -0,0 +1,5 @@
#! /usr/bin/env sh
virsh --connect qemu:///system start "win11"
virt-manager --connect qemu:///system --show-domain-console "win11"

View File

@ -42,4 +42,5 @@
with_items: with_items:
- { src: compiledoc, dest: ~/.local/bin/compiledoc } - { src: compiledoc, dest: ~/.local/bin/compiledoc }
- { src: inline_code.tex, dest: ~/.local/bin/inline_code.tex } - { src: inline_code.tex, dest: ~/.local/bin/inline_code.tex }
- { src: start_vm, dest: ~/.local/bin/start_vm }
tags: t460p tags: t460p

View File

@ -35,7 +35,7 @@ import XMonad.Prompt.FuzzyMatch
import XMonad.Prompt.Shell import XMonad.Prompt.Shell
import XMonad.Prompt.Workspace import XMonad.Prompt.Workspace
import XMonad.Hooks.WorkspaceHistory (workspaceHistoryHook) import XMonad.Hooks.WorkspaceHistory (workspaceHistoryHook)
import XMonad.Hooks.DynamicProperty import XMonad.Hooks.OnPropertyChange (onXPropertyChange)
import qualified XMonad.StackSet as W import qualified XMonad.StackSet as W
import qualified Data.Map as M import qualified Data.Map as M
import Text.Regex.Posix import Text.Regex.Posix
@ -91,6 +91,7 @@ topicItems =
, TI "ST_Backend" "~/projekte/SchulungsTracker/Backend" (switchToLayout "Full" *> spawn "rider ~/projekte/SchulungsTracker/Backend/SchulungsTracker_Backend.sln") , TI "ST_Backend" "~/projekte/SchulungsTracker/Backend" (switchToLayout "Full" *> spawn "rider ~/projekte/SchulungsTracker/Backend/SchulungsTracker_Backend.sln")
, TI "ST_Wiki" "~/projekte/SchulungsTracker/Wiki" (switchToLayout "Programming" *> spawnEditor) , TI "ST_Wiki" "~/projekte/SchulungsTracker/Wiki" (switchToLayout "Programming" *> spawnEditor)
, TI "azsql-dump" "~/projekte/azsql-dump" (switchToLayout "Programming" *> spawnShell *> spawnEditor) , TI "azsql-dump" "~/projekte/azsql-dump" (switchToLayout "Programming" *> spawnShell *> spawnEditor)
, TI "gtue" "~/projekte/gtue" (switchToLayout "FullNoBar" *> spawn "start_vm")
] ]
myTopicConfig :: TopicConfig myTopicConfig :: TopicConfig
@ -227,11 +228,12 @@ myAdditionalKeys =
mySpacing :: Integer -> l a -> XMonad.Layout.LayoutModifier.ModifiedLayout Spacing l a mySpacing :: Integer -> l a -> XMonad.Layout.LayoutModifier.ModifiedLayout Spacing l a
mySpacing i = spacingRaw True (Border i i i i) True (Border i i i i) True mySpacing i = spacingRaw True (Border i i i i) True (Border i i i i) True
myLayout = avoidStruts $ tiling ||| hacking ||| full myLayout = avoidStrutsOn [U] (tiling ||| hacking ||| full) ||| fullNoBar
where where
tiling = renamed [Replace "Tall"] $ smartBorders $ mySpacing 6 $ Tall 1 (3/100) (1/2) tiling = renamed [Replace "Tall"] $ smartBorders $ mySpacing 6 $ Tall 1 (3/100) (1/2)
hacking = renamed [Replace "Programming"] $ smartBorders $ mySpacing 6 $ Tall 1 (3/100) (5/8) hacking = renamed [Replace "Programming"] $ smartBorders $ mySpacing 6 $ Tall 1 (3/100) (5/8)
full = noBorders Full full = noBorders Full
fullNoBar = renamed [Replace "FullNoBar"] full
-- Regex lifted up to use in manageHook -- Regex lifted up to use in manageHook
(*!?) :: Functor f => f String -> String -> f Bool (*!?) :: Functor f => f String -> String -> f Bool
q *!? x = fmap (=~ x) q q *!? x = fmap (=~ x) q
@ -268,7 +270,7 @@ myManageHook = composeAll . concat $
-- return (All True) if the default handler is to be run afterwards. To -- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid. -- combine event hooks use mappend or mconcat from Data.Monoid.
-- --
myEventHook = dynamicPropertyChange "WM_NAME" (title =? "it factum Max Hohlfeld - KeePassXC" <||> title =? "db.kdbx [Gesperrt] - KeePassXC" --> floating) myEventHook = onXPropertyChange "WM_NAME" (title =? "it factum Max Hohlfeld - KeePassXC" <||> title =? "db.kdbx [Gesperrt] - KeePassXC" --> floating)
where floating = customFloating $ W.RationalRect (1/8) (1/8) (3/4) (3/4) where floating = customFloating $ W.RationalRect (1/8) (1/8) (3/4) (3/4)
------------------------------------------------------------------------ ------------------------------------------------------------------------