summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home.nix178
1 files changed, 176 insertions, 2 deletions
diff --git a/home.nix b/home.nix
index 7a9880e..072df5e 100644
--- a/home.nix
+++ b/home.nix
@@ -87,6 +87,10 @@ in {
87 xsel 87 xsel
88 xwallpaper 88 xwallpaper
89 89
90 # wayland and desktop-related
91 swaybg
92 wmenu
93
90 # 3d printing 94 # 3d printing
91 prusa-slicer 95 prusa-slicer
92 uvtools 96 uvtools
@@ -948,7 +952,7 @@ interceptor.register(int_fn)
948 }; 952 };
949 953
950 xsession = { 954 xsession = {
951 enable = true; 955 enable = false;
952 windowManager.i3 = { 956 windowManager.i3 = {
953 enable = true; 957 enable = true;
954 config = { 958 config = {
@@ -1082,7 +1086,7 @@ interceptor.register(int_fn)
1082 "${modifier}+r" = "mode resize"; 1086 "${modifier}+r" = "mode resize";
1083 }; 1087 };
1084 1088
1085 menu = "dmenu_run"; 1089 menu = "${pkgs.wmenu}/bin/wmenu";
1086 1090
1087 modes.resize = 1091 modes.resize =
1088 let 1092 let
@@ -1116,4 +1120,174 @@ interceptor.register(int_fn)
1116 }; 1120 };
1117 }; 1121 };
1118 }; 1122 };
1123
1124 wayland.windowManager.sway = {
1125 enable = true;
1126 package = pkgs.swayfx;
1127
1128 # https://github.com/nix-community/home-manager/issues/5379#issuecomment-2096066969
1129 checkConfig = false;
1130
1131 config = {
1132 # TODO import nix file that defines colorscheme
1133 bars = [ {
1134 colors = {
1135 # background = colors.current.primary.background;
1136 background = "#000000";
1137 statusline = colors.current.primary.foreground;
1138 focusedWorkspace = {
1139 background = colors.current.normal.black;
1140 border = colors.current.normal.black;
1141 text = colors.current.normal.green;
1142 };
1143 activeWorkspace = {
1144 background = colors.current.normal.black;
1145 border = colors.current.normal.black;
1146 text = colors.current.primary.foreground;
1147 };
1148 inactiveWorkspace = {
1149 background = colors.current.primary.background;
1150 border = colors.current.primary.background;
1151 text = colors.current.normal.white;
1152 };
1153 };
1154 command = "${pkgs.sway}/bin/swaybar";
1155 position = "top";
1156 statusCommand = "while date +'%Y-%m-%d %X'; do sleep 1; done";
1157 } ];
1158
1159 colors = {
1160 focused = {
1161 background = colors.current.primary.background;
1162 border = colors.current.primary.background;
1163 childBorder = colors.current.primary.background;
1164 indicator = colors.current.normal.black;
1165 text = colors.current.normal.green;
1166 };
1167 focusedInactive = {
1168 background = colors.current.primary.background;
1169 border = colors.current.primary.background;
1170 childBorder = colors.current.primary.background;
1171 indicator = colors.current.normal.black;
1172 text = colors.current.primary.foreground;
1173 };
1174 unfocused = {
1175 background = colors.current.normal.black;
1176 border = colors.current.normal.black;
1177 childBorder = colors.current.normal.black;
1178 indicator = colors.current.primary.background;
1179 text = colors.current.normal.white;
1180 };
1181 };
1182
1183 focus.mouseWarping = true;
1184
1185 fonts = {
1186 names = [ "monospace" ];
1187 size = 11.0;
1188 };
1189
1190 gaps = {
1191 inner = 15;
1192 smartGaps = true;
1193 };
1194
1195 keybindings =
1196 let
1197 left = "n";
1198 down = "e";
1199 up = "o";
1200 right = "i";
1201 modifier = config.wayland.windowManager.sway.config.modifier;
1202 menu = config.wayland.windowManager.sway.config.menu;
1203 terminal = config.wayland.windowManager.sway.config.terminal;
1204 in lib.mkOptionDefault {
1205 "${modifier}+Return" = "exec ${terminal}";
1206 "${modifier}+p" = "exec ${menu}";
1207 "${modifier}+b" = "exec bm t";
1208 "${modifier}+Shift+b" = "exec kasimenu";
1209 "${modifier}+u" = "exec kasimenu user";
1210 "${modifier}+Shift+u" = "exec kasimenu email";
1211 "${modifier}+Shift+t" = "exec kasimenu_totp";
1212
1213 "${modifier}+Shift+q" = "kill";
1214 "${modifier}+Shift+c" = "reload";
1215 "Mod1+Mod4+Ctrl+Shift+e" = "exit";
1216
1217 "${modifier}+${left}" = "focus left;";
1218 "${modifier}+${down}" = "focus down;";
1219 "${modifier}+${up}" = "focus up;";
1220 "${modifier}+${right}" = "focus right;";
1221 "${modifier}+Shift+${left}" = "move left";
1222 "${modifier}+Shift+${down}" = "move down";
1223 "${modifier}+Shift+${up}" = "move up";
1224 "${modifier}+Shift+${right}" = "move right";
1225
1226 # TODO do this programatically
1227 "${modifier}+1" = "workspace number 1";
1228 "${modifier}+2" = "workspace number 2";
1229 "${modifier}+3" = "workspace number 3";
1230 "${modifier}+4" = "workspace number 4";
1231 "${modifier}+5" = "workspace number 5";
1232 "${modifier}+6" = "workspace number 6";
1233 "${modifier}+7" = "workspace number 7";
1234 "${modifier}+8" = "workspace number 8";
1235 "${modifier}+9" = "workspace number 9";
1236 "${modifier}+0" = "workspace number 10";
1237 "${modifier}+Shift+1" = "move container to workspace number 1";
1238 "${modifier}+Shift+2" = "move container to workspace number 2";
1239 "${modifier}+Shift+3" = "move container to workspace number 3";
1240 "${modifier}+Shift+4" = "move container to workspace number 4";
1241 "${modifier}+Shift+5" = "move container to workspace number 5";
1242 "${modifier}+Shift+6" = "move container to workspace number 6";
1243 "${modifier}+Shift+7" = "move container to workspace number 7";
1244 "${modifier}+Shift+8" = "move container to workspace number 8";
1245 "${modifier}+Shift+9" = "move container to workspace number 9";
1246 "${modifier}+Shift+0" = "move container to workspace number 10";
1247
1248 "${modifier}+Ctrl+Shift+b" = "splith";
1249 "${modifier}+Ctrl+Shift+v" = "splitv";
1250 "${modifier}+s" = "layout stacking";
1251 "${modifier}+t" = "layout tabbed";
1252 "${modifier}+Ctrl+Shift+t" = "layout toggle split";
1253 "${modifier}+Shift+f" = "fullscreen";
1254 "${modifier}+Shift+space" = "floating toggle";
1255 "${modifier}+space" = "focus mode_toggle";
1256 "${modifier}+a" = "focus parent";
1257
1258 "${modifier}+r" = "mode resize";
1259 };
1260
1261 menu = "dmenu_run";
1262
1263 modes.resize =
1264 let
1265 left = "n";
1266 down = "e";
1267 up = "o";
1268 right = "i";
1269 in lib.mkOptionDefault {
1270 ${left} = "resize shrink width 10px";
1271 ${down} = "resize grow height 10px";
1272 ${up} = "resize shrink width 10px";
1273 ${right} = "resize grow width 10px";
1274 Escape = "mode default";
1275 };
1276
1277 modifier = "Mod4";
1278
1279 startup = [
1280 { command = "${pkgs.swaybg}/bin/swaybg --center pics/wp/elite_milky_way_below.png"; }
1281 ];
1282
1283 terminal = "alacritty";
1284
1285 window = {
1286 border = 0;
1287 titlebar = false;
1288 };
1289
1290 workspaceAutoBackAndForth = true;
1291 };
1292 };
1119} 1293}