mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 19:00:14 +00:00
more adjustments
This commit is contained in:
@ -199,20 +199,19 @@ in
|
||||
exec = "${config.terminalLaunchCommand} aerc %u";
|
||||
};
|
||||
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
|
||||
"${config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier}+Shift+e" =
|
||||
"exec ${
|
||||
# Don't name the script `aerc` or it will affect grep
|
||||
builtins.toString (
|
||||
pkgs.writeShellScript "focus-mail.sh" ''
|
||||
count=$(ps aux | grep -c aerc)
|
||||
if [ "$count" -eq 1 ]; then
|
||||
i3-msg "exec --no-startup-id ${config.terminal} start --class aerc -- aerc"
|
||||
sleep 0.25
|
||||
fi
|
||||
i3-msg "[class=aerc] focus"
|
||||
''
|
||||
)
|
||||
}";
|
||||
"${config.xsession.windowManager.i3.config.modifier}+Shift+e" = "exec ${
|
||||
# Don't name the script `aerc` or it will affect grep
|
||||
builtins.toString (
|
||||
pkgs.writeShellScript "focus-mail.sh" ''
|
||||
count=$(ps aux | grep -c aerc)
|
||||
if [ "$count" -eq 1 ]; then
|
||||
i3-msg "exec --no-startup-id ${config.terminal} start --class aerc -- aerc"
|
||||
sleep 0.25
|
||||
fi
|
||||
i3-msg "[class=aerc] focus"
|
||||
''
|
||||
)
|
||||
}";
|
||||
};
|
||||
|
||||
programs.fish.shellAbbrs = {
|
||||
|
@ -183,20 +183,19 @@ in
|
||||
};
|
||||
|
||||
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
|
||||
"${config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier}+Shift+b" =
|
||||
"exec ${
|
||||
# Don't name the script `firefox` or it will affect grep
|
||||
builtins.toString (
|
||||
pkgs.writeShellScript "focus-ff.sh" ''
|
||||
count=$(ps aux | grep -c firefox)
|
||||
if [ "$count" -eq 1 ]; then
|
||||
i3-msg "exec --no-startup-id firefox"
|
||||
sleep 0.5
|
||||
fi
|
||||
i3-msg "[class=firefox] focus"
|
||||
''
|
||||
)
|
||||
}";
|
||||
"${config.xsession.windowManager.i3.config.modifier}+Shift+b" = "exec ${
|
||||
# Don't name the script `firefox` or it will affect grep
|
||||
builtins.toString (
|
||||
pkgs.writeShellScript "focus-ff.sh" ''
|
||||
count=$(ps aux | grep -c firefox)
|
||||
if [ "$count" -eq 1 ]; then
|
||||
i3-msg "exec --no-startup-id firefox"
|
||||
sleep 0.5
|
||||
fi
|
||||
i3-msg "[class=firefox] focus"
|
||||
''
|
||||
)
|
||||
}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -91,7 +91,6 @@ in
|
||||
scs = "systemctl status";
|
||||
sca = "systemctl cat";
|
||||
m = "make";
|
||||
t = "trash";
|
||||
|
||||
# Vim (overwritten by Neovim)
|
||||
v = "vim";
|
||||
|
@ -25,7 +25,7 @@ let
|
||||
-B -o ldif-wrap=no \
|
||||
-E pr=5000/prompt \
|
||||
-H "${ldap_scheme}://''${LDAP_HOST}:${builtins.toString ldap_port}" \
|
||||
-D "${pkgs.lib.toUpper magic_prefix}2\\${pkgs.lib.toLower config.user}" \
|
||||
-D "${pkgs.lib.toUpper magic_prefix}2\\${pkgs.lib.toLower config.home.username}" \
|
||||
-w "$(${pkgs._1password-cli}/bin/op item get T2 --fields label=password --reveal)" \
|
||||
-b "dc=''${LDAP_HOST//./,dc=}" \
|
||||
-s "sub" -x "(cn=''${SEARCH_FILTER})" \
|
||||
|
@ -18,7 +18,7 @@ in
|
||||
|
||||
# Quick button for launching nautilus
|
||||
xsession.windowManager.i3.config.keybindings = {
|
||||
"${config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier}+n" =
|
||||
"${config.xsession.windowManager.i3.config.modifier}+n" =
|
||||
"exec --no-startup-id ${pkgs.nautilus}/bin/nautilus";
|
||||
};
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (config.nmasur.settings) username;
|
||||
cfg = config.nmasur.presets.programs.nixpkgs;
|
||||
in
|
||||
|
||||
@ -124,7 +125,7 @@ in
|
||||
# For security, only allow specific users
|
||||
settings.allowed-users = [
|
||||
"@wheel" # Anyone in the wheel group
|
||||
config.user # The current user
|
||||
config.home.username # The current user
|
||||
];
|
||||
|
||||
# Enable features in Nix commands
|
||||
|
@ -0,0 +1,27 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.nmasur.presets.programs.obsidian;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
nmasur.presets.programs.obsidian = {
|
||||
enable = lib.mkEnableOption "Obsidian markdown wiki";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
unfreePackages = [ "obsidian" ];
|
||||
home.packages = with pkgs; [ obsidian ];
|
||||
|
||||
# Broken on 2023-12-11
|
||||
# https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8
|
||||
# insecurePackages = [ "electron-25.9.0" ];
|
||||
};
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
|
||||
options.tmux.enable = lib.mkEnableOption "Tmux terminal multiplexer";
|
||||
|
||||
config.home-manager.users.${config.user} = lib.mkIf config.tmux.enable {
|
||||
config = lib.mkIf config.tmux.enable {
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
Reference in New Issue
Block a user