mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
Compare commits
3 commits
efdba54fc4
...
29c4ca1a81
| Author | SHA1 | Date | |
|---|---|---|---|
| 29c4ca1a81 | |||
| eac1c86fe8 | |||
| 156181fc14 |
4 changed files with 11 additions and 24 deletions
|
|
@ -38,5 +38,6 @@
|
||||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||||
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
|
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
|
||||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }
|
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||||
|
"vimtex": { "branch": "master", "commit": "2e1bbabeb2c34bb17d7bc8cfdf8f95b16dd0db0c" }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,12 @@ local plugins = {
|
||||||
},
|
},
|
||||||
-- The haskell lexer
|
-- The haskell lexer
|
||||||
"vim-scripts/alex.vim",
|
"vim-scripts/alex.vim",
|
||||||
|
{
|
||||||
|
-- https://github.com/lervag/vimtex#lazynvim
|
||||||
|
"lervag/vimtex",
|
||||||
|
lazy = false,
|
||||||
|
version = "^2",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
branch = "0.1.x",
|
branch = "0.1.x",
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
device, # obtain with `xrandr`
|
device, # obtain with `xrandr`
|
||||||
brightness, # [0..1]
|
brightness, # [0..1]
|
||||||
}:
|
}:
|
||||||
singleton "10_xrandr_brightness" ''
|
singleton "10_xrandr_brightness" /* bash */ ''
|
||||||
${lib.getExe pkgs.xorg.xrandr} --output ${device} --brightness ${toString brightness}
|
${lib.getExe pkgs.xorg.xrandr} --output ${device} --brightness ${toString brightness}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
modelName, # obtain with `ddcutil detect`
|
modelName, # obtain with `ddcutil detect`
|
||||||
brightness, # [0..1]
|
brightness, # [0..1]
|
||||||
}:
|
}:
|
||||||
singleton "10_ddc_brightness" ''
|
singleton "10_ddc_brightness" /* bash */ ''
|
||||||
${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 10 ${
|
${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 10 ${
|
||||||
toString (builtins.floor (brightness * 100))
|
toString (builtins.floor (brightness * 100))
|
||||||
}
|
}
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
modelName, # obtain with `ddcutil detect`
|
modelName, # obtain with `ddcutil detect`
|
||||||
contrast, # [0..1]
|
contrast, # [0..1]
|
||||||
}:
|
}:
|
||||||
singleton "10_ddc_contrast" ''
|
singleton "10_ddc_contrast" /* bash */ ''
|
||||||
${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 12 ${
|
${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 12 ${
|
||||||
toString (builtins.floor (contrast * 100))
|
toString (builtins.floor (contrast * 100))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,24 +8,6 @@
|
||||||
symlinkJoin,
|
symlinkJoin,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
tmux-register-session = writeShellApplication {
|
|
||||||
name = "__tmux-register-session";
|
|
||||||
runtimeInputs = [ tmux ];
|
|
||||||
text = ''
|
|
||||||
last=/tmp/TMUX_LAST
|
|
||||||
|
|
||||||
# bail if tmux not running
|
|
||||||
if ! pgrep tmux >/dev/null 2>&1; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
this="$(tmux display-message -p '#S')"
|
|
||||||
if [ ! -f "$last" ] || [ "$(cat "$last")" != "$this" ]; then
|
|
||||||
echo "$this" >"$last"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
tmux-maybe-create = writeShellApplication {
|
tmux-maybe-create = writeShellApplication {
|
||||||
name = "__tmux-maybe-create";
|
name = "__tmux-maybe-create";
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
|
|
@ -94,7 +76,6 @@ let
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# effects
|
# effects
|
||||||
${lib.getExe tmux-register-session} || :
|
|
||||||
${lib.getExe tmux-maybe-create} "$session_name" "$selected"
|
${lib.getExe tmux-maybe-create} "$session_name" "$selected"
|
||||||
${lib.getExe tmux-attach-or-switch} "$session_name"
|
${lib.getExe tmux-attach-or-switch} "$session_name"
|
||||||
'';
|
'';
|
||||||
|
|
@ -103,7 +84,6 @@ in
|
||||||
symlinkJoin {
|
symlinkJoin {
|
||||||
name = "tmux-sessionizer";
|
name = "tmux-sessionizer";
|
||||||
paths = [
|
paths = [
|
||||||
tmux-register-session
|
|
||||||
tmux-maybe-create
|
tmux-maybe-create
|
||||||
tmux-attach-or-switch
|
tmux-attach-or-switch
|
||||||
tmux-sessionizer
|
tmux-sessionizer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue