add dunst to xmonad config; create git role

This commit is contained in:
Max Hohlfeld 2022-11-15 09:58:26 +01:00
parent b184c67475
commit 82a899f196
7 changed files with 569 additions and 168 deletions

View File

@ -1,4 +1,4 @@
allTags := "nvim,xmonad"
allTags := "nvim,xmonad,git"
default:
just --list

View File

@ -0,0 +1,19 @@
[user]
email = maxhohlfeld@it-factum.de
name = Max Hohlfeld
[core]
editor = nvim
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
[merge]
conflictstyle = diff3
[diff]
colorMoved = default

29
roles/git/tasks/main.yml Normal file
View File

@ -0,0 +1,29 @@
---
- name: Install git package
ansible.builtin.package:
name:
- git
- git-delta
state: present
tags: pc
- name: Create a config directory if it doesn't exist
ansible.builtin.file:
path: ~/.config/git
state: directory
mode: '0755'
tags: pc
- name: Copy over config for T460p
ansible.builtin.copy:
src: config_t460p
dest: ~/.config/git/config
mode: '0644'
tags: t460p
- name: Copy over config for qwerty
ansible.builtin.copy:
src: config_qwerty
dest: ~/.config/git/config
mode: '0644'
tags: qwerty

454
roles/xmonad/files/dunstrc Normal file
View File

