2020-04-22 22:13:03 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
# Display manager
|
2020-05-09 01:17:35 +02:00
|
|
|
services.xserver.enable = true;
|
2020-05-08 21:53:52 +02:00
|
|
|
services.xserver.displayManager = {
|
2020-04-22 22:13:03 +02:00
|
|
|
defaultSession = "sway";
|
2020-05-11 06:39:22 +02:00
|
|
|
lightdm = {
|
2020-04-22 22:13:03 +02:00
|
|
|
enable = true;
|
2020-05-09 01:17:35 +02:00
|
|
|
autoLogin = {
|
2020-04-22 22:13:03 +02:00
|
|
|
enable = true;
|
|
|
|
user = "coolneng";
|
|
|
|
};
|
2020-05-14 02:09:23 +02:00
|
|
|
greeter.package = pkgs.lightdm_gtk_greeter;
|
2020-04-22 22:13:03 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Window manager
|
|
|
|
programs.sway = {
|
|
|
|
enable = true;
|
|
|
|
extraPackages = with pkgs; [
|
|
|
|
xwayland
|
|
|
|
swaylock
|
2020-05-10 03:13:30 +02:00
|
|
|
swayidle
|
2020-04-22 22:13:03 +02:00
|
|
|
swaybg
|
|
|
|
rofi
|
|
|
|
waybar
|
|
|
|
clipman
|
2020-05-10 03:13:30 +02:00
|
|
|
wl-clipboard
|
2020-04-22 22:13:03 +02:00
|
|
|
grim
|
|
|
|
slurp
|
2020-05-09 18:45:10 +02:00
|
|
|
light
|
2020-04-22 22:13:03 +02:00
|
|
|
imv
|
|
|
|
kanshi
|
2020-05-09 13:53:59 +02:00
|
|
|
kitty
|
2020-04-22 22:13:03 +02:00
|
|
|
];
|
|
|
|
extraSessionCommands = ''
|
2020-05-16 05:20:59 +02:00
|
|
|
export MOZ_ENABLE_WAYLAND=1
|
2020-05-14 02:09:23 +02:00
|
|
|
export MOZ_DBUS_REMOTE=1
|
2020-04-22 22:13:03 +02:00
|
|
|
export GRIM_DEFAULT_DIR=/home/coolneng/Photos/Screenshots
|
|
|
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
|
|
export QT_QPA_PLATFORM=wayland
|
|
|
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
|
|
|
export SDL_VIDEODRIVER=wayland
|
2020-05-19 13:26:50 +02:00
|
|
|
export GTK_THEME=Adapta-Eta
|
2020-04-22 22:13:03 +02:00
|
|
|
'';
|
2020-05-14 02:09:23 +02:00
|
|
|
wrapperFeatures.gtk = true;
|
2020-04-22 22:13:03 +02:00
|
|
|
};
|
2020-05-10 03:13:30 +02:00
|
|
|
|
2020-05-09 18:45:10 +02:00
|
|
|
# Backlight
|
|
|
|
programs.light.enable = true;
|
|
|
|
|
2020-04-22 22:13:03 +02:00
|
|
|
# Blue light filter
|
2020-05-11 06:39:22 +02:00
|
|
|
location = {
|
|
|
|
latitude = 35.89;
|
|
|
|
longitude = -5.32;
|
|
|
|
provider = "manual";
|
|
|
|
};
|
|
|
|
|
2020-04-22 22:13:03 +02:00
|
|
|
services.redshift = {
|
|
|
|
package = pkgs.redshift-wlr;
|
|
|
|
enable = true;
|
|
|
|
temperature = {
|
|
|
|
day = 6500;
|
2020-05-11 06:39:22 +02:00
|
|
|
night = 5300;
|
2020-04-22 22:13:03 +02:00
|
|
|
};
|
|
|
|
};
|
2020-05-09 18:45:10 +02:00
|
|
|
|
2020-04-22 22:13:03 +02:00
|
|
|
# Bar
|
|
|
|
programs.waybar.enable = true;
|
2020-05-10 03:13:30 +02:00
|
|
|
|
|
|
|
# GPG agent
|
2020-05-14 02:09:23 +02:00
|
|
|
programs.gnupg.agent = {
|
|
|
|
enable = true;
|
2020-05-19 13:26:50 +02:00
|
|
|
pinentryFlavor = "gtk2";
|
2020-05-14 02:09:23 +02:00
|
|
|
};
|
2020-05-15 03:43:23 +02:00
|
|
|
|
|
|
|
# Tmux
|
|
|
|
programs.tmux = {
|
|
|
|
enable = true;
|
|
|
|
historyLimit = 5000;
|
|
|
|
keyMode = "vi";
|
|
|
|
shortcut = "x";
|
|
|
|
terminal = "screen-256";
|
|
|
|
baseIndex = 1;
|
|
|
|
extraConfig = ''
|
|
|
|
## set terminal bell
|
|
|
|
set -g bell-action any
|
|
|
|
|
|
|
|
# i3 split bindings
|
|
|
|
bind g split-window -h
|
|
|
|
bind v split-window -v
|
|
|
|
unbind '"'
|
|
|
|
unbind %
|
|
|
|
unbind m
|
|
|
|
|
|
|
|
# vim split navigation
|
|
|
|
bind h select-pane -L
|
|
|
|
bind j select-pane -D
|
|
|
|
bind k select-pane -U
|
|
|
|
bind l select-pane -R
|
|
|
|
|
|
|
|
# equalize splits with x
|
|
|
|
unbind space
|
|
|
|
bind space select-layout even-vertical
|
|
|
|
|
|
|
|
# window switching
|
|
|
|
unbind n
|
|
|
|
unbind c
|
|
|
|
bind c new-window
|
|
|
|
unbind ,
|
|
|
|
unbind .
|
|
|
|
bind , previous-window
|
|
|
|
bind . next-window
|
|
|
|
bind-key n command-prompt "rename-window '%%'"
|
|
|
|
|
|
|
|
# change kill window bind
|
|
|
|
unbind &
|
|
|
|
unbind x
|
|
|
|
bind x kill-session
|
|
|
|
|
|
|
|
# switch to last session
|
|
|
|
bind S switch-client -l
|
|
|
|
|
|
|
|
# force a reload of the config file
|
|
|
|
unbind r
|
|
|
|
bind r source-file ~/.tmux.conf
|
|
|
|
|
|
|
|
set -g status on
|
|
|
|
set -g pane-base-index 1
|
|
|
|
set -g base-index 1
|
|
|
|
set -g set-titles on
|
|
|
|
set -g aggressive-resize on
|
|
|
|
set-option -g set-titles-string '#{pane_current_command}'
|
|
|
|
set-option -g visual-activity on
|
|
|
|
set-option -g status-position bottom
|
|
|
|
set-option -g renumber-windows on
|
|
|
|
set-window-option -g monitor-activity off
|
|
|
|
set-option -g allow-rename off
|
|
|
|
|
|
|
|
# copy mode
|
|
|
|
unbind [
|
|
|
|
bind Escape copy-mode
|
|
|
|
bind-key -T copy-mode-vi 'v' send -X begin-selection # Begin selection in copy mode.
|
|
|
|
bind-key -T copy-mode-vi 'C-v' send -X rectangle-toggle # Begin selection in copy mode.
|
|
|
|
bind-key -T copy-mode-vi 'y' send -X copy-selection # Yank selection in copy mode.
|
|
|
|
|
|
|
|
set -g mouse on
|
|
|
|
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
|
|
|
|
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
|
|
|
|
|
|
|
|
# Colorscheme
|
|
|
|
set -g status-justify "centre"
|
|
|
|
set -g status "on"
|
|
|
|
set -g status-left-style "none"
|
|
|
|
set -g message-command-style "fg=#c6c8d1,bg=#2e3244"
|
|
|
|
set -g status-right-style "none"
|
|
|
|
set -g pane-active-border-style "fg=#454b68"
|
|
|
|
set -g status-style "none,bg=#1e2132"
|
|
|
|
set -g message-style "fg=#c6c8d1,bg=#2e3244"
|
|
|
|
set -g pane-border-style "fg=#2e3244"
|
|
|
|
set -g status-right-length "100"
|
|
|
|
set -g status-left-length "100"
|
|
|
|
setw -g window-status-activity-style "none,fg=#454b68,bg=#1e2132"
|
|
|
|
setw -g window-status-separator ""
|
|
|
|
setw -g window-status-style "none,fg=#c6c8d1,bg=#1e2132"
|
|
|
|
set -g status-left "#[fg=#c6c8d1,bg=#454b68,bold] #S #[fg=#454b68,bg=#2e3244,nobold,nounderscore,noitalics]#[fg=#c6c8d1,bg=#1e2132] #[fg=#1e2132,bg=#1e2132,nobold,nounderscore,noitalics]"
|
|
|
|
set -g status-right "#[fg=#1e2132,bg=#1e2132,nobold,nounderscore,noitalics]#[fg=#c6c8d1,bg=#1e2132] #[fg=#2e3244,bg=#1e2132,nobold,nounderscore,noitalics]#[fg=#c6c8d1,bg=#2e3244] %b %d %Y #[fg=#454b68,bg=#2e3244,nobold,nounderscore,noitalics]#[fg=#c6c8d1,bg=#454b68,bold] %R #{prefix_highlight} "
|
|
|
|
setw -g window-status-format "#[fg=#1e2132,bg=#1e2132,nobold,nounderscore,noitalics] #[fg=#c6c8d1] #I #W #[fg=#1e2132,bg=#1e2132,nobold,nounderscore,noitalics]"
|
|
|
|
setw -g window-status-current-format "#[fg=#1e2132,bg=#2e3244,nobold,nounderscore,noitalics]#[fg=#c6c8d1,bg=#2e3244] #I #W #[fg=#2e3244,bg=#1e2132,nobold,nounderscore,noitalics]"
|
|
|
|
'';
|
|
|
|
};
|
2020-04-22 22:13:03 +02:00
|
|
|
}
|