Switching Hyprland To Nix Colors

This commit is contained in:
Tyler Kelley 2024-01-15 00:26:14 -06:00
parent 645f64e04b
commit 9a667c579f
6 changed files with 276 additions and 97 deletions

188
config/hyprland.nix Normal file
View File

@ -0,0 +1,188 @@
{ pkgs, config, ... }:
{
home.file.".config/hyprland".text = ''
# monitor=[monitor-name],[resolution@framerate],[pos-x,y],[scale factor],transform,[rotation]
# Rotation Degrees Shorthand
# normal (no transforms) -> 0
# 90 degrees -> 1
# 180 degrees -> 2
# 270 degrees -> 3
# flipped -> 4
# flipped + 90 degrees -> 5
# flipped + 180 degrees -> 6
# flipped + 270 degrees -> 7
monitor=,highres,auto,1 # Automatic Configuration
windowrule = float, ^(steam)$
windowrule = center, ^(steam)$
windowrule = size 1080 900, ^(steam)$
input {
kb_layout = us
kb_options=caps:super
follow_mouse = 1
touchpad {
natural_scroll = false
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
gestures {
workspace_swipe = true
workspace_swipe_fingers = 3
}
# Ensure Mouse or Keyboard Inputs Turn On Displays
misc {
mouse_move_enables_dpms = true
key_press_enables_dpms = false
}
animations {
enabled = yes
# Define Settings For Animation Bezier Curve
bezier = wind, 0.05, 0.9, 0.1, 1.05
bezier = winIn, 0.1, 1.1, 0.1, 1.1
bezier = winOut, 0.3, -0.3, 0, 1
bezier = liner, 1, 1, 1, 1
animation = windows, 1, 6, wind, slide
animation = windowsIn, 1, 6, winIn, slide
animation = windowsOut, 1, 5, winOut, slide
animation = windowsMove, 1, 5, wind, slide
animation = border, 1, 1, liner
animation = borderangle, 1, 30, liner, loop
animation = fade, 1, 10, default
animation = workspaces, 1, 5, wind
}
exec-once = dbus-update-activation-environment --systemd --all
exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = hyprctl setcursor Bibata-Modern-Ice 24
exec-once = swww init
exec-once = waybar
exec-once = swaync
exec-once = wallsetter
$mainMod = SUPER
# Sound Control Keybinds
bind = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bind = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bind = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Brightness Control Keybinds
bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
bind = , XF86MonBrightnessUp, exec, brightnessctl set +5%
# System Application Keybinds
bind = $mainMod, Return, exec, kitty
bind = $mainMod SHIFT, Return, exec, rofi -show drun
bind = $mainMod SHIFT, W, exec, kitty -e amfora
bind = $mainMod SHIFT, S, exec, wallsetter
bind = $mainMod, W, exec, firefox
bind = $mainMod, E, exec, emopicker9000
bind = $mainMod, S, exec, grim -g "$(slurp)"
bind = $mainMod, D, exec, discord
bind = $mainMod, O, exec, obs
bind = $mainMod, G, exec, gimp
bind = $mainMod SHIFT, G, exec, godot4
bind = $mainMod, T, exec, thunar
bind = $mainMod, M, exec, ario
# OBS Global Keybinds
bind = ALT, F1, pass, ^(com\.obsproject\.Studio)$
bind = ALT, F2, pass, ^(com\.obsproject\.Studio)$
bind = ALT, F3, pass, ^(com\.obsproject\.Studio)$
bind = ALT, F4, pass, ^(com\.obsproject\.Studio)$
bind = ALT, F5, pass, ^(com\.obsproject\.Studio)$
# Hyprland Keybinds
bind = $mainMod, Q, killactive,
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod SHIFT, I, togglesplit, # dwindle
bind = $mainMod, F, fullscreen,
bind = $mainMod SHIFT, F, togglefloating,
bind = $mainMod SHIFT, C, exit,
# Move window with mainMod + shift + arrow keys
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
bind = $mainMod SHIFT, h, movewindow, l
bind = $mainMod SHIFT, l, movewindow, r
bind = $mainMod SHIFT, k, movewindow, u
bind = $mainMod SHIFT, j, movewindow, d
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d
# Switch workspaces with mainMod + [0-6]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-6]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
dwindle {
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # you probably want this
}
master {
new_is_master = true
}
general {
gaps_in = 4
gaps_out = 8
border_size = 3
col.active_border = rgba(${base0C}ff) rgba(${base0D}ff) 45deg
col.inactive_border = rgba(${base00}cc) rgba(${base01}cc) 45deg
layout = dwindle
resize_on_border = true
}
decoration {
rounding = 10
drop_shadow = false
blur {
enabled = true
size = 5
passes = 3
new_optimizations = on
ignore_opacity = on
}
}
'';
}

View File

@ -15,23 +15,23 @@
background_opacity = "0.85";
};
extraConfig = ''
foreground #${config.colorScheme.colors.base0F}
foreground #${config.colorScheme.colors.base05}
background #${config.colorScheme.colors.base00}
color0 #${config.colorScheme.colors.base00}
color8 #${config.colorScheme.colors.base00}
color1 #${config.colorScheme.colors.base01}
color9 #${config.colorScheme.colors.base09}
color2 #${config.colorScheme.colors.base02}
color10 #${config.colorScheme.colors.base0A}
color3 #${config.colorScheme.colors.base03}
color11 #${config.colorScheme.colors.base0B}
color4 #${config.colorScheme.colors.base04}
color12 #${config.colorScheme.colors.base0C}
color5 #${config.colorScheme.colors.base05}
color13 #${config.colorScheme.colors.base0D}
color6 #${config.colorScheme.colors.base06}
color14 #${config.colorScheme.colors.base0E}
color7 #${config.colorScheme.colors.base07}
color8 #${config.colorScheme.colors.base01}
color1 #${config.colorScheme.colors.base02}
color9 #${config.colorScheme.colors.base03}
color2 #${config.colorScheme.colors.base04}
color10 #${config.colorScheme.colors.base05}
color3 #${config.colorScheme.colors.base06}
color11 #${config.colorScheme.colors.base07}
color4 #${config.colorScheme.colors.base08}
color12 #${config.colorScheme.colors.base09}
color5 #${config.colorScheme.colors.base0A}
color13 #${config.colorScheme.colors.base0B}
color6 #${config.colorScheme.colors.base0C}
color14 #${config.colorScheme.colors.base0D}
color7 #${config.colorScheme.colors.base0E}
color15 #${config.colorScheme.colors.base0F}
cursor #${config.colorScheme.colors.base07}
cursor_text_color #${config.colorScheme.colors.base00}

View File

@ -4,79 +4,78 @@
home.file.".vimcolors.vim".text = ''
hi clear
syntax reset
let g:colors_name = "dynamiccolors"
let g:colors_name = "sunset"
set background=dark
set t_Co=256
hi Normal guifg=#${config.colorScheme.colors.base07} ctermbg=NONE guibg=#${config.colorScheme.colors.base00} gui=NONE
hi Normal guifg=#${config.colorScheme.colors.base05} ctermbg=NONE guibg=NONE gui=NONE
hi DiffText guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi ErrorMsg guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi WarningMsg guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi PreProc guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi Exception guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi Error guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi DiffDelete guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi GitGutterDelete guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi GitGutterChangeDelete guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi cssIdentifier guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi cssImportant guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi Type guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi Identifier guifg=#${config.colorScheme.colors.base01} guibg=NONE
hi PMenuSel guifg=#${config.colorScheme.colors.base06} guibg=NONE
hi Constant guifg=#${config.colorScheme.colors.base06} guibg=NONE
hi Repeat guifg=#${config.colorScheme.colors.base06} guibg=NONE
hi DiffAdd guifg=#${config.colorScheme.colors.base06} guibg=NONE
hi GitGutterAdd guifg=#${config.colorScheme.colors.base06} guibg=NONE
hi cssIncludeKeyword guifg=#${config.colorScheme.colors.base06} guibg=NONE
hi Keyword guifg=#${config.colorScheme.colors.base06} guibg=NONE
hi IncSearch guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Title guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi PreCondit guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Debug guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi SpecialChar guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Conditional guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Todo guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Special guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Label guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Delimiter guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Number guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi CursorLineNR guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Define guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi MoreMsg guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Tag guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi String guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi MatchParen guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Macro guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi DiffChange guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi GitGutterChange guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi cssColor guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Function guifg=#${config.colorScheme.colors.base04} guibg=NONE
hi Directory guifg=#${config.colorScheme.colors.base05} guibg=NONE
hi markdownLinkText guifg=#${config.colorScheme.colors.base05} guibg=NONE
hi javaScriptBoolean guifg=#${config.colorScheme.colors.base05} guibg=NONE
hi Include guifg=#${config.colorScheme.colors.base05} guibg=NONE
hi Storage guifg=#${config.colorScheme.colors.base05} guibg=NONE
hi cssClassName guifg=#${config.colorScheme.colors.base05} guibg=NONE
hi cssClassNameDot guifg=#${config.colorScheme.colors.base05} guibg=NONE
hi Statement guifg=#${config.colorScheme.colors.base06} guibg=NONE
hi Operator guifg=#${config.colorScheme.colors.base06} guibg=NONE
hi cssAttr guifg=#${config.colorScheme.colors.base06} guibg=NONE
hi DiffText guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi ErrorMsg guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi WarningMsg guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi PreProc guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi Exception guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi Error guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi DiffDelete guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi GitGutterDelete guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi GitGutterChangeDelete guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi cssIdentifier guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi cssImportant guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi Type guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi Identifier guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi PMenuSel guifg=#${config.colorScheme.colors.base0B} guibg=NONE
hi Constant guifg=#${config.colorScheme.colors.base0B} guibg=NONE
hi Repeat guifg=#${config.colorScheme.colors.base0B} guibg=NONE
hi DiffAdd guifg=#${config.colorScheme.colors.base0B} guibg=NONE
hi GitGutterAdd guifg=#${config.colorScheme.colors.base0B} guibg=NONE
hi cssIncludeKeyword guifg=#${config.colorScheme.colors.base0B} guibg=NONE
hi Keyword guifg=#${config.colorScheme.colors.base0B} guibg=NONE
hi IncSearch guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Title guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi PreCondit guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Debug guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi SpecialChar guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Conditional guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Todo guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Special guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Label guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Delimiter guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Number guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi CursorLineNR guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Define guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi MoreMsg guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Tag guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi String guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi MatchParen guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Macro guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi DiffChange guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi GitGutterChange guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi cssColor guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Function guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi Directory guifg=#${config.colorScheme.colors.base09} guibg=NONE
hi markdownLinkText guifg=#${config.colorScheme.colors.base09} guibg=NONE
hi javaScriptBoolean guifg=#${config.colorScheme.colors.base09} guibg=NONE
hi Include guifg=#${config.colorScheme.colors.base09} guibg=NONE
hi Storage guifg=#${config.colorScheme.colors.base09} guibg=NONE
hi cssClassName guifg=#${config.colorScheme.colors.base09} guibg=NONE
hi cssClassNameDot guifg=#${config.colorScheme.colors.base09} guibg=NONE
hi Statement guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Operator guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi cssAttr guifg=#${config.colorScheme.colors.base0C} guibg=NONE
hi Pmenu guifg=#${config.colorScheme.colors.base0F} guibg=#${config.colorScheme.colors.base08}
hi SignColumn guibg=#${config.colorScheme.colors.base00}
hi Title guifg=#${config.colorScheme.colors.base06}
hi LineNr guifg=#${config.colorScheme.colors.base07} guibg=#${config.colorScheme.colors.base00}
hi NonText guifg=#${config.colorScheme.colors.base05} guibg=#${config.colorScheme.colors.base00}
hi Comment guifg=#${config.colorScheme.colors.base05} gui=italic
hi SpecialComment guifg=#${config.colorScheme.colors.base05} gui=italic guibg=NONE
hi CursorLine guibg=#${config.colorScheme.colors.base08}
hi TabLineFill gui=NONE guibg=#${config.colorScheme.colors.base08}
hi TabLine guifg=#${config.colorScheme.colors.base07} guibg=#${config.colorScheme.colors.base08} gui=NONE
hi StatusLine gui=bold guibg=#${config.colorScheme.colors.base08} guifg=#${config.colorScheme.colors.base0F}
hi StatusLineNC gui=NONE guibg=#${config.colorScheme.colors.base00} guifg=#${config.colorScheme.colors.base0F}
hi Search guibg=#${config.colorScheme.colors.base05} guifg=#${config.colorScheme.colors.base0F}
hi VertSplit gui=NONE guifg=#${config.colorScheme.colors.base08} guibg=NONE
hi Visual gui=NONE guibg=#${config.colorScheme.colors.base08}
hi Pmenu guifg=#${config.colorScheme.colors.base05} guibg=#${config.colorScheme.colors.base0D}
hi Title guifg=#${config.colorScheme.colors.base05}
hi LineNr guifg=#${config.colorScheme.colors.base0A} guibg=NONE
hi NonText guifg=#${config.colorScheme.colors.base03} guibg=NONE
hi Comment guifg=#${config.colorScheme.colors.base03} gui=italic
hi SpecialComment guifg=#${config.colorScheme.colors.base03} gui=italic guibg=NONE
hi CursorLine guibg=#${config.colorScheme.colors.base0D}
hi TabLineFill gui=NONE guibg=#${config.colorScheme.colors.base0D}
hi TabLine guifg=#${config.colorScheme.colors.base0A} guibg=#${config.colorScheme.colors.base0D} gui=NONE
hi StatusLine gui=bold guibg=#${config.colorScheme.colors.base0D} guifg=#${config.colorScheme.colors.base01}
hi StatusLineNC gui=NONE guibg=NONE guifg=#${config.colorScheme.colors.base05}
hi Search guibg=#${config.colorScheme.colors.base03} guifg=#${config.colorScheme.colors.base05}
hi VertSplit gui=NONE guifg=#${config.colorScheme.colors.base0D} guibg=NONE
hi Visual gui=NONE guibg=#${config.colorScheme.colors.base0D}
'';
}

