This commit is contained in:
Hadi
2024-06-27 19:42:08 +02:00
parent ae6818ed65
commit 84f87f9833
13 changed files with 138 additions and 95 deletions

View File

@@ -24,7 +24,7 @@
./plugins/noice.nix
./plugins/obsidian.nix
./plugins/image.nix
./plugins/ltex.nix
# ./plugins/ltex.nix
./plugins/flash.nix
./plugins/zen-mode.nix
./options.nix

View File

@@ -10,7 +10,11 @@
action = "<CMD>lua vim.lsp.buf.format()<CR>";
options.desc = "LSP Format";
}
{
key = "<leader>ox";
action = "vip:!pandoc -t commonmark_x<cr>";
options.desc = "Format Markdown Tables";
}
{
key = "<leader>ot";
action = "<cmd>lua require('obsidian').util.toggle_checkbox()<cr>";

View File

@@ -13,9 +13,9 @@
svelte.enable = true;
marksman.enable = true;
ltex = {
enable = true;
enable = false;
settings = {
enabled = true;
enabled = false;
language = "en";
};
};

View File

@@ -17,4 +17,13 @@ let
notif "caffeine" "$message"
'';
in { home.packages = [ caffeine-status caffeine ]; }
caffeine-status-icon = pkgs.writeShellScriptBin "caffeine-status-icon" ''
status=$(caffeine-status)
if [[ $status == "active" ]]; then
echo "󰅶"
else
echo "󰾪"
fi
'';
in { home.packages = [ caffeine-status caffeine caffeine-status-icon ]; }

View File

@@ -24,11 +24,27 @@ let
'';
night-shift-status = pkgs.writeShellScriptBin "night-shift-status" ''
if pgrep wlsunset; then
if [[ $(pgrep wlsunset) ]]; then
echo "1"
else
echo "0"
fi
'';
in { home.packages = [ night-shift-on night-shift-off night-shift-toggle night-shift-status ]; }
night-shift-status-icon =
pkgs.writeShellScriptBin "night-shift-status-icon" ''
if [[ $(pgrep wlsunset) ]]; then
echo "󰖔"
else
echo "󰖕"
fi
'';
in {
home.packages = [
night-shift-on
night-shift-off
night-shift-toggle
night-shift-status
night-shift-status-icon
];
}

View File

@@ -1,7 +1,6 @@
{
services.udiskie = {
enable = true;
tray = "always";
notify = true;
automount = true;
};

View File

@@ -33,8 +33,16 @@
height = 44;
modules-left = [ "custom/logo" "hyprland/window" ];
modules-center = [ "hyprland/workspaces" ];
modules-right =
[ "tray" "backlight" "pulseaudio" "battery" "clock" "custom/power" ];
modules-right = [
"tray"
"backlight"
"pulseaudio"
"custom/caffeine"
"custom/night-shift"
"battery"
"clock"
"custom/power"
];
"wlr/taskbar" = {
format = "{icon}";
@@ -124,14 +132,20 @@
tooltip = false;
on-click = "powermenu";
};
# "custom/caffeine": {
# "format": "{}",
# "max-length": 5,
# "interval": 10,
# "exec": "caffeine-status-icon",
# "exec-if": "pgrep spotify",
# "return-type": ""
#}
"custom/caffeine" = {
format = "{}";
max-length = 5;
interval = 10;
exec = "caffeine-status-icon";
# exec-if = "pgrep spotify";
# return-type = "";
};
"custom/night-shift" = {
format = "{}";
max-length = 5;
interval = 10;
exec = "night-shift-status-icon";
};
backlight = {
device = "nvidia_0";
format = "{icon}";
@@ -218,6 +232,8 @@
#memory,
#custom-power,
#custom-caffeine,
#custom-night-shift,
#battery,
#backlight,
#pulseaudio,