@ -0,0 +1,454 @@
# See dunst(5) for all configuration options
[global]
### Display ###
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a window manager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern window managers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse
### Geometry ###
# dynamic width from 0 to 300
# width = (0, 300)
# constant width of 300
width = 300
# The maximum height of a single notification, excluding the frame.
height = 300
# Position the notification in the top right corner
origin = top-right
# Offset from the origin
offset = 10x50
# Scale factor. It is auto-detected if value is 0.
scale = 0
# Maximum number of notification (0 means no limit)
notification_limit = 0
### Progress bar ###
# Turn on the progess bar. It appears when a progress hint is passed with
# for example dunstify -h int:value:12
progress_bar = true
# Set the progress bar height. This includes the frame, so make sure
# it's at least twice as big as the frame width.
progress_bar_height = 10
# Set the frame width of the progress bar
progress_bar_frame_width = 1
# Set the minimum width for the progress bar
progress_bar_min_width = 150
# Set the maximum width for the progress bar
progress_bar_max_width = 300
# Show how many messages are currently hidden (because of
# notification_limit).
indicate_hidden = yes
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
transparency = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
# If gap_size is greater than 0, this setting will be ignored.
separator_height = 2
# Padding between text and separator.
padding = 8
# Horizontal padding.
horizontal_padding = 8
# Padding between text and icon.
text_icon_padding = 0
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 3
# Defines color of the frame around the notification window.
frame_color = "#dca3a3"
# Size of gap to display between notifications - requires a compositor.
# If value is greater than 0, separator_height will be ignored and a border
# of size frame_width will be drawn around each notification instead.
# Click events on gaps do not currently propagate to applications below.
gap_size = 0
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Sort messages by urgency.
sort = yes
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# A client can set the 'transient' hint to bypass this. See the rules
# section for how to disable this if necessary
# idle_threshold = 120
### Text ###
font = Monospace 10
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 0
# Possible values are:
# full: Allow a small subset of html markup in notifications:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <https://docs.gtk.org/Pango/pango_markup.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
# server. Dunst will try to strip the markup but the parsing is
# simplistic so using this option outside of matching rules for
# specific applications *IS GREATLY DISCOURAGED*.
#
# no: Disable markup parsing, incoming notifications will be treated as
# plain text. Dunst will not advertise that it has the body-markup
# capability if this is set as a global setting.
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = full
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "<b>%s</b>\n%b"
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# Vertical alignment of message text and icon.
# Possible values are "top", "center" and "bottom".
vertical_alignment = center
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Specify where to make an ellipsis in long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle
# Ignore newlines '\n' in notifications.
ignore_newline = no
# Stack together notifications with the same content
stack_duplicates = true
# Hide the count of stacked notifications with the same content
hide_duplicate_count = false
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
### Icons ###
# Recursive icon lookup. You can set a single theme, instead of having to
# define all lookup paths.
enable_recursive_icon_lookup = true
# Set icon theme (only used for recursive icon lookup)
icon_theme = Adwaita
# You can also set multiple icon themes, with the leftmost one being used first.
# icon_theme = "Adwaita, breeze"
# Align icons left/right/top/off
icon_position = left
# Scale small icons up to this size, set to 0 to disable. Helpful
# for e.g. small files or high-dpi screens. In case of conflict,
# max_icon_size takes precedence over this.
min_icon_size = 32
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 128
# Paths to default icons (only neccesary when not using recursive icon lookup)
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
### History ###
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
### Misc/Advanced ###
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/xdg-open
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
# Define the title of the windows spawned by dunst
title = Dunst
# Define the class of the windows spawned by dunst
class = Dunst
# Define the corner radius of the notification window
# in pixel size. If the radius is 0, you have no rounded
# corners.
# The radius will be automatically lowered if it exceeds half of the
# notification height to avoid clipping text and/or icons.
corner_radius = 0
# Ignore the dbus closeNotification message.
# Useful to enforce the timeout set by dunst configuration. Without this
# parameter, an application may close the notification sent before the
# user defined timeout.
ignore_dbusclose = false
### Wayland ###
# These settings are Wayland-specific. They have no effect when using X11
# Uncomment this if you want to let notications appear under fullscreen
# applications (default: overlay)
# layer = top
# Set this to true to use X11 output on Wayland.
force_xwayland = false
### Legacy
# Use the Xinerama extension instead of RandR for multi-monitor support.
# This setting is provided for compatibility with older nVidia drivers that
# do not support RandR and using it on systems that support RandR is highly
# discouraged.
#
# By enabling this setting dunst will not be able to detect when a monitor
# is connected or disconnected which might break follow mode if the screen
# layout changes.
force_xinerama = false
### mouse
# Defines list of actions for each mouse event
# Possible values are:
# * none: Don't do anything.
# * do_action: Invoke the action determined by the action_name rule. If there is no
# such action, open the context menu.
# * open_url: If the notification has exactly one url, open it. If there are multiple
# ones, open the context menu.
# * close_current: Close current notification.
# * close_all: Close all notifications.
# * context: Open context menu for the notification.
# * context_all: Open context menu for all notifications.
# These values can be strung together for each mouse event, and
# will be executed in sequence.
mouse_left_click = close_current
mouse_middle_click = do_action, close_current
mouse_right_click = close_all
# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#3f3f3f"
foreground = "#888888"
timeout = 10
# Icon for notifications with low urgency, uncomment to enable
#default_icon = /path/to/icon
[urgency_normal]
background = "#3f3f3f"
foreground = "#ffffff"
timeout = 10
# Icon for notifications with normal urgency, uncomment to enable
#default_icon = /path/to/icon
[urgency_critical]
background = "#3f3f3f"
foreground = "#ffffff"
frame_color = "#ff0000"
timeout = 0
# Icon for notifications with critical urgency, uncomment to enable
#default_icon = /path/to/icon
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
#
# Messages can be matched by
# appname (discouraged, see desktop_entry)
# body
# category
# desktop_entry
# icon
# match_transient
# msg_urgency
# stack_tag
# summary
#
# and you can override the
# background
# foreground
# format
# frame_color
# fullscreen
# new_icon
# set_stack_tag
# set_transient
# set_category
# timeout
# urgency
# icon_position
# skip_display
# history_ignore
# action_name
# word_wrap
# ellipsize
# alignment
# hide_text
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
# match_transient = yes
# set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes
# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
# If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
# withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
# fullscreen = delay
#[fullscreen_show_critical]
# msg_urgency = critical
# fullscreen = show
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# skip_display = true
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[skip-display]
# # This notification will not be displayed, but will be included in the history
# summary = "foobar"
# skip_display = yes
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
#[stack-volumes]
# appname = "some_volume_notifiers"
# set_stack_tag = "volume"
#
# vim: ft=cfg

View File

