[feat] Fix nvim config mostly

This commit is contained in:
Uttarayan
2024-02-22 01:45:37 +05:30
parent 3622d00200
commit ed82e4eec4
7 changed files with 87 additions and 254 deletions

View File

@@ -1,206 +0,0 @@
@define-color color_bg #2d2d2d;
@define-color color_bg_dark #1c1c1c;
@define-color color_border #424242;
@define-color color_border_active #6699cc;
@define-color color_text #ffffff;
@define-color color_urgent #8f0a0a;
/* -- base styles -- */
* {
font-family: Noto Sans Nerd Font, sans-serif;
font-size: 16px;
border: none;
border-radius: 0;
}
box, menubar, button {
background-color: @color_bg;
background-image: none;
}
button, label {
color: @color_text;
}
button:hover {
background-color: @color_bg_dark;
}
#bar {
border-top: 1px solid @color_border;
}
.popup {
border: 1px solid @color_border;
padding: 1em;
}
/* -- clipboard -- */
.clipboard {
margin-left: 5px;
font-size: 1.1em;
}
.popup-clipboard .item {
padding-bottom: 0.3em;
border-bottom: 1px solid @color_border;
}
/* -- clock -- */
.clock {
font-weight: bold;
margin-left: 5px;
}
.popup-clock .calendar-clock {
color: @color_text;
font-size: 2.5em;
padding-bottom: 0.1em;
}
.popup-clock .calendar {
background-color: @color_bg;
color: @color_text;
}
.popup-clock .calendar .header {
padding-top: 1em;
border-top: 1px solid @color_border;
font-size: 1.5em;
}
.popup-clock .calendar:selected {
background-color: @color_border_active;
}
/* -- launcher -- */
.launcher .item {
margin-right: 4px;
}
.launcher .item:not(.focused):hover {
background-color: @color_bg_dark;
}
.launcher .open {
border-bottom: 1px solid @color_text;
}
.launcher .focused {
border-bottom: 2px solid @color_border_active;
}
.launcher .urgent {
border-bottom-color: @color_urgent;
}
.popup-launcher {
padding: 0;
}
.popup-launcher .popup-item:not(:first-child) {
border-top: 1px solid @color_border;
}
/* -- music -- */
.music:hover * {
background-color: @color_bg_dark;
}
.popup-music .album-art {
margin-right: 1em;
}
.popup-music .icon-box {
margin-right: 0.4em;
}
.popup-music .title .icon, .popup-music .title .label {
font-size: 1.7em;
}
.popup-music .controls *:disabled {
color: @color_border;
}
.slider slider {
color: @color_urgent;
background-color: @color_urgent;
}
.popup-music .volume .slider slider {
border-radius: 100%;
}
.popup-music .volume .icon {
margin-left: 4px;
}
.popup-music .progress .slider slider {
border-radius: 100%;
}
/* -- script -- */
.script {
padding-left: 10px;
}
/* -- sys_info -- */
.sysinfo {
margin-left: 10px;
}
.sysinfo .item {
margin-left: 5px;
}
/* -- tray -- */
.tray {
margin-left: 10px;
}
/* -- workspaces -- */
.workspaces .item.focused {
box-shadow: inset 0 -3px;
background-color: @color_bg_dark;
}
.workspaces .item:hover {
box-shadow: inset 0 -3px;
}
/* -- custom: power menu -- */
.popup-power-menu #header {
font-size: 1.4em;
padding-bottom: 0.4em;
margin-bottom: 0.6em;
border-bottom: 1px solid @color_border;
}
.popup-power-menu .power-btn {
border: 1px solid @color_border;
padding: 0.6em 1em;
}
.popup-power-menu #buttons > *:nth-child(1) .power-btn {
margin-right: 1em;
}

1
config/ironbar/style.css Symbolic link
View File

@@ -0,0 +1 @@
/nix/store/87j6kznxyqcic67gphrcyb5bz6ydnfpl-home-manager-files/.config/ironbar/style.css

View File

