[SYNC] Synced a lot of small changes so I can pull on laptop

This commit is contained in:
Afonso Franco 2023-02-22 13:18:03 +00:00
parent eba535af3c
commit 564c398714
Signed by: afonso
GPG key ID: C459E0BB3DCEE899
9 changed files with 143 additions and 90 deletions

View file

@ -20,6 +20,10 @@ function launch-term
docker exec -it core xterm -bg black -fg white -fa 'DejaVu Sans Mono' -fs 16 -e vcmd -c /tmp/pycore.1/$argv -- sh -c "cd /rust-cc && /bin/bash" docker exec -it core xterm -bg black -fg white -fa 'DejaVu Sans Mono' -fs 16 -e vcmd -c /tmp/pycore.1/$argv -- sh -c "cd /rust-cc && /bin/bash"
end end
function cat
bat $argv
end
function core function core
xhost +local:root xhost +local:root
sudo docker exec -it core core-gui sudo docker exec -it core core-gui
@ -44,10 +48,13 @@ end
set -gx EDITOR vim set -gx EDITOR vim
set -gx TERM 'xterm-256color' set -gx TERM 'xterm-256color'
fish_add_path $HOME/.nix-profile/bin
fish_add_path /var/lib/snapd/snap/bin fish_add_path /var/lib/snapd/snap/bin
fish_add_path $HOME/.local/share/nvim/mason/bin fish_add_path $HOME/.local/share/nvim/mason/bin
set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin /home/afonso/.ghcup/bin $PATH # ghcup-env #set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin /home/afonso/.ghcup/bin $PATH # ghcup-env
fish_add_path /home/afonso/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin fish_add_path /home/afonso/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin
fish_add_path $HOME/.local/bin fish_add_path $HOME/.local/bin
fish_add_path $HOME/.cargo/bin fish_add_path $HOME/.cargo/bin
set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin /home/afonso/.ghcup/bin $PATH # ghcup-env

View file

@ -18,8 +18,7 @@
#| SET KEY TO LAYOUT |# #| SET KEY TO LAYOUT |#
(defalias esc (tap-hold 200 esc (layer-toggle numbers))) (defalias esc (tap-hold 200 esc (layer-toggle numrow)))
#| LAYOUTS |# #| LAYOUTS |#
@ -32,11 +31,11 @@
lctl lmet lalt spc ralt rmet cmp rctl left down rght lctl lmet lalt spc ralt rmet cmp rctl left down rght
) )
(deflayer numbers (deflayer numrow
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ 7 8 9 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ 4 5 6 _ _ _ _ 1 2 3 4 5 6 7 8 9 0 _ _
_ _ _ _ _ _ _ 1 2 3 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
) )

View file

@ -0,0 +1,4 @@
augroup hypr_ftdetect
au!
au BufRead,BufNewFile *hypr/*.conf,*hypr/*/*.conf set ft=hypr
augroup END

View file

@ -0,0 +1 @@
setlocal commentstring=#\ %s

View file

