mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: jenkins + darwin (and linting)
This commit is contained in:
parent
d2c8805e5b
commit
6338497d5f
42 changed files with 841 additions and 602 deletions
|
|
@ -1,36 +1,37 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
inherit (config.lib.stylix) colors;
|
||||
sesh = pkgs.writeScriptBin "sesh" ''
|
||||
#! /usr/bin/env sh
|
||||
_:
|
||||
# { pkgs, config, ... }:
|
||||
# let
|
||||
# inherit (config.lib.stylix) colors;
|
||||
# sesh = pkgs.writeScriptBin "sesh" ''
|
||||
# #! /usr/bin/env sh
|
||||
|
||||
# Taken from https://github.com/zellij-org/zellij/issues/884#issuecomment-1851136980
|
||||
# select a directory using zoxide
|
||||
ZOXIDE_RESULT=$(zoxide query --interactive)
|
||||
# checks whether a directory has been selected
|
||||
if [[ -z "$ZOXIDE_RESULT" ]]; then
|
||||
# if there was no directory, select returns without executing
|
||||
exit 0
|
||||
fi
|
||||
# extracts the directory name from the absolute path
|
||||
SESSION_TITLE=$(echo "$ZOXIDE_RESULT" | sed 's#.*/##')
|
||||
# # Taken from https://github.com/zellij-org/zellij/issues/884#issuecomment-1851136980
|
||||
# # select a directory using zoxide
|
||||
# ZOXIDE_RESULT=$(zoxide query --interactive)
|
||||
# # checks whether a directory has been selected
|
||||
# if [[ -z "$ZOXIDE_RESULT" ]]; then
|
||||
# # if there was no directory, select returns without executing
|
||||
# exit 0
|
||||
# fi
|
||||
# # extracts the directory name from the absolute path
|
||||
# SESSION_TITLE=$(echo "$ZOXIDE_RESULT" | sed 's#.*/##')
|
||||
|
||||
# get the list of sessions
|
||||
SESSION_LIST=$(zellij list-sessions -n | awk '{print $1}')
|
||||
# # get the list of sessions
|
||||
# SESSION_LIST=$(zellij list-sessions -n | awk '{print $1}')
|
||||
|
||||
# checks if SESSION_TITLE is in the session list
|
||||
if echo "$SESSION_LIST" | grep -q "^$SESSION_TITLE$"; then
|
||||
# if so, attach to existing session
|
||||
zellij attach "$SESSION_TITLE"
|
||||
else
|
||||
# if not, create a new session
|
||||
echo "Creating new session $SESSION_TITLE and CD $ZOXIDE_RESULT"
|
||||
cd $ZOXIDE_RESULT
|
||||
zellij attach -c "$SESSION_TITLE"
|
||||
fi
|
||||
'';
|
||||
# # checks if SESSION_TITLE is in the session list
|
||||
# if echo "$SESSION_LIST" | grep -q "^$SESSION_TITLE$"; then
|
||||
# # if so, attach to existing session
|
||||
# zellij attach "$SESSION_TITLE"
|
||||
# else
|
||||
# # if not, create a new session
|
||||
# echo "Creating new session $SESSION_TITLE and CD $ZOXIDE_RESULT"
|
||||
# cd $ZOXIDE_RESULT
|
||||
# zellij attach -c "$SESSION_TITLE"
|
||||
# fi
|
||||
# '';
|
||||
|
||||
in
|
||||
# in
|
||||
{
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue