mirror of
https://github.com/kmein/niveum
synced 2026-03-19 11:31:09 +01:00
modularize
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
{ config, pkgs }:
|
||||
with import <dot/theme.nix>;
|
||||
{
|
||||
enable = true;
|
||||
iconTheme = config.constants.theme.icon;
|
||||
settings = {
|
||||
global = {
|
||||
transparency = 10;
|
||||
font = "${terminalFont.name} ${toString terminalFont.size}";
|
||||
geometry = "200x5-30+20";
|
||||
frame_color = invertedColorScheme.background;
|
||||
follow = "mouse";
|
||||
indicate_hidden = true;
|
||||
notification_height = 0;
|
||||
separator_height = 2;
|
||||
padding = 8;
|
||||
horizontal_padding = 8;
|
||||
separator_color = "auto";
|
||||
sort = true;
|
||||
markup = "full";
|
||||
format = ''%a\n<b>%s</b>\n%b'';
|
||||
alignment = "left";
|
||||
show_age_threshold = 60;
|
||||
bounce_freq = 0;
|
||||
word_wrap = true;
|
||||
ellipsize = "middle";
|
||||
ignore_newline = false;
|
||||
stack_duplicates = true;
|
||||
hide_duplicate_count = false;
|
||||
max_icon_size = 32;
|
||||
sticky_history = true;
|
||||
history_length = 20;
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
||||
browser = "${pkgs.xdg_utils}/bin/xdg-open";
|
||||
verbosity = "mesg";
|
||||
corner_radius = 0;
|
||||
mouse_left_click = "do_action";
|
||||
mouse_right_click = "close_current";
|
||||
mouse_middle_click = "close_all";
|
||||
};
|
||||
urgency_low = { frame_color = invertedColorScheme.background; background = invertedColorScheme.background; foreground = invertedColorScheme.foreground; timeout = 5; };
|
||||
urgency_normal = { frame_color = invertedColorScheme.background; background = invertedColorScheme.background; foreground = invertedColorScheme.foreground; timeout = 10; };
|
||||
urgency_critical = { frame_color = invertedColorScheme.red.dark; background = invertedColorScheme.red.dark; foreground = invertedColorScheme.foreground; timeout = 0; };
|
||||
};
|
||||
}
|
||||
11
dot/ghci.nix
11
dot/ghci.nix
@@ -1,11 +0,0 @@
|
||||
{ pkgs }:
|
||||
''
|
||||
:set editor vim
|
||||
:def hoogle \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --count=15 \"" ++ s ++ "\""
|
||||
:def doc \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --info \"" ++ s ++ "\""
|
||||
:def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\""
|
||||
:def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
|
||||
:set prompt "\o033[1m%s\o033[1;34m λ\o033[0m "
|
||||
:set -Wall
|
||||
''
|
||||
# :def djinn \x -> return $ ":!echo \"" ++ x ++ "\" | ${pkgs.haskell.packages.ghc7102.djinn}/bin/djinn /dev/stdin"
|
||||
177
dot/i3.nix
177
dot/i3.nix
@@ -1,177 +0,0 @@
|
||||
{ pkgs, config, lib }:
|
||||
let
|
||||
unstable = import <nixos-unstable> {};
|
||||
i3blocks_conf = import <dot/i3blocks.nix> { inherit pkgs; };
|
||||
new-workspace = unstable.writers.writeDash "new-workspace" ''
|
||||
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
||||
'';
|
||||
move-to-new-workspace = unstable.writers.writeDash "new-workspace" ''
|
||||
i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
||||
'';
|
||||
wifi-interface = {
|
||||
scardanelli = "wlp2s0";
|
||||
homeros = "wlp3s0";
|
||||
}.${config.networking.hostName};
|
||||
in with import <dot/theme.nix>;
|
||||
rec {
|
||||
fonts = [ "${uiFont.name} ${toString uiFont.size}" ];
|
||||
modifier = "Mod4";
|
||||
window = {
|
||||
titlebar = false;
|
||||
border = 1;
|
||||
hideEdgeBorders = "smart";
|
||||
};
|
||||
floating = {
|
||||
titlebar = false;
|
||||
border = 1;
|
||||
};
|
||||
colors =
|
||||
let scheme = { background = colorScheme.background; text = colorScheme.foreground; };
|
||||
in {
|
||||
focused = scheme // {
|
||||
border = colorScheme.background;
|
||||
indicator = colorScheme.background;
|
||||
childBorder = colorScheme.background;
|
||||
};
|
||||
focusedInactive = scheme // {
|
||||
border = colorScheme.background;
|
||||
indicator = colorScheme.background;
|
||||
childBorder = colorScheme.background;
|
||||
};
|
||||
unfocused = scheme // {
|
||||
border = colorScheme.background;
|
||||
indicator = colorScheme.background;
|
||||
childBorder = colorScheme.background;
|
||||
};
|
||||
urgent = scheme // {
|
||||
border = colorScheme.red.light;
|
||||
indicator = colorScheme.red.light;
|
||||
childBorder = colorScheme.red.light;
|
||||
};
|
||||
placeholder = scheme // {
|
||||
border = colorScheme.green.light;
|
||||
indicator = colorScheme.green.light;
|
||||
childBorder = colorScheme.green.light;
|
||||
};
|
||||
};
|
||||
bars = [{
|
||||
workspaceButtons = false;
|
||||
fonts = [ "${terminalFont.name} ${toString terminalFont.size}" ];
|
||||
mode = "hide";
|
||||
colors = {
|
||||
background = colorScheme.background;
|
||||
separator = colorScheme.background;
|
||||
statusline = colorScheme.foreground;
|
||||
bindingMode = {
|
||||
background = colorScheme.red.light;
|
||||
border = colorScheme.background;
|
||||
text = colorScheme.foreground;
|
||||
};
|
||||
};
|
||||
# position = "top";
|
||||
statusCommand =
|
||||
let
|
||||
i3status-config = pkgs.writeText "i3status.conf" ''
|
||||
general {
|
||||
colors = true
|
||||
color_good = "${colorScheme.green.dark}"
|
||||
color_bad = "${colorScheme.red.dark}"
|
||||
color_degraded = "${colorScheme.black.light}"
|
||||
interval = 5
|
||||
separator = " "
|
||||
}
|
||||
|
||||
order += "run_watch retiolum"
|
||||
order += "path_exists openvpn"
|
||||
order += "wireless ${wifi-interface}"
|
||||
order += "battery all"
|
||||
order += "volume master"
|
||||
order += "load"
|
||||
order += "tztime local"
|
||||
|
||||
wireless ${wifi-interface} {
|
||||
format_up = "%essid"
|
||||
format_down = "offline"
|
||||
}
|
||||
|
||||
run_watch retiolum {
|
||||
pidfile = "/var/run/tinc.retiolum.pid"
|
||||
format = "%title"
|
||||
}
|
||||
|
||||
path_exists openvpn {
|
||||
path = "/proc/sys/net/ipv4/conf/tun0"
|
||||
format = "%title"
|
||||
}
|
||||
|
||||
battery all {
|
||||
format = "%status%percentage"
|
||||
format_down = "No battery"
|
||||
status_chr = "↑"
|
||||
status_bat = "↓"
|
||||
status_unk = ""
|
||||
status_full = "↯"
|
||||
path = "/sys/class/power_supply/BAT%d/uevent"
|
||||
low_threshold = 15
|
||||
threshold_type = "percentage"
|
||||
integer_battery_capacity = true
|
||||
}
|
||||
|
||||
volume master {
|
||||
format = "%volume"
|
||||
format_muted = "%volume"
|
||||
device = "default"
|
||||
mixer = "Master"
|
||||
mixer_idx = 0
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = "%Y-%m-%d %H:%M"
|
||||
}
|
||||
|
||||
load {
|
||||
format = "%1min"
|
||||
}
|
||||
'';
|
||||
in ''
|
||||
${pkgs.i3status}/bin/i3status -c ${i3status-config}
|
||||
'';
|
||||
}];
|
||||
keybindings = {
|
||||
"${modifier}+Down" = "focus down";
|
||||
"${modifier}+Left" = "focus left";
|
||||
"${modifier}+Return" = "exec ${config.defaultApplications.terminal}";
|
||||
"${modifier}+Right" = "focus right";
|
||||
"${modifier}+Shift+Down" = "move down";
|
||||
"${modifier}+Shift+Left" = "move left";
|
||||
"${modifier}+Shift+Right" = "move right";
|
||||
"${modifier}+Shift+Up" = "move up";
|
||||
"${modifier}+Shift+c" = "reload";
|
||||
"${modifier}+Shift+n" = "move window to workspace next";
|
||||
"${modifier}+Shift+b" = "move window to workspace prev";
|
||||
"${modifier}+Shift+q" = "kill";
|
||||
"${modifier}+Shift+r" = "restart";
|
||||
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
|
||||
"${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}";
|
||||
"${modifier}+Shift+z" = "floating toggle";
|
||||
"${modifier}+Up" = "focus up";
|
||||
"${modifier}+a" = "exec ${pkgs.rofi}/bin/rofi -display-window — -show window";
|
||||
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -display-run — -show run";
|
||||
"${modifier}+e" = "layout toggle split";
|
||||
"${modifier}+f" = "fullscreen toggle";
|
||||
"${modifier}+h" = "split h";
|
||||
"${modifier}+n" = "workspace next";
|
||||
"${modifier}+b" = "workspace prev";
|
||||
"${modifier}+p" = "exec ${pkgs.rofi-pass}/bin/rofi-pass";
|
||||
"${modifier}+r" = "mode resize";
|
||||
"${modifier}+s" = "layout stacking";
|
||||
"${modifier}+t" = "exec ${config.defaultApplications.fileManager}";
|
||||
"${modifier}+v" = "split v";
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
"${modifier}+x" = "exec --no-startup-id ${new-workspace}";
|
||||
"${modifier}+y" = "exec ${config.defaultApplications.browser}";
|
||||
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5 && pkill -RTMIN+3 i3blocks";
|
||||
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t && pkill -RTMIN+3 i3blocks";
|
||||
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5 && pkill -RTMIN+3 i3blocks";
|
||||
};
|
||||
}
|
||||
10
dot/mpv.nix
10
dot/mpv.nix
@@ -1,10 +0,0 @@
|
||||
''
|
||||
Alt+RIGHT add video-rotate 90
|
||||
Alt+LEFT add video-rotate -90
|
||||
Alt+- add video-zoom -0.25
|
||||
Alt+= add video-zoom 0.25
|
||||
Alt+l add video-pan-x -0.05
|
||||
Alt+h add video-pan-x 0.05
|
||||
Alt+k add video-pan-y 0.05
|
||||
Alt+j add video-pan-y -0.05
|
||||
''
|
||||
38
dot/rofi.nix
38
dot/rofi.nix
@@ -1,38 +0,0 @@
|
||||
{ config }:
|
||||
with import <dot/theme.nix>;
|
||||
{
|
||||
enable = true;
|
||||
separator = "solid";
|
||||
scrollbar = false;
|
||||
terminal = config.defaultApplications.terminal;
|
||||
borderWidth = 0;
|
||||
lines = 5;
|
||||
font = "${terminalFont.name} ${toString (terminalFont.size + 1)}";
|
||||
colors = rec {
|
||||
window = {
|
||||
background = invertedColorScheme.background;
|
||||
border = invertedColorScheme.background;
|
||||
separator = invertedColorScheme.black.light;
|
||||
};
|
||||
rows = {
|
||||
normal = {
|
||||
background = window.background;
|
||||
backgroundAlt = window.background;
|
||||
foreground = invertedColorScheme.foreground;
|
||||
highlight = { foreground = invertedColorScheme.cyan.dark; inherit (window) background; };
|
||||
};
|
||||
active = {
|
||||
background = window.background;
|
||||
backgroundAlt = window.background;
|
||||
foreground = invertedColorScheme.yellow.dark;
|
||||
highlight = { foreground = invertedColorScheme.green.dark; inherit (window) background; };
|
||||
};
|
||||
urgent = {
|
||||
background = window.background;
|
||||
backgroundAlt = window.background;
|
||||
foreground = invertedColorScheme.red.dark;
|
||||
highlight = { foreground = invertedColorScheme.magenta.dark; inherit (window) background; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{ user }:
|
||||
''
|
||||
templates:
|
||||
params:
|
||||
author-name: ${user.name}
|
||||
author-email: ${user.email}
|
||||
copyright: 'Copyright: (c) 2019 ${user.name}'
|
||||
github-username: ${user.github}
|
||||
''
|
||||
27
dot/tmux.nix
27
dot/tmux.nix
@@ -1,27 +0,0 @@
|
||||
''
|
||||
set -g status-interval 2
|
||||
set -g status-left-length 32
|
||||
set -g status-right-length 150
|
||||
|
||||
set -g status-bg default
|
||||
|
||||
setw -g window-status-format "#[fg=colour12,bg=colour233] #I #[fg=white,bg=colour237] #W "
|
||||
setw -g window-status-current-format "#[fg=colour12,bg=colour233] * #[fg=white,bg=colour237,bold] #W "
|
||||
|
||||
set -g status-left ""
|
||||
set -g status-right "# [fg=colour255,bg=colour237,bold] %Y-%m-%d #[default]#[fg=colour12,bg=colour233] %H:%M "
|
||||
set -g status-justify left
|
||||
|
||||
set -g pane-active-border-fg colour237
|
||||
set -g pane-border-fg colour237
|
||||
set -g pane-active-border-bg default
|
||||
set -g pane-border-bg default
|
||||
|
||||
set -g status-position bottom
|
||||
|
||||
set -g mouse on
|
||||
|
||||
# displays *
|
||||
unbind *
|
||||
bind * list-clients
|
||||
''
|
||||
@@ -1,24 +0,0 @@
|
||||
{ config, pkgs }:
|
||||
let theme = import <dot/theme.nix>;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.rxvt_unicode-with-plugins;
|
||||
keybindings = {
|
||||
"Shift-Control-C" = "eval:selection_to_clipboard";
|
||||
"Shift-Control-V" = "eval:paste_clipboard";
|
||||
};
|
||||
scroll.bar.enable = false;
|
||||
extraConfig = {
|
||||
perl-ext = "default,url-select";
|
||||
"url-select.launcher" = "/usr/bin/env chromium";
|
||||
"url-select.underline" = true;
|
||||
"colorUL" = theme.colorScheme.blue.light;
|
||||
"perl-lib" = "${pkgs.urxvt_perls}/lib/urxvt/perl";
|
||||
urlLauncher = "/usr/bin/env chromium";
|
||||
fading = 20;
|
||||
iso14755 = false;
|
||||
urgentOnBell = true;
|
||||
reverseVideo = false;
|
||||
};
|
||||
}
|
||||
@@ -112,7 +112,7 @@ if has("autocmd")
|
||||
autocmd bufnewfile,bufread *.conf set filetype=conf
|
||||
autocmd bufnewfile,bufread *.fs packadd vim-fsharp | set filetype=fsharp
|
||||
autocmd bufnewfile,bufread *.h set keywordprg=man\ 3
|
||||
autocmd bufnewfile,bufread *.nix packadd vim-nix | set filetype=nix
|
||||
autocmd bufnewfile,bufread *.nix packadd vim-nix | set filetype=nix | set path+=/var/src
|
||||
autocmd bufnewfile,bufread *.rust packadd rust-vim " | packadd deoplete-rust
|
||||
autocmd bufnewfile,bufread *.csv packadd csv-vim | set filetype=csv
|
||||
autocmd bufnewfile,bufread *.tex packadd vimtex | set filetype=tex
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
{ lib }:
|
||||
let theme = import <dot/theme.nix>;
|
||||
in with lib; lists.foldr
|
||||
(i: cs: cs // { "*color${toString i}" = builtins.elemAt theme.colorPalette i; })
|
||||
{
|
||||
"*background" = theme.colorScheme.background;
|
||||
"*foreground" = theme.colorScheme.foreground;
|
||||
"*fadeColor" = theme.colorScheme.background;
|
||||
"*cursorColor" = theme.colorScheme.cursorColor;
|
||||
|
||||
# "URxvt*font" = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
|
||||
# "URxvt*boldFont" = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
|
||||
"*.font" = "xft:${theme.terminalFont.name}:size=${toString theme.terminalFont.size}";
|
||||
"*.boldFont" = "xft:${theme.terminalFont.name}:style=Bold:size=${toString theme.terminalFont.size}";
|
||||
"*.italicFont" = "xft:${theme.terminalFont.name}:style=Italic:size=${toString theme.terminalFont.size}";
|
||||
}
|
||||
(lists.range 0 15)
|
||||
Reference in New Issue
Block a user