Compare commits
2 commits
4adc34f8c0
...
528137cea3
Author | SHA1 | Date | |
---|---|---|---|
|
528137cea3 | ||
|
370542a562 |
11 changed files with 993 additions and 90 deletions
|
@ -1,21 +1,33 @@
|
|||
{ pkgs, ...}: {
|
||||
{ pkgs, ...}:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader.grub = {
|
||||
loader = {
|
||||
timeout = 2;
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S4CNNE0M700172J";
|
||||
gfxmodeBios = "auto"; # 1920x1080 did not work
|
||||
splashImage = null;
|
||||
font = null;
|
||||
};
|
||||
# kernelParams = [
|
||||
# "video=DP-3:1920x1080@240"
|
||||
# "video=HDMI-3:1920x1080@75"
|
||||
# ];
|
||||
};
|
||||
# doesn't even work, todo when fixed: remove xrandr from i3 autostart
|
||||
kernelParams = [
|
||||
"video=DP-3:1920x1080@240"
|
||||
"video=HDMI-3:1920x1080@75"
|
||||
];
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"freeimage-unstable-2021-11-01"
|
||||
];
|
||||
|
||||
networking.hostName = "krizej-pc";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
|
@ -31,6 +43,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
# programs.sway.enable = true;
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
|
@ -128,6 +142,35 @@
|
|||
Defaults pwfeedback
|
||||
'';
|
||||
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
mesa
|
||||
amdvlk
|
||||
libdrm
|
||||
libva
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
extraPackages32 = with pkgs; [
|
||||
driversi686Linux.mesa
|
||||
driversi686Linux.amdvlk
|
||||
driversi686Linux.vaapiVdpau
|
||||
driversi686Linux.libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
||||
environment.sessionVariables = {
|
||||
AMD_VULKAN_ICD = "RADV";
|
||||
};
|
||||
|
||||
nixpkgs.overlays = import ./pkgs pkgs;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
system.stateVersion = "23.11";
|
||||
|
|
669
files/darcula.vim
Normal file
669
files/darcula.vim
Normal file
|
@ -0,0 +1,669 @@
|
|||
" stolen and modified from https://github.com/doums/darcula
|
||||
|
||||
" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
" file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
if exists("g:darcula")
|
||||
finish
|
||||
endif
|
||||
let g:darcula = 1
|
||||
highlight clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name='darcula'
|
||||
|
||||
let s:p={
|
||||
\ 'null': ['NONE', 'NONE'],
|
||||
\ 'bg': ['#2B2B2B', 235],
|
||||
\ 'fg': ['#A9B7C6', 145],
|
||||
\ 'cursor': ['#BBBBBB', 250],
|
||||
\ 'identifierUnderCaret': ['#344134', 237],
|
||||
\ 'identifierUnderCaretWrite': ['#40332B', 58],
|
||||
\ 'gutter': ['#313335', 236],
|
||||
\ 'selection': ['#214283', 24],
|
||||
\ 'cursorLine': ['#323232', 236],
|
||||
\ 'cursorLineNr': ['#A4A3A3', 248],
|
||||
\ 'errorMsg': ['#CC666E', 174],
|
||||
\ 'error': ['#BC3F3C', 131],
|
||||
\ 'warning': ['#A9B7C6', 145],
|
||||
\ 'muted': ['#606060', 241],
|
||||
\ 'link': ['#287BDE', 32],
|
||||
\ 'stdOutput': ['#BBBBBB', 250],
|
||||
\ 'lineNumber': ['#606366', 241],
|
||||
\ 'matchBraceFg': ['#FFEF28', 220],
|
||||
\ 'matchBraceBg': ['#3B514D', 59],
|
||||
\ 'todo': ['#A8C023', 142],
|
||||
\ 'search': ['#32593D', 23],
|
||||
\ 'incSearch': ['#155221', 22],
|
||||
\ 'foldedFg': ['#8C8C8C', 245],
|
||||
\ 'foldedBg': ['#3A3A3A', 237],
|
||||
\ 'constant': ['#9876AA', 103],
|
||||
\ 'keyword': ['#CC7832', 172],
|
||||
\ 'comment': ['#808080', 244],
|
||||
\ 'docComment': ['#629755', 65],
|
||||
\ 'string': ['#6A8759', 101],
|
||||
\ 'number': ['#6897BB', 103],
|
||||
\ 'delimiter': ['#CC7832', 172],
|
||||
\ 'specialComment': ['#8A653B', 95],
|
||||
\ 'function': ['#FFC66D', 216],
|
||||
\ 'diffAdd': ['#294436', 23],
|
||||
\ 'diffText': ['#385570', 60],
|
||||
\ 'diffDelete': ['#484A4A', 239],
|
||||
\ 'diffChange': ['#303C47', 23],
|
||||
\ 'addStripe': ['#384C38', 66],
|
||||
\ 'stripeWhiteSpace': ['#4C4638', 59],
|
||||
\ 'changeStripe': ['#374752', 60],
|
||||
\ 'deleteStripe': ['#656E76', 242],
|
||||
\ 'typo': ['#659C6B', 72],
|
||||
\ 'metaData': ['#BBB529', 142],
|
||||
\ 'macroName': ['#908B25', 100],
|
||||
\ 'cDataStructure': ['#B5B6E3', 146],
|
||||
\ 'cStructField': ['#9373A5', 103],
|
||||
\ 'debug': ['#666D75', 102],
|
||||
\ 'codeError': ['#532B2E', 52],
|
||||
\ 'codeWarning': ['#52503A', 59],
|
||||
\ 'errorStripe': ['#9E2927', 124],
|
||||
\ 'warnStripe': ['#BE9117', 136],
|
||||
\ 'infoStripe': ['#756D56', 101],
|
||||
\ 'hintStripe': ['#6c7176', 242],
|
||||
\ 'typeDef': ['#B9BCD1', 146],
|
||||
\ 'menu': ['#46484A', 238],
|
||||
\ 'menuFg': ['#BBBBBB', 250],
|
||||
\ 'menuSel': ['#113A5C', 23],
|
||||
\ 'menuSBar': ['#616263', 241],
|
||||
\ 'tag': ['#E8BF6A', 180],
|
||||
\ 'entity': ['#6D9CBE', 109],
|
||||
\ 'htmlAttribute': ['#BABABA', 250],
|
||||
\ 'htmlString': ['#A5C261', 143],
|
||||
\ 'tsObject': ['#507874', 66],
|
||||
\ 'statusLine': ['#3C3F41', 237],
|
||||
\ 'statusLineFg': ['#BBBBBB', 250],
|
||||
\ 'statusLineNC': ['#787878', 243],
|
||||
\ 'tabLineSel': ['#4E5254', 239],
|
||||
\ 'shCommand': ['#C57633', 137],
|
||||
\ 'templateLanguage': ['#232525', 235],
|
||||
\ 'rustMacro': ['#4EADE5', 74],
|
||||
\ 'rustLifetime': ['#20999D', 37],
|
||||
\ 'duplicateFromServer': ['#5E5339', 59],
|
||||
\ 'hintBg': ['#3B3B3B', 237],
|
||||
\ 'hintFg': ['#787878', 243],
|
||||
\ 'wrapGuide': ['#2F2F2F', 236],
|
||||
\ 'UIBorder': ['#616161', 241],
|
||||
\ 'UISelection': ['#0D293E', 17],
|
||||
\ 'ANSIBlack': ['#FFFFFF', 231],
|
||||
\ 'ANSIRed': ['#FF6B68', 210],
|
||||
\ 'ANSIGreen': ['#A8C023', 142],
|
||||
\ 'ANSIYellow': ['#D6BF55', 179],
|
||||
\ 'ANSIBlue': ['#5394EC', 68],
|
||||
\ 'ANSIMagenta': ['#AE8ABE', 139],
|
||||
\ 'ANSICyan': ['#299999', 37],
|
||||
\ 'ANSIGray': ['#999999', 247],
|
||||
\ 'ANSIDarkGray': ['#555555', 240],
|
||||
\ 'ANSIBrightRed': ['#FF8785', 210],
|
||||
\ 'ANSIBrightGreen': ['#A8C023', 142],
|
||||
\ 'ANSIBrightYellow': ['#FFFF00', 226],
|
||||
\ 'ANSIBrightBlue': ['#7EAEF1', 110],
|
||||
\ 'ANSIBrightMagenta': ['#FF99FF', 219],
|
||||
\ 'ANSIBrightCyan': ['#6CDADA', 116],
|
||||
\ 'ANSIWhite': ['#1F1F1F', 234],
|
||||
\ 'UIBlue': ['#3592C4', 67],
|
||||
\ 'UIGreen': ['#499C54', 71],
|
||||
\ 'UIRed': ['#C75450', 131],
|
||||
\ 'UIBrown': ['#93896C', 102],
|
||||
\ 'otherBuiltin': ['#8888C6', 147]
|
||||
\ }
|
||||
|
||||
" expose the palette
|
||||
let darcula#palette=s:p
|
||||
|
||||
" helper function
|
||||
function s:Hi(group, fg, ...)
|
||||
" arguments: group, fg, bg, style
|
||||
if a:0 >= 1
|
||||
let bg=a:1
|
||||
else
|
||||
let bg=s:p.null
|
||||
endif
|
||||
if a:0 >= 2 && strlen(a:2)
|
||||
let style=a:2
|
||||
else
|
||||
let style='NONE'
|
||||
endif
|
||||
let hiList = [
|
||||
\ 'hi', a:group,
|
||||
\ 'ctermfg=' . a:fg[1],
|
||||
\ 'guifg=' . a:fg[0],
|
||||
\ 'ctermbg=' . bg[1],
|
||||
\ 'guibg=' . bg[0],
|
||||
\ 'cterm=' . style,
|
||||
\ 'gui=' . style
|
||||
\ ]
|
||||
execute join(hiList)
|
||||
endfunction
|
||||
|
||||
" expose that function
|
||||
function darcula#Hi(group, fg, ...)
|
||||
if a:0 >= 2
|
||||
call s:Hi(a:group, a:fg, a:1, a:2)
|
||||
elseif a:0 == 1
|
||||
call s:Hi(a:group, a:fg, a:1)
|
||||
else
|
||||
call s:Hi(a:group, a:fg)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call s:Hi('Normal', s:p.fg, s:p.bg)
|
||||
call s:Hi('ColorColumn', s:p.null, s:p.wrapGuide)
|
||||
call s:Hi('Conceal', s:p.muted, s:p.bg)
|
||||
call s:Hi('Cursor', s:p.cursor)
|
||||
hi! link lCursor Cursor
|
||||
hi! link CursorIM Cursor
|
||||
hi! link CursorColumn CursorLine
|
||||
call s:Hi('CursorLine', s:p.null, s:p.cursorLine, 'NONE')
|
||||
call s:Hi('DiffAdd', s:p.null, s:p.diffAdd)
|
||||
call s:Hi('DiffChange', s:p.null, s:p.diffChange)
|
||||
call s:Hi('DiffDelete', s:p.null, s:p.diffDelete)
|
||||
call s:Hi('DiffText', s:p.null, s:p.diffText)
|
||||
hi! link Directory NormalFg
|
||||
hi! link EndOfBuffer NonText
|
||||
call s:Hi('ErrorMsg', s:p.errorMsg)
|
||||
call s:Hi('Error', s:p.error)
|
||||
call s:Hi('VertSplit', s:p.muted)
|
||||
call s:Hi('Folded', s:p.foldedFg, s:p.foldedBg)
|
||||
hi! link FoldColumn Folded
|
||||
call s:Hi('SignColumn', s:p.null, s:p.gutter)
|
||||
call s:Hi('LineNr', s:p.lineNumber, s:p.gutter)
|
||||
hi! link LineNrAbove LineNr
|
||||
hi! link LineNrBelow LineNr
|
||||
call s:Hi('CursorLineNr', s:p.cursorLineNr, s:p.cursorLine)
|
||||
call s:Hi('MatchParen', s:p.matchBraceFg, s:p.matchBraceBg, 'bold')
|
||||
call s:Hi('ModeMsg', s:p.stdOutput)
|
||||
hi! link MoreMsg NormalFg
|
||||
call s:Hi('NonText', s:p.muted)
|
||||
call s:Hi('Pmenu', s:p.menuFg, s:p.menu)
|
||||
call s:Hi('PmenuSel', s:p.menuFg, s:p.menuSel)
|
||||
call s:Hi('PmenuSbar', s:p.menu, s:p.menu)
|
||||
call s:Hi('PmenuThumb', s:p.menuSBar, s:p.menuSBar)
|
||||
hi! link Question NormalFg
|
||||
hi! link QuickFixLine NormalFg
|
||||
call s:Hi('Search', s:p.null, s:p.search)
|
||||
call s:Hi('IncSearch', s:p.null, s:p.incSearch)
|
||||
hi! link SpecialKey NonText
|
||||
call s:Hi('SpellBad', s:p.typo, s:p.null, 'underline')
|
||||
hi! link SpellCap SpellBad
|
||||
hi! link SpellLocal SpellBad
|
||||
hi! link SpellRare SpellBad
|
||||
call s:Hi('StatusLine', s:p.statusLineFg, s:p.statusLine)
|
||||
call s:Hi('StatusLineNC', s:p.statusLineNC, s:p.statusLine)
|
||||
hi! link StatusLineTerm StatusLine
|
||||
hi! link StatusLineTermNC StatusLineNC
|
||||
call s:Hi('TabLine', s:p.statusLineFg, s:p.statusLine)
|
||||
call s:Hi('TabLineFill', s:p.statusLine, s:p.statusLine)
|
||||
call s:Hi('TabLineSel', s:p.fg, s:p.tabLineSel)
|
||||
call s:Hi('Terminal', s:p.stdOutput, s:p.bg)
|
||||
hi! link Title Special
|
||||
call s:Hi('Visual', s:p.null, s:p.selection)
|
||||
hi! link VisualNOS Visual
|
||||
call s:Hi('WarningMsg', s:p.warning)
|
||||
hi! link WildMenu PmenuSel
|
||||
call s:Hi('Comment', s:p.comment)
|
||||
hi! link Identifier NormalFg
|
||||
hi! link Type Keyword
|
||||
call s:Hi('Typedef', s:p.typeDef)
|
||||
call s:Hi('Todo', s:p.todo, s:p.null, 'italic')
|
||||
hi! link Special PreProc
|
||||
call s:Hi('Constant', s:p.constant, s:p.null, 'italic')
|
||||
call s:Hi('String', s:p.string)
|
||||
hi! link Character String
|
||||
call s:Hi('Number', s:p.number)
|
||||
call s:Hi('Delimiter', s:p.delimiter)
|
||||
call s:Hi('SpecialComment', s:p.specialComment, s:p.null, 'italic')
|
||||
hi! link Statement Keyword
|
||||
call s:Hi('Keyword', s:p.keyword)
|
||||
call s:Hi('Underlined', s:p.fg, s:p.null, 'underline')
|
||||
call s:Hi('PreProc', s:p.metaData)
|
||||
hi! link Tag Keyword
|
||||
call s:Hi('Debug', s:p.debug, s:p.null, 'italic')
|
||||
call s:Hi('Function', s:p.function)
|
||||
call s:Hi('OtherBuiltin', s:p.otherBuiltin)
|
||||
|
||||
" fixes
|
||||
hi! link Integer Number
|
||||
hi! link Macro cMacroName
|
||||
hi! link Include PreProc
|
||||
hi! link Operator Keyword
|
||||
hi! link SpecialChar PreProc
|
||||
hi! link GitGutterAdd GitAddStripe
|
||||
hi! link GitGutterChange GitChangeStripe
|
||||
hi! link GitGutterDelete GitDeleteStripe
|
||||
hi! link StorageClass Keyword
|
||||
hi! link Structure Keyword
|
||||
hi! link Conditional Keyword
|
||||
hi! link Repeat Keyword
|
||||
hi! link cDefine PreProc
|
||||
|
||||
" nix
|
||||
hi! link nixBoolean Keyword
|
||||
hi! link nixInterpolationParam InstanceField
|
||||
hi! link nixInterpolationDelimiter InstanceField
|
||||
hi! link nixStringDelimiter String
|
||||
hi! link nixPath Constant
|
||||
hi! link nixSearchPath nixPath
|
||||
hi! link nixURI nixPath
|
||||
hi! link nixPathDelimiter nixPath
|
||||
hi! link nixSearchPathRef nixPath
|
||||
hi! link nixHomePath nixPath
|
||||
hi! link nixAttributeDot Identifier
|
||||
hi! link nixSimpleFunctionArgument Function
|
||||
hi! link nixArgumentDefinition Function
|
||||
hi! link nixNamespacedBuiltin OtherBuiltin
|
||||
hi! link nixSimpleBuiltin OtherBuiltin
|
||||
hi! link nixBuiltin OtherBuiltin
|
||||
hi! link nixStringSpecial Keyword
|
||||
hi! link nixArgumentSeparator Operator
|
||||
|
||||
" helper groups
|
||||
call s:Hi('docComment', s:p.docComment, s:p.null, 'italic')
|
||||
call s:Hi('NormalFg', s:p.fg)
|
||||
call s:Hi('GitAddStripe', s:p.addStripe, s:p.addStripe)
|
||||
call s:Hi('GitChangeStripe', s:p.changeStripe, s:p.changeStripe)
|
||||
call s:Hi('GitDeleteStripe', s:p.deleteStripe, s:p.gutter)
|
||||
call s:Hi('CodeError', s:p.null, s:p.codeError)
|
||||
call s:Hi('CodeWarning', s:p.null, s:p.codeWarning)
|
||||
call s:Hi('CodeInfo', s:p.null, s:p.infoStripe)
|
||||
call s:Hi('CodeHint', s:p.hintFg, s:p.hintBg)
|
||||
call s:Hi('ErrorSign', s:p.errorStripe, s:p.gutter)
|
||||
call s:Hi('WarningSign', s:p.warnStripe, s:p.gutter)
|
||||
call s:Hi('InfoSign', s:p.infoStripe, s:p.gutter)
|
||||
call s:Hi('HintSign', s:p.hintStripe, s:p.gutter)
|
||||
call s:Hi('IdentifierUnderCaret', s:p.null, s:p.identifierUnderCaret)
|
||||
call s:Hi('IdentifierUnderCaretWrite', s:p.null, s:p.identifierUnderCaretWrite)
|
||||
call s:Hi('InstanceField', s:p.constant)
|
||||
call s:Hi('UIDialog', s:p.fg, s:p.statusLine)
|
||||
call s:Hi('UIBorder', s:p.UIBorder, s:p.statusLine)
|
||||
call s:Hi('UISelection', s:p.null, s:p.UISelection)
|
||||
|
||||
" neovim
|
||||
if has('nvim')
|
||||
" the following code snippet fix an issue with CursorLine hi group
|
||||
" see https://github.com/neovim/neovim/issues/9019
|
||||
if has('termguicolors') && &termguicolors
|
||||
hi CursorLine ctermfg=white
|
||||
else
|
||||
hi CursorLine guifg=white
|
||||
endif
|
||||
hi! link NormalFloat Pmenu
|
||||
hi! link NormalNC NormalFg
|
||||
hi! link MsgArea NormalFg
|
||||
hi! link MsgSeparator StatusLine
|
||||
hi! link QuickFixLine NormalFg
|
||||
hi! link Substitute Search
|
||||
" TermCursor
|
||||
" TermCursorNC
|
||||
hi! link Whitespace NonText
|
||||
hi! link healthSuccess IncSearch
|
||||
call s:Hi('NvimInternalError', s:p.error, s:p.error)
|
||||
call s:Hi('RedrawDebugClear', s:p.fg, s:p.duplicateFromServer)
|
||||
call s:Hi('RedrawDebugComposed', s:p.fg, s:p.search)
|
||||
call s:Hi('RedrawDebugRecompose', s:p.fg, s:p.codeError)
|
||||
" Terminal colors
|
||||
let g:terminal_color_0 = s:p.ANSIBlack[0]
|
||||
let g:terminal_color_1 = s:p.ANSIRed[0]
|
||||
let g:terminal_color_2 = s:p.ANSIGreen[0]
|
||||
let g:terminal_color_3 = s:p.ANSIYellow[0]
|
||||
let g:terminal_color_4 = s:p.ANSIBlue[0]
|
||||
let g:terminal_color_5 = s:p.ANSIMagenta[0]
|
||||
let g:terminal_color_6 = s:p.ANSICyan[0]
|
||||
let g:terminal_color_7 = s:p.ANSIGray[0]
|
||||
let g:terminal_color_8 = s:p.ANSIDarkGray[0]
|
||||
let g:terminal_color_9 = s:p.ANSIBrightRed[0]
|
||||
let g:terminal_color_10 = s:p.ANSIBrightGreen[0]
|
||||
let g:terminal_color_11 = s:p.ANSIBrightYellow[0]
|
||||
let g:terminal_color_12 = s:p.ANSIBrightBlue[0]
|
||||
let g:terminal_color_13 = s:p.ANSIBrightMagenta[0]
|
||||
let g:terminal_color_14 = s:p.ANSIBrightCyan[0]
|
||||
let g:terminal_color_15 = s:p.ANSIWhite[0]
|
||||
|
||||
" nvim-treesitter
|
||||
hi! link TSAnnotation PreProc
|
||||
hi! link TSAttribute PreProc
|
||||
hi! link TSBoolean Keyword
|
||||
hi! link TSCharacter Character
|
||||
hi! link TSComment Comment
|
||||
hi! link TSConstructor Function
|
||||
hi! link TSConditional Keyword
|
||||
hi! link TSConstant Constant
|
||||
hi! link TSConstBuiltin Keyword
|
||||
hi! link TSConstMacro cMacroName
|
||||
hi! link TSError codeError
|
||||
hi! link TSException Keyword
|
||||
hi! link TSField InstanceField
|
||||
hi! link TSFloat Number
|
||||
hi! link TSFunction Function
|
||||
hi! link TSFuncBuiltin Normal
|
||||
hi! link TSFuncMacro cMacroName
|
||||
hi! link TSInclude Keyword
|
||||
hi! link TSKeyword Keyword
|
||||
hi! link TSKeywordFunction Keyword
|
||||
hi! link TSLabel Normal
|
||||
hi! link TSMethod Function
|
||||
hi! link TSNamespace cDataStructure
|
||||
hi! link TSNone Normal
|
||||
hi! link TSNumber Number
|
||||
hi! link TSOperator Normal
|
||||
hi! link TSParameter Normal
|
||||
hi! link TSParameterReference Normal
|
||||
hi! link TSProperty TSField
|
||||
hi! link TSPunctDelimiter Normal
|
||||
hi! link TSPunctBracket Normal
|
||||
hi! link TSPunctSpecial Keyword
|
||||
hi! link TSRepeat Keyword
|
||||
hi! link TSString String
|
||||
hi! link TSStringRegex Number
|
||||
hi! link TSStringEscape Keyword
|
||||
hi! link TSTag htmlTag
|
||||
hi! link TSTagDelimiter htmlTag
|
||||
hi! link TSText Normal
|
||||
call s:Hi('TSStrong', s:p.fg, s:p.null, 'bold')
|
||||
call s:Hi('TSEmphasis', s:p.fg, s:p.null, 'italic')
|
||||
call s:Hi('TSUnderline', s:p.fg, s:p.null, 'underline')
|
||||
call s:Hi('TSStrike', s:p.fg, s:p.null, 'strikethrough')
|
||||
call s:Hi('TSTitle', s:p.fg, s:p.null, 'bold,underline')
|
||||
hi! link TSLiteral Normal
|
||||
hi! link TSURI markdownLinkText
|
||||
hi! link TSNote CodeInfo
|
||||
hi! link TSWarning CodeWarning
|
||||
hi! link TSDanger CodeError
|
||||
hi! link TSType Normal
|
||||
hi! link TSTypeBuiltin Keyword
|
||||
hi! link TSVariable Normal
|
||||
hi! link TSVariableBuiltin Keyword
|
||||
|
||||
" LSP
|
||||
hi! link LspDiagnosticsDefaultError CodeError
|
||||
hi! link LspDiagnosticsDefaultWarning CodeWarning
|
||||
hi! link LspDiagnosticsDefaultInformation CodeInfo
|
||||
hi! link LspDiagnosticsDefaultHint CodeHint
|
||||
hi! link LspDiagnosticsSignError ErrorSign
|
||||
hi! link LspDiagnosticsSignWarning WarningSign
|
||||
hi! link LspDiagnosticsSignInformation InfoSign
|
||||
hi! link LspDiagnosticsSignHint HintSign
|
||||
hi! link LspReferenceText IdentifierUnderCaret
|
||||
hi! link LspReferenceRead IdentifierUnderCaret
|
||||
hi! link LspReferenceWrite IdentifierUnderCaretWrite
|
||||
hi! link LspDiagnosticsUnderlineError CodeError
|
||||
hi! link LspDiagnosticsUnderlineWarning CodeWarning
|
||||
hi! link LspDiagnosticsUnderlineInformation CodeInfo
|
||||
hi! link LspDiagnosticsUnderlineHint CodeHint
|
||||
hi! link LspDiagnosticsFloatingError NormalFloat
|
||||
hi! link LspDiagnosticsFloatingWarning NormalFloat
|
||||
hi! link LspDiagnosticsFloatingInformation NormalFloat
|
||||
hi! link LspDiagnosticsFloatingHint NormalFloat
|
||||
endif
|
||||
|
||||
" Vim terminal colors (for :terminal)
|
||||
if !has('nvim')
|
||||
let g:terminal_ansi_colors=[
|
||||
\ s:p.ANSIBlack[0],
|
||||
\ s:p.ANSIRed[0],
|
||||
\ s:p.ANSIGreen[0],
|
||||
\ s:p.ANSIYellow[0],
|
||||
\ s:p.ANSIBlue[0],
|
||||
\ s:p.ANSIMagenta[0],
|
||||
\ s:p.ANSICyan[0],
|
||||
\ s:p.ANSIGray[0],
|
||||
\ s:p.ANSIDarkGray[0],
|
||||
\ s:p.ANSIBrightRed[0],
|
||||
\ s:p.ANSIBrightGreen[0],
|
||||
\ s:p.ANSIBrightYellow[0],
|
||||
\ s:p.ANSIBrightBlue[0],
|
||||
\ s:p.ANSIBrightMagenta[0],
|
||||
\ s:p.ANSIBrightCyan[0],
|
||||
\ s:p.ANSIWhite[0]
|
||||
\ ]
|
||||
endif
|
||||
|
||||
" C/C++
|
||||
call s:Hi('cMacroName', s:p.macroName)
|
||||
hi! link cConstant cMacroName
|
||||
hi! link cPreInclude String
|
||||
hi! link cPreProcRegion NormalFg
|
||||
hi! link cUserLabel NormalFg
|
||||
hi! link cDataStructureKeyword Keyword
|
||||
call s:Hi('cDataStructure', s:p.cDataStructure)
|
||||
hi! link cFunction Function
|
||||
hi! link cppDestructor cFunction
|
||||
hi! link cSemicolon Keyword
|
||||
hi! link cComma Keyword
|
||||
call s:Hi('cppAfterColon', s:p.cStructField)
|
||||
hi! link cppBeforeColon cDataStructure
|
||||
call s:Hi('cStructField', s:p.cStructField)
|
||||
hi! link cppNullptr Keyword
|
||||
hi! link cppTemplate Keyword
|
||||
hi! link cTypedef Keyword
|
||||
hi! link cppTypeName Keyword
|
||||
hi! link cSpecial Keyword
|
||||
hi! link cEnum Keyword
|
||||
call s:Hi('cSomeMacro', s:p.macroName)
|
||||
|
||||
hi! link cJCFunc Function
|
||||
|
||||
" Rust
|
||||
call s:Hi('rustDeriveTrait', s:p.metaData)
|
||||
hi! link rustQuestionMark Keyword
|
||||
hi! link rustComma Keyword
|
||||
hi! link rustSemicolon Keyword
|
||||
hi! link rustOperator NormalFg
|
||||
call s:Hi('rustCommentLineDoc', s:p.docComment, s:p.null, 'italic')
|
||||
call s:Hi('rustMacro', s:p.rustMacro)
|
||||
hi! link rustAssert rustMacro
|
||||
hi! link rustPanic rustMacro
|
||||
hi! link rustEscape Keyword
|
||||
hi! link rustSigil NormalFg
|
||||
hi! link rustSelf Keyword
|
||||
call s:Hi('rustLifetime', s:p.rustLifetime, s:p.null, 'italic')
|
||||
call s:Hi('rustTypeParameter', s:p.rustLifetime)
|
||||
hi! link rustEnumVariant Constant
|
||||
hi! link rustModPath NormalFg
|
||||
hi! link rustModPathSep NormalFg
|
||||
hi! link rustAs Keyword
|
||||
hi! link rustConst Constant
|
||||
hi! link rustVarField InstanceField
|
||||
|
||||
" Vim
|
||||
hi! link vimOption Constant
|
||||
hi! link vimFunction Function
|
||||
hi! link vimContinue NonText
|
||||
hi! link vimParenSep NormalFg
|
||||
hi! link vimBracket PreProc
|
||||
hi! link vimOper NormalFg
|
||||
hi! link vimSep NormalFg
|
||||
hi! link vimCommentString Comment
|
||||
|
||||
" JavaScript
|
||||
hi! link jsNoise Keyword
|
||||
hi! link JsImport Keyword
|
||||
hi! link JsFrom Keyword
|
||||
hi! link JsOperator NormalFg
|
||||
hi! link jsArrowFunction NormalFg
|
||||
hi! link jsFuncArgCommas Delimiter
|
||||
hi! link jsObjectKey InstanceField
|
||||
hi! link jsTernaryIfOperator NormalFg
|
||||
hi! link jsObjectSeparator Keyword
|
||||
hi! link jsSpreadOperator NormalFg
|
||||
hi! link jsModuleComma Keyword
|
||||
hi! link jsClassDefinition NormalFg
|
||||
hi! link jsSuper Keyword
|
||||
hi! link jsThis Keyword
|
||||
hi! link jsObjectProp InstanceField
|
||||
hi! link jsDestructuringNoise Keyword
|
||||
hi! link jsClassProperty Function
|
||||
hi! link jsBooleanTrue Keyword
|
||||
hi! link jsBooleanFalse Keyword
|
||||
hi! link jsObjectShorthandProp NormalFg
|
||||
hi! link jsObjectColon NormalFg
|
||||
hi! link jsExport Keyword
|
||||
hi! link jsModuleAs Keyword
|
||||
|
||||
" TypeScript
|
||||
hi! link typescriptBraces NormalFg
|
||||
hi! link typescriptDocComment docComment
|
||||
hi! link typescriptDocParam docComment
|
||||
hi! link typescriptParens NormalFg
|
||||
hi! link typescriptOpSymbols InstanceField
|
||||
hi! link typescriptRegexpString Number
|
||||
hi! link typescriptSpecial Keyword
|
||||
hi! link typescriptLogicSymbols InstanceField
|
||||
hi! link typescriptExceptions Keyword
|
||||
call s:Hi('typescriptDocTags', s:p.docComment, s:p.null, 'bold,italic,underline')
|
||||
call s:Hi('typescriptGlobalObjects', s:p.tsObject)
|
||||
|
||||
" JSON
|
||||
hi! link jsonBraces NormalFg
|
||||
hi! link jsonKeyword InstanceField
|
||||
hi! link jsonNoise Keyword
|
||||
hi! link jsonKeywordMatch Keyword
|
||||
hi! link jsonBoolean Keyword
|
||||
hi! link jsonNull Keyword
|
||||
hi! link jsonEscape Keyword
|
||||
hi! link jsonStringMatch String
|
||||
|
||||
" XML
|
||||
call s:Hi('xmlTagName', s:p.tag)
|
||||
hi! link xmlEndTag xmlTagName
|
||||
hi! link xmlAttrib NormalFg
|
||||
hi! link xmlProcessingDelim xmlTagName
|
||||
hi! link xmlDocTypeKeyword xmlTagName
|
||||
hi! link xmlComment Comment
|
||||
hi! link xmlCommentStart xmlComment
|
||||
hi! link xmlCommentPart xmlComment
|
||||
call s:Hi('xmlEntity', s:p.entity)
|
||||
hi! link xmlEntityPunct xmlEntity
|
||||
hi! link xmlCdata NormalFg
|
||||
hi! link xmlCdataCdata xmlCdata
|
||||
hi! link xmlCdataStart xmlCdata
|
||||
hi! link xmlCdataEnd xmlCdata
|
||||
hi! link xmlNamespace InstanceField
|
||||
hi! link xmlAttribPunct NormalFg
|
||||
hi! link xmlEqual xmlString
|
||||
|
||||
" GraphQL
|
||||
hi! link graphqlTaggedTemplate NormalFg
|
||||
|
||||
" YAML
|
||||
hi! link yamlDocumentStart NormalFg
|
||||
hi! link yamlDocumentEnd NormalFg
|
||||
hi! link yamlComment docComment
|
||||
hi! link yamlBlockMappingKey Keyword
|
||||
hi! link yamlKeyValueDelimiter NormalFg
|
||||
hi! link yamlInteger NormalFg
|
||||
hi! link yamlFloat NormalFg
|
||||
hi! link yamlBlockCollectionItemStart NormalFg
|
||||
call s:Hi('yamlAnchor', s:p.tag)
|
||||
hi! link yamlAlias yamlAnchor
|
||||
hi! link yamlBool NormalFg
|
||||
hi! link yamlNodeTag NormalFg
|
||||
hi! link yamlNull NormalFg
|
||||
|
||||
" Markdown
|
||||
hi! link markdownH1 Constant
|
||||
hi! link markdownH2 markdownH1
|
||||
hi! link markdownH3 markdownH1
|
||||
hi! link markdownH4 markdownH1
|
||||
hi! link markdownH5 markdownH1
|
||||
hi! link markdownH6 markdownH1
|
||||
hi! link markdownHeadingRule markdownH1
|
||||
hi! link markdownHeadingDelimiter markdownH1
|
||||
call s:Hi('markdownAutomaticLink', s:p.link, s:p.null, 'underline')
|
||||
hi! link markdownBlockquote String
|
||||
hi! link markdownBoldDelimiter Keyword
|
||||
hi! link markdownBold NormalFg
|
||||
hi! link markdownItalicDelimiter Keyword
|
||||
hi! link markdownItalic NormalFg
|
||||
hi! link markdownCode Comment
|
||||
hi! link markdownCodeDelimiter markdownCode
|
||||
hi! link markdownCodeBlock markdownCode
|
||||
call s:Hi('markdownLinkText', s:p.link, s:p.null, 'underline')
|
||||
hi! link markdownLinkTextDelimiter markdownLinkText
|
||||
hi! link markdownUrlDelimiter markdownLinkText
|
||||
call s:Hi('markdownUrl', s:p.function, s:p.null, 'italic')
|
||||
hi! link markdownIdDelimiter Keyword
|
||||
hi! link markdownLinkDelimiter Keyword
|
||||
hi! link markdownIdDeclaration Keyword
|
||||
hi! link markdownLinkDelimiter NormalFg
|
||||
hi! link markdownUrlTitleDelimiter Comment
|
||||
hi! link markdownRule Comment
|
||||
|
||||
" HTML
|
||||
let html_no_rendering=1
|
||||
call s:Hi('htmlTag', s:p.tag)
|
||||
hi! link htmlTagName htmlTag
|
||||
hi! link htmlEndTag htmlTag
|
||||
call s:Hi('htmlArg', s:p.htmlAttribute)
|
||||
call s:Hi('htmlString', s:p.htmlString)
|
||||
hi! link htmlValue htmlString
|
||||
hi! link htmlComment Comment
|
||||
hi! link htmlCommentError Comment
|
||||
hi! link htmlCommentPart Comment
|
||||
call s:Hi('htmlSpecialChar', s:p.entity)
|
||||
hi! link htmlSpecialTagName htmlTag
|
||||
|
||||
" CSS
|
||||
hi! link cssAtKeyword Keyword
|
||||
hi! link cssBraces NormalFg
|
||||
hi! link cssAttributeSelector htmlTag
|
||||
hi! link cssSelectorOp NormalFg
|
||||
hi! link cssClassName htmlTag
|
||||
hi! link cssNoise Keyword
|
||||
hi! link cssAttrComma Keyword
|
||||
hi! link cssFunctionComma Keyword
|
||||
hi! link cssMediaComma Keyword
|
||||
hi! link cssComment Comment
|
||||
hi! link cssClassNameDot NormalFg
|
||||
call s:Hi('cssFunctionName', s:p.tag)
|
||||
call s:Hi('cssColor', s:p.number)
|
||||
call s:Hi('cssIdentifier', s:p.tag)
|
||||
call s:Hi('cssPseudoClassId', s:p.tag)
|
||||
call s:Hi('cssImportant', s:p.keyword, s:p.null, 'bold')
|
||||
call s:Hi('cssProp', s:p.htmlAttribute)
|
||||
call s:Hi('cssAttr', s:p.htmlString)
|
||||
call s:Hi('cssAttrRegion', s:p.htmlString)
|
||||
call s:Hi('cssURL', s:p.link)
|
||||
|
||||
" Shell Script
|
||||
call s:Hi('sheBang', s:p.fg, s:p.null, 'bold')
|
||||
hi! link shRange NormalFg
|
||||
hi! link shFunctionKey Keyword
|
||||
call s:Hi('shStatement', s:p.shCommand)
|
||||
hi! link bashStatement shStatement
|
||||
hi! link shDerefVar NormalFg
|
||||
hi! link shQuote String
|
||||
call s:Hi('shHereDoc', s:p.null, s:p.templateLanguage)
|
||||
call s:Hi('shRedir', s:p.fg, s:p.null, 'bold')
|
||||
hi! link shDerefSimple NormalFg
|
||||
hi! link shCommandSubBQ InstanceField
|
||||
hi! link shOption NormalFg
|
||||
hi! link shCmdSubRegion shStatement
|
||||
hi! link shCommandSub NormalFg
|
||||
hi! link shLoop Keyword
|
||||
hi! link shCommandSub Keyword
|
||||
hi! link shSet shStatement
|
||||
hi! link shFunctionTwo shStatement
|
||||
hi! link shCtrlSeq String
|
||||
hi! link shSpecial String
|
||||
hi! link shCommandSub NormalFg
|
||||
hi! link shDerefSpecial NormalFg
|
||||
hi! link shOperator NormalFg
|
||||
|
||||
" help
|
||||
hi! link helpHyperTextJump Number
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
19
files/i3gtk.css
Normal file
19
files/i3gtk.css
Normal file
|
@ -0,0 +1,19 @@
|
|||
button {
|
||||
border-radius: 0;
|
||||
outline: none;
|
||||
transition-duration: 0;
|
||||
padding: 0;
|
||||
margin-top: 0;
|
||||
|
||||
border: 1px solid #222;
|
||||
background: #333;
|
||||
|
||||
color: #fff;
|
||||
font: 14px "JetBrains Mono NL";
|
||||
}
|
||||
|
||||
button:hover {
|
||||
border: 1px solid #4c7899;
|
||||
background: #285577;
|
||||
}
|
||||
|
61
home.nix
61
home.nix
|
@ -23,15 +23,10 @@ in rec {
|
|||
(cfg_name: importCfg { prefix = "programs"; name = cfg_name; });
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xfce.thunar
|
||||
xfce.tumbler # image previews in thunar
|
||||
xfce.thunar-volman
|
||||
xfce.thunar-archive-plugin
|
||||
xfce.thunar-media-tags-plugin
|
||||
xarchiver
|
||||
fortune
|
||||
vim-full
|
||||
jetbrains.pycharm-community
|
||||
jetbrains.clion
|
||||
# android-studio
|
||||
# android-tools
|
||||
feh
|
||||
|
@ -42,31 +37,63 @@ in rec {
|
|||
discord
|
||||
libreoffice-qt
|
||||
wineWowPackages.stable
|
||||
jetbrains.clion
|
||||
winetricks
|
||||
pamixer
|
||||
gimp
|
||||
xorg.xkill
|
||||
gamemode
|
||||
gdb
|
||||
trenchbroom
|
||||
vkquake
|
||||
ericw-tools
|
||||
xdotool
|
||||
yad
|
||||
pcmanfm
|
||||
gvfs
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
# # fonts?
|
||||
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
|
||||
(pkgs.writeShellScriptBin "i3custom-center-mouse-on-focus" ''
|
||||
eval $(xdotool getwindowfocus getwindowgeometry --shell)
|
||||
MX=$(($X + $WIDTH / 2))
|
||||
MY=$(($Y + $HEIGHT / 2))
|
||||
xdotool mousemove $MX $MY
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "i3custom-window-actions" ''
|
||||
yad --splash --mouse --close-on-unfocus --undecorated \
|
||||
--gtkrc="${home.homeDirectory}/.config/i3/i3gtk.css" \
|
||||
--text="i3 window actions" \
|
||||
--button float:0 --button kill:1
|
||||
|
||||
case $? in
|
||||
0) i3custom-floating-toggle;;
|
||||
1) i3-msg "kill";;
|
||||
-1) ;;
|
||||
esac
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "i3custom-floating-toggle" ''
|
||||
i3-msg "mark --add _; [con_mark=f] floating disable, border pixel 1, mark --add --toggle _; [con_mark=_] floating enable, border normal; mark --add --toggle f;"
|
||||
'')
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".config/i3/workspace2.json".source = files/workspace2.json;
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
".config/i3/i3gtk.css".source = files/i3gtk.css;
|
||||
# FIXME not .vim bro!!!!!!!!!
|
||||
".vim/colors/darcula.vim".source = files/darcula.vim;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
|
@ -75,7 +102,9 @@ in rec {
|
|||
# '';
|
||||
};
|
||||
|
||||
home.sessionVariables = let HOME = home.homeDirectory; in rec {
|
||||
home.sessionVariables = let
|
||||
HOME = home.homeDirectory;
|
||||
in rec {
|
||||
EDITOR = "vim";
|
||||
MANSECT = "2:3:3p:3type:1:1p:n:l:8:0:0p:5:4:9:6:7";
|
||||
|
||||
|
@ -132,12 +161,12 @@ in rec {
|
|||
gtk = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "oxylite";
|
||||
package = pkgs.oxylite-icon-theme;
|
||||
name = "Arc";
|
||||
package = pkgs.arc-icon-theme;
|
||||
};
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome.gnome-themes-extra;
|
||||
name = "Arc-Mono";
|
||||
package = pkgs.arc-mono-gtk-theme;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
68
pkgs/arc-mono-gtk-theme.nix
Normal file
68
pkgs/arc-mono-gtk-theme.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, sassc
|
||||
, meson
|
||||
, ninja
|
||||
, glib
|
||||
, gnome
|
||||
, gtk-engine-murrine
|
||||
, inkscape
|
||||
, cinnamon
|
||||
, makeFontsConf
|
||||
, python3
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "arc-theme";
|
||||
version = "i don't care";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "krizej";
|
||||
repo = pname;
|
||||
rev = "b99424e909e722a1f976df09744fd2dadbead24f";
|
||||
sha256 = "sha256-+pyr3ZfPs519CcJaIMTtU1/xyu8rfIdVD4Mb0Ag/J6Q=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
sassc
|
||||
inkscape
|
||||
glib # for glib-compile-resources
|
||||
python3
|
||||
];
|
||||
|
||||
propagatedUserEnvPkgs = [
|
||||
gnome.gnome-themes-extra
|
||||
gtk-engine-murrine
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs meson/install-file.py
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
# Shut up inkscape's warnings about creating profile directory
|
||||
export HOME="$TMPDIR"
|
||||
'';
|
||||
|
||||
# Fontconfig error: Cannot load default config file: No such file: (null)
|
||||
FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
|
||||
|
||||
mesonFlags = [
|
||||
# "-Dthemes=cinnamon,gnome-shell,gtk2,gtk3,plank,xfwm,metacity"
|
||||
# "-Dvariants=light,darker,dark,lighter"
|
||||
"-Dcinnamon_version=${cinnamon.cinnamon-common.version}"
|
||||
"-Dgnome_shell_version=${gnome.gnome-shell.version}"
|
||||
# You will need to patch gdm to make use of this.
|
||||
"-Dgnome_shell_gresource=true"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Flat theme with transparent elements for GTK 3, GTK 2 and Gnome Shell";
|
||||
homepage = "https://github.com/jnsh/arc-theme";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ simonvandel romildo ];
|
||||
};
|
||||
}
|
|
@ -7,6 +7,8 @@ pkgs: [
|
|||
oxylite-icon-theme = pkgs.callPackage ./oxylite-icon-theme.nix {};
|
||||
e17gtk-revolved = pkgs.callPackage ./e17gtk-revolved.nix {};
|
||||
darkcold-gtk-theme = pkgs.callPackage ./darkcold-gtk-theme.nix {};
|
||||
arc-mono-gtk-theme = pkgs.callPackage ./arc-mono-gtk-theme.nix {};
|
||||
vim-darcula-theme = pkgs.callPackage ./vim-darcula-theme.nix {};
|
||||
})
|
||||
]
|
||||
|
||||
|
|
10
pkgs/vim-darcula-theme.nix
Normal file
10
pkgs/vim-darcula-theme.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ lib, pkgs }:
|
||||
pkgs.vimUtils.buildVimPlugin {
|
||||
name = "vim-darcula-theme";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "doums";
|
||||
repo = "darcula";
|
||||
rev = "faf8dbab27bee0f27e4f1c3ca7e9695af9b1242b";
|
||||
sha256 = "sha256-Gn+lmlYxSIr91Bg3fth2GAQou2Nd1UjrLkIFbBYlmF8=";
|
||||
};
|
||||
}
|
|
@ -11,5 +11,6 @@
|
|||
"i3status"
|
||||
"ssh"
|
||||
"git"
|
||||
"vim"
|
||||
]
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{...}:
|
||||
{
|
||||
enable = true;
|
||||
|
||||
shellAliases = {
|
||||
"ls" = "eza -lhs type";
|
||||
"cp" = "cp -v";
|
||||
|
@ -9,6 +10,10 @@
|
|||
"myip" = "curl ifconfig.me";
|
||||
};
|
||||
|
||||
shellAbbrs = {
|
||||
"2clip" = "xclip -selection clipboard";
|
||||
};
|
||||
|
||||
functions = {
|
||||
"fish_greeting" = "fortune";
|
||||
"fish_prompt" = builtins.readFile ../files/prompt.fish;
|
||||
|
|
138
programs/i3.nix
138
programs/i3.nix
|
@ -11,8 +11,18 @@
|
|||
};
|
||||
|
||||
window = {
|
||||
titlebar = false;
|
||||
border = 1;
|
||||
titlebar = false;
|
||||
};
|
||||
|
||||
floating = {
|
||||
border = 1;
|
||||
titlebar = true;
|
||||
criteria = [
|
||||
{ class = "zenity"; }
|
||||
{ class = "fceux"; }
|
||||
{ title = "Friends List"; } # steam
|
||||
];
|
||||
};
|
||||
|
||||
gaps = {
|
||||
|
@ -20,12 +30,6 @@
|
|||
outer = 0;
|
||||
};
|
||||
|
||||
floating.criteria = [
|
||||
{ class = "zenity"; }
|
||||
{ class = "fceux"; }
|
||||
{ title = "Friends List"; } # steam
|
||||
];
|
||||
|
||||
fonts = {
|
||||
names = ["JetBrains Mono NL"];
|
||||
size = 10.0;
|
||||
|
@ -46,16 +50,7 @@
|
|||
focus = {
|
||||
followMouse = true;
|
||||
mouseWarping = true;
|
||||
};
|
||||
|
||||
modes = {
|
||||
resize = {
|
||||
"Left" = "resize shrink width 10 px or 10 ppt";
|
||||
"Right" = "resize grow width 10 px or 10 ppt";
|
||||
"Up" = "resize shrink height 10 px or 10 ppt";
|
||||
"Down" = "resize grow height 10 px or 10 ppt";
|
||||
"Escape" = "mode default";
|
||||
};
|
||||
newWindow = "urgent";
|
||||
};
|
||||
|
||||
startup = [
|
||||
|
@ -76,25 +71,39 @@
|
|||
{ command = "element-desktop &"; notification = false; }
|
||||
|
||||
{ command = "xrandr --output DP-3 --mode 1920x1080 --rate 239.76 --primary --output HDMI-3 --mode 1920x1080 --rate 74.97 --right-of DP-3 &"; notification = false; }
|
||||
{ command = "sleep 1 && i3-msg \"workspace 1\""; notification = false; }
|
||||
];
|
||||
|
||||
modes = let
|
||||
cmd_and_center = (cmd: "exec --no-startup-id i3-msg '${cmd}' && i3-center-mouse-on-focus");
|
||||
in {
|
||||
resize = {
|
||||
"Left" = cmd_and_center "resize shrink width 10 px or 10 ppt";
|
||||
"Right" = cmd_and_center "resize grow width 10 px or 10 ppt";
|
||||
"Up" = cmd_and_center "resize shrink height 10 px or 10 ppt";
|
||||
"Down" = cmd_and_center "resize grow height 10 px or 10 ppt";
|
||||
"Escape" = "mode default";
|
||||
};
|
||||
};
|
||||
|
||||
modifier = "Mod4";
|
||||
floating.modifier = "Mod4";
|
||||
keybindings =
|
||||
let
|
||||
keybindings = let
|
||||
mod = modifier;
|
||||
execns = "exec --no-startup-id";
|
||||
cmd_and_center = (cmd: "${execns} i3-msg '${cmd}' && i3custom-center-mouse-on-focus");
|
||||
in {
|
||||
# Program keybinds
|
||||
"${mod}+Return" = "exec --no-startup-id alacritty";
|
||||
"${mod}+Shift+s" = "exec --no-startup-id flameshot gui";
|
||||
"${mod}+b" = "exec --no-startup-id firefox";
|
||||
"${mod}+d" = "exec --no-startup-id rofi -show drun";
|
||||
"${mod}+Return" = "${execns} alacritty";
|
||||
"${mod}+Shift+s" = "${execns} flameshot gui";
|
||||
"${mod}+b" = "${execns} firefox";
|
||||
"${mod}+d" = "${execns} rofi -show drun";
|
||||
# hack, see i3 user doc for --release flag
|
||||
"--release ${mod}+k" = "exec xkill";
|
||||
|
||||
# Volume control
|
||||
"Ctrl+F9" = "exec --no-startup-id pamixer --toggle-mute";
|
||||
"Ctrl+F10" = "exec --no-startup-id pamixer --decrease 5";
|
||||
"Ctrl+F11" = "exec --no-startup-id pamixer --increase 5";
|
||||
"Ctrl+F9" = "${execns} pamixer --toggle-mute";
|
||||
"Ctrl+F10" = "${execns} pamixer --decrease 5";
|
||||
"Ctrl+F11" = "${execns} pamixer --increase 5";
|
||||
|
||||
# MPD controls
|
||||
# "Ctrl+F5" = "exec ~/music/select_music.sh";
|
||||
|
@ -108,50 +117,51 @@
|
|||
# "Ctrl+Shift+F11" = ''exec mpc volume +5 && dunstify "mpc $(mpc volume)" -r 420'';
|
||||
|
||||
# General i3 keybindings
|
||||
"${mod}+f" = "fullscreen toggle";
|
||||
"${mod}+f" = cmd_and_center "fullscreen toggle";
|
||||
"${mod}+r" = "mode resize";
|
||||
"${mod}+Shift+q" = "kill";
|
||||
"${mod}+k" = "exec xkill";
|
||||
"${mod}+Shift+q" = cmd_and_center "kill";
|
||||
"${mod}+Shift+r" = "restart";
|
||||
"${mod}+Shift+e" = "exec --no-startup-id i3-nagbar -t warning -m 'exit?' -b 'yes' 'i3-msg exit'";
|
||||
"${mod}+Shift+e" = "${execns} i3-nagbar -t warning -m 'exit?' -b 'yes' 'i3-msg exit'";
|
||||
# Mouse bindings
|
||||
"--border --whole-window button8" = "${execns} i3custom-window-actions";
|
||||
|
||||
"${mod}+Left" = "focus left";
|
||||
"${mod}+Right" = "focus right";
|
||||
"${mod}+Up" = "focus up";
|
||||
"${mod}+Down" = "focus down";
|
||||
"${mod}+Shift+Left" = "move left";
|
||||
"${mod}+Shift+Right" = "move right";
|
||||
"${mod}+Shift+Up" = "move up";
|
||||
"${mod}+Shift+Down" = "move down";
|
||||
"${mod}+Left" = cmd_and_center "focus left";
|
||||
"${mod}+Right" = cmd_and_center "focus right";
|
||||
"${mod}+Up" = cmd_and_center "focus up";
|
||||
"${mod}+Down" = cmd_and_center "focus down";
|
||||
"${mod}+Shift+Left" = cmd_and_center "move left";
|
||||
"${mod}+Shift+Right" = cmd_and_center "move right";
|
||||
"${mod}+Shift+Up" = cmd_and_center "move up";
|
||||
"${mod}+Shift+Down" = cmd_and_center "move down";
|
||||
|
||||
"${mod}+q" = "layout stacking";
|
||||
"${mod}+w" = "layout tabbed";
|
||||
"${mod}+e" = "layout toggle split";
|
||||
"${mod}+q" = cmd_and_center "layout stacking";
|
||||
"${mod}+w" = cmd_and_center "layout tabbed";
|
||||
"${mod}+e" = cmd_and_center "layout toggle split";
|
||||
|
||||
"${mod}+Shift+space" = "floating toggle";
|
||||
"${mod}+space" = "focus mode_toggle";
|
||||
"${mod}+Shift+space" = "${execns} i3custom-floating-toggle && i3custom-center-mouse-on-focus";
|
||||
"${mod}+space" = cmd_and_center "focus mode_toggle";
|
||||
|
||||
"${mod}+1" = "workspace number 1";
|
||||
"${mod}+2" = "workspace number 2";
|
||||
"${mod}+3" = "workspace number 3";
|
||||
"${mod}+4" = "workspace number 4";
|
||||
"${mod}+5" = "workspace number 5";
|
||||
"${mod}+6" = "workspace number 6";
|
||||
"${mod}+7" = "workspace number 7";
|
||||
"${mod}+8" = "workspace number 8";
|
||||
"${mod}+9" = "workspace number 9";
|
||||
"${mod}+0" = "workspace number 10";
|
||||
"${mod}+1" = cmd_and_center "workspace number 1";
|
||||
"${mod}+2" = cmd_and_center "workspace number 2";
|
||||
"${mod}+3" = cmd_and_center "workspace number 3";
|
||||
"${mod}+4" = cmd_and_center "workspace number 4";
|
||||
"${mod}+5" = cmd_and_center "workspace number 5";
|
||||
"${mod}+6" = cmd_and_center "workspace number 6";
|
||||
"${mod}+7" = cmd_and_center "workspace number 7";
|
||||
"${mod}+8" = cmd_and_center "workspace number 8";
|
||||
"${mod}+9" = cmd_and_center "workspace number 9";
|
||||
"${mod}+0" = cmd_and_center "workspace number 10";
|
||||
|
||||
"${mod}+Shift+1" = "move container to workspace number 1";
|
||||
"${mod}+Shift+2" = "move container to workspace number 2";
|
||||
"${mod}+Shift+3" = "move container to workspace number 3";
|
||||
"${mod}+Shift+4" = "move container to workspace number 4";
|
||||
"${mod}+Shift+5" = "move container to workspace number 5";
|
||||
"${mod}+Shift+6" = "move container to workspace number 6";
|
||||
"${mod}+Shift+7" = "move container to workspace number 7";
|
||||
"${mod}+Shift+8" = "move container to workspace number 8";
|
||||
"${mod}+Shift+9" = "move container to workspace number 9";
|
||||
"${mod}+Shift+0" = "move container to workspace number 10";
|
||||
"${mod}+Shift+1" = cmd_and_center "move container to workspace number 1";
|
||||
"${mod}+Shift+2" = cmd_and_center "move container to workspace number 2";
|
||||
"${mod}+Shift+3" = cmd_and_center "move container to workspace number 3";
|
||||
"${mod}+Shift+4" = cmd_and_center "move container to workspace number 4";
|
||||
"${mod}+Shift+5" = cmd_and_center "move container to workspace number 5";
|
||||
"${mod}+Shift+6" = cmd_and_center "move container to workspace number 6";
|
||||
"${mod}+Shift+7" = cmd_and_center "move container to workspace number 7";
|
||||
"${mod}+Shift+8" = cmd_and_center "move container to workspace number 8";
|
||||
"${mod}+Shift+9" = cmd_and_center "move container to workspace number 9";
|
||||
"${mod}+Shift+0" = cmd_and_center "move container to workspace number 10";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
47
programs/vim.nix
Normal file
47
programs/vim.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
plugins = [
|
||||
pkgs.vimPlugins.indentLine
|
||||
pkgs.vimPlugins.vim-gitgutter
|
||||
];
|
||||
settings = let
|
||||
vimCache = "~/.cache/vim";
|
||||
in {
|
||||
background = "dark";
|
||||
backupdir = [ "${vimCache}/backup/" ];
|
||||
copyindent = false;
|
||||
directory = [ "~/.cache/vim/swap/" ];
|
||||
expandtab = true;
|
||||
hidden = false;
|
||||
history = 420;
|
||||
ignorecase = false;
|
||||
modeline = true;
|
||||
mouse = "a";
|
||||
mousefocus = false;
|
||||
mousehide = false;
|
||||
mousemodel = "popup_setpos";
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
shiftwidth = 4;
|
||||
smartcase = false;
|
||||
tabstop = 4;
|
||||
undodir = [ "~/.cache/vim/undo/" ];
|
||||
undofile = false;
|
||||
};
|
||||
extraConfig = ''
|
||||
set updatetime=100
|
||||
set signcolumn=yes
|
||||
set termguicolors
|
||||
set cursorline
|
||||
colorscheme darcula
|
||||
let g:indentLine_char = '▏'
|
||||
let g:c_no_ansi = 1
|
||||
let g:c_functions = 1
|
||||
let g:c_no_c99 = 1
|
||||
let g:c_no_bsd = 1
|
||||
let g:c_no_c11 = 1
|
||||
let g:c_gnu = 1
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue