1
Fork 0

Got tmux to act the way I want on startup let's goooo

This commit is contained in:
Matei Adriel 2022-12-04 07:56:20 +01:00
parent 01ee066c62
commit 32b53a7fd6
21 changed files with 171 additions and 73 deletions
modules/applications

View file

@ -5,15 +5,30 @@ let
fastcopy = pkgs.tmuxPlugins.mkTmuxPlugin
{
pluginName = "fastcopy";
version = "unstable-2022-04-18";
version = "unstable-2022-11-16";
src = pkgs.fetchFromGitHub
{
owner = "abhinav";
repo = "tmux-fastcopy";
sha256 = "0d2xdch5w35mw3kpw1y6jy8wk4zj43pjx73jlx83ciqddl3975x6";
rev = "4b9bc8e9e71c5b6eeb44a02f608baec07e12ea3d";
sha256 = "1ald4ycgwj1fhk82yvsy951kgnn5im53fhsscz20hvjsqql7j4j3";
rev = "41f4c1c9fae7eb05c85ee2e248719f004dcfc90e";
};
};
cowboy = pkgs.tmuxPlugins.mkTmuxPlugin
{
pluginName = "cowboy";
version = "unstable-2021-05-11";
src = pkgs.fetchFromGitHub
{
owner = "tmux-plugins";
repo = "tmux-cowboy";
sha256 = "16wqwfaqy7nhiy1ijkng1x4baqq7s9if0m3ffcrnakza69s6r4r8";
rev = "75702b6d0a866769dd14f3896e9d19f7e0acd4f2";
};
};
muxile = pkgs.callPackage ./tmux/muxile.nix { };
in
{
home-manager.users.adrielus.programs = {
@ -33,6 +48,15 @@ in
sessionist # Nicer workflow for switching around between session
# fastcopy # Easy copying of stuff
resurrect # Save / restore tmux sessions
# muxile # Track tmux sessions on my phone
# cowboy # kill all hanging processes inside pane
{
plugin = continuum; # start tmux on boot & more
extraConfig = ''
set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
'';
}
];
extraConfig = ''
@ -45,3 +69,4 @@ in
};
};
}

View file

@ -0,0 +1,22 @@
{ pkgs, ... }:
let dependencies = [ pkgs.qrencode pkgs.jq pkgs.websocat ];
in
pkgs.tmuxPlugins.mkTmuxPlugin
{
pluginName = "muxile";
version = "unstable-2021-08-08";
src = pkgs.fetchFromGitHub
{
owner = "bjesus";
repo = "muxile";
sha256 = "12kmcyizzglr4r7nisjbjmwmw1g4hbwpkil53zzmq9wx60l8lwgb";
rev = "7310995ed1827844a528a32bb2d3a3694f1c4a0d";
};
nativeBuildInputs = [ pkgs.makeWrapper ];
postInstall = ''
for f in $target/scripts/*.sh; do
wrapProgram $f \
--prefix PATH : ${lib.makeBinPath dependencies}
done
'';
}

View file

@ -1,6 +1,6 @@
{-# LANGUAGE BlockArguments #-}
import Control.Monad (join)
import Control.Monad (forM_, join)
import Data.Function ((&))
import System.Environment
import System.Process
@ -29,7 +29,7 @@ main =
{ modMask = mod4Mask,
layoutHook = myLayoutHook,
startupHook = startup,
manageHook = manageDocks <+> myManagerHook <+> manageHook kdeConfig,
manageHook = manageDocks <+> manageSpawn <+> myManagerHook <+> manageHook kdeConfig,
handleEventHook = handleEventHook kdeConfig <+> fullscreenEventHook,
terminal = myTerminal,
workspaces = myWorkspaces,
@ -104,5 +104,13 @@ main =
layouts = tall ||| threeCols ||| Full
myLayoutHook = desktopLayoutModifiers $ spacingHook layouts
startupApps =
[ (0, "alacritty"),
(1, "google-chrome-stable"),
(2, "Discord")
]
startup :: X ()
startup = pure ()
startup = do
forM_ startupApps \(index, app) -> do
spawnOn (myWorkspaces !! index) app

View file

@ -1,10 +1,10 @@
{ pkgs, ... }: {
home-manager.users.adrielus = {
xsession.windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
config = ./Main.hs;
};
# xsession.windowManager.xmonad = {
# enable = true;
# enableContribAndExtras = true;
# config = ./Main.hs;
# };
home.packages = with pkgs; [ xwallpaper ];