mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
tweak i3
This commit is contained in:
parent
80259fa056
commit
dce8138b43
3 changed files with 39 additions and 5 deletions
|
@ -21,6 +21,7 @@
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
inherit (impermanence.nixosModules) impermanence;
|
inherit (impermanence.nixosModules) impermanence;
|
||||||
|
|
||||||
|
alacritty = import ./modules/alacritty.nix;
|
||||||
baseline = import ./modules/baseline.nix;
|
baseline = import ./modules/baseline.nix;
|
||||||
cli = import ./modules/cli.nix;
|
cli = import ./modules/cli.nix;
|
||||||
desktop = import ./modules/desktop.nix;
|
desktop = import ./modules/desktop.nix;
|
||||||
|
|
20
modules/alacritty.nix
Normal file
20
modules/alacritty.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
programs.bash.interactiveShellInit = ''
|
||||||
|
function _set_title() {
|
||||||
|
printf "\033]0;%s@%s:%s\007" "''${USER}" "''${HOSTNAME%%.*}" "''${PWD/#$HOME/\~}"
|
||||||
|
}
|
||||||
|
[ -z "$VTE_VERSION" ] && PROMPT_COMMAND="_set_title; $PROMPT_COMMAND"
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment.etc."xdg/alacritty.yml".text = ''
|
||||||
|
env:
|
||||||
|
TERM: xterm-256color
|
||||||
|
key_bindings:
|
||||||
|
- { key: N, mods: Control|Shift, action: SpawnNewInstance }
|
||||||
|
- { key: T, mods: Control|Shift, action: SpawnNewInstance }
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
|
@ -35,21 +35,33 @@ in
|
||||||
(
|
(
|
||||||
cat '${pkgs.i3}/etc/i3/config' |
|
cat '${pkgs.i3}/etc/i3/config' |
|
||||||
sed 's/Mod1/Mod4/' |
|
sed 's/Mod1/Mod4/' |
|
||||||
sed 's/exec i3-config-wizard//' |
|
sed 's/^exec i3-config-wizard/#&/' |
|
||||||
sed 's/^font/#font/' |
|
sed 's/^font.*/font pango:DejaVuSans, FontAwesome5Free 12/' |
|
||||||
sed 's,status_command i3status,status_command i3status -c ${./i3status.conf},' |
|
sed 's,status_command i3status,status_command i3status-rs \n tray_output primary,' |
|
||||||
sed 's/i3-sensible-terminal/alacritty/' |
|
sed 's/i3-sensible-terminal/alacritty/' |
|
||||||
sed 's/10%/2%/'
|
sed 's/10%/2%/'
|
||||||
cat '${pkgs.writeText "i3extra" cfg.extraConfig}'
|
cat '${pkgs.writeText "i3extra" cfg.extraConfig}'
|
||||||
echo 'bindsym XF86MonBrightnessUp exec brightnessctl -n500 -e s -- +10%'
|
|
||||||
echo 'bindsym XF86MonBrightnessDown exec brightnessctl -n500 -e s -- -10%'
|
|
||||||
)|
|
)|
|
||||||
tee "$out"
|
tee "$out"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
sconfig.i3.extraConfig = ''
|
||||||
|
default_border normal 4
|
||||||
|
default_floating_border normal 4
|
||||||
|
bindsym Mod4+Escape kill
|
||||||
|
hide_edge_borders both
|
||||||
|
bindsym XF86MonBrightnessUp exec brightnessctl -n500 -e s -- +10%
|
||||||
|
bindsym XF86MonBrightnessDown exec brightnessctl -n500 -e s -- -10%
|
||||||
|
'';
|
||||||
|
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
fonts.fonts = with pkgs; [
|
||||||
|
font-awesome
|
||||||
|
powerline-fonts
|
||||||
|
];
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
|
@ -57,6 +69,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
i3status-rust
|
||||||
alacritty
|
alacritty
|
||||||
brightnessctl
|
brightnessctl
|
||||||
numix-icon-theme
|
numix-icon-theme
|
||||||
|
|
Loading…
Reference in a new issue