From 0be41fd01a8929055a303b625be81f64c2282733 Mon Sep 17 00:00:00 2001 From: 4o1x5 <4o1x5@4o1x5.dev> Date: Tue, 28 May 2024 02:36:04 +0200 Subject: [PATCH] added new polybar its kind of uneven right now thats kind of bothering me but I'll add more modules new keybinds and scripts for timewarrior (i3, polybar) --- etc/apps/prod.nix | 9 +- etc/configs/colors.nix | 19 --- etc/configs/i3.nix | 28 +++- etc/configs/picom.nix | 1 + etc/configs/polybar.nix | 12 +- etc/configs/polybar/bottom.nix | 94 ++++++++++++ etc/configs/vscode.nix | 5 +- etc/configuration.nix | 10 ++ etc/desktop.nix | 2 + etc/dev.nix | 2 +- etc/flake.lock | 200 ++++++++++++++++++++++--- etc/flake.nix | 17 ++- etc/system/drivers/shitvidia-patch.nix | 2 +- etc/system/shell.nix | 6 +- readme.md | 12 +- rice.png | Bin 1456635 -> 2867336 bytes scripts/hvec_h264.sh | 2 + scripts/start_replay.sh | 2 + scripts/timew.sh | 13 ++ scripts/timew_start.sh | 5 + 20 files changed, 382 insertions(+), 59 deletions(-) delete mode 100755 etc/configs/colors.nix create mode 100644 etc/configs/polybar/bottom.nix create mode 100755 scripts/hvec_h264.sh create mode 100755 scripts/timew.sh create mode 100755 scripts/timew_start.sh diff --git a/etc/apps/prod.nix b/etc/apps/prod.nix index 02f92ce..23e2148 100755 --- a/etc/apps/prod.nix +++ b/etc/apps/prod.nix @@ -1,8 +1,15 @@ -{ pkgs, config, ... }: { +{ pkgs, config, inputs, ... }: { environment.systemPackages = with pkgs; [ taskwarrior timewarrior logseq + inputs.romodoro.packages.x86_64-linux.default + taskwarrior-tui + #inputs.dttyper.packages.x86_64-linux.default + #(pkgs.callPackage ./dttyper/default.nix { }) + #(pkgs.callPackage ./romodoro/default.nix { }) + #(pkgs.callPackage ./goki/default.nix { }) + ]; diff --git a/etc/configs/colors.nix b/etc/configs/colors.nix deleted file mode 100755 index 6daf93b..0000000 --- a/etc/configs/colors.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - - foreground = "#FFFFFF"; - foreground_alt = "#F72585"; - - background = "#191830"; - - border = "#F72585"; - warning = "#f00"; - - textHighlight = "#FAD000"; - selectedWindowHighlight = "#FAD000"; - - seperatorColor = "#FAD000"; - - - i3BorderColor = "#FAD000"; -} - diff --git a/etc/configs/i3.nix b/etc/configs/i3.nix index e18ccc1..c63bb40 100755 --- a/etc/configs/i3.nix +++ b/etc/configs/i3.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: { - +{ pkgs, lib, ... }: +let + scripts = "~/.config/scripts"; +in +{ environment.systemPackages = with pkgs; [ # for replay xdotool @@ -53,9 +56,12 @@ # application keybinds "mod4+d" = "exec rofi -show drun"; "mod4+e" = "exec rofi -show calc"; + "mod4+f" = "exec rofi -show emoji"; + "mod4+t" = "exec alacritty"; "mod4+r" = "exec firefox"; + # power off "mod4+Shift+Delete" = "exec shutdown now"; @@ -64,10 +70,17 @@ "mod4+2" = "exec setxkbmap hu"; # replay - "mod4+s" = "exec ~/.config/scripts/replay_application_name.sh"; - "mod4+w" = "exec ~/.config/scripts/save_replay.sh"; - "mod4+a" = "exec ~/.config/scripts/start_replay.sh"; - "mod4+x" = "exec ~/.config/scripts/stop_replay.sh"; + "mod4+s" = "exec ${scripts}/replay_application_name.sh"; + "mod4+w" = "exec ${scripts}/save_replay.sh"; + "mod4+a" = "exec ${scripts}/start_replay.sh"; + "mod4+x" = "exec ${scripts}/stop_replay.sh"; + + # timewarrior + "mod4+h" = "exec ${scripts}/timew_start.sh"; + "mod4+j" = "exec timew stop"; + "mod4+k" = "exec timew cancel"; + "mod4+g" = "exec timew continue"; + # screenshot # shit needs work @@ -76,6 +89,9 @@ # select window to screenshot then saves it to /home/pictures/screenshots/date+random.png and copies to clipboard "Shift+Print" = ''exec "NUM=$(echo $RANDOM) maim -s $HOME/Pictures/screenshots/$(date +%Y%m%d_%H%M)$NUM.png ; cat $HOME/Pictures/screenshots/$(date +%Y%m%d_%H%M)$NUM.png | xclip -selection clipboard -t image/png"''; + # sticky window + "Mod1+Shift+s" = "sticky toggle"; + # Volume adjustment for current player "shift+XF86AudioRaiseVolume" = "exec --no-startup-id playerctl volume 0.1+"; diff --git a/etc/configs/picom.nix b/etc/configs/picom.nix index 943866a..e95512d 100755 --- a/etc/configs/picom.nix +++ b/etc/configs/picom.nix @@ -13,6 +13,7 @@ rev = "da21aa8ef70f9796bc8609fb495c3a1e02df93f9"; hash = "sha256-rxGWAot+6FnXKjNZkMl1uHHHEMVSxm36G3VoV1vSXLA="; }; + })); settings = { diff --git a/etc/configs/polybar.nix b/etc/configs/polybar.nix index 921516e..a4b5cf1 100755 --- a/etc/configs/polybar.nix +++ b/etc/configs/polybar.nix @@ -11,9 +11,14 @@ let currentWorkspace = "#FAD000"; seperatorColor = "#FAD000"; }; + script = "~/.config/scripts"; in { + imports = [ + ./polybar/bottom.nix + ]; + home-manager.users.grape.services.polybar = { enable = true; script = "polybar --reload"; @@ -214,8 +219,6 @@ in format = " "; }; - - "global/wm" = { override-redirect = false; }; @@ -245,12 +248,13 @@ in border-color = "${colors.invisible}"; # Displayed modules - modules-left = "date s keyboard s ewmh s wired-network wireless-network s audio s music"; - modules-center = "cava"; + modules-left = "date s keyboard s ewmh s wired-network wireless-network "; + #modules-center = "cava"; # TODO Add gpu usage and temp modules-right = "battery-label battery s fs-label-data fs-data s fs-label-system fs-system s replay-label replay s memory s gpu-label gpu-usage gpu-temp s cpu-temp cpu-usage"; }; + }; }; diff --git a/etc/configs/polybar/bottom.nix b/etc/configs/polybar/bottom.nix new file mode 100644 index 0000000..5352f03 --- /dev/null +++ b/etc/configs/polybar/bottom.nix @@ -0,0 +1,94 @@ +{ pkgs, ... }: +let + # todo add this to flake.nix + colors = { + fg = "#FFFFFF"; + bg = "#191830"; + border = "#F72585"; + warn = "#f00"; + altfg = "#F72585"; + + invisible = "#00400080"; + + currentWorkspace = "#FAD000"; + seperatorColor = "#FAD000"; + }; + + script = "~/.config/scripts"; +in +{ + + home-manager.users.grape.services.polybar = { + enable = true; + script = "polybar --reload"; + + config = { + + "module/cava" = { + type = "custom/script"; + tail = "true"; + exec = "$HOME/.config/scripts/cava.sh"; + format = "