From d8dc7bcc21b0d2a73cb12259043f727c357c36ef Mon Sep 17 00:00:00 2001 From: Thilo Billerbeck Date: Mon, 7 Oct 2024 19:51:42 +0200 Subject: [PATCH] add justfile and kitty, improve time grouper --- home-manager/dotfiles/justfile | 15 ++++++++++++ home-manager/modules/machine.nix | 3 ++- .../toggl-time-grouper/toggl-time-grouper | 12 ++++++---- home-manager/programs/kitty.nix | 23 +++++++++++++++++++ 4 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 home-manager/dotfiles/justfile create mode 100644 home-manager/programs/kitty.nix diff --git a/home-manager/dotfiles/justfile b/home-manager/dotfiles/justfile new file mode 100644 index 0000000..f020a76 --- /dev/null +++ b/home-manager/dotfiles/justfile @@ -0,0 +1,15 @@ +flatpak-override: flatpak-override-chrome flatpak-override-steam + +flatpak-override-chrome: + flatpak override \ + --user \ + --filesystem=~/.local/share/applications \ + --filesystem=~/.local/share/icons \ + --filesystem=~/.pki/nssdb \ + com.google.Chrome + +flatpak-override-steam: + flatpak override \ + --user \ + --filesystem=~/mnt \ + com.valvesoftware.Steam \ No newline at end of file diff --git a/home-manager/modules/machine.nix b/home-manager/modules/machine.nix index 9adea44..90abc88 100644 --- a/home-manager/modules/machine.nix +++ b/home-manager/modules/machine.nix @@ -8,7 +8,6 @@ with lib; { imports = [ ./../programs/atuin.nix - ./../programs/alacritty.nix ./../programs/bat.nix ./../programs/beets.nix ./../programs/command-not-found.nix @@ -17,6 +16,7 @@ with lib; ./../programs/fzf.nix ./../programs/git.nix ./../programs/htop.nix + ./../programs/kitty.nix ./../programs/neovim.nix ./../programs/starship.nix ./../programs/topgrade.nix @@ -89,6 +89,7 @@ with lib; ".config/nano/nanorc".text = '' set linenumbers ''; + "justfile".source = ./../dotfiles/justfile; ".gitignore".source = ./../dotfiles/.gitignore; ".config/pipewire/pipewire.conf.d/99-noise-suppression.conf".text = '' context.modules = [{ diff --git a/home-manager/pkgs/toggl-time-grouper/toggl-time-grouper b/home-manager/pkgs/toggl-time-grouper/toggl-time-grouper index 53ce0d4..4cdee2b 100644 --- a/home-manager/pkgs/toggl-time-grouper/toggl-time-grouper +++ b/home-manager/pkgs/toggl-time-grouper/toggl-time-grouper @@ -17,8 +17,12 @@ df.rename(columns={ 'Duration': 'duration' }, inplace=True) -df = df.groupby(['project','description','day'], as_index=False).agg({'duration': 'sum'}) -df['duration'] = round(df['duration'].dt.total_seconds() / 60 / 60, 2) -print("Total hours are: ", round(df['duration'].sum(), 2)) +dfg = df.groupby(['project','description','day'], as_index=False).agg({'duration': 'sum'}) +dfg['duration'] = round(dfg['duration'].dt.total_seconds() / 60 / 60, 2) +print("Total hours are: ", round(dfg['duration'].sum(), 2)) -df.to_csv(Path(sys.argv[1]).stem + '-grouped.csv', index=False) \ No newline at end of file +dfg.to_csv(Path(sys.argv[1]).stem + '-grouped.csv', index=False) + +dfc = dfg.groupby(['project'] , as_index=False).agg({'duration': 'sum'}) +for index, row in dfc.iterrows(): + print(row['project'], str(row['duration']).replace(".",",")) \ No newline at end of file diff --git a/home-manager/programs/kitty.nix b/home-manager/programs/kitty.nix new file mode 100644 index 0000000..ac567ea --- /dev/null +++ b/home-manager/programs/kitty.nix @@ -0,0 +1,23 @@ +{ + config, + pkgs, + ... +}: + +let + nixGL = import ./../../home-manager/utils/nixGLWrap.nix { inherit pkgs config; }; +in +{ + programs.kitty = { + enable = true; + package = (nixGL pkgs.kitty); + font = { + name = "JetbrainsMono NFM"; + size = 14; + }; + themeFile = "Dracula"; + extraConfig = '' + background_opacity 0.9 + ''; + }; +}