@ -38,6 +38,7 @@ import XMonad.Hooks.DynamicProperty
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import Text.Regex.Posix
import XMonad.Util.WorkspaceCompare ( getSortByIndex, filterOutWs )
-- colours
@ -52,7 +53,7 @@ grey :: String = "#3f3f3f"
darkGrey :: String = "#262626"
-- variables
myTerminal = "st"
myTerminal = "alacritty"
myBorderWidth = 1
myModMask = mod4Mask
@ -72,9 +73,9 @@ topicItems =
, noAction "3" "~/"
, noAction "4" "~/"
, noAction "5" "~/"
, TI "dots" "~/dotfiles" spawnShell
, TI "IHD_Backend" "~/projekte/IHD/Tractatio_Backend/" (spawnShell *> spawnShell *> spawnShell)
, TI "IHD_Frontend" "~/projekte/IHD/Demonstrare_Frontend/" (spawnShell *> spawnShell *> spawnShell)
, TI "alkaa" "~/projekte/alkaa" (switchToLayout "Programming" *> spawnShell *> spawnEditor)
, TI "IHD_Backend" "~/projekte/IHD/Tractatio_Backend/" (switchToLayout "Programming" *> spawn "rider")
, TI "IHD_Frontend" "~/projekte/IHD/Demonstrare_Frontend/" (switchToLayout "Programming" *> spawnShellAndExecute "npm start" *> spawnShell *> spawnEditor)
]
myTopicConfig :: TopicConfig
@ -85,58 +86,28 @@ myTopicConfig = def
, defaultTopic = "1" -- fallback
}
spawnShellInTopic :: X ()
-- spawnShellInTopic = currentTopicDir myTopicConfig >>= spawn(myTerminal) ++ " -d "
spawnShellInTopic = proc $ inTerm >-> execute "nvim" >-$ currentTopicDir myTopicConfig
-- spawnTermInTopic :: X ()
-- spawnTermInTopic = proc $ termInDir >-$ currentTopicDir topicConfig
-- | Execute a program in the topic directory (inside a terminal).
-- executeInTopic :: String -> X ()
-- executeInTopic p = proc $ (termInDir >-$ currentTopicDir topicConfig) >-> executeNoQuote p
-- | Spawn editor in the current topic directory.
-- spawnEditorInTopic :: X ()
-- spawnEditorInTopic = proc $ inEditor >-$ currentTopicDir topicConfig
--
spawnShell :: X ()
spawnShell = currentTopicDir myTopicConfig >>= spawnShellIn
-- spawnShell = currentTopicDir myTopicConfig >>= \dir -> spawnShellInTopic $ dir " dsfsdf"
-- spawnShell = ((spawnShellInTopic "dsf") " dsfsdf")
spawnShell = proc $ termInDir >-$ currentTopicDir myTopicConfig
spawnShellIn :: Dir -> X ()
spawnShellIn dir = spawn $ "st -d " ++ dir
spawnEditor :: X ()
spawnEditor = proc $ (termInDir >-$ currentTopicDir myTopicConfig) >-> execute "nvim"
spawnShellWith :: String -> X()
-- spawnShellWith cmd = spawn $ "st -e " ++ cmd
spawnShellWith cmd = currentTopicDir myTopicConfig >>= spawnShellInWith cmd
switchToLayout :: String -> X ()
switchToLayout = sendMessage . JumpToLayout
spawnShellInWith :: Dir -> String -> X ()
spawnShellInWith dir cmd = spawn $ "st -d " ++ dir ++ " -e " ++ cmd
-- getDir :: X Dir -> String
-- getDir (X dir) = dir
-- combine :: String -> String
-- combine str = currentTopicDir myTopicConfig . getDir
-- getDir =
spawnShellInAndExe :: String -> String -> X ()
spawnShellInAndExe cmd dir = spawn $ "st -d" ++ dir ++ " -e" ++ cmd
goto :: Topic -> X ()
goto = switchTopic myTopicConfig
promptedGoto :: X ()
promptedGoto = workspacePrompt topicPrompt goto
promptedShift :: X ()
promptedShift = workspacePrompt topicPrompt $ windows . W.shift
spawnShellAndExecute :: String -> X ()
spawnShellAndExecute cmd = proc $ (termInDir >-$ currentTopicDir myTopicConfig) >-> execute cmd
toggleTopic :: X ()
toggleTopic = switchNthLastFocusedByScreen myTopicConfig 1
myWorkSpacePrompt :: XPConfig -> (String -> X ()) -> X ()
myWorkSpacePrompt c job = do ws <- gets (W.workspaces . windowset)
sort <- getSortByIndex
let filter = filterOutWs ["1", "2", "3", "4", "5", "NSP"]
let ts = map W.tag $ filter ws
mkXPrompt (Wor "") c (mkComplFunFromList' c ts) job
topicPrompt :: XPConfig
topicPrompt = def
{ historySize = 0 -- No history in the prompt.
@ -158,13 +129,22 @@ topicPrompt = def
myAdditionalKeys :: [(String, X ())]
myAdditionalKeys =
-- xmonad specific
[ ("M-q", spawn "xmonad --recompile; xmonad --restart")
[ ("M-q", spawn "xmonad --recompile; xmonad --restart")
, ("M-S-c", kill)
, ("M-j", windows W.focusDown)
, ("M-k", windows W.focusUp)
, ("M-S-j", windows W.swapDown)
, ("M-S-k", windows W.swapUp)
, ("M-h", sendMessage Shrink)
, ("M-j", sendMessage Expand)
, ("M-,", sendMessage (IncMasterN 1))
, ("M-S-,", sendMessage (IncMasterN (-1)))
, ("M-.", sendMessage ToggleStruts)
-- dmenu prompts
, ("M-<Return>", spawn "dm-recent-aliases")
, ("M-p s", spawn "dm-screenshot")
, ("M-p c", spawn "dm-confedit")
, ("M-p k", spawn "dm-kill")
, ("M-<Return>", spawn "dm-recent-aliases")
, ("M-p s", spawn "dm-screenshot")
, ("M-p k", spawn "dm-kill")
-- scratchpads
, ("M-n", namedScratchpadAction myScratchpads "nnn")
@ -172,11 +152,16 @@ myAdditionalKeys =
, ("M-v", namedScratchpadAction myScratchpads "vimwiki")
-- open terminal
, ("M-S-<Return>", spawn (myTerminal))
-- open browser
, ("M-S-<Return>", spawnShell)
, ("M-b", spawn "firefox")
-- layout
, ("M-t t", switchToLayout "Tall")
, ("M-t p", switchToLayout "Programming")
, ("M-t f", switchToLayout "Full")
, ("M-S-f", withFocused $ windows . W.sink)
-- media keys
, ("<XF86AudioMute>", spawn "pamixer -t")
, ("<XF86AudioLowerVolume>", spawn "pamixer -d 5")
@ -186,112 +171,26 @@ myAdditionalKeys =
-- lock screen
, ("M-S-l", spawn "slock")
-- mute mic
, ("M-S-m", spawn "amixer sset Capture toggle")
, ("M-z", promptedGoto)
, ("M-S-z", promptedShift)
, ("M-S-<Space>", toggleTopic)
-- close windows
, ("M-S-c", kill)
-- workspace switching
, ("M-<Tab>", toggleTopic)
, ("M-<Space>", myWorkSpacePrompt topicPrompt (switchTopic myTopicConfig))
, ("M-S-<Space>", myWorkSpacePrompt topicPrompt (windows . W.shift))
]
++
[ ("M-" ++ m ++ k, f i)
| (i, k) <- zip (topicNames topicItems) (map show [1 .. 9 :: Int])
, (f, m) <- [(goto, ""), (windows . W.shift, "S-")]
| (i, k) <- zip (topicNames topicItems) (map show [1 .. 5 :: Int])
, (f, m) <- [(switchTopic myTopicConfig, ""), (windows . W.shift, "S-")]
]
-- default keybinds
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
[
-- Rotate through the available layout algorithms
((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
-- , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
-- , ((modm, xK_n ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modm, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm, xK_k ), windows W.focusUp )
-- Move focus to the master window
-- , ((modm, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modm, xK_Return), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm, xK_h ), sendMessage Shrink)
-- Expand the master area
, ((modm, xK_l ), sendMessage Expand)
-- Push window back into tiling
, ((modm, xK_t ), withFocused $ windows . W.sink)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
-- Toggle the status bar gap
-- Use this binding with avoidStruts from Hooks.ManageDocks.
-- See also the statusBar function from Hooks.DynamicLog.
--
, ((modm .|. shiftMask, xK_b ), sendMessage ToggleStruts)
-- Quit xmonad
-- , ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
]
++
--
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
--
-- [((m .|. modm, k), windows $ f i)
-- | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
-- , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
-- ++
--
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
--
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
-- Layouts
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
myLayout = onWorkspace "6" full $ avoidStruts $ onWorkspace "5" steamThreeCol $ tiled ||| full ||| threeCol
myLayout = avoidStruts $ tiling ||| hacking ||| full
where
tiled = renamed [CutWordsLeft 1] $ smartBorders $ mySpacing 6 $ Tall 1 (3/100) (1/2)
steamThreeCol = renamed [Replace "Three Col"] $ noBorders $ mySpacing 3 $ ThreeCol 1 (3/100) (5/8)
threeCol = renamed [Replace "Three Col"] $ smartBorders $ mySpacing 6 $ ThreeCol 1 (3/100) (1/2)
full = smartBorders $ Full
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)
full = noBorders Full
-- Regex lifted up to use in manageHook
(*!?) :: Functor f => f String -> String -> f Bool
@ -303,11 +202,6 @@ myManageHook = composeAll . concat $
, [ resource =? "kdesktop" --> doIgnore ]
, [ ( className =? "LibreWolf" <&&> role =? "Organizer" ) --> doFloat ]
-- Steam and games
, [ className =? "Steam" --> doShift "5" ]
, [ ( className =? "Steam" <&&> title *!? "Friends List" <||> title *!? "News" ) --> doF W.swapDown ]
, [ title =? t <&&> title *!? t --> doShift "6" | t <- myGames ]
-- float specific classes
, [ className =? c --> doFloat | c <- myFloatingClasses ]
@ -317,7 +211,6 @@ myManageHook = composeAll . concat $
where
role = stringProperty "WM_WINDOW_ROLE"
myFloatingClasses = ["Gimp", "Origin"]
myGames = ["Grim Dawn", "Der Herr der Ringe Online™", "Dota 2", "Project Zomboid", "Valheim", "Factorio", "Path of Exile", "Paradox Launcher", "Europa Universalis IV", "Bannerlord"]
@ -346,6 +239,7 @@ myStartupHook = do
setWMName "LG3D"
setDefaultCursor xC_left_ptr
--spawnOnce("redshift -c /home/max/.config/redshift/redshiftrc")
spawnOnce "/usr/bin/dunst"
spawnOnce("feh --bg-fill ~/bg.jpg ~/bg.jpg")
-- Main
@ -360,10 +254,7 @@ main = do
workspaces = topicNames topicItems,
normalBorderColor = white,
focusedBorderColor = red,
-- key bindings
keys = myKeys,
keys = mempty,
-- hooks, layouts
layoutHook = myLayout,
manageHook = myManageHook,

View File

@ -6,7 +6,9 @@
- xmonad-contrib
- xmobar
- alacritty
- dunst
state: present
become: true
tags: pc
# - name: Build and install custom st, dmenu and slock
@ -20,6 +22,7 @@
with_items:
- ~/.config/xmonad
- ~/.config/xmobar
- ~/.config/dunst
tags: pc
- name: Copy over alacritty config
@ -29,6 +32,13 @@
mode: '0644'
tags: pc
- name: Copy over dunst config
ansible.builtin.copy:
src: dunstrc
dest: ~/.config/dunst/dunstrc
mode: '0644'
tags: pc
- name: Copy over T460p config files
ansible.builtin.copy:
src: "{{ item.src }}"

View File

@ -2,11 +2,6 @@
- name: Dotfile Playbook
connection: local
hosts: localhost
# roles:
# - role: nvim
# tags: nvim
# - role: xmonad
# tags: xmonad
tasks:
- ansible.builtin.include_role:
name: nvim
@ -14,3 +9,6 @@
- ansible.builtin.include_role:
name: xmonad
tags: xmonad
- ansible.builtin.include_role:
name: git
tags: git