added tmux module

This commit is contained in:
Bryan Ramos 2024-05-18 21:02:16 -04:00
parent 3e3d67e6bd
commit 37f704cc19
Signed by: bryan
GPG key ID: 6ABDCD144D6643C8
11 changed files with 101 additions and 13 deletions

View file

@ -1,5 +1,22 @@
{ lib, config, ... }:
with lib;
let
tmux = config.modules.user.tmux;
in
''
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
exec sway
fi
case $- in
*i*)
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
exec sway
fi
${optionalString tmux.enable ''
if [ -z "$DISPLAY" ] && [ -z "$TMUX" ]; then
exec tmux
fi
''}
;;
esac
''

View file

@ -17,6 +17,10 @@ in
'';
config = {
fonts = {
names = [ "Terminus" ];
};
output = {
HDMI-A-1 = {
resolution = "1920x1080";
@ -49,8 +53,8 @@ in
{
position = "top";
statusCommand = ''while :; do echo "$(free -h | awk '/^Mem/ {print $3}') '|' $(date +'%I:%M:%S %p') '|' $(date +'%m-%d-%Y')"; sleep 1; done'';
fonts = {
names = [ "Noto Sans" ];
fonts = {
names = [ "Terminus" ];
size = 10.0;
};
colors = {
@ -82,6 +86,9 @@ in
"${modifier}+Print" = ''exec sh -c 'grim -g "$(swaymsg -t get_tree | jq -j '"'"'.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"'"'"')" ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png' '';
"${modifier}+Shift+f" = "exec alacritty -e sh -c 'EDITOR=nvim ranger'";
"${modifier}+Shift+d" = "exec rofi -modi emoji -show emoji";
"${modifier}+Shift+Return" = ''
exec alacritty --working-directory -e $(pwd)
'';
};
};

View file

@ -16,7 +16,7 @@ in
};
programs.bash = {
profileExtra = import ./config/shellHook.nix;
profileExtra = import ./config/shellHook.nix { inherit config lib; };
shellAliases = {
open = "xdg-open";
};