diff --git a/.dotter/global.toml b/.dotter/global.toml index 1207504..721a40f 100644 --- a/.dotter/global.toml +++ b/.dotter/global.toml @@ -35,4 +35,13 @@ alacritty = "~/.config/alacritty" starship = "~/.config/" [zsh.files] -zsh = "~/" \ No newline at end of file +zsh = "~/" + +[polybar.files] +polybar = "~/.config/polybar" + +[leftwm.files] +leftwm = "~/.config/leftwm" + +[xmonad.files] +xmonad = "~/.xmonad" diff --git a/.dotter/local.toml b/.dotter/local.toml index baed2bc..c79d861 100644 --- a/.dotter/local.toml +++ b/.dotter/local.toml @@ -1,2 +1,2 @@ # includes = [] -packages = ["mc", "nvim", "emacs", "i3", "alacritty", "starship", "zsh"] +packages = ["mc", "nvim", "emacs", "i3", "alacritty", "starship", "zsh", "polybar"] diff --git a/leftwm/config.toml b/leftwm/config.toml new file mode 100644 index 0000000..422bc40 --- /dev/null +++ b/leftwm/config.toml @@ -0,0 +1,376 @@ +modkey = "Mod4" +mousekey = "Mod4" +workspaces = [] +tags = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ] +layouts = [ + "MainAndVertStack", + "MainAndHorizontalStack", + # "MainAndDeck", + #"GridHorizontal", + # "EvenHorizontal", + # "EvenVertical", + # "Fibonacci", + # "LeftMain", + # "CenterMain", + # "CenterMainBalanced", + # "CenterMainFluid", + # "Monocle", + # "RightWiderLeftStack", + # "LeftWiderRightStack" +] +layout_mode = "Tag" +insert_behavior = "Bottom" +disable_current_tag_swap = false +disable_tile_drag = true +focus_behaviour = "Sloppy" +focus_new_windows = true +disable_window_snap = true +window_rules = [ + {window_class = "firefox", window_title = "Mozilla Firefox$", spawn_on_tag = 1}, + {window_class = "TelegramDesktop", spawn_on_tag = 9}, + {window_class = "Signal", spawn_on_tag = 9}, + {window_class = "Rocket.Chat", spawn_on_tag = 9}, + {window_class = "Element", spawn_on_tag = 9}, + {window_class = "Thunderbird", spawn_on_tag = 10}, + {window_class = "zoom", spawn_on_tag = 5}, + + # {window_title = "Manjaro Settings Manager", spawn_floating = true}, + # {window_class = "Pamac-manager", spawn_floating = true}, + # {window_class = "Pamac-updater", spawn_floating = true}, + # {window_class = "Qalculate-gtk", spawn_floating = true}, +] + +[[keybind]] +command = "SetLayout" +value = "Monocle" +modifier = ["modkey"] +key = "m" + +[[scratchpad]] +name = "calculator" +value = "qalculate-gtk" + +[[keybind]] +command = "ToggleScratchPad" +value = "calculator" +modifier = ["modkey"] +key = "c" + +[[keybind]] +command = "Execute" +value = "~/.config/leftwm/scripts/dzen_exit_menu.pl" +modifier = ["modkey", "Shift"] +key = "e" + +[[keybind]] +command = "Execute" +value = "firefox" +modifier = ["modkey"] +key = "b" + +[[keybind]] +command = "Execute" +value = "krusader" +modifier = ["modkey"] +key = "t" + +[[keybind]] +command = "Execute" +value = "rofi -show run #dmenu_recency -i" +modifier = ["modkey"] +key = "d" + +[[keybind]] +command = "Execute" +value = "alacritty" +modifier = ["modkey"] +key = "Return" + +[[keybind]] +command = "ToggleFullScreen" +value = "" +modifier = ["modkey"] +key = "f" + +[[keybind]] +command = "ToggleFloating" +value = "" +modifier = ["modkey", "Shift"] +key = "space" + +[[keybind]] +command = "CloseWindow" +value = "" +modifier = ["modkey"] +key = "q" + +[[keybind]] +command = "CloseWindow" +value = "" +modifier = ["modkey"] +key = "x" + +[[keybind]] +command ="SoftReload" +value = "" +modifier = ["modkey", "Shift"] +key = "r" + +#[[keybind]] +#command = "MoveToLastWorkspace" +#value = "" +#modifier = ["modkey", "Shift"] +#key = "w" + +#[[keybind]] +#command = "SwapTags" +#value = "" +#modifier = ["modkey"] +#key = "w" + +#[[keybind]] +#command = "MoveWindowUp" +#value = "" +#modifier = ["modkey", "Shift"] +#key = "k" + +#[[keybind]] +#command = "MoveWindowDown" +#value = "" +#modifier = ["modkey", "Shift"] +#key = "j" + +#[[keybind]] +#command = "MoveWindowTop" +#value = "" +#modifier = ["modkey", "Shift"] +#key = "Return" + +#[[keybind]] +#command = "FocusWindowUp" +#value = "" +#modifier = ["modkey"] +#key = "k" + +#[[keybind]] +#command = "FocusWindowDown" +#value = "" +#modifier = ["modkey"] +#key = "j" + +#[[keybind]] +#command = "NextLayout" +#value = "" +#modifier = ["modkey", "Control"] +#key = "k" + +#[[keybind]] +#command = "PreviousLayout" +#value = "" +#modifier = ["modkey", "Control"] +#key = "j" + +#[[keybind]] +#command = "FocusWorkspaceNext" +#value = "" +#modifier = ["modkey"] +#key = "l" + +#[[keybind]] +#command = "FocusWorkspacePrevious" +#value = "" +#modifier = ["modkey"] +#key = "h" + + +[[keybind]] +command = "FocusWindowUp" +value = "" +modifier = ["modkey"] +key = "Up" + +[[keybind]] +command = "FocusWindowDown" +value = "" +modifier = ["modkey"] +key = "Down" + +[[keybind]] +command = "FocusWindowTop" +value = "true" +modifier = ["modkey"] +key = "Left" + +[[keybind]] +command = "FocusWindowTop" +value = "true" +modifier = ["modkey"] +key = "Right" + +[[keybind]] +command = "MoveWindowUp" +value = "" +modifier = ["modkey", "Shift"] +key = "Up" + +[[keybind]] +command = "MoveWindowDown" +value = "" +modifier = ["modkey", "Shift"] +key = "Down" + +[[keybind]] +command = "MoveWindowTop" +value = "" +modifier = ["modkey", "Shift"] +key = "Left" + +[[keybind]] +command = "MoveWindowTop" +value = "" +modifier = ["modkey", "Shift"] +key = "Right" + +[[keybind]] +command = "NextLayout" +value = "" +modifier = ["modkey", "Control"] +key = "Up" + +[[keybind]] +command = "RotateTag" +value = "" +modifier = ["modkey", "Control"] +key = "Down" + +#[[keybind]] +#command = "FocusWorkspaceNext" +#value = "" +#modifier = ["modkey"] +#key = "Right" + +#[[keybind]] +#command = "FocusWorkspacePrevious" +#value = "" +#modifier = ["modkey"] +#key = "Left" + +[[keybind]] +command = "GotoTag" +value = "1" +modifier = ["modkey"] +key = "1" + +[[keybind]] +command = "GotoTag" +value = "2" +modifier = ["modkey"] +key = "2" + +[[keybind]] +command = "GotoTag" +value = "3" +modifier = ["modkey"] +key = "3" + +[[keybind]] +command = "GotoTag" +value = "4" +modifier = ["modkey"] +key = "4" + +[[keybind]] +command = "GotoTag" +value = "5" +modifier = ["modkey"] +key = "5" + +[[keybind]] +command = "GotoTag" +value = "6" +modifier = ["modkey"] +key = "6" + +[[keybind]] +command = "GotoTag" +value = "7" +modifier = ["modkey"] +key = "7" + +[[keybind]] +command = "GotoTag" +value = "8" +modifier = ["modkey"] +key = "8" + +[[keybind]] +command = "GotoTag" +value = "9" +modifier = ["modkey"] +key = "9" + +[[keybind]] +command = "GotoTag" +value = "10" +modifier = ["modkey"] +key = "0" + +[[keybind]] +command = "MoveToTag" +value = "1" +modifier = ["modkey", "Shift"] +key = "1" + +[[keybind]] +command = "MoveToTag" +value = "2" +modifier = ["modkey", "Shift"] +key = "2" + +[[keybind]] +command = "MoveToTag" +value = "3" +modifier = ["modkey", "Shift"] +key = "3" + +[[keybind]] +command = "MoveToTag" +value = "4" +modifier = ["modkey", "Shift"] +key = "4" + +[[keybind]] +command = "MoveToTag" +value = "5" +modifier = ["modkey", "Shift"] +key = "5" + +[[keybind]] +command = "MoveToTag" +value = "6" +modifier = ["modkey", "Shift"] +key = "6" + +[[keybind]] +command = "MoveToTag" +value = "7" +modifier = ["modkey", "Shift"] +key = "7" + +[[keybind]] +command = "MoveToTag" +value = "8" +modifier = ["modkey", "Shift"] +key = "8" + +[[keybind]] +command = "MoveToTag" +value = "9" +modifier = ["modkey", "Shift"] +key = "9" + +[[keybind]] +command = "MoveToTag" +value = "10" +modifier = ["modkey", "Shift"] +key = "0" diff --git a/leftwm/scripts/dzen_exit_menu.pl b/leftwm/scripts/dzen_exit_menu.pl new file mode 100755 index 0000000..3b713a5 --- /dev/null +++ b/leftwm/scripts/dzen_exit_menu.pl @@ -0,0 +1,21 @@ +#!/bin/perl +use strict; +use warnings; + +my $message="System (l) lock, (e) logout, (r) reboot, (s) shutdown"; +my $screen_height=1080; +my $message_height=34; + +my %actions; +$actions{"l"} = "i3lock --ignore-empty-password --color 000000"; +$actions{"e"} = "pkill leftwm"; +$actions{"r"} = "systemctl reboot"; +$actions{"s"} = "systemctl poweroff"; + +my @dzen_actions; +while ((my $key, my $action) = each (%actions)){ + push @dzen_actions, "key_$key=exit,exec:$action"; +} +my $joined_actions = join(";", @dzen_actions); +print "$joined_actions"; +`echo "$message" | dzen2 -h $message_height -p -y $screen_height -e "onstart=grabkeys;key_Escape=exit;key_Return=exit;button1=exit;$joined_actions"`; diff --git a/leftwm/themes.toml b/leftwm/themes.toml new file mode 100644 index 0000000..cb2160d --- /dev/null +++ b/leftwm/themes.toml @@ -0,0 +1,211 @@ +[[repos]] +url = "https://raw.githubusercontent.com/leftwm/leftwm-community-themes/master/known.toml" +name = "community" +definitions_version = 1 + +[[repos.themes]] +name = "Orange Forest" +repository = "https://github.com/PVautour/leftwm-theme-orange-forest/" +commit = "*" +version = "0.0.2" +leftwm_versions = "^0.3.0" +current = false + +[[repos.themes]] +name = "Coffee" +repository = "https://github.com/lex148/leftwm-coffee/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "Soothe" +repository = "https://github.com/b4skyx/leftwm-soothe/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false +relative_directory = "theme/" + +[[repos.themes]] +name = "TNG" +repository = "https://github.com/lex148/leftwm-tng/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "Windows XP" +repository = "https://github.com/lex148/leftwm-windowsxp/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "Dracula Rounded" +directory = "/home/julian/.config/leftwm/themes/Dracula Rounded" +repository = "https://github.com/AethanFoot/leftwm-theme-dracula-rounded/" +commit = "*" +version = "0.0.3" +leftwm_versions = "^0.3.0" +current = false + +[[repos.themes]] +name = "Forest" +directory = "/home/julian/.config/leftwm/themes/Forest" +repository = "https://github.com/lex148/forest/" +commit = "*" +version = "0.0.1" +leftwm_versions = "^0.3.0" +current = true + +[[repos.themes]] +name = "Ground Zero" +repository = "https://github.com/Qwart376/Ground-Zero/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "Red Moon" +repository = "https://github.com/Qwart376/Red-Moon" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "Blue Coffee" +directory = "/home/julian/.config/leftwm/themes/Blue Coffee" +repository = "https://github.com/Qwart376/Blue-Coffee/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "sunflower" +repository = "https://github.com/mautamu/leftwm-sunflower/" +commit = "*" +version = "0.1.2" +leftwm_versions = "^0.2.11, <0.3.0" +current = false + +[[repos.themes]] +name = "Bumblebee" +repository = "https://github.com/mfdorst/leftwm-bumblebee/" +commit = "*" +version = "0.0.1" +leftwm_versions = "^0.2.8, <0.3.0" +current = false + +[[repos.themes]] +name = "Sunset" +repository = "https://github.com/Syudagye/leftwm-sunset" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "Garden" +directory = "/home/julian/.config/leftwm/themes/Garden" +repository = "https://github.com/taylor85345/leftwm-theme-garden" +commit = "*" +version = "0.0.4" +leftwm_versions = ">0.2.7" +current = false + +[[repos.themes]] +name = "Epitaph" +directory = "/home/julian/.config/leftwm/themes/Epitaph" +repository = "https://github.com/VentGrey/Epitaph" +commit = "*" +version = "0.0.2" +leftwm_versions = "*" +current = false + +[[repos.themes]] +name = "Ocean-night" +directory = "/home/julian/.config/leftwm/themes/Ocean-night" +repository = "https://github.com/TheRoniOne/ocean-night" +commit = "*" +version = "0.0.1" +leftwm_versions = "*" +current = false + +[[repos.themes]] +name = "Flamingo" +repository = "https://github.com/necaris/leftwm-theme-flamingo" +commit = "*" +version = "0.0.1" +leftwm_versions = ">0.2.7, <0.3.0" +current = false + +[[repos.themes]] +name = "Amber" +repository = "https://github.com/di-effe/amber" +commit = "*" +version = "0.2.2" +leftwm_versions = ">0.2.10, <0.3.0" +current = false + +[[repos.themes]] +name = "Catppuccin" +repository = "https://github.com/di-effe/catppuccin" +commit = "*" +version = "0.1.1" +leftwm_versions = ">0.2.10, <0.3.0" +current = false + +[[repos.themes]] +name = "Molese" +repository = "https://github.com/m0lese/leftwm-config" +commit = "*" +version = "2.1.0" +leftwm_versions = ">0.2.10, <0.3.0" +current = false + +[[repos.themes]] +name = "Double Bar" +directory = "/home/julian/.config/leftwm/themes/Double Bar" +repository = "https://github.com/PeterDauwe/doublebar/" +commit = "*" +version = "0.0.2" +leftwm_versions = "^0.3.0" +current = false + +[[repos.themes]] +name = "SpaceJelly" +repository = "https://gitlab.com/jchand99/space_jelly" +commit = "*" +version = "1.0.0" +leftwm_versions = ">0.2.10, <0.3.0" +current = false + +[[repos.themes]] +name = "Ascent" +directory = "/home/julian/.config/leftwm/themes/Ascent" +repository = "https://gitlab.com/mWalrus/ascent" +commit = "*" +version = "1.0.0" +leftwm_versions = ">0.2.7" +current = false + +[[repos.themes]] +name = "Zexanima" +repository = "https://github.com/calebgasser/zexanima-leftwm-theme/tree/develop" +commit = "*" +version = "0.0.1" +leftwm_versions = ">0.3.0" +current = false + +[[repos]] +url = "localhost" +name = "LOCAL" +definitions_version = 1 +themes = [] diff --git a/leftwm/themes/current b/leftwm/themes/current new file mode 160000 index 0000000..129901d --- /dev/null +++ b/leftwm/themes/current @@ -0,0 +1 @@ +Subproject commit 129901d8aa23bbbcacebb44aebe62aaee441c9cf diff --git a/xmonad/build-x86_64-linux/Main.hi b/xmonad/build-x86_64-linux/Main.hi new file mode 100644 index 0000000..d701a38 Binary files /dev/null and b/xmonad/build-x86_64-linux/Main.hi differ diff --git a/xmonad/build-x86_64-linux/Main.o b/xmonad/build-x86_64-linux/Main.o new file mode 100644 index 0000000..e17ff82 Binary files /dev/null and b/xmonad/build-x86_64-linux/Main.o differ diff --git a/xmonad/scripts/dzen_exit_menu.pl b/xmonad/scripts/dzen_exit_menu.pl new file mode 100755 index 0000000..e7471e4 --- /dev/null +++ b/xmonad/scripts/dzen_exit_menu.pl @@ -0,0 +1,21 @@ +#!/bin/perl +use strict; +use warnings; + +my $message="System (l) lock, (e) logout, (r) reboot, (s) shutdown"; +my $screen_height=1080; +my $message_height=34; + +my %actions; +$actions{"l"} = "i3lock --ignore-empty-password --color 000000"; +$actions{"e"} = "pkill leftwm"; +$actions{"r"} = "systemctl reboot"; +$actions{"s"} = "systemctl poweroff"; + +my @dzen_actions; +while ((my $key, my $action) = each (%actions)){ + push @dzen_actions, "key_$key=exit,exec:$action"; +} +my $joined_actions = join(";", @dzen_actions); +print "$joined_actions"; +system "echo \"$message\" | dzen2 -h $message_height -p -y $screen_height -e \"onstart=grabkeys;key_Escape=exit;key_Return=exit;button1=exit;$joined_actions\""; diff --git a/xmonad/xmonad-x86_64-linux b/xmonad/xmonad-x86_64-linux new file mode 100755 index 0000000..45fe634 Binary files /dev/null and b/xmonad/xmonad-x86_64-linux differ diff --git a/xmonad/xmonad.errors b/xmonad/xmonad.errors new file mode 100644 index 0000000..6767361 --- /dev/null +++ b/xmonad/xmonad.errors @@ -0,0 +1 @@ +$ ghc --make xmonad.hs -i -ilib -fforce-recomp -main-is main -dynamic -v0 -outputdir /home/julian/.xmonad/build-x86_64-linux -o /home/julian/.xmonad/xmonad-x86_64-linux diff --git a/xmonad/xmonad.hi b/xmonad/xmonad.hi new file mode 100644 index 0000000..e665423 Binary files /dev/null and b/xmonad/xmonad.hi differ diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs new file mode 100644 index 0000000..09e134a --- /dev/null +++ b/xmonad/xmonad.hs @@ -0,0 +1,205 @@ +import qualified Data.Map as M +import Data.Monoid +import System.Exit +import XMonad hiding ((|||)) +import XMonad.Actions.MouseResize +import XMonad.Hooks.EwmhDesktops +import XMonad.Hooks.InsertPosition (Focus (Newer), Position (Below, Master), insertPosition) +import XMonad.Hooks.ManageDocks +import XMonad.Hooks.ManageHelpers (doCenterFloat, doFullFloat, isDialog, isFullscreen) +import XMonad.Layout.Fullscreen +import XMonad.Layout.LayoutCombinators +import XMonad.Layout.LimitWindows +import XMonad.Layout.MultiToggle +import XMonad.Layout.MultiToggle.Instances +import XMonad.Layout.NoBorders +import XMonad.Layout.NoFrillsDecoration (simpleDeco) +import XMonad.Layout.Reflect (reflectHoriz) +import XMonad.Layout.Renamed +import XMonad.Layout.ResizableTile +import XMonad.Layout.SimpleDecoration +import XMonad.Layout.Simplest +import XMonad.Layout.SimplestFloat +import XMonad.Layout.Spacing +import XMonad.Layout.SubLayouts +import XMonad.Layout.Tabbed +import XMonad.Layout.ToggleLayouts +import qualified XMonad.Layout.ToggleLayouts as T (ToggleLayout (Toggle), toggleLayouts) +import XMonad.Layout.WindowArranger +import XMonad.Layout.WindowNavigation +import qualified XMonad.StackSet as W +import XMonad.Util.EZConfig (additionalKeysP, checkKeymap) +import XMonad.Util.SpawnOnce + +myTerminal = "alacritty" + +myFocusFollowsMouse = True + +-- mod1Mask = left alt; mod3Mask = right alt; mod4Mask = windows key +myModMask = mod4Mask + +myWorkspaces = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"] + +myWorkspaceKeys = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"] + +myBorderWidth = 2 + +myNormalBorderColor = "#dddddd" + +myFocusedBorderColor = "#f0c674" + +myAddKeys = + [ ("M-S-r", spawn "xmonad --recompile && xmonad --restart && notify-send 'Xmonad restarted'"), + ("M-h", sendMessage Shrink), -- Shrink master area + ("M-l", sendMessage Expand), -- Expand master area + ("M-,", sendMessage (IncMasterN 1)), -- Increment the number of windows in the master area + ("M-.", sendMessage (IncMasterN (-1))), -- Deincrement the number of windows in the master area + -- ("M-t", withFocused $ windows . W.sink), -- Push window back into tiling + ("M-x", kill), + ("M-q", kill), + ("M-C-j", sendMessage $ JumpToLayout "TiledBottom"), + ("M-C-k", sendMessage $ JumpToLayout "TiledTop"), + ("M-C-h", sendMessage $ JumpToLayout "TiledLeft"), + ("M-C-l", sendMessage $ JumpToLayout "TiledRight"), + ("M-f", sendMessage $ T.Toggle "Full"), + -- ("M-S-", setLayout $ XMonad.layoutHook conf), -- Reset the layouts on the current workspace to default + ("M-n", refresh), -- Resize viewed windows to the correct size + ("M-", windows W.focusDown), -- Move focus to the next window + ("M-j", windows W.focusDown), -- Move focus to the next window + ("M-k", windows W.focusUp), -- Move focus to the previous window + ("M-m", windows W.focusMaster), -- Move focus to the master window + -- Swap the focused window and the master window + -- ((modm, xK_Return), windows W.swapMaster), + ("M-S-j", windows W.swapDown), -- Swap the focused window with the next window + ("M-S-k", windows W.swapUp), -- Swap the focused window with the previous window + ("M-S-e", spawn "~/.xmonad/scripts/dzen_exit_menu.pl"), + -- My keybound programs + ("M-d", spawn "rofi -show run #dmenu_recency -i"), + ("M-", spawn myTerminal), + ("M-b", spawn "firefox"), + ("M-t", spawn "krusader"), + ("M-u", spawn "pamac-manager"), + ("M-c", spawn "qalculate-gtk"), + ("", spawn "amixer set Master toggle"), + ("", spawn "amixer set Master 10%- unmute"), + ("", spawn "amixer set Master 10%+ unmute") + ] + -- Switch to workspace + ++ [ ("M-" ++ key, windows $ W.greedyView workspace) + | (key, workspace) <- zip myWorkspaceKeys myWorkspaces + ] + -- Move window to workspace and follow + ++ [ ( "M-S-" ++ key, + do + windows $ W.shift workspace + windows $ + W.greedyView workspace + ) + | (key, workspace) <- zip myWorkspaceKeys myWorkspaces + ] + -- Move window to workspace + ++ [ ("M-C-" ++ key, windows $ W.shift workspace) + | (key, workspace) <- zip myWorkspaceKeys myWorkspaces + ] + +myKeys conf@(XConfig {XMonad.modMask = modm}) = + M.fromList $ + [ -- Reset the layouts on the current workspace to default + ((modm .|. shiftMask, xK_space), setLayout $ XMonad.layoutHook conf), + -- Quit xmonad + ((modm .|. shiftMask, xK_q), io exitSuccess) + ] + +myMouseBindings (XConfig {XMonad.modMask = modm}) = + M.fromList + -- mod-button1, Set the window to floating mode and move by dragging + [ ( (modm, button1), + \w -> + focus w >> mouseMoveWindow w + >> windows W.shiftMaster + ), + -- mod-button2, Raise the window to the top of the stack + ((modm, button2), \w -> focus w >> windows W.shiftMaster), + -- mod-button3, Set the window to floating mode and resize by dragging + ( (modm, button3), + \w -> + focus w >> mouseResizeWindow w + >> windows W.shiftMaster + ) + -- you may also bind events to the mouse scroll wheel (button4 and button5) + ] + +myLayouts = T.toggleLayouts Full $ tiledRight ||| tiledBottom ||| tiledLeft ||| tiledTop ||| Full + where + tiledRight = renamed [Replace "TiledRight"] $ Tall nmaster delta ratio + tiledBottom = renamed [Replace "TiledBottom"] $ Mirror $ Tall nmaster delta ratio + tiledLeft = renamed [Replace "TiledLeft"] $ reflectHoriz $ Tall nmaster delta ratio + tiledTop = renamed [Replace "TiledTop"] $ Mirror $ reflectHoriz $ Tall nmaster delta ratio + + -- The default number of windows in the master pane + nmaster = 1 + -- Default proportion of screen occupied by master pane + ratio = 1 / 2 + -- Percent of screen to increment by when resizing panes + delta = 3 / 100 + +-- To match on the WM_NAME, you can use 'title' in the same way that +-- 'className' and 'resource' are used below. +myManageHook = + composeAll + [ className =? "Qalculate-gtk" --> doCenterFloat, + resource =? "desktop_window" --> doIgnore, + resource =? "kdesktop" --> doIgnore, + className =? "firefox" <&&> title =? "Mozilla Firefox" --> doShift "1" <+> doF (W.greedyView "1"), + className =? "TelegramDesktop" --> doShift "9", + className =? "Signal" --> doShift "9", + className =? "Rocket.Chat" --> doShift "9", + className =? "Element" --> doShift "9", + className =? "Thunderbird" --> doShift "10", + className =? "zoom" --> doShift "5" + -- isFullscreen --> doFullFloat + ] + +myStartupHook = do + spawn "~/.config/polybar/startup.sh" + spawnOnce "picom" + spawnOnce "nm-applet" + spawnOnce "blueman-applet" + spawnOnce "xfce4-power-manager" + spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" + spawnOnce "start-pulseaudio-x11" + spawnOnce "feh --bg-fill /home/julian/Bilder/background.jpg" + spawnOnce "/usr/lib/xfce4/notifyd/xfce4-notifyd" + spawnOnce "jgmenu --at-pointer --hide-on-startup" + + -- Very important return()!!! + return () >> checkKeymap myConfig myAddKeys + +main = + xmonad $ + ewmhFullscreen $ ewmh $ docks myConfig + +myConfig = + def + { terminal = myTerminal, + focusFollowsMouse = myFocusFollowsMouse, + borderWidth = myBorderWidth, + modMask = myModMask, + workspaces = myWorkspaces, + normalBorderColor = myNormalBorderColor, + focusedBorderColor = myFocusedBorderColor, + -- key bindings + keys = myKeys, + mouseBindings = myMouseBindings, + -- hooks, layouts + layoutHook = smartBorders $ avoidStruts $ smartSpacingWithEdge 2 $ myLayouts, + manageHook = insertPosition Below Newer <+> myManageHook, + -- handleEventHook = + -- logHook = + startupHook = myStartupHook + } + `additionalKeysP` myAddKeys + +-- Local Variables: +-- lsp-lens-enable: nil +-- End: diff --git a/xmonad/xmonad.o b/xmonad/xmonad.o new file mode 100644 index 0000000..a7bc8fb Binary files /dev/null and b/xmonad/xmonad.o differ