aboutsummaryrefslogtreecommitdiff
path: root/programs
diff options
context:
space:
mode:
Diffstat (limited to 'programs')
-rw-r--r--programs/htop.nix17
-rw-r--r--programs/tmux.nix26
2 files changed, 37 insertions, 6 deletions
diff --git a/programs/htop.nix b/programs/htop.nix
index a48b70c..fca3487 100644
--- a/programs/htop.nix
+++ b/programs/htop.nix
@@ -6,6 +6,21 @@
6{ 6{
7 programs.htop = { 7 programs.htop = {
8 enable = true; 8 enable = true;
9 settings.color_scheme = 1; # monochrome 9 settings = {
10 color_scheme = 1; # monochrome
11 show_program_path = 0;
12 fields = with config.lib.htop.fields; [
13 PID
14 M_SIZE
15 M_RESIDENT
16 M_SHARE
17 STATE
18 PERCENT_CPU
19 PERCENT_MEM
20 TIME
21 COMM
22 ];
23
24 };
10 }; 25 };
11} 26}
diff --git a/programs/tmux.nix b/programs/tmux.nix
index e5c5aa1..11efa39 100644
--- a/programs/tmux.nix
+++ b/programs/tmux.nix
@@ -3,6 +3,20 @@
3, ... 3, ...
4}: 4}:
5 5
6let
7 cmus-np = pkgs.writeScriptBin "cmus-np" ''
8 ${pkgs.cmus}/bin/cmus-remote -Q | awk '
9 /tag artist/ { $1=$2=""; artist = substr($0,3) }
10 /tag title/ { $1=$2=""; title = substr($0,3) }
11 END { printf "%s ยท %s\n", artist, title}
12 '
13 '';
14
15 cmus-status = pkgs.writeScriptBin "cmus-status" ''
16 ${pkgs.cmus}/bin/cmus-remote -Q | awk '/status/ { print $2 }'
17 '';
18
19in
6{ 20{
7 programs.tmux = { 21 programs.tmux = {
8 enable = true; 22 enable = true;
@@ -74,14 +88,16 @@
74 set -g status-style "bg=colour0" 88 set -g status-style "bg=colour0"
75 set -ag status-style "fg=colour7" 89 set -ag status-style "fg=colour7"
76 90
77 set -g status-right "#[fg=colour15]#(date +"%H%M") #[fg=colour8]hrs " 91 set status-right-length 70
78 set -ag status-right "#[fg=colour15]#(date +"%d/%m")#[fg=colour8] #(date +"%Y") " 92 set -g status-right "#[fg=colour15]#(${cmus-np}/bin/cmus-np) #[fg=colour8]#(${cmus-status}/bin/cmus-status) "
79 set -ag status-right "#[fg=colour7]#(bat -q)#[fg=colour12]" 93 set -ag status-right "#[fg=colour15]#(date +"%H%M") #[fg=colour8]hrs "
94 set -ag status-right "#[fg=colour15]#(date +"%d/%m")#[fg=colour8] #(date +"%Y")"
80 95
81 # status left 96 # status left
82 set -g status-left "#[fg=colour7]#(${pkgs.prompt}/bin/prompt cwd '#{pane_current_path}') "
83 set -ag status-left "#[fg=colour7]#(${pkgs.prompt}/bin/prompt vcs '#{pane_current_path}')"
84 set status-left-length 50 97 set status-left-length 50
98 set -g status-left "#[fg=colour7]#(bat -q) "
99 set -ag status-left "#[fg=colour7]#(${pkgs.prompt}/bin/prompt cwd '#{pane_current_path}') "
100 set -ag status-left "#[fg=colour7]#(${pkgs.prompt}/bin/prompt vcs '#{pane_current_path}')"
85 ''; 101 '';
86 }; 102 };
87} 103}