@@ -35,6 +35,16 @@ in {
(nerdfonts.override { fonts = [ "Hasklig" ]; })
mpv
] ++ (if device.isLinux then [
(pkgs.catppuccin-gtk.override {
variant = "mocha";
size = "standard";
accents = [ "mauve" ];
tweaks = [ "normal" ];
})
(pkgs.catppuccin-papirus-folders.override {
accent = "mauve";
flavor = "mocha";
})
swaynotificationcenter
openocd-rp2040
usbutils
@@ -55,7 +65,7 @@ in {
] else
[ ]);
xdg.enable = true;
# xdg.enable = true;
programs = {
git = {

View File

@@ -1,5 +1,11 @@
{ inputs, pkgs, osConfig, ... }: {
imports = [ inputs.anyrun.nixosModules.home-manager ];
{
inputs,
pkgs,
device,
osConfig,
...
}: {
imports = [inputs.anyrun.nixosModules.home-manager];
programs.anyrun = {
enable = true;
config = {
@@ -15,10 +21,10 @@
symbols
kidex
];
x = { fraction = 0.5; };
y = { fraction = 0.3; };
height = { absolute = 0; };
width = { absolute = 1000; };
x = {fraction = 0.5;};
y = {fraction = 0.3;};
height = {absolute = 0;};
width = {absolute = 1000;};
showResultsImmediately = true;
maxEntries = 10;
layer = "overlay";
@@ -26,9 +32,12 @@
extraConfigFiles = {
"nixos-options.ron".text = let
nixos-options = osConfig.system.build.manual.optionsJSON
nixos-options =
pkgs.lib.optionalString device.isNix
osConfig.system.build.manual.optionsJSON
+ "/share/doc/nixos/options.json";
hm-options = inputs.home-manager.packages.${pkgs.system}.docs-json
hm-options =
inputs.home-manager.packages.${pkgs.system}.docs-json
+ "/share/doc/home-manager/options.json";
# or alternatively if you wish to read any other documentation options, such as home-manager
# get the docs-json package from the home-manager flake
@@ -39,11 +48,16 @@
# ":something-else" = [some-other-option];
# ":nall" = [nixos-options hm-options some-other-option];
# };
options = builtins.toJSON {
":nix" = [ nixos-options ];
":hm" = [ hm-options ];
};
options = builtins.toJSON ({
":hm" = [hm-options];
}
// (
if device.isNix
then {
":nix" = [nixos-options];
}
else {}
));
in ''
Config(
options: ${options},
@@ -84,12 +98,12 @@
"rink.ron".text = ''
Config(
currency: Some("${
builtins.toFile "currency.units" ''
!category currencies "Currencies"
usd USD
inr INR
''
}"),
builtins.toFile "currency.units" ''
!category currencies "Currencies"
usd USD
inr INR
''
}"),
)
'';
};

View File

@@ -1,17 +1,30 @@
{ devices, inputs, overlays, home-manager, ... }:
{
devices,
inputs,
overlays,
home-manager,
...
}:
builtins.listToAttrs (builtins.map (device: {
name = device.user;
value = let
pkgs = import inputs.nixpkgs {
inherit overlays;
system = device.system;
};
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
inherit device;
};
modules = [ ../common/home.nix ];
};
}) devices)
name = device.user;
value = let
pkgs = import inputs.nixpkgs {
inherit overlays;
system = device.system;
};
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
inherit device;
};
modules = [
{
nixpkgs.config.allowUnfree = true;
}
../common/home.nix
];
};
})
devices)

View File

@@ -1,4 +1,4 @@
{ ... }: {
{ pkgs, ... }: {
wayland.windowManager.hyprland = {
enable = true;
settings = {
@@ -119,22 +119,22 @@
bind = [
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
"$mainMod, Return, exec, foot"
"$mainModShift, Return, exec, wezterm"
"$mainMod, Return, exec, ${pkgs.foot}/bin/foot"
"$mainModShift, Return, exec, ${pkgs.wezterm}/bin/wezterm"
"$mainModShift, Q, killactive,"
# "$mainMod, M, exit,"
"$mainMod, t, togglefloating,"
"$mainMod, f, fullscreen,"
"$mainMod, d, exec, anyrun"
"$mainMod, Space, exec, anyrun"
"$mainMod, d, exec, ${pkgs.anyrun}/bin/anyrun"
"$mainMod, Space, exec, ${pkgs.anyrun}/bin/anyrun"
"$mainMod, p, pseudo, # dwindle"
"$mainMod, v, togglesplit, # dwindle"
"$mainMod, a, exec, swaync-client -t"
"$mainMod, Tab, cyclenext"
# Audio
",xf86audioraisevolume, exec, swayosd --output-volume raise"
",xf86audiolowervolume, exec, swayosd --output-volume lower"
",xf86audiomute, exec, swayosd --output-volume mute-toggle"
",xf86audioraisevolume, exec, ${pkgs.swayosd}/bin/swayosd --output-volume raise"
",xf86audiolowervolume, exec, ${pkgs.swayosd}/bin/swayosd --output-volume lower"
",xf86audiomute, exec, ${pkgs.swayosd}/bin/swayosd --output-volume mute-toggle"
",xf86audioprev, exec, /home/fs0c131y/.cargo/bin/mctl prev"
",xf86audionext, exec, /home/fs0c131y/.cargo/bin/mctl next"
",xf86audioplay, exec, /home/fs0c131y/.cargo/bin/mctl toggle"

View File

@@ -161,6 +161,7 @@ return require('lazy').setup({
{ 'hrsh7th/cmp-path', lazy = false },
{ 'hrsh7th/cmp-cmdline', lazy = false },
{ 'L3MON4D3/LuaSnip' },
{ "nvim-treesitter/nvim-treesitter", lazy = false },
{ 'saadparwaiz1/cmp_luasnip' },
{
"zbirenbaum/copilot-cmp",
@@ -264,14 +265,14 @@ return require('lazy').setup({
-- event = "LspAttach",
config = function()
local dap = require('dap')
local registry = require('mason-registry').get_package("codelldb");
local codelldb = registry:get_install_path() .. "/codelldb"
-- local registry = require('mason-registry').get_package("codelldb");
-- local codelldb = registry:get_install_path() .. "/codelldb"
dap.adapters.codelldb = {
type = 'server',
port = "${port}",
executable = {
-- CHANGE THIS to your path!
command = codelldb,
command = "codelldb",
args = { "--port", "${port}" },
-- On windows you may have to uncomment this:

View File

@@ -38,7 +38,7 @@ vim.g.rustaceanvim = {
-- tools = {},
-- LSP configuration
server = {
capabilities = require'lsp_zero'.get_capabilities(),
capabilities = require'lsp-zero'.get_capabilities(),
on_attach = function(client, bufnr)
-- you can also put keymaps in here
lspstatus.on_attach(client, bufnr)