Skip to content

Instantly share code, notes, and snippets.

@DrSensor
Last active June 11, 2024 01:48

Revisions

  1. DrSensor revised this gist Sep 18, 2021. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions run
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/bin/sh

    case $context in
    nvidia)
    prime-run $@
    ;;
    windows)
    proton-call -r $@
    ;;
    *)
    $@
    ;;
    esac
  2. DrSensor revised this gist Jul 29, 2021. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions power-saving.nix
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    {
    general = [
    auto-cpufreq # https://github.com/AdnanHodzic/auto-cpufreq
    ];
    laptop = general ++ [
    tlp # https://linrunner.de/tlp/
    ];
    handheld = general ++ [
    xsuspender # https://kernc.github.io/xsuspender
    ];
    }
  3. DrSensor revised this gist Jul 19, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion desktop.nix
    Original file line number Diff line number Diff line change
    @@ -43,4 +43,5 @@ desktopEnvironment {
    # 3. or wf-record to screencasts the region
    '';
    };
    }
    system-gui = [ gtk4 lxappearance-gtk4 ];
    }
  4. DrSensor revised this gist Jun 20, 2021. No changes.
  5. DrSensor revised this gist Jun 20, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion desktop.nix
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    , desktopEnvironment
    }: with pkgs;
    desktopEnvironment {
    display-manager = emptty;
    session-manager = emptty;
    window-manager = [ sway labwc ];
    screen-display = {
    use = kanshi; # autorandr
  6. DrSensor revised this gist Jun 20, 2021. 1 changed file with 15 additions and 1 deletion.
    16 changes: 15 additions & 1 deletion desktop.nix
    Original file line number Diff line number Diff line change
    @@ -28,5 +28,19 @@ desktopEnvironment {
    notification = fnott;
    systray = yambar;
    launcher = fuzzel; # or rofi-wlc
    terminal = foot;
    terminal = mkShell {
    packages = [ foot zellij ];
    shellHook = ''
    # run zellij multiplexer inside foot terminal
    '';
    };
    screen-captures = mkShell {
    packages = [ grim wf-recorder slurp ];
    shellHook = ''
    # 1. ask if you want to capture whole desktop, specific monitor, or just a region
    # 2. slurp to get the region
    # 3. grim to screenshots the region
    # 3. or wf-record to screencasts the region
    '';
    };
    }
  7. DrSensor revised this gist Jun 20, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion desktop.nix
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,8 @@ desktopEnvironment {
    };
    wallpaper = {
    static = swaybg;
    animated = [ oguri mpvpaper ];
    animated.gif = oguri;
    animated.video = mpvpaper;
    gui = wallutils;
    };
    notification = fnott;
  8. DrSensor created this gist Jun 20, 2021.
    31 changes: 31 additions & 0 deletions desktop.nix
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    { pkgs ? import <nixpkgs>
    , lib ? pkgs.lib
    , desktopEnvironment
    }: with pkgs;
    desktopEnvironment {
    display-manager = emptty;
    window-manager = [ sway labwc ];
    screen-display = {
    use = kanshi; # autorandr
    gui = wlay;
    };
    screen-brightness = wlsunset;
    screen-lock.timer = swayidle;
    screen-lock.use = mkShell {
    packages = [ swaylock grim sox ];
    shellHook = ''
    # 1. screencapture using grim
    # 2. databender/mosaic using sox
    # 3. set swaylock --image from sox
    '';
    };
    wallpaper = {
    static = swaybg;
    animated = [ oguri mpvpaper ];
    gui = wallutils;
    };
    notification = fnott;
    systray = yambar;
    launcher = fuzzel; # or rofi-wlc
    terminal = foot;
    }