View File

@ -20,7 +20,6 @@ endif
" => Plugins
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
call plug#begin('~/.vim/plugged')
Plug 'itchyny/lightline.vim' " Lightline statusbar
Plug 'scrooloose/nerdtree' " Nerdtree
Plug 'ryanoasis/vim-devicons' " Icons for Nerdtree
Plug 'dracula/vim', { 'as': 'dracula' } " Dracula Color Scheme
@ -55,10 +54,10 @@ set encoding=UTF-8 " Set encoding
let NERDTreeShowHidden=1 " NERDtree shows hidden files
set term=kitty " fix for kitty terminal
set termguicolors
:source $HOME/.vimcolors.vim
" get transparent bg & some markdown stuffs
" Theme System & Ensure Transparency works
hi Normal guibg=NONE ctermbg=NONE
:source $HOME/.vimcolors.vim
au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown
@ -93,10 +92,6 @@ inoremap <silent><expr> <Tab>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Status Line
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" The lightline.vim theme
let g:lightline = {
\ 'colorscheme': 'one',
\ }
" Always show statusline
set laststatus=2
" Uncomment to prevent non-normal modes showing in powerline and below powerline.

View File

@ -117,7 +117,7 @@
color: #${config.colorScheme.colors.base0F};
}
#workspaces {
background: linear-gradient(180deg, #${config.colorScheme.colors.base00}, #${config.colorScheme.colors.base08});
background: linear-gradient(180deg, #${config.colorScheme.colors.base00}, #${config.colorScheme.colors.base01});
margin: 5px;
padding: 0px 1px;
border-radius: 15px;

View File

@ -7,11 +7,12 @@
home.stateVersion = "23.11";
# Set The Colorscheme
colorScheme = inputs.nix-colors.colorSchemes.gruvbox-dark-medium;
colorScheme = inputs.nix-colors.colorSchemes.rose-pine-moon;
imports = [
inputs.nix-colors.homeManagerModules.default
./config/waybar.nix
./config/hyprland.nix
./config/kitty.nix
./config/vimcolors.nix
];
@ -39,10 +40,6 @@
source = ./config/swaync;
recursive = true;
};
home.file.".config/hypr" = {
source = ./config/hyprland;
recursive = true;
};
# Define Settings For Xresources
xresources.properties = {