aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home.nix38
-rw-r--r--hosts/myrtle/configuration.nix3
-rw-r--r--programs/tmux.nix9
-rw-r--r--programs/zathura.nix2
-rw-r--r--scripts/default.nix35
5 files changed, 43 insertions, 44 deletions
diff --git a/home.nix b/home.nix
index 33949b8..16cc9dd 100644
--- a/home.nix
+++ b/home.nix
@@ -20,46 +20,58 @@
20 home.extraOutputsToInstall = [ "man" ]; 20 home.extraOutputsToInstall = [ "man" ];
21 home.packages = with pkgs; [ 21 home.packages = with pkgs; [
22 22
23 # essentials
23 vim 24 vim
24 unzip
25 curl
26 tmux
27 weechat 25 weechat
28 firefox 26 firefox
27 unzip
28 tmux
29 xclip 29 xclip
30 ripgrep 30 ripgrep
31 miniserve 31 miniserve
32 rnix-lsp 32 rnix-lsp
33 pfetch 33 pfetch
34 st 34 st
35 arandr
36 imagemagick
37 ffmpeg
38 maim
39 wget
40 cmus 35 cmus
41 tree 36 tree
42 rxvt-unicode
43 neomutt 37 neomutt
44 mpv
45 nodePackages.bash-language-server 38 nodePackages.bash-language-server
46 w3m 39 w3m
47 noto-fonts-emoji 40 noto-fonts-emoji
48 ripgrep-all 41 ripgrep-all
49 urlview 42 urlview
50 slop
51 fd 43 fd
52 du-dust 44 du-dust
53 jq 45 jq
54 libnotify 46 libnotify
55 inotify-tools 47 inotify-tools
48 pavucontrol
49
50 # sync
56 rtorrent 51 rtorrent
57 sxiv
58 lftp 52 lftp
59 pavucontrol 53 wget
54 curl
55
56 # graphics
57 krita
58 sxiv
59 imagemagick
60 ffmpeg
61 mpv
62 slop
63 maim
64 arandr
65
66 # graphics debug
60 cudatoolkit 67 cudatoolkit
61 pciutils 68 pciutils
62 69
70 # monitoring
71 s-tui
72 stress
73 powertop
74
63 # input 75 # input
64 xinput_calibrator 76 xinput_calibrator
65 libinput 77 libinput
diff --git a/hosts/myrtle/configuration.nix b/hosts/myrtle/configuration.nix
index c86efd4..db70416 100644
--- a/hosts/myrtle/configuration.nix
+++ b/hosts/myrtle/configuration.nix
@@ -116,11 +116,10 @@
116 supergfxd.enable = true; 116 supergfxd.enable = true;
117 117
118 logind.extraConfig = '' 118 logind.extraConfig = ''
119 HandlePowerKey=suspend-then-hibernate 119 HandlePowerKey=suspend
120 HandlePowerKeyLongPress=poweroff 120 HandlePowerKeyLongPress=poweroff
121 ''; 121 '';
122 122
123 auto-cpufreq.enable = true;
124 batteryNotifier = { 123 batteryNotifier = {
125 enable = true; 124 enable = true;
126 notifyCapacity = 20; 125 notifyCapacity = 20;
diff --git a/programs/tmux.nix b/programs/tmux.nix
index 15f9a13..c748a60 100644
--- a/programs/tmux.nix
+++ b/programs/tmux.nix
@@ -82,10 +82,7 @@ in
82 setw -g pane-base-index 1 82 setw -g pane-base-index 1
83 83
84 # session jumper 84 # session jumper
85 bind C-j display-popup -E "\ 85 bind-key -n C-j run-shell "tmux-fzf"
86 tmux list-sessions -F '#{session_name}' |\
87 fzf |\
88 xargs tmux switch-client -t"
89 86
90 87
91 # pane binds 88 # pane binds
@@ -101,7 +98,9 @@ in
101 98
102 # window binds 99 # window binds
103 bind -n M-h previous-window 100 bind -n M-h previous-window
104 bind -n M-i next-window 101 bind -n M-i next-window
102 bind -n M-? switch-client -p
103 bind -n M-/ switch-client -n
105 bind-key "{" split-window -h -c "#{pane_current_path}" 104 bind-key "{" split-window -h -c "#{pane_current_path}"
106 bind-key "}" split-window -v -c "#{pane_current_path}" 105 bind-key "}" split-window -v -c "#{pane_current_path}"
107 bind-key s choose-session 106 bind-key s choose-session
diff --git a/programs/zathura.nix b/programs/zathura.nix
index 5e5c8ce..9758c7a 100644
--- a/programs/zathura.nix
+++ b/programs/zathura.nix
@@ -31,7 +31,7 @@ with theme;
31 statusbar-h-padding = "50"; 31 statusbar-h-padding = "50";
32 statusbar-v-padding = "50"; 32 statusbar-v-padding = "50";
33 guioptions = "s"; 33 guioptions = "s";
34 font = "Input 10"; 34 font = "Nerd Input 10";
35 }; 35 };
36 }; 36 };
37} 37}
diff --git a/scripts/default.nix b/scripts/default.nix
index 1c57566..627b121 100644
--- a/scripts/default.nix
+++ b/scripts/default.nix
@@ -38,41 +38,30 @@ let
38 38
39 # fzf script to switch between tmux sessions 39 # fzf script to switch between tmux sessions
40 tmux-fzf = pkgs.writeScriptBin "tmux-fzf" '' 40 tmux-fzf = pkgs.writeScriptBin "tmux-fzf" ''
41 tbin() { 41 LIST_DATA="#{session_name}/#{window_name}/#{pane_current_command}"
42 ${pkgs.tmux}/bin/tmux "$@" 42 FZF_COMMAND="${pkgs.fzf}/bin/fzf-tmux -p --delimiter=: --with-nth 4 --color=hl:2"
43 }
44 fbin() {
45 ${pkgs.fzf}/bin/fzf "$@"
46 }
47 43
48 __fzf() { 44 TARGET_SPEC="#{session_name}:#{window_id}:#{pane_id}:"
49 fbin --cycle --height 7 --reverse
50 }
51 45
52 __list_to_fzf() { 46 LINE=$(tmux list-windows -a -F "$TARGET_SPEC $LIST_DATA" | $FZF_COMMAND) || exit 0
53 tbin ls -F "#{session_name}" | fzf 47 args=(''${LINE//:/ })
54 }
55 48
56 if [ -n "$TMUX" ]; then 49 ${pkgs.tmux}/bin/tmux select-window -t ''${args[1]} && tmux switch-client -t ''${args[0]}
57 tbin switch-client -t "$(__list_to_fzf)"
58 else
59 tbin a -t "$(tbin ls -F "#{session_name}" | fbin)"
60 fi
61 ''; 50 '';
62 51
63 touchscreen = 21; 52 touchscreen = "ELAN9008:00 04F3:2ED6";
64 stylus = 15; 53 stylus = "ELAN9008:00 04F3:2ED6 Stylus Pen (0)";
65 portait-transform = builtins.toString [ 0 (-1) 1 1 0 0 0 0 1 ]; 54 portait-transform = builtins.toString [ 0 (-1) 1 1 0 0 0 0 1 ];
66 landscape-transform = builtins.toString [ 0 0 0 0 0 0 0 0 0 ]; 55 landscape-transform = builtins.toString [ 0 0 0 0 0 0 0 0 0 ];
67 portrait = pkgs.writeScriptBin "portrait" '' 56 portrait = pkgs.writeScriptBin "portrait" ''
68 ${pkgs.xorg.xrandr}/bin/xrandr -o left 57 ${pkgs.xorg.xrandr}/bin/xrandr -o left
69 ${pkgs.xorg.xinput}/bin/xinput set-prop ${builtins.toString touchscreen} --type=float "Coordinate Transformation Matrix" ${portait-transform} 58 ${pkgs.xorg.xinput}/bin/xinput set-prop ${touchscreen} --type=float "Coordinate Transformation Matrix" ${portait-transform}
70 ${pkgs.xorg.xinput}/bin/xinput set-prop ${builtins.toString stylus} --type=float "Coordinate Transformation Matrix" ${portait-transform} 59 ${pkgs.xorg.xinput}/bin/xinput set-prop ${stylus} --type=float "Coordinate Transformation Matrix" ${portait-transform}
71 ''; 60 '';
72 landscape = pkgs.writeScriptBin "landscape" '' 61 landscape = pkgs.writeScriptBin "landscape" ''
73 ${pkgs.xorg.xrandr}/bin/xrandr -o normal 62 ${pkgs.xorg.xrandr}/bin/xrandr -o normal
74 ${pkgs.xorg.xinput}/bin/xinput set-prop ${builtins.toString touchscreen} --type=float "Coordinate Transformation Matrix" ${landscape-transform} 63 ${pkgs.xorg.xinput}/bin/xinput set-prop ${touchscreen} --type=float "Coordinate Transformation Matrix" ${landscape-transform}
75 ${pkgs.xorg.xinput}/bin/xinput set-prop ${builtins.toString stylus} --type=float "Coordinate Transformation Matrix" ${landscape-transform} 64 ${pkgs.xorg.xinput}/bin/xinput set-prop ${stylus} --type=float "Coordinate Transformation Matrix" ${landscape-transform}
76 ''; 65 '';
77 66
78in 67in