Skip to content

Commit

Permalink
Revert "Replace Joplin by nb"
Browse files Browse the repository at this point in the history
This reverts commit 6308b2b.
  • Loading branch information
rake5k committed Oct 11, 2023
1 parent f71b9f1 commit 546f5fb
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 217 deletions.
12 changes: 12 additions & 0 deletions home/programs/xmonad/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ in
type = types.str;
description = "Command to spawn the default terminal emulator";
};

wiki = {
command = mkOption {
type = types.str;
description = "Command to spawn the default wiki app";
};
wmClassName = mkOption {
type = types.str;
description = "Window manager class name retrieved via `xprop` utility";
};
};

};
};

Expand Down
4 changes: 2 additions & 2 deletions home/programs/xmonad/xmonad.hs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ pkgs.writeText "xmonad.hs" ''
h = (3/4)
x = center w
y = center h
spawnWiki = myTerminal ++ " -t wiki -e nb --interactive ls"
findWiki = title =? "wiki"
spawnWiki = "${cfg.wiki.command}"
findWiki = className =? "${cfg.wiki.wmClassName}"
manageWiki = customFloating $ W.RationalRect x y w h
where
w = (4/5)
Expand Down
4 changes: 4 additions & 0 deletions home/roles/desktop/xmonad/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ in
command = mkDefault "1password";
wmClassName = mkDefault "1Password";
};
wiki = {
command = mkDefault "joplin-desktop";
wmClassName = mkDefault "Joplin";
};
};
};
};
Expand Down
1 change: 1 addition & 0 deletions home/roles/web/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ in
_1password
_1password-gui
bind
joplin-desktop
wget
thunderbird

Expand Down
2 changes: 1 addition & 1 deletion home/users/christian/shell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ in
programs.tmux.enable = true;
users.christian.shell = {
direnv.enable = true;
nb.enable = true;
ranger.enable = true;
zsh.enable = true;
};
Expand Down Expand Up @@ -69,6 +68,7 @@ in

programs = {
ssh = import ./ssh.nix;
zsh = import ./zsh.nix;

bat.enable = true;
exa.enable = true;
Expand Down
31 changes: 0 additions & 31 deletions home/users/christian/shell/nb/default.nix

This file was deleted.

47 changes: 47 additions & 0 deletions home/users/christian/shell/zsh.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
autocd = true;
dotDir = ".config/zsh";
dirHashes = {
bb = "/mnt/bluecare/bluecare";
bh = "/mnt/bluecare/home";
bt = "/mnt/bluecare/transfer";
d = "$HOME/Documents";
dl = "$HOME/Downloads";
hh = "/mnt/home/home";
hm = "/mnt/home/music";
hp = "/mnt/home/photo";
ht = "/mnt/home/public";
hv = "/mnt/home/video";
p = "$HOME/Pictures";
usb = "/run/media/chr";
v = "$HOME/Videos";
};
history =
let
historySize = 1000000;
in
{
expireDuplicatesFirst = true;
extended = true;
ignoreDups = true;
ignoreSpace = true;
path = "$ZDOTDIR/.zsh_history";
save = historySize;
share = true;
size = historySize;
};
shellGlobalAliases = {
"..." = "../..";
"...." = "../../..";
"....." = "../../../..";
"......" = "../../../../..";
"......." = "../../../../../..";
"........" = "../../../../../../..";
G = "| grep";
UUID = "$(uuidgen | tr -d \\n)";
};
}
174 changes: 0 additions & 174 deletions home/users/christian/shell/zsh/completions/_nb

This file was deleted.

9 changes: 0 additions & 9 deletions home/users/christian/shell/zsh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ in
};

config = mkIf cfg.enable {
home = {
file = {
"${config.programs.zsh.dotDir}/completions".source = ./completions;
};
};

programs.zsh = {
enable = true;
enableAutosuggestions = true;
Expand Down Expand Up @@ -64,9 +58,6 @@ in
# Fix for https://stackoverflow.com/questions/43249043/bind-delete-key-in-vi-mode
bindkey -a '^[[3~' vi-delete-char
'';
initExtraBeforeCompInit = ''
fpath=(~/.zsh/completion $fpath)
'';
shellGlobalAliases = {
"..." = "../..";
"...." = "../../..";
Expand Down

0 comments on commit 546f5fb

Please sign in to comment.