Compare commits
2 commits
6a0755f0c7
...
a1039550fc
Author | SHA1 | Date | |
---|---|---|---|
a1039550fc | |||
bb3b544724 |
5 changed files with 86 additions and 33 deletions
|
@ -1,37 +1,38 @@
|
||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "3181cef8a5c6a71f263a28e61651233d7a7afeb2" },
|
"LuaSnip": { "branch": "master", "commit": "f7c845749aba6096f041a73a26ba64f3817bab99" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "028a87933d99f8bb88f2f70a4def3ff9574f3594" },
|
"bufferline.nvim": { "branch": "main", "commit": "52d6acabb79c8c0942f8873a0ca7848eb2159267" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" },
|
"cmp-cmdline": { "branch": "main", "commit": "8fcc934a52af96120fe26358985c10c035984b53" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
||||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "d2768cb1b83de649d57d967085fe73c5e01f8fd7" },
|
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
||||||
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
|
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" },
|
"dressing.nvim": { "branch": "master", "commit": "5f44f829481640be0f96759c965ae22a3bcaf7ce" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "44585a0c0085765195e6961c15529ba6c5a2a13b" },
|
"fidget.nvim": { "branch": "main", "commit": "688b4fec4517650e29c3e63cfbb6e498b3112ba1" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "046e4d3491baf664e0eef5231d28beb49333578b" },
|
"friendly-snippets": { "branch": "main", "commit": "6fa50a94ba5378bb73013a6e163376d8e69bd8a5" },
|
||||||
"impatient.nvim": { "branch": "main", "commit": "c90e273f7b8c50a02f956c24ce4804a47f18162e" },
|
"impatient.nvim": { "branch": "main", "commit": "c90e273f7b8c50a02f956c24ce4804a47f18162e" },
|
||||||
"kmonad-vim": { "branch": "master", "commit": "37978445197ab00edeb5b731e9ca90c2b141723f" },
|
"kmonad-vim": { "branch": "master", "commit": "37978445197ab00edeb5b731e9ca90c2b141723f" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "15fe46a728b7473d4cae368838bbc1c79c3a3f48" },
|
"lazy.nvim": { "branch": "main", "commit": "8077428e63feb0f3bf795d53b23ba1695b28ab0e" },
|
||||||
"leap.nvim": { "branch": "main", "commit": "ff4c3663e5a0a0ecbb3fffbc8318825def35d2aa" },
|
"leap.nvim": { "branch": "main", "commit": "9a69febb2e5a4f5f5a55dd2d7173098fde917bc5" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
"lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "c29f9a9f9b01528ca6a44cd14814f5af20778f7a" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "3f9c0ea157e88b08e2d11ec65002eeb6e421f0da" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e7303a1632c004ebd2dcd0be1aaa4354586c030b" },
|
"mason.nvim": { "branch": "main", "commit": "01dfdfd36be77cb1195b60d580315bf4e2d8e62c" },
|
||||||
"null-ls.nvim": { "branch": "main", "commit": "2ff0a4ed1985d04bae3f21915ee0b1be3932c164" },
|
"null-ls.nvim": { "branch": "main", "commit": "689cdd78f70af20a37b5309ebc287ac645ae4f76" },
|
||||||
"nvim": { "branch": "main", "commit": "6368edcd0b5e5cb5d9fb7cdee9d62cffe3e14f0e" },
|
"nvim": { "branch": "main", "commit": "4175759297350557315987d479fb687a9f0b781f" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "31042a5823b55c4bfb30efcbba2fc1b5b53f90dc" },
|
"nvim-autopairs": { "branch": "master", "commit": "6a5faeabdbcc86cfbf1561ae430a451a72126e81" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "11a95792a5be0f5a40bab5fc5b670e5b1399a939" },
|
"nvim-cmp": { "branch": "main", "commit": "7a3b1e76f74934b12fda82158237c6ad8bfd3d40" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "1d3203b4c39ea5ec63cf1271d9e3b14a91706897" },
|
"nvim-lspconfig": { "branch": "master", "commit": "62856b20751b748841b0f3ec5a10b1e2f6a6dbc9" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "d508f9aceb8f1e3138aaea60ca5610a24d6561b6" },
|
"nvim-treesitter": { "branch": "master", "commit": "8d2f9903f11542c3363353a65a8e08adfcca9d29" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "cacee4828152dd3a83736169ae61bbcd29a3d213" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "895ec44f5c89bc67ba5440aef3d1f2efa3d59a41" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "3548363849878ef895ce54edda02421279b419d8" },
|
"nvim-web-devicons": { "branch": "master", "commit": "4709a504d2cd2680fb511675e64ef2790d491d36" },
|
||||||
"onedark.vim": { "branch": "main", "commit": "b6b5ffe31a195a3077338d7a506b905e4a51590f" },
|
"onedark.vim": { "branch": "main", "commit": "b6b5ffe31a195a3077338d7a506b905e4a51590f" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "1c7e3e6b0f4dd5a174fcea9fda8a4d7de593b826" },
|
"plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" },
|
||||||
"startup.nvim": { "branch": "master", "commit": "b060480d2e647534faf70fa1263fe7623b77b0ce" },
|
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||||
|
"startup.nvim": { "branch": "master", "commit": "dd7fe4d10e68701c51548b3073650f20be873322" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "b79cd6c88b3d96b0f49cb7d240807cd59b610cd8" },
|
"telescope.nvim": { "branch": "master", "commit": "b79cd6c88b3d96b0f49cb7d240807cd59b610cd8" },
|
||||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||||
"vimtex": { "branch": "master", "commit": "c77ec4e15768ffcb97a96d1bf2df1ef58e94acdd" },
|
"vimtex": { "branch": "master", "commit": "fc829f9ceefcf6013b36c150f0e73279dcbc3ff7" },
|
||||||
"yuck.vim": { "branch": "master", "commit": "9b5e0370f70cc30383e1dabd6c215475915fe5c3" },
|
"yuck.vim": { "branch": "master", "commit": "9b5e0370f70cc30383e1dabd6c215475915fe5c3" },
|
||||||
"zen-mode.nvim": { "branch": "main", "commit": "2c8f9f3758a4c430ff867e547741424ac16208bb" }
|
"zen-mode.nvim": { "branch": "main", "commit": "3c92f503823088862ca2a7809d1c7edc90fb92fa" }
|
||||||
}
|
}
|
|
@ -160,7 +160,7 @@ cmp.setup {
|
||||||
{ name = "buffer", keyword_length = 5 },
|
{ name = "buffer", keyword_length = 5 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ name = "orgmode" }
|
{ name = "neorg" }
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
confirm_opts = {
|
confirm_opts = {
|
||||||
|
|
|
@ -145,9 +145,23 @@ lazy.setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-------------------------------------------SYNTAX----------------------------------------------
|
-------------------------------------------OTHERS----------------------------------------------
|
||||||
'kmonad/kmonad-vim',
|
|
||||||
'elkowar/yuck.vim'
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-neorg/neorg",
|
||||||
|
build = ":Neorg sync-parsers",
|
||||||
|
opts = {
|
||||||
|
load = {
|
||||||
|
["core.defaults"] = {}, -- Loads default behaviour
|
||||||
|
["core.norg.concealer"] = {} -- Adds pretty icons to your documents
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dependencies = { { "nvim-lua/plenary.nvim" } },
|
||||||
|
},
|
||||||
|
|
||||||
|
'kmonad/kmonad-vim',
|
||||||
|
'elkowar/yuck.vim',
|
||||||
|
--Discord Rich Presence
|
||||||
|
'andweeb/presence.nvim'
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,6 +3,9 @@ local null_ls = require("null-ls")
|
||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
sources = {
|
sources = {
|
||||||
null_ls.builtins.formatting.rustfmt,
|
null_ls.builtins.formatting.rustfmt,
|
||||||
|
null_ls.builtins.formatting.stylish_haskell,
|
||||||
|
null_ls.builtins.formatting.fourmolu,
|
||||||
|
null_ls.builtins.formatting.black,
|
||||||
null_ls.builtins.formatting.prettierd.with({
|
null_ls.builtins.formatting.prettierd.with({
|
||||||
filetypes = { "html", "json", "yaml", "markdown" },
|
filetypes = { "html", "json", "yaml", "markdown" },
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -1,4 +1,16 @@
|
||||||
|
@document.meta
|
||||||
|
title: Xmonad Config
|
||||||
|
authors: Afonso Franco
|
||||||
|
categories: configs
|
||||||
|
tangle: ./xmonad.hs
|
||||||
|
@end
|
||||||
|
|
||||||
|
* Overrides
|
||||||
|
@code haskell
|
||||||
{-# OPTIONS_GHC -Wno-deprecations #-}
|
{-# OPTIONS_GHC -Wno-deprecations #-}
|
||||||
|
@end
|
||||||
|
* Imports
|
||||||
|
@code haskell
|
||||||
|
|
||||||
import XMonad
|
import XMonad
|
||||||
|
|
||||||
|
@ -42,6 +54,10 @@ import System.Exit
|
||||||
--Color Scheme
|
--Color Scheme
|
||||||
import Colors.Teal
|
import Colors.Teal
|
||||||
|
|
||||||
|
@end
|
||||||
|
* Variables
|
||||||
|
@code haskell
|
||||||
|
|
||||||
myTerminal = "alacritty"
|
myTerminal = "alacritty"
|
||||||
myTextEditor = "nvim"
|
myTextEditor = "nvim"
|
||||||
myWebBrowser = "firefox"
|
myWebBrowser = "firefox"
|
||||||
|
@ -64,6 +80,9 @@ myBorderWidth = 2
|
||||||
myWorkspaces = ["main","web","text","code","social","mail"]
|
myWorkspaces = ["main","web","text","code","social","mail"]
|
||||||
myWorkspaceIndices = zip myWorkspaces [1..]
|
myWorkspaceIndices = zip myWorkspaces [1..]
|
||||||
|
|
||||||
|
@end
|
||||||
|
* ScratchPads
|
||||||
|
@code haskell
|
||||||
myScratchPads :: [NamedScratchpad]
|
myScratchPads :: [NamedScratchpad]
|
||||||
myScratchPads = [NS "terminal" spawnTerm findTerm manageTerm]
|
myScratchPads = [NS "terminal" spawnTerm findTerm manageTerm]
|
||||||
where
|
where
|
||||||
|
@ -76,7 +95,9 @@ myScratchPads = [NS "terminal" spawnTerm findTerm manageTerm]
|
||||||
t = 0.7 -h
|
t = 0.7 -h
|
||||||
l = 0.8 -w
|
l = 0.8 -w
|
||||||
|
|
||||||
|
@end
|
||||||
|
* Keybinds
|
||||||
|
@code haskell
|
||||||
myKeys :: [(String, X ())]
|
myKeys :: [(String, X ())]
|
||||||
myKeys =
|
myKeys =
|
||||||
[ ("M-x" ,spawn myTerminal )
|
[ ("M-x" ,spawn myTerminal )
|
||||||
|
@ -121,14 +142,18 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
|
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
|
||||||
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
|
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
|
||||||
>> windows W.shiftMaster))]
|
>> windows W.shiftMaster))]
|
||||||
|
@end
|
||||||
|
* Layouts
|
||||||
|
@code haskell
|
||||||
myLayout = avoidStruts(tiled ||| Mirror tiled ||| Full)
|
myLayout = avoidStruts(tiled ||| Mirror tiled ||| Full)
|
||||||
where
|
where
|
||||||
tiled = Tall nmaster delta ratio
|
tiled = Tall nmaster delta ratio
|
||||||
nmaster = 1
|
nmaster = 1
|
||||||
ratio = 1/2
|
ratio = 1/2
|
||||||
delta = 3/100
|
delta = 3/100
|
||||||
|
@end
|
||||||
|
* Hooks
|
||||||
|
@code haskell
|
||||||
myManageHook = composeAll
|
myManageHook = composeAll
|
||||||
[ className =? "MPlayer" --> doFloat
|
[ className =? "MPlayer" --> doFloat
|
||||||
, className =? "Gimp" --> doFloat
|
, className =? "Gimp" --> doFloat
|
||||||
|
@ -147,6 +172,7 @@ myManageHook = composeAll
|
||||||
, title =? "scratchpad" --> doFloat
|
, title =? "scratchpad" --> doFloat
|
||||||
, isFullscreen --> doFullFloat]
|
, isFullscreen --> doFullFloat]
|
||||||
|
|
||||||
|
|
||||||
myEventHook = ewmhDesktopsEventHook
|
myEventHook = ewmhDesktopsEventHook
|
||||||
|
|
||||||
myStartupHook = do
|
myStartupHook = do
|
||||||
|
@ -162,6 +188,9 @@ myStartupHook = do
|
||||||
spawn ("killall trayer ;sleep 1 && trayer --monitor 0 --edge top --align right --widthtype request --padding 7 --iconspacing 12 --SetDockType true --SetPartialStrut true --expand true --transparent true --alpha 0 --tint 0x2B2E37 --height 26 --distance 5 &")
|
spawn ("killall trayer ;sleep 1 && trayer --monitor 0 --edge top --align right --widthtype request --padding 7 --iconspacing 12 --SetDockType true --SetPartialStrut true --expand true --transparent true --alpha 0 --tint 0x2B2E37 --height 26 --distance 5 &")
|
||||||
spawnOn "web" myWebBrowser
|
spawnOn "web" myWebBrowser
|
||||||
spawnOn "main" myTerminal
|
spawnOn "main" myTerminal
|
||||||
|
@end
|
||||||
|
* XMobar Config
|
||||||
|
@code haskell
|
||||||
|
|
||||||
myStatusBarSpawner :: Applicative f => ScreenId -> f StatusBarConfig
|
myStatusBarSpawner :: Applicative f => ScreenId -> f StatusBarConfig
|
||||||
myStatusBarSpawner (S s) = do
|
myStatusBarSpawner (S s) = do
|
||||||
|
@ -195,7 +224,9 @@ myXmobarPP s = def
|
||||||
layoutColorIsActive n l = do
|
layoutColorIsActive n l = do
|
||||||
c <- withWindowSet $ return . W.screen . W.current
|
c <- withWindowSet $ return . W.screen . W.current
|
||||||
if n == c then wrapL "<icon=/home/afonso/.config/xmobar/xpm/" "_selected.xpm/>" l else wrapL "<icon=/home/afonso/.config/xmobar/xpm/" ".xpm/>" l
|
if n == c then wrapL "<icon=/home/afonso/.config/xmobar/xpm/" "_selected.xpm/>" l else wrapL "<icon=/home/afonso/.config/xmobar/xpm/" ".xpm/>" l
|
||||||
|
@end
|
||||||
|
* Config Variables binding
|
||||||
|
@code haskell
|
||||||
|
|
||||||
myConfig = def
|
myConfig = def
|
||||||
{
|
{
|
||||||
|
@ -213,6 +244,10 @@ myConfig = def
|
||||||
handleEventHook = myEventHook <+> fullscreenEventHook <+> swallowEventHook (className=?"Alacritty") (return True),
|
handleEventHook = myEventHook <+> fullscreenEventHook <+> swallowEventHook (className=?"Alacritty") (return True),
|
||||||
startupHook = myStartupHook
|
startupHook = myStartupHook
|
||||||
}
|
}
|
||||||
|
@end
|
||||||
|
* Main
|
||||||
|
@code haskell
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = xmonad . ewmh . ewmhFullscreen . dynamicSBs myStatusBarSpawner . docks $ additionalKeysP (removeKeysP myConfig myRemoveKeys) myKeys
|
main = xmonad . ewmh . ewmhFullscreen . dynamicSBs myStatusBarSpawner . docks $ additionalKeysP (removeKeysP myConfig myRemoveKeys) myKeys
|
||||||
|
@end
|
Loading…
Add table
Add a link
Reference in a new issue