@ -12,6 +12,7 @@
"fidget.nvim": { "branch": "main", "commit": "44585a0c0085765195e6961c15529ba6c5a2a13b" }, "fidget.nvim": { "branch": "main", "commit": "44585a0c0085765195e6961c15529ba6c5a2a13b" },
"friendly-snippets": { "branch": "main", "commit": "046e4d3491baf664e0eef5231d28beb49333578b" }, "friendly-snippets": { "branch": "main", "commit": "046e4d3491baf664e0eef5231d28beb49333578b" },
"impatient.nvim": { "branch": "main", "commit": "c90e273f7b8c50a02f956c24ce4804a47f18162e" }, "impatient.nvim": { "branch": "main", "commit": "c90e273f7b8c50a02f956c24ce4804a47f18162e" },
"kmonad-vim": { "branch": "master", "commit": "37978445197ab00edeb5b731e9ca90c2b141723f" },
"lazy.nvim": { "branch": "main", "commit": "15fe46a728b7473d4cae368838bbc1c79c3a3f48" }, "lazy.nvim": { "branch": "main", "commit": "15fe46a728b7473d4cae368838bbc1c79c3a3f48" },
"leap.nvim": { "branch": "main", "commit": "ff4c3663e5a0a0ecbb3fffbc8318825def35d2aa" }, "leap.nvim": { "branch": "main", "commit": "ff4c3663e5a0a0ecbb3fffbc8318825def35d2aa" },
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" }, "lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
@ -26,11 +27,11 @@
"nvim-treesitter-context": { "branch": "master", "commit": "cacee4828152dd3a83736169ae61bbcd29a3d213" }, "nvim-treesitter-context": { "branch": "master", "commit": "cacee4828152dd3a83736169ae61bbcd29a3d213" },
"nvim-web-devicons": { "branch": "master", "commit": "3548363849878ef895ce54edda02421279b419d8" }, "nvim-web-devicons": { "branch": "master", "commit": "3548363849878ef895ce54edda02421279b419d8" },
"onedark.vim": { "branch": "main", "commit": "b6b5ffe31a195a3077338d7a506b905e4a51590f" }, "onedark.vim": { "branch": "main", "commit": "b6b5ffe31a195a3077338d7a506b905e4a51590f" },
"orgmode": { "branch": "master", "commit": "dadf56334d2be7d9e8ad1e22c697a6e75f0164b7" },
"plenary.nvim": { "branch": "master", "commit": "1c7e3e6b0f4dd5a174fcea9fda8a4d7de593b826" }, "plenary.nvim": { "branch": "master", "commit": "1c7e3e6b0f4dd5a174fcea9fda8a4d7de593b826" },
"startup.nvim": { "branch": "master", "commit": "b060480d2e647534faf70fa1263fe7623b77b0ce" }, "startup.nvim": { "branch": "master", "commit": "b060480d2e647534faf70fa1263fe7623b77b0ce" },
"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": "c77ec4e15768ffcb97a96d1bf2df1ef58e94acdd" },
"yuck.vim": { "branch": "master", "commit": "9b5e0370f70cc30383e1dabd6c215475915fe5c3" },
"zen-mode.nvim": { "branch": "main", "commit": "2c8f9f3758a4c430ff867e547741424ac16208bb" } "zen-mode.nvim": { "branch": "main", "commit": "2c8f9f3758a4c430ff867e547741424ac16208bb" }
} }

View file

@ -145,5 +145,9 @@ lazy.setup({
end, end,
}, },
-------------------------------------------SYNTAX----------------------------------------------
'kmonad/kmonad-vim',
'elkowar/yuck.vim'
}) })

View file

@ -0,0 +1,67 @@
" Vim syntax file
" Language: Hyprland config file
" Maintainer: Gabriel Carneiro
" Latest Revision: 26 October 2022
if exists("b:current_syntax")
finish
endif
" Strings
syn match Path "\(\.\|\~\)\/.*" display
syn match Symbol "=" skipwhite display nextgroup=Value
syn match Str "[a-zA-Z _ .-\"\'?]\+$" contained display
syn match Num "\d\+\(\.\d\+\)\?" contained display
syn match Num "e[+-]\d\+" contained display
syn match Num "[+-]\d\+\(\.\d\+\)\?" contained display
syn match ShellVar "\$\w\+" contained display
syn keyword Logical on off true false no yes contained display
syn region HyprSimpleString keepend start='[^ \t]' end='$\|#' contained contains=HyprVar,HyprComment
syn match HyprQuotedString '"[^"]\+"' contained
syn cluster HyprString contains=HyprSimpleString,HyprQuotedString
" Settings
syn keyword Block input general animations decoration gestures misc dwindle master
syn region OptBlock start="{" end="}" fold transparent display contains=HyprVar,Value,OptBlock,Num,Str,HyprComment,Disp,ShellVar
syn match HyprVar '\s[a-z _ .]\+ ' skipwhite contained display nextgroup=Symbol
syn region Value start="=" end="$\|," transparent display contains=Str,Num,Logical,ShellVar,Path,HyprComment,Disp,Dispatchers
syn match Disp '[a-zA-Z][a-zA-Z0-9 _.]\+,' contained display contains=Num
syn match N ', [a-zA-Z][a-zA-Z0-9 _.]\+,' contained skipwhite
" Commands
syn region Command start='^[a-zA-Z][a-zA-Z_. -]\+ =' end='$' skipwhite transparent contains=HyprKeyModifier,ShellVar,HyprConfigCommand,Dispatchers,HyprComment,Str,Disp,Path,Num
syn keyword HyprKeyModifier SUPER SHIFT CTRL ALT Mod1 Mod2 Mod3 Mod4 Mod5 Mode_switch nextgroup=N
syn keyword HyprConfigCommand bind bindm monitor source windowrule nextgroup=Symbol contained
" Comments
syn keyword HyprTodo contained TODO FIXME XXX NOTE
syn match HyprComment "\(#\|\/\/\).*$" contains=HyprTodo
highlight link Dispatchers Special
highlight link Windowrules Special
highlight link Disp Special
highlight link Num Constant
highlight link NumRule Constant
highlight link HyprVar Identifier
highlight link HyprConfigCommand Identifier
highlight link HyprKeyModifier Constant
highlight link KeyBind Constant
highlight link Logical Constant
highlight link Str String
highlight link BindCmd String
highlight link Path String
highlight link HyprSimpleString String
highlight link HyprQuotedString String
highlight link Block Define
highlight link ShellVar Define
highlight link HyprTodo Todo
highlight link HyprComment Comment

