Browse Source

nixify compton

master
Yorick van Pelt 2 years ago
parent
commit
d2cd69add3
4 changed files with 55 additions and 27 deletions
  1. +1
    -1
      install.sh
  2. +54
    -1
      nix/.config/nixpkgs/home.nix
  3. +0
    -20
      x/compton_default.conf
  4. +0
    -5
      x/compton_intel.conf

+ 1
- 1
install.sh View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#!nix-shell -i bash -p stow
set -e
$(nix-build '<nixpkgs>' -A stow --no-out-link)/bin/stow -d `dirname $0` -t ~ nix x gtk gpg mutt stow rofi
$(nix-build '<nixpkgs>' -A stow --no-out-link)/bin/stow -d `dirname $0` -t ~ nix x gpg mutt stow rofi
nix build -f. $(hostname -s)

+ 54
- 1
nix/.config/nixpkgs/home.nix View File

@@ -1,4 +1,4 @@
{
{ pkgs, ... }: {
programs = {
home-manager = {
enable = true;
@@ -54,8 +54,61 @@
initExtra = "eval $(thefuck --alias)";
};
};
xresources.properties =
let font = "DejaVu Sans Mono";
fsize = 11;
dpi = 192; in
{
"URxvt.scrollstyle" = "plain";
"URxvt.scrollBar_right" = "true";
"URxvt.perl-ext-common" = "default,matcher,font-size,vtwheel";
"URxvt.url-launcher" = "xdg-open";
"URxvt.matcher.button" = "1";
"URxvt.urgentOnBell" = "True";
"URxvt.depth" = "32";
"URxvt.borderColor" = "S_base03";
# "! URxvt.background" = "[95]#202020";
"*font" = "xft:${font}:size=${toString fsize}:antialias=true:hinting=true";
"polybar.font" = "${font}:size=${toString fsize}:antialias=true:hinting=true;2";
"URxvt.geometry" = "100x30";
"URxvt.scrollColor" = "S_base0";

"rofi.font" = "${font} ${toString fsize}";
"Emacs.font" = "${font}-${toString fsize}";

"URxvt.font-size.step" = "4";
"URxvt.keysym.C-equal" = "perl:font-size:increase";
"URxvt.keysym.C-minus" = "perl:font-size:decrease";

"Xft.dpi" = dpi;
"*dpi" = dpi;
};
xresources.extraConfig = builtins.readFile (
pkgs.fetchFromGitHub {
owner = "solarized";
repo = "xresources";
rev = "025ceddbddf55f2eb4ab40b05889148aab9699fc";
sha256 = "0lxv37gmh38y9d3l8nbnsm1mskcv10g3i83j0kac0a2qmypv1k9f";
} + "/Xresources.light");
xdg.configFile."streamlink/config".text = ''
player = mpv --cache 2048
default-stream = best
'';
services = {
compton = {
enable = true;
backend = "glx";
extraOptions = ''
glx-no-stencil = true;
unredir-if-possible = true;
'';
# nvidia = ''
# paint-on-overlay = true;
# glx-no-rebind-pixmap = true;
# glx-swap-method = -1;
# xrender-sync-fence = true;
# ''; vsync = "opengl-oml";
};

};
}

+ 0
- 20
x/compton_default.conf View File

@@ -1,20 +0,0 @@
# compton (https://github.com/chjj/compton) compositor config

# Latest git master version of compton is recommended. Configuring compton is
# tricky, these settings are what work for me with NVIDIA GeForce GTX 650 Ti,
# and the nvidia-352 driver.

# Use GLX backend for performance and vsync:
backend = "glx"

# Various performance optimizations:
paint-on-overlay = true;
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
glx-swap-method = -1;

# With newer NVIDIA drivers, this option is needed to prevent lags/flickering:
xrender-sync-fence = true;

unredir-if-possible = true;
vsync = "opengl-oml";

+ 0
- 5
x/compton_intel.conf View File

@@ -1,5 +0,0 @@
backend = "glx";
#paint-on-overlay = true;
glx-no-stencil = true;
#glx-swap-method = 4;
unredir-if-possible = true;

Loading…
Cancel
Save