Compare commits
6 commits
3a69f908ae
...
b069c185c1
Author | SHA1 | Date | |
---|---|---|---|
b069c185c1 | |||
50c64b0f3e | |||
e6eeeed280 | |||
ed0cea5dc3 | |||
adb4f860bf | |||
500aae34d2 |
11 changed files with 91 additions and 324 deletions
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "ea7d7ea510c641c4f15042becd27f35b3e5b3c2b" },
|
||||
"LuaSnip": { "branch": "master", "commit": "6085dfd1808fb0059e13d160317a10c3a68c5407" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "243893ba9d5d1049dd451a25cab32ec7f8f67bcf" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
||||
|
@ -9,28 +9,29 @@
|
|||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"compiler-explorer.nvim": { "branch": "master", "commit": "ee8e7a2808bdad67cd2acb61b5c9ffa7735c7ec9" },
|
||||
"copilot.lua": { "branch": "master", "commit": "2c942f33ba5c621c906e625e00a1bb504b65e2f0" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "c1e1d5fa44fe08811b6ef4aadac2b50e602f9504" },
|
||||
"copilot.lua": { "branch": "master", "commit": "1a8032ae496916ccc7a7a52ee79194fbef29f462" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "8f4d62b7817455896a3c73cab642002072c114bc" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
||||
"impatient.nvim": { "branch": "main", "commit": "47302af74be7b79f002773011f0d8e85679a7618" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "59335c5b9d116f5d3948f833288a89e2a829a005" },
|
||||
"leap.nvim": { "branch": "main", "commit": "5efe985cf68fac3b6a6dfe7a75fbfaca8db2af9c" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "f014db32437aa61c86fc0ef1067cd2bc6a37205c" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "e2705063f395b44f676cd26596a11007a2cbd3bd" },
|
||||
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
|
||||
"neorg": { "branch": "main", "commit": "069cf8a460594ca6f4233c83aac1a31a96c62d98" },
|
||||
"neorg": { "branch": "main", "commit": "745715c873395840a5127413d1ef30a42735605e" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
|
||||
"nvim": { "branch": "main", "commit": "85e93601e0f0b48aa2c6bbfae4d0e9d7a1898280" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "defad64afbf19381fe31488a7582bbac421d6e38" },
|
||||
"nvim": { "branch": "main", "commit": "7a4bcdadafc59a5bedbd866c643fa486d8cca4a1" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "de4f7138a68d5d5063170f2182fd27faf06b0b54" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "cc388d3f6b9c7c943ae2b2dcd46ad470fd257f91" },
|
||||
"nvim-ghost.nvim": { "branch": "main", "commit": "a1ca0b2dac59881066d7ac9373cf64d59ba29d6a" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "361a2878a41f23452457eec12a807ff59bc75882" },
|
||||
"nvim-tmux-navigation": { "branch": "main", "commit": "543f090a45cef28156162883d2412fffecb6b750" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "794266a4edc8ab57b0d637626f01b5278a9123d8" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "b6c763db8cc486215ba96e0a67418848a710ab25" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "973ab742f143a796a779af4d786ec409116a0d87" },
|
||||
"oil.nvim": { "branch": "master", "commit": "9e036c6a4868b971127f3cb6bac6197bb4103723" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "812c2dd8fe838bb26cb53f0d251116468c2cae37" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "bc19b78e9c705d67be98d56e9fab96470af45f33" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82" },
|
||||
"oil.nvim": { "branch": "master", "commit": "ac2928cca85ba3596e92f9f51940d46be2d606f8" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
|
||||
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||
"rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
|
||||
|
@ -39,10 +40,11 @@
|
|||
"telescope.nvim": { "branch": "master", "commit": "b79cd6c88b3d96b0f49cb7d240807cd59b610cd8" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
|
||||
"undotree": { "branch": "master", "commit": "0e11ba7325efbbb3f3bebe06213afa3e7ec75131" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "6fcb0ad03982de646e3fecb6915e585651b9a9fb" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "99db68d9b3304580bd383da7aaee05c7a954a344" },
|
||||
"vim-jukit": { "branch": "master", "commit": "4d1f4e4c3923464e12f86fce49eb198b6e61a2a9" },
|
||||
"vim-obsession": { "branch": "master", "commit": "fe9d3e1a9a50171e7d316a52e1e56d868e4c1fe5" },
|
||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||
"vimtex": { "branch": "master", "commit": "d08da8034bab1fae423bd36aa606ee3012cf2833" },
|
||||
"vimtex": { "branch": "master", "commit": "7d453a61b0256337f341a1195ca9eb3f3890a7df" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "68f554702de63f4b7b6b6d4bcb10178f41a0acc7" }
|
||||
}
|
|
@ -29,6 +29,22 @@ lazy.setup({
|
|||
require('leap').add_default_mappings()
|
||||
end
|
||||
},
|
||||
--Nvim to browser
|
||||
'subnut/nvim-ghost.nvim',
|
||||
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
|
@ -119,9 +135,9 @@ lazy.setup({
|
|||
compiler_flags = "", -- Default flags passed to the compiler.
|
||||
job_timeout_ms = 25000, -- Timeout for libuv job in milliseconds.
|
||||
languages = { -- Language specific default compiler/flags
|
||||
c = {
|
||||
compiler = "cg132"
|
||||
}
|
||||
c = {
|
||||
compiler = "cg132"
|
||||
}
|
||||
},
|
||||
})
|
||||
end
|
||||
|
@ -215,12 +231,12 @@ lazy.setup({
|
|||
end
|
||||
},
|
||||
|
||||
{
|
||||
'lervag/vimtex',
|
||||
config = function()
|
||||
require 'plugins.vimtex'
|
||||
end
|
||||
},
|
||||
{
|
||||
'lervag/vimtex',
|
||||
config = function()
|
||||
require 'plugins.vimtex'
|
||||
end
|
||||
},
|
||||
|
||||
-------------------------------------------------------------------------------------------
|
||||
-- Syntax Highlighting
|
||||
|
|
|
@ -2,8 +2,7 @@ local mason_lspconfig = require "mason-lspconfig"
|
|||
local lspconfig = require "lspconfig"
|
||||
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = { "lua_ls", "texlab", "hls", "yamlls" },
|
||||
automatic_installation = true
|
||||
automatic_installation = false
|
||||
})
|
||||
|
||||
|
||||
|
@ -61,6 +60,13 @@ mason_lspconfig.setup_handlers {
|
|||
end,
|
||||
}
|
||||
|
||||
require('lspconfig')['hls'].setup {
|
||||
filetypes = { 'haskell', 'lhaskell', 'cabal' },
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
require("rust-tools").setup({
|
||||
server = {
|
||||
on_attach = on_attach,
|
||||
|
@ -79,4 +85,3 @@ require("rust-tools").setup({
|
|||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
#################################
|
||||
# Animations #
|
||||
#################################
|
||||
# requires https://github.com/jonaburg/picom
|
||||
# (These are also the default values)
|
||||
transition-length = 0
|
||||
transition-pow-x = 0.1
|
||||
transition-pow-y = 0.1
|
||||
transition-pow-w = 0.1
|
||||
transition-pow-h = 0.1
|
||||
size-transition = true
|
||||
|
||||
animation-stiffness = 140;
|
||||
animation-for-open-window = "slide-up";
|
||||
animation-for-unmap-window = "zoom";
|
||||
animation-dampening = 8;
|
||||
|
||||
#################################
|
||||
# Corners #
|
||||
|
|
|
@ -22,7 +22,7 @@ Config {font = "Ubuntu bold 10"
|
|||
, persistent = False
|
||||
, iconRoot = "/home/afonso/.config/xmobar/xpm/" -- default: "."
|
||||
, commands = [
|
||||
Run UnsafeXPropertyLog "_XMONAD_LOG_0"
|
||||
Run XMonadLog
|
||||
, Run Date "%a, %d %b <fn=1></fn> %H:%M" "date" 10
|
||||
, Run Mpris2 "playerctld" ["-t", "<fc=#AAC0F0><artist> - <title></fc>"] 10
|
||||
, Run Memory ["-t","<fn=6></fn> <fc=#AAC0F0><usedratio></fc>%"] 10
|
||||
|
@ -38,7 +38,7 @@ Config {font = "Ubuntu bold 10"
|
|||
, alignSep = "}{"
|
||||
, template = " <icon=logo.xpm/> \
|
||||
\ \
|
||||
\%_XMONAD_LOG_0%\
|
||||
\%XMonadLog%\
|
||||
\}\
|
||||
\%date%\
|
||||
\<hspace=20/>\
|
8
.config/xmonad/hie.yaml
Normal file
8
.config/xmonad/hie.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
cradle:
|
||||
stack:
|
||||
- path: ./xmonad.hs
|
||||
component: ./xmonad.hs
|
||||
- path: ./xmonad-git/
|
||||
component: xmonad:lib
|
||||
- path: ./xmonad-contrib-git/
|
||||
component: xmonad-contrib:lib
|
Binary file not shown.
Binary file not shown.
|
@ -59,10 +59,10 @@ myClickJustFocuses = False
|
|||
windowCount :: X (Maybe String)
|
||||
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
|
||||
|
||||
myNormalBorderColor = "#008080"
|
||||
myNormalBorderColor = "#534783"
|
||||
myFocusedBorderColor = "#01F9C6"
|
||||
|
||||
myBorderWidth = 2
|
||||
myBorderWidth = 1
|
||||
|
||||
myWorkspaces = ["main","web","text","code","social","monitoring"]
|
||||
myWorkspaceIndices = zip myWorkspaces [1..]
|
||||
|
@ -112,18 +112,11 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
|
|||
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
|
||||
>> windows W.shiftMaster))]
|
||||
|
||||
myLayout = avoidStruts(tiled ||| Mirror tiled ||| Full)
|
||||
where
|
||||
tiled = Tall nmaster delta ratio
|
||||
nmaster = 1
|
||||
ratio = 1/2
|
||||
delta = 3/100
|
||||
|
||||
myManageHook = composeAll
|
||||
[ className =? "MPlayer" --> doFloat
|
||||
, className =? "Gimp" --> doFloat
|
||||
, resource =? "desktop_window" --> doIgnore
|
||||
, className =? "QjackCtl" --> doFloat
|
||||
, className =? "QjackCtl" --> doFloat
|
||||
, resource =? "kdesktop" --> doIgnore
|
||||
, className =? "firefox" --> doShift (myWorkspaces !! 1)
|
||||
, className =? "Code" --> doShift (myWorkspaces !! 3)
|
||||
|
@ -146,65 +139,47 @@ myStartupHook = do
|
|||
spawnOnce "picom &"
|
||||
setWMName "LG3D"
|
||||
spawnOnce "nm-applet"
|
||||
spawnOnce ("xsetroot -cursor_name left_ptr")
|
||||
spawnOnce ("killall trayer ;sleep 1 && trayer --monitor 0 --edge top --align right --margin 4 --widthtype request --padding 8 --iconspacing 12 --SetDockType true --SetPartialStrut true --expand true --transparent true --alpha 0 --tint 0x2B2E37 --height 30 --distance 5 &")
|
||||
spawnOnce ("slimbookbattery --minimize")
|
||||
spawnOnce ("slimbookintelcontroller")
|
||||
spawnOnce ("nextcloud")
|
||||
spawnOnce "xsetroot -cursor_name left_ptr"
|
||||
spawnOnce "killall trayer ;sleep 1 && trayer --monitor 0 --edge top --align right --margin 4 --widthtype request --padding 8 --iconspacing 12 --SetDockType true --SetPartialStrut true --expand true --transparent true --alpha 0 --tint 0x2B2E37 --height 30 --distance 5 &"
|
||||
spawnOnce "slimbookbattery --minimize"
|
||||
spawnOnce "slimbookintelcontroller"
|
||||
spawnOnce "nextcloud"
|
||||
spawnOnOnce "web" myWebBrowser
|
||||
spawnOnOnce "main" myTerminalTmux
|
||||
|
||||
|
||||
myStatusBarSpawner :: Applicative f => ScreenId -> f StatusBarConfig
|
||||
myStatusBarSpawner (S s) = do
|
||||
pure $ statusBarPropTo ("_XMONAD_LOG_" ++ show s)
|
||||
("xmobar -x " ++ show s ++ " ~/.config/xmobar/xmobarrc" ++ show s)
|
||||
(pure $ myXmobarPP (S s))
|
||||
mySB = statusBarProp "/home/afonso/.local/bin/xmobar /home/afonso/.config/xmobar/xmobarrc" (pure myXmobarPP)
|
||||
|
||||
|
||||
myXmobarPP :: ScreenId -> PP
|
||||
myXmobarPP s = def
|
||||
{ ppSep = ""
|
||||
, ppWsSep = ""
|
||||
, ppCurrent = xmobarColor cyan "" . const wsIconFull
|
||||
, ppVisible = xmobarColor grey4 "" . const wsIconFull
|
||||
, ppVisibleNoWindows = Just (xmobarColor grey4 "" . const wsIconFull)
|
||||
, ppHidden = xmobarColor grey2 "" . const wsIconHidden
|
||||
, ppHiddenNoWindows = xmobarColor grey2 "" . const wsIconEmpty
|
||||
, ppUrgent = xmobarColor orange "" . const wsIconFull
|
||||
, ppOrder = \(ws : _ : _ : extras) -> ws : extras
|
||||
, ppExtras = [ wrapL " " " " $ layoutColorIsActive s (logLayoutOnScreen s)
|
||||
,titleColorIsActive s (shortenL 81 $ logTitleOnScreen s)
|
||||
]
|
||||
}
|
||||
myXmobarPP :: PP
|
||||
myXmobarPP = def
|
||||
{ ppSep = ""
|
||||
, ppWsSep = ""
|
||||
, ppCurrent = xmobarColor cyan "" . const wsIconFull
|
||||
, ppVisible = xmobarColor grey4 "" . const wsIconFull
|
||||
, ppHidden = xmobarColor grey4 "" . const wsIconFull
|
||||
, ppHiddenNoWindows = xmobarColor grey4 "" . const wsIconFull
|
||||
, ppOrder = \(ws : _ : _ : extras) -> ws : extras
|
||||
}
|
||||
where
|
||||
wsIconFull = " <fn=2>\xf111</fn> "
|
||||
wsIconHidden = " <fn=2>\xf111</fn> "
|
||||
wsIconEmpty = " <fn=2>\xf10c</fn> "
|
||||
titleColorIsActive n l = do
|
||||
c <- withWindowSet $ return . W.screen . W.current
|
||||
if n == c then xmobarColorL cyan "" l else xmobarColorL grey3 "" l
|
||||
layoutColorIsActive n l = do
|
||||
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
|
||||
|
||||
|
||||
myConfig = def
|
||||
{
|
||||
terminal = myTerminal,
|
||||
focusFollowsMouse = myFocusFollowsMouse,
|
||||
clickJustFocuses = myClickJustFocuses,
|
||||
focusFollowsMouse = True,
|
||||
clickJustFocuses = False,
|
||||
borderWidth = myBorderWidth,
|
||||
modMask = myModMask,
|
||||
workspaces = myWorkspaces,
|
||||
normalBorderColor = myNormalBorderColor,
|
||||
focusedBorderColor = myFocusedBorderColor,
|
||||
layoutHook = smartBorders . spacingWithEdge 15 $ myLayout,
|
||||
layoutHook = avoidStruts $ smartBorders . smartSpacingWithEdge 5 $ layoutHook def,
|
||||
manageHook = manageSpawn <+> myManageHook <+> manageHook def,
|
||||
handleEventHook = myEventHook <+> fullscreenEventHook <+> swallowEventHook (className=?"Alacritty") (return True),
|
||||
handleEventHook = myEventHook <+> fullscreenEventHook,
|
||||
startupHook = myStartupHook
|
||||
}
|
||||
|
||||
|
||||
main :: IO ()
|
||||
main = xmonad . ewmh . ewmhFullscreen . dynamicSBs myStatusBarSpawner . docks $ additionalKeysP (removeKeysP myConfig myRemoveKeys) myKeys
|
||||
main = xmonad . ewmh . ewmhFullscreen . withSB mySB . docks $ additionalKeysP (removeKeysP myConfig myRemoveKeys) myKeys
|
||||
|
|
|
@ -1,237 +0,0 @@
|
|||
@document.meta
|
||||
title: Xmonad Config
|
||||
authors: Afonso Franco
|
||||
categories: configs
|
||||
tangle: /home/afonso/.config/xmonad/xmonad.hs
|
||||
@end
|
||||
|
||||
* Overrides
|
||||
@code haskell
|
||||
{-# OPTIONS_GHC -Wno-deprecations #-}
|
||||
@end
|
||||
* Imports
|
||||
@code haskell
|
||||
|
||||
import XMonad
|
||||
|
||||
--Utils
|
||||
import XMonad.Util.EZConfig (additionalKeysP,removeKeysP)
|
||||
import XMonad.Util.Loggers (logLayoutOnScreen, logTitleOnScreen, shortenL, wrapL, xmobarColorL)
|
||||
import XMonad.Util.Run
|
||||
import XMonad.Util.SpawnOnce
|
||||
|
||||
--Hooks
|
||||
import XMonad.Hooks.DynamicLog
|
||||
import XMonad.Hooks.SetWMName
|
||||
import XMonad.Hooks.StatusBar
|
||||
import XMonad.Hooks.EwmhDesktops
|
||||
import XMonad.Hooks.ManageDocks
|
||||
import XMonad.Hooks.ManageHelpers
|
||||
import XMonad.Hooks.WindowSwallowing
|
||||
|
||||
--Actions
|
||||
import XMonad.Actions.SpawnOn
|
||||
import XMonad.Actions.UpdateFocus (focusUnderPointer)
|
||||
|
||||
--Layouts
|
||||
import XMonad.Layout.NoBorders
|
||||
import XMonad.Layout.Spacing
|
||||
|
||||
|
||||
-- MultiMonitorFocusHook
|
||||
import Control.Monad (when)
|
||||
import Data.Foldable (find)
|
||||
import Foreign.C (CInt)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Monoid (All (All))
|
||||
|
||||
--Miscellaneous
|
||||
import qualified XMonad.StackSet as W
|
||||
import qualified Data.Map as M
|
||||
import System.Exit
|
||||
|
||||
--Color Scheme
|
||||
import Colors.Teal
|
||||
|
||||
@end
|
||||
* Variables
|
||||
@code haskell
|
||||
|
||||
myTerminal = "kitty"
|
||||
myTerminalTmux = myTerminal ++ " -e tmux a"
|
||||
myTextEditor = "nvim"
|
||||
myWebBrowser = "firefox"
|
||||
myModMask = mod4Mask
|
||||
|
||||
myFocusFollowsMouse :: Bool
|
||||
myFocusFollowsMouse = True
|
||||
|
||||
myClickJustFocuses :: Bool
|
||||
myClickJustFocuses = False
|
||||
|
||||
windowCount :: X (Maybe String)
|
||||
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
|
||||
|
||||
myNormalBorderColor = "#008080"
|
||||
myFocusedBorderColor = "#01F9C6"
|
||||
|
||||
myBorderWidth = 2
|
||||
|
||||
myWorkspaces = ["main","web","text","code","social","monitoring"]
|
||||
myWorkspaceIndices = zip myWorkspaces [1..]
|
||||
|
||||
@end
|
||||
|
||||
* Keybinds
|
||||
@code haskell
|
||||
myKeys :: [(String, X ())]
|
||||
myKeys =
|
||||
[ ("M-x" ,spawn myTerminalTmux )
|
||||
, ("M-p", spawn "rofi -show drun -show-icons")
|
||||
, ("M-S-p", spawn "rofi -show p -modi p:rofi-power-menu")
|
||||
, ("M-s", spawn "selected=$(ls ~/scripts/|rofi -dmenu -p \"Run: \") && bash ~/.config/rofi/scripts/$selected")
|
||||
, ("M-b", spawn myWebBrowser)
|
||||
, ("<Print>", spawn "flameshot gui")
|
||||
, ("<XF86AudioMute>", spawn "pamixer set --toggle-mute")
|
||||
, ("<XF86AudioLowerVolume>", spawn "pamixer -d 5")
|
||||
, ("<XF86AudioRaiseVolume>", spawn "pamixer -i 5")
|
||||
, ("<XF86MonBrightnessUp>", spawn "lux -a 10%")
|
||||
, ("<XF86MonBrightnessDown>", spawn "lux -s 10%")
|
||||
, ("M-n", spawn $ myTerminal ++ " -e nmtui")
|
||||
, ("M-q", kill)
|
||||
, ("M-S-<Space>", sendMessage NextLayout)
|
||||
, ("M-<Down>", windows W.focusDown)
|
||||
, ("M-<Up>", windows W.focusUp )
|
||||
, ("M-m", windows W.focusMaster )
|
||||
, ("M-<Return>", windows W.swapMaster)
|
||||
, ("M-h", sendMessage Shrink)
|
||||
, ("M-l", sendMessage Expand)
|
||||
, ("M-t", withFocused $ windows . W.sink)
|
||||
, ("M-S-u", io (exitWith ExitSuccess))
|
||||
, ("M-u", spawn "xmonad --recompile; xmonad --restart")
|
||||
]
|
||||
++
|
||||
[("M-" ++ m ++ (show k), windows $ f i)
|
||||
| (i, k) <- myWorkspaceIndices
|
||||
, (f, m) <- [(W.greedyView, "0"), (W.shift, "S-")]]
|
||||
++
|
||||
[("M-" ++ m ++ key, screenWorkspace sc >>= flip whenJust (windows . f))
|
||||
| (key, sc) <- zip ["w", "e", "r"] [0..]
|
||||
, (f, m) <- [(W.view, "0"), (W.shift, "S-")]]
|
||||
|
||||
myRemoveKeys = ["M-S-<Return>","M-S-p","M-S-c","M-<Space>","M-n","M-S-q"]
|
||||
|
||||
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
|
||||
>> windows W.shiftMaster))
|
||||
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
|
||||
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
|
||||
>> windows W.shiftMaster))]
|
||||
@end
|
||||
* Layouts
|
||||
@code haskell
|
||||
myLayout = avoidStruts(tiled ||| Mirror tiled ||| Full)
|
||||
where
|
||||
tiled = Tall nmaster delta ratio
|
||||
nmaster = 1
|
||||
ratio = 1/2
|
||||
delta = 3/100
|
||||
@end
|
||||
* Hooks
|
||||
@code haskell
|
||||
myManageHook = composeAll
|
||||
[ className =? "MPlayer" --> doFloat
|
||||
, className =? "Gimp" --> doFloat
|
||||
, resource =? "desktop_window" --> doIgnore
|
||||
, className =? "QjackCtl" --> doFloat
|
||||
, resource =? "kdesktop" --> doIgnore
|
||||
, className =? "firefox" --> doShift (myWorkspaces !! 1)
|
||||
, className =? "Code" --> doShift (myWorkspaces !! 3)
|
||||
, className =? "discord" --> doShift (myWorkspaces !! 4)
|
||||
, title =? "JetBrains Toolbox" --> doShift (myWorkspaces !! 3)
|
||||
, className =? "main" --> doFloat
|
||||
, className =? "Mailspring" --> doShift (myWorkspaces !! 5)
|
||||
, className =? "Xmessage" --> doFloat
|
||||
, title =? "Steam - News" --> doFloat
|
||||
, title =? "Friends List" --> doFloat
|
||||
, isFullscreen --> doFullFloat]
|
||||
|
||||
|
||||
myEventHook = ewmhDesktopsEventHook
|
||||
|
||||
myStartupHook = do
|
||||
spawnOnce "pasystray"
|
||||
spawnOnce "nitrogen --restore &"
|
||||
spawnOnce "playerctld"
|
||||
spawnOnce "picom &"
|
||||
setWMName "LG3D"
|
||||
spawnOnce "nm-applet"
|
||||
spawnOnce ("xsetroot -cursor_name left_ptr")
|
||||
spawnOnce ("killall trayer ;sleep 1 && trayer --monitor 0 --edge top --align right --margin 4 --widthtype request --padding 8 --iconspacing 12 --SetDockType true --SetPartialStrut true --expand true --transparent true --alpha 0 --tint 0x2B2E37 --height 30 --distance 5 &")
|
||||
spawnOnce ("slimbookbattery --minimize")
|
||||
spawnOnce ("slimbookintelcontroller")
|
||||
spawnOnce ("nextcloud")
|
||||
spawnOnOnce "web" myWebBrowser
|
||||
spawnOnOnce "main" myTerminalTmux
|
||||
@end
|
||||
* XMobar Config
|
||||
@code haskell
|
||||
|
||||
myStatusBarSpawner :: Applicative f => ScreenId -> f StatusBarConfig
|
||||
myStatusBarSpawner (S s) = do
|
||||
pure $ statusBarPropTo ("_XMONAD_LOG_" ++ show s)
|
||||
("xmobar -x " ++ show s ++ " ~/.config/xmobar/xmobarrc" ++ show s)
|
||||
(pure $ myXmobarPP (S s))
|
||||
|
||||
|
||||
myXmobarPP :: ScreenId -> PP
|
||||
myXmobarPP s = def
|
||||
{ ppSep = ""
|
||||
, ppWsSep = ""
|
||||
, ppCurrent = xmobarColor cyan "" . const wsIconFull
|
||||
, ppVisible = xmobarColor grey4 "" . const wsIconFull
|
||||
, ppVisibleNoWindows = Just (xmobarColor grey4 "" . const wsIconFull)
|
||||
, ppHidden = xmobarColor grey2 "" . const wsIconHidden
|
||||
, ppHiddenNoWindows = xmobarColor grey2 "" . const wsIconEmpty
|
||||
, ppUrgent = xmobarColor orange "" . const wsIconFull
|
||||
, ppOrder = \(ws : _ : _ : extras) -> ws : extras
|
||||
, ppExtras = [ wrapL " " " " $ layoutColorIsActive s (logLayoutOnScreen s)
|
||||
,titleColorIsActive s (shortenL 81 $ logTitleOnScreen s)
|
||||
]
|
||||
}
|
||||
where
|
||||
wsIconFull = " <fn=2>\xf111</fn> "
|
||||
wsIconHidden = " <fn=2>\xf111</fn> "
|
||||
wsIconEmpty = " <fn=2>\xf10c</fn> "
|
||||
titleColorIsActive n l = do
|
||||
c <- withWindowSet $ return . W.screen . W.current
|
||||
if n == c then xmobarColorL cyan "" l else xmobarColorL grey3 "" l
|
||||
layoutColorIsActive n l = do
|
||||
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
|
||||
@end
|
||||
* Config Variables binding
|
||||
@code haskell
|
||||
|
||||
myConfig = def
|
||||
{
|
||||
terminal = myTerminal,
|
||||
focusFollowsMouse = myFocusFollowsMouse,
|
||||
clickJustFocuses = myClickJustFocuses,
|
||||
borderWidth = myBorderWidth,
|
||||
modMask = myModMask,
|
||||
workspaces = myWorkspaces,
|
||||
normalBorderColor = myNormalBorderColor,
|
||||
focusedBorderColor = myFocusedBorderColor,
|
||||
layoutHook = smartBorders . spacingWithEdge 15 $ myLayout,
|
||||
manageHook = manageSpawn <+> myManageHook <+> manageHook def,
|
||||
handleEventHook = myEventHook <+> fullscreenEventHook <+> swallowEventHook (className=?"Alacritty") (return True),
|
||||
startupHook = myStartupHook
|
||||
}
|
||||
@end
|
||||
* Main
|
||||
@code haskell
|
||||
|
||||
main :: IO ()
|
||||
main = xmonad . ewmh . ewmhFullscreen . dynamicSBs myStatusBarSpawner . docks $ additionalKeysP (removeKeysP myConfig myRemoveKeys) myKeys
|
||||
@end
|
2
.config/yubikey-touch-detector/service.conf
Normal file
2
.config/yubikey-touch-detector/service.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
YUBIKEY_TOUCH_DETECTOR_VERBOSE=true
|
||||
YUBIKEY_TOUCH_DETECTOR_LIBNOTIFY=true
|
Loading…
Add table
Add a link
Reference in a new issue