View file

@ -1,42 +1,47 @@
{-# OPTIONS_GHC -Wno-deprecations #-} {-# OPTIONS_GHC -Wno-deprecations #-}
import XMonad import XMonad
--Utils
import XMonad.Util.EZConfig (additionalKeysP,removeKeysP) import XMonad.Util.EZConfig (additionalKeysP,removeKeysP)
import XMonad.Hooks.DynamicLog
import XMonad.Util.Loggers (logLayoutOnScreen, logTitleOnScreen, shortenL, wrapL, xmobarColorL) import XMonad.Util.Loggers (logLayoutOnScreen, logTitleOnScreen, shortenL, wrapL, xmobarColorL)
import XMonad.Hooks.SetWMName
import XMonad.Actions.SpawnOn
import XMonad.Actions.UpdateFocus (focusUnderPointer)
import XMonad.Hooks.StatusBar
import XMonad.Layout.NoBorders
import qualified XMonad.StackSet as W
import XMonad.Hooks.EwmhDesktops
import XMonad.Util.Run import XMonad.Util.Run
import Data.Maybe (fromJust) import XMonad.Util.SpawnOnce
import XMonad.Util.NamedScratchpad as NS
--Hooks
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.SetWMName
import XMonad.Hooks.StatusBar
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers import XMonad.Hooks.ManageHelpers
import Data.Monoid
import Colors.Teal
import System.Exit
import XMonad.Util.SpawnOnce
import XMonad.Layout.Spacing
import XMonad.Hooks.WindowSwallowing import XMonad.Hooks.WindowSwallowing
--Actions
import XMonad.Actions.SpawnOn
import XMonad.Actions.UpdateFocus (focusUnderPointer)
--Layouts
import XMonad.Layout.NoBorders
import XMonad.Layout.Spacing
--Miscellaneous
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 System.Exit
--Color Scheme
import Colors.Teal
myTerminal = "alacritty" myTerminal = "alacritty"
myTextEditor = "nvim" myTextEditor = "nvim"
myWebBrowser = "firefox" myWebBrowser = "firefox"
myModMask = mod4Mask
myFocusFollowsMouse :: Bool myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True myFocusFollowsMouse = True
myFocusUnderPointer action = do
c <- focusUnderPointer
a <- action
b <- focusUnderPointer
return ()
myClickJustFocuses :: Bool myClickJustFocuses :: Bool
myClickJustFocuses = False myClickJustFocuses = False
@ -49,15 +54,27 @@ myFocusedBorderColor = "#01F9C6"
myBorderWidth = 2 myBorderWidth = 2
myWorkspaces = ["main","web","text","code","social","mail"] myWorkspaces = ["main","web","text","code","social","mail"]
myWorkspaceIndices = zip myWorkspaces [1..]
myWorkspaceIndices = M.fromList $ zipWith (,) myWorkspaces [1..] myScratchPads :: [NamedScratchpad]
myScratchPads = [NS "terminal" spawnTerm findTerm manageTerm]
where
spawnTerm = myTerminal ++ " -t scratchpad"
findTerm = title =? "scratchpad"
manageTerm = customFloating $ W.RationalRect l t w h
where
h = 0.6
w = 0.6
t = 0.7 -h
l = 0.8 -w
myModMask = mod4Mask
myKeys :: [(String, X ())] myKeys :: [(String, X ())]
myKeys = myKeys =
[ ("M-x" ,myFocusUnderPointer (spawn myTerminal) ) [ ("M-x" ,spawn myTerminal )
, ("M-S-x", namedScratchpadAction myScratchPads "terminal")
, ("M-p", spawn "rofi -show drun") , ("M-p", spawn "rofi -show drun")
, ("M-S-p", spawn "eww open --toggle powermenu")
, ("M-s", spawn "selected=$(ls ~/scripts/|rofi -dmenu -p \"Run: \") && bash ~/.config/rofi/scripts/$selected") , ("M-s", spawn "selected=$(ls ~/scripts/|rofi -dmenu -p \"Run: \") && bash ~/.config/rofi/scripts/$selected")
, ("M-b", spawn myWebBrowser) , ("M-b", spawn myWebBrowser)
, ("<Print>", spawn "flameshot gui") , ("<Print>", spawn "flameshot gui")
@ -81,7 +98,7 @@ myKeys =
] ]
++ ++
[("M-" ++ m ++ (show k), windows $ f i) [("M-" ++ m ++ (show k), windows $ f i)
| (i, k) <- zip myWorkspaces [1..] | (i, k) <- myWorkspaceIndices
, (f, m) <- [(W.greedyView, "0"), (W.shift, "S-")]] , (f, m) <- [(W.greedyView, "0"), (W.shift, "S-")]]
++ ++
[("M-" ++ m ++ key, screenWorkspace sc >>= flip whenJust (windows . f)) [("M-" ++ m ++ key, screenWorkspace sc >>= flip whenJust (windows . f))
@ -89,6 +106,7 @@ myKeys =
, (f, m) <- [(W.view, "0"), (W.shift, "S-")]] , (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"] myRemoveKeys = ["M-S-<Return>","M-S-p","M-S-c","M-<Space>","M-n","M-S-q"]
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $ myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster)) >> windows W.shiftMaster))
@ -118,6 +136,7 @@ myManageHook = composeAll
, className =? "Xmessage" --> doFloat , className =? "Xmessage" --> doFloat
, title =? "Steam - News" --> doFloat , title =? "Steam - News" --> doFloat
, title =? "Friends List" --> doFloat , title =? "Friends List" --> doFloat
, title =? "scratchpad" --> doFloat
, isFullscreen --> doFullFloat] , isFullscreen --> doFullFloat]
myEventHook = ewmhDesktopsEventHook myEventHook = ewmhDesktopsEventHook
@ -183,59 +202,8 @@ myConfig = def
layoutHook = smartBorders . spacingWithEdge 10 $ myLayout, layoutHook = smartBorders . spacingWithEdge 10 $ myLayout,
manageHook = manageSpawn <+> myManageHook <+> manageHook def, manageHook = manageSpawn <+> myManageHook <+> manageHook def,
handleEventHook = myEventHook <+> fullscreenEventHook <+> swallowEventHook (className=?"Alacritty") (return True) , handleEventHook = myEventHook <+> fullscreenEventHook <+> swallowEventHook (className=?"Alacritty") (return True) ,
startupHook = myStartupHook} startupHook = myStartupHook
}
main :: IO () main :: IO ()
main = do main = xmonad . ewmh . ewmhFullscreen . dynamicSBs myStatusBarSpawner . docks $ additionalKeysP (removeKeysP myConfig myRemoveKeys) myKeys
xmonad . ewmh . ewmhFullscreen . dynamicSBs myStatusBarSpawner . docks $ additionalKeysP (removeKeysP myConfig myRemoveKeys) myKeys
help :: String
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
"",
"-- launching and killing programs",
"mod-Shift-Enter Launch xterminal",
"mod-p Launch dmenu",
"mod-Shift-p Launch gmrun",
"mod-Shift-c Close/kill the focused window",
"mod-Space Rotate through the available layout algorithms",
"mod-Shift-Space Reset the layouts on the current workSpace to default",
"mod-n Resize/refresh viewed windows to the correct size",
"",
"-- move focus up or down the window stack",
"mod-Tab Move focus to the next window",
"mod-Shift-Tab Move focus to the previous window",
"mod-j Move focus to the next window",
"mod-k Move focus to the previous window",
"mod-m Move focus to the master window",
"",
"-- modifying the window order",
"mod-Return Swap the focused window and the master window",
"mod-Shift-j Swap the focused window with the next window",
"mod-Shift-k Swap the focused window with the previous window",
"",
"-- resizing the master/slave ratio",
"mod-h Shrink the master area",
"mod-l Expand the master area",
"",
"-- floating layer support",
"mod-t Push window back into tiling; unfloat and re-tile it",
"",
"-- increase or decrease number of windows in the master area",
"mod-comma (mod-,) Increment the number of windows in the master area",
"mod-period (mod-.) Deincrement the number of windows in the master area",
"",
"-- quit, or restart",
"mod-Shift-q Quit xmonad",
"mod-q Restart xmonad",
"mod-[1..9] Switch to workSpace N",
"",
"-- Workspaces & screens",
"mod-Shift-[1..9] Move client to workspace N",
"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",
"",
"-- Mouse bindings: default actions bound to mouse events",
"mod-button1 Set the window to floating mode and move by dragging",
"mod-button2 Raise the window to the top of the stack",
"mod-button3 Set the window to floating mode and resize by dragging"]

View file

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
export XDG_SESSION_TYPE=x11
export XDG_CURRENT_DESKTOP=X-Generic
userresources=$HOME/.Xresources userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources sysresources=/etc/X11/xinit/.Xresources