summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2018-05-31 14:17:07 -0700
committerBen Sima <ben@bsima.me>2018-05-31 14:17:07 -0700
commit9c77a5ff83a7b9ffb87b1087d1f27cc534ceaeb4 (patch)
tree704314076593d2b527e4ee0f02cd59ece1486f46
parentd6ee0e228470a3f13dc17f465da770e940f6c4ea (diff)
Polybar and stuff
-rw-r--r--home.nix53
-rw-r--r--packages.nix5
-rw-r--r--vim.nix34
-rw-r--r--xmonad.hs6
4 files changed, 69 insertions, 29 deletions
diff --git a/home.nix b/home.nix
index 60d177d..af866f8 100644
--- a/home.nix
+++ b/home.nix
@@ -1,5 +1,14 @@
{ pkgs, ... }:
+let
+ solarized-xresources =
+ pkgs.fetchFromGitHub {
+ owner = "solarized";
+ repo = "xresources";
+ rev = "025ceddbddf55f2eb4ab40b05889148aab9699fc";
+ sha256 = "0lxv37gmh38y9d3l8nbnsm1mskcv10g3i83j0kac0a2qmypv1k9f";
+ };
+in
{
home.packages = import ./packages.nix { inherit pkgs; };
@@ -13,41 +22,53 @@
"XTerm*termName" = "xterm-256color";
"XTerm*metaSendsEscape" = true;
};
- extraConfig = builtins.readFile (
- pkgs.fetchFromGitHub {
- owner = "solarized";
- repo = "xresources";
- rev = "025ceddbddf55f2eb4ab40b05889148aab9699fc";
- sha256 = "0lxv37gmh38y9d3l8nbnsm1mskcv10g3i83j0kac0a2qmypv1k9f";
- } + "/Xresources.light"
- );
+ extraConfig = builtins.readFile(solarized-xresources + "/Xresources.light");
};
services.network-manager-applet.enable = true;
services.polybar = {
- enable = false;
- script = "polybar bar &";
+ enable = true;
+
config = {
"bar/top" = {
- monitor = "${env:MONITOR:HDMI1}";
+ font-0 = "mononoki:size-10";
+ monitor = "\${env:MONITOR:eDP1}";
+ monitor-fallback = "HDMI1";
width = "100%";
- height = "3%";
+ height = "2%";
radius = 0;
+ background = "#fdf6e3"; # solarized base3
+ foreground = "#657b83"; # solarized base00
+ module-margin = 4;
modules-center = "date";
+ modules-right = "battery";
};
+
"module/date" = {
type = "internal/date";
internal = 5;
- date = "%y.%m.%d";
+ date = "%Y.%m.%d";
time = "%H.%M";
- label = "%time% %date%";
+ label = "%date%..%time%";
+ };
+
+ "module/battery" = {
+ type = "internal/battery";
+ battery = "BAT0";
+ adapter = "AC";
+ full-at = 99;
};
};
+ script = ''
+ #!/usr/bin/env sh
+ systemctl --user daemon-reload
+ polybar top &
+ '';
};
services.taffybar = {
- enable = true;
+ enable = false;
};
services.redshift = {
@@ -77,7 +98,7 @@
path = https://github.com/rycee/home-manager/archive/release-18.03.tar.gz;
};
- vim = import ./vim.nix;
+ vim = import ./vim.nix { inherit pkgs; inherit (pkgs) vimUtils fetchFromGitHub; };
git = {
enable = true;
diff --git a/packages.nix b/packages.nix
index 162db32..1351c52 100644
--- a/packages.nix
+++ b/packages.nix
@@ -6,6 +6,7 @@ pkgs.cabal2nix
pkgs.cloc
pkgs.dict
pkgs.dmenu
+pkgs.dzen2
pkgs.emacs
pkgs.entr
pkgs.exercism
@@ -13,6 +14,7 @@ pkgs.fasd
pkgs.file
pkgs.gimp
pkgs.git
+pkgs.htop
pkgs.jq
pkgs.keepassx
pkgs.keybase
@@ -21,10 +23,12 @@ pkgs.mononoki
pkgs.mplayer
pkgs.mpv
pkgs.networkmanager_vpnc
+pkgs.nix-prefetch-scripts
pkgs.offlineimap
pkgs.pass
pkgs.pavucontrol
pkgs.pinentry
+pkgs.polybar
pkgs.qtpass
pkgs.racket
pkgs.ranger
@@ -41,7 +45,6 @@ pkgs.vlc
pkgs.vpnc
pkgs.w3m
pkgs.wakatime
-#pkgs.xorg.xbacklight
pkgs.xterm
pkgs.yank
pkgs.youtube-dl
diff --git a/vim.nix b/vim.nix
index 80954c7..311300b 100644
--- a/vim.nix
+++ b/vim.nix
@@ -1,3 +1,17 @@
+{ pkgs, vimUtils, fetchFromGitHub }:
+
+let
+ vim-sexp = vimUtils.buildVimPluginFrom2Nix {
+ name = "elm.vim-2017-07-09";
+ src = fetchFromGitHub {
+ owner = "guns";
+ repo = "vim-sexp";
+ rev = "12292941903d9ac8151513189d2007e1ccfc95f0";
+ sha256 = "1mfqbmrbqgnsc34pmcsrc0c5zvgxhhnw4hx4g5wbssfk1ddyx6y0";
+ };
+ dependencies = [];
+ };
+in
{
enable = true;
plugins = [
@@ -12,16 +26,6 @@
tabstop = 4;
};
extraConfig = ''
- " Auto-switch theme
- let hour = strftime("%H")
- if 6 <= hour && hour < 18
- set background=light
- else
- set background=dark
- endif
- let g:solarized_termcolors=256
- colorscheme solarized
- "
set cuc cul " Crosshair
set cc=80 " 80 column lines
set linebreak " Break lines at word (requires Wrap lines)
@@ -34,5 +38,15 @@
set smartindent " Enable smart-indent
imap fd <Esc>
set mouse=a
+ ""
+ "" Auto-switch theme
+ let hour = strftime("%H")
+ if 6 <= hour && hour < 18
+ set background=light
+ else
+ set background=dark
+ endif
+ let g:solarized_termcolors=256
+ colorscheme solarized
'';
}
diff --git a/xmonad.hs b/xmonad.hs
index 9ac0ead..1a30b66 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -6,13 +6,15 @@ import XMonad.Hooks.ManageDocks
--import System.Taffybar.Support.PagerHints (pagerHints)
delKeys conf@(XConfig {modMask = modMask}) =
- [ (modMask, xK_p) ]
+ [ (modMask, xK_p)
+ ]
insKeys :: XConfig l -> [((KeyMask, KeySym), X ())]
insKeys conf@(XConfig {modMask = modMask}) =
[ ((0, xK_F5), spawn "xbacklight -dec 1")
, ((0, xK_F6), spawn "xbacklight -inc 1")
- , ((modMask, xK_o), spawn "dmenu")
+ , ((modMask, xK_o), spawn "dmenu_run")
+ , ((modMask, xK_p), spawn "passmenu")
]
main =