From beb7d2def1054af84cb3b33edd438211121a74b6 Mon Sep 17 00:00:00 2001 From: foosinn Date: Sat, 12 Feb 2022 20:52:20 +0100 Subject: [PATCH] a little ricing --- configuration.nix | 5 ++- dotfiles/sway/config | 77 ++++++++++++++------------------------- dotfiles/sway/status.toml | 24 ++++++------ modules/colors.nix | 48 ++++++++++++++++++++++++ packages/neovim.nix | 1 + roles/base.nix | 9 +++-- roles/desktop.nix | 48 +++++++++++++++++++++++- roles/private.nix | 36 ++++++++++-------- 8 files changed, 166 insertions(+), 82 deletions(-) create mode 100644 modules/colors.nix diff --git a/configuration.nix b/configuration.nix index 429dd2c..b6d2b22 100644 --- a/configuration.nix +++ b/configuration.nix @@ -7,6 +7,8 @@ { imports = [ + ./modules/colors.nix + # Include the results of the hardware scan. ./hardware-configuration.nix @@ -18,7 +20,8 @@ ./roles/network.nix ./roles/nix.nix ./roles/vpn.nix - ./roles/work.nix + ./roles/private.nix + ./roles/game.nix ]; networking.useDHCP = false; diff --git a/dotfiles/sway/config b/dotfiles/sway/config index 74e9834..b14990e 100644 --- a/dotfiles/sway/config +++ b/dotfiles/sway/config @@ -7,19 +7,9 @@ set $right l set $term alacritty set $wallpaper /home/stefan/Downloads/bg.jpg set $lock swaylock -t -i $wallpaper --scaling=fill - -# echo -- bemenu -H 23 -b -p run --{ff,nf}=#eeeeeee --{tf,hf}=#78dce8 --{tb,fb,nb,hb,sb}=#2d2a2e - -set $menu bemenu-run -H 23 -b -p run \ - --ff=#ff6188 \ - --nf=#fcfcfa \ - --tf=#78dce8 \ - --hf=#78dce8 \ - --tb=#2d2a2e \ - --fb=#2d2a2e \ - --nb=#2d2a2e \ - --hb=#2d2a2e \ - --sb=#2d2a2e +set $font pango:CaskaydiaCove Nerd Font Mono 10 +set $menucolor --ff=#f8f8f2 --nf=#f8f8f2 --tf=#bd93f9 --hf=#bd93f9 --tb=#282a36 --fb=#282a36 --nb=#282a36 --hb=#282a36 --sb=#282a36 +set $menu bemenu-run -H 23 -b -p run $menucolor input "1:1:AT_Translated_Set_2_keyboard" xkb_layout de input "0:0:TUXEDO_Keyboard" xkb_layout de @@ -53,32 +43,22 @@ for_window [title="pyCalc"] floating enable for_window [title="insect"] floating enable # font -#font pango:CaskaydiaCove Nerd Font Mono 10 +font $font # colors -set $black #2d2a2e -set $base00 #2d2a2e -set $base01 #ff6188 -set $base02 #a9dc76 -set $base03 #ffd866 -set $base04 #78dce8 -set $base05 #ab9df2 -set $base06 #fcfcfa -set $base07 #fcfcfa -set $base08 #323232 -set $base09 #cc6666 -set $base0A #ffd866 -set $base0B #78dce8 -set $base0C #ab9df2 -set $base0D #ff6188 -set $base0E #a6dc76 -set $base0F #ffffff +set $black #282a36 +set $red #ff6188 +set $cyan #78dce8 +set $white #fcfcfa +set $yellow #f1fa8c +set $violet #bd93f9 +set $black2 #323232 -# border background text indicator -client.focused $base04 $base00 $base07 $base04 $base04 -client.focused_inactive $base00 $base00 $base07 $base00 $base00 -client.unfocused $black $black $base07 $base00 $base00 -client.urgent $base01 $base01 $base00 $base08 $base07 +# border backgnd text indicator childborder +client.focused $violet $black $white $violet $violet +client.focused_inactive $black $black $white $black2 $black +client.unfocused $black $black $white $black2 $black +client.urgent $red $red $black $black2 $white # movement @@ -139,21 +119,18 @@ bar { position bottom colors { background $black - statusline $base07 - separator $base04 - - # border back text - focused_workspace $base04 $base04 $base00 - active_workspace $base04 $base04 $base00 - urgent_workspace $base01 $base01 $base07 - inactive_workspace $base00 $base00 $base07 + statusline $white + separator $violet + # border back text + focused_workspace $violet $violet $black + active_workspace $violet $violet $black + urgent_workspace $red $red $white + inactive_workspace $black $black $white } status_command i3status-rs /etc/sway/status.toml } -include /etc/sway/config.d/* - set $gnome-schema org.gnome.desktop.interface exec_always { gsettings set $gnome-schema gtk-theme 'Arc-Dark' @@ -162,12 +139,14 @@ exec_always { } # autostarts -exec mako --border-color=#cc6666 \ - --background-color=#2d2a2eee +exec mako --font "$font" \ + --background-color=$black \ + --border-color=$violet \ + --text-color=$white exec emacs --daemon exec swayidle before-sleep "$lock" exec /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1 # pastebin exec wl-paste --primary -t text --watch clipman store -bindsym $mod+p exec clipman pick -t "bemenu" --tool-args='-b --fn "CascadiaCode 10" -l 10 --ff=#ff6188 --nf=#fcfcfa --tf=#78dce8 --hf=#78dce8 --tb=#2d2a2e --fb=#2d2a2e --nb=#2d2a2e --hb=#2d2a2e --sb=#2d2a2e' +bindsym $mod+p exec clipman pick -t "bemenu" --tool-args='-b --fn "$font" -l 10 $menucolor' diff --git a/dotfiles/sway/status.toml b/dotfiles/sway/status.toml index 4a04ddd..18b43e2 100644 --- a/dotfiles/sway/status.toml +++ b/dotfiles/sway/status.toml @@ -1,18 +1,18 @@ [theme] name = "plain" [theme.overrides] -idle_bg = "#2d2a2e" -idle_fg = "#eeeeee" -info_bg = "#2d2a2e" -info_fg = "#eeeeee" -good_bg = "#2d2a2e" -good_fg = "#a9dc76" -warning_bg = "#2d2a2e" -warning_fg = "#ffd866" -critical_bg = "#2a2e38" -critical_fg = "#ff665c" -separator_bg = "#2d2a2e" -separator_fg = "#555555" +idle_bg = "#282a36" +idle_fg = "#f8f8f2" +info_bg = "#282a36" +info_fg = "#f8f8f2" +good_bg = "#282a36" +good_fg = "#50fa7b" +warning_bg = "#282a36" +warning_fg = "#f1fa8c" +critical_bg = "#282a36" +critical_fg = "#ff5555" +separator_bg = "#282a36" +separator_fg = "#bd93f9" separator = "|" [icons] diff --git a/modules/colors.nix b/modules/colors.nix new file mode 100644 index 0000000..4a84640 --- /dev/null +++ b/modules/colors.nix @@ -0,0 +1,48 @@ +{ config, lib, pkgs, ... }: + +with lib; { + options = { + colors = { + background = mkOption { + type = types.str; + default = "19181A"; + }; + foreground = mkOption { + type = types.str; + default = "FCFCFA"; + }; + black = mkOption { + type = types.str; + default = "19181A"; + }; + red = mkOption { + type = types.str; + default = "cc6666"; + }; + green = mkOption { + type = types.str; + default = "a9dc76"; + }; + yellow = mkOption { + type = types.str; + default = "ffd866"; + }; + cyan = mkOption { + type = types.str; + default = "78dce8"; + }; + magenta = mkOption { + type = types.str; + default = "FC9867"; + }; + blue = mkOption { + type = types.str; + default = "AB9DF2"; + }; + white = mkOption { + type = types.str; + default = "FCFCFA"; + }; + }; + }; +} diff --git a/packages/neovim.nix b/packages/neovim.nix index 49c9cf0..f1744dd 100644 --- a/packages/neovim.nix +++ b/packages/neovim.nix @@ -31,6 +31,7 @@ neovim.override { set relativenumber set mouse=a set shortmess+=c + set clipboard=unnamedplus " better search set incsearch diff --git a/roles/base.nix b/roles/base.nix index 98e5326..1cb5552 100644 --- a/roles/base.nix +++ b/roles/base.nix @@ -45,6 +45,12 @@ in { etc = { "starship.toml".source = ../dotfiles/starship.toml; }; + + variables = { + BAT_THEME = "ansi"; + EDITOR = "nvim"; + STARSHIP_CONFIG = "/etc/starship.toml"; + }; }; programs.bash = { @@ -52,8 +58,6 @@ in { . <(starship init bash) ''; interactiveShellInit = '' - export EDITOR=nvim - export STARSHIP_CONFIG=/etc/starship.toml if [ -f ~/.ssh/agent.env ] ; then . ~/.ssh/agent.env > /dev/null @@ -68,7 +72,6 @@ in { ssh-add fi - set_win_title() { echo -ne "\033]0;$USER@$HOSTNAME: $PWD\007" } diff --git a/roles/desktop.nix b/roles/desktop.nix index 2151945..3bf6310 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -4,6 +4,7 @@ { config, lib, pkgs, ... }: let + colors = config.colors; unstable = import { config.allowUnfree = true; }; in { @@ -36,11 +37,56 @@ in { v4l2loopback ]; + colors = { + background = "#282a36"; + foreground = "#f8f8f2"; + black = "#1E2029"; + red = "#ff5555"; + green = "#50fa7b"; + yellow = "#f1fa8c"; + cyan = "#8be9fd"; + magenta ="#bd93f9"; + blue = "#61bfff"; + white = "#ffffff"; + }; + environment = { etc = { "sway/config".source = ../dotfiles/sway/config; "sway/status.toml".source = ../dotfiles/sway/status.toml; - "xdg/alacritty/alacritty.yml".source = ../dotfiles/alacritty.yml; + "xdg/alacritty/alacritty.yml".text = '' +font: + normal: + family: CaskaydiaCove Nerd Font + size: 12 + +background_opacity: 0.98 +draw_bold_text_with_bright_colors: true + +colors: + primary: + background: "${colors.background}" + foreground: "${colors.foreground}" + + normal: + black: "${colors.black}" + red: "${colors.red}" + green: "${colors.green}" + yellow: "${colors.yellow}" + cyan: "${colors.cyan}" + magenta: "${colors.magenta}" + blue: "${colors.blue}" + white: "${colors.white}" + +window: + dynamic_title: true + +env: + TERM: xterm-256color + +key_bindings: + - { key: Escape, mods: Control, action: ToggleViMode } + ''; }; }; diff --git a/roles/private.nix b/roles/private.nix index 82823ce..1d8f031 100644 --- a/roles/private.nix +++ b/roles/private.nix @@ -5,25 +5,25 @@ let in { environment.systemPackages = with pkgs; [ # embedded - arduino - avrdude - gcc-arm-embedded - openocd - pkgsCross.avr.avrlibc - pkgsCross.avr.buildPackages.binutils - pkgsCross.avr.buildPackages.gcc8 - pkgsCross.avr.libcCross + #arduino + #avrdude + #gcc-arm-embedded + #openocd + #pkgsCross.avr.avrlibc + #pkgsCross.avr.buildPackages.binutils + #pkgsCross.avr.buildPackages.gcc8 + #pkgsCross.avr.libcCross - cura - candle + #cura + #candle openscad - kicad - blender - python3Packages.numpy - python3Packages.shapely + #kicad + #blender + #python3Packages.numpy + #python3Packages.shapely - steam - unstable.obs-studio + #steam + #unstable.obs-studio ]; # stm32 debugger @@ -40,4 +40,8 @@ in { fsType = "nfs"; options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=120" ]; }; + + networking.extraHosts = '' + 162.55.40.34 mail.f2o.io + ''; }