feat: sioye config
This commit is contained in:
parent
3cc16b3e9d
commit
d969b351f1
8 changed files with 142 additions and 45 deletions
19
config/sioyek/keys_user.config
Normal file
19
config/sioyek/keys_user.config
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
previous_page k
|
||||
next_page j
|
||||
|
||||
move_down J
|
||||
move_up K
|
||||
move_left l
|
||||
move_right h
|
||||
|
||||
zoom_in =
|
||||
zoom_out -
|
||||
|
||||
fit_to_page_height_smart s
|
||||
fit_to_page_width S
|
||||
|
||||
toggle_presentation_mode T
|
||||
toggle_dark_mode d
|
||||
toggle_statusbar b
|
||||
|
||||
close_window q
|
||||
10
config/sioyek/prefs_user.config
Normal file
10
config/sioyek/prefs_user.config
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
wheel_zoom_on_cursor 1
|
||||
startup_commands toggle_presentation_mode; show_statusbar 0
|
||||
|
||||
page_separator_width 10
|
||||
should_launch_new_window 1
|
||||
|
||||
source ~/.config/sioyek/themes/theme.config
|
||||
|
||||
font_size 18
|
||||
status_bar_font_size 18
|
||||
21
config/sioyek/themes/daylight.config
Normal file
21
config/sioyek/themes/daylight.config
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
background_color 0.961 0.961 0.961
|
||||
custom_background_color 0.961 0.961 0.961
|
||||
text_highlight_color 0.922 0.922 0.922
|
||||
visual_mark_color 0.922 0.922 0.922 1.0
|
||||
custom_text_color 0.102 0.102 0.102
|
||||
ui_text_color 0.102 0.102 0.102
|
||||
ui_selected_text_color 0.102 0.102 0.102
|
||||
link_highlight_color 0.298 0.431 0.961
|
||||
search_highlight_color 0.298 0.431 0.961
|
||||
synctex_highlight_color 0.298 0.431 0.961
|
||||
highlight_color_a 0.231 0.357 0.859
|
||||
highlight_color_b 0.176 0.498 0.243
|
||||
highlight_color_c 0.600 0.408 0.000
|
||||
highlight_color_d 0.780 0.145 0.306
|
||||
highlight_color_e 0.682 0.243 0.788
|
||||
highlight_color_f 0.063 0.596 0.678
|
||||
highlight_color_g 0.961 0.624 0.000
|
||||
ui_background_color 0.922 0.922 0.922
|
||||
ui_selected_background_color 0.298 0.431 0.961
|
||||
status_bar_color 0.961 0.961 0.961
|
||||
status_bar_text_color 0.102 0.102 0.102
|
||||
22
config/sioyek/themes/midnight.config
Normal file
22
config/sioyek/themes/midnight.config
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
background_color 0.071 0.071 0.071
|
||||
custom_background_color 0.071 0.071 0.071
|
||||
text_highlight_color 0.176 0.176 0.176
|
||||
visual_mark_color 0.176 0.176 0.176 1.0
|
||||
custom_text_color 0.878 0.878 0.878
|
||||
ui_text_color 0.878 0.878 0.878
|
||||
ui_selected_text_color 0.878 0.878 0.878
|
||||
link_highlight_color 0.616 0.722 0.969
|
||||
search_highlight_color 0.616 0.722 0.969
|
||||
synctex_highlight_color 0.616 0.722 0.969
|
||||
highlight_color_a 0.478 0.635 0.969
|
||||
highlight_color_b 0.596 0.765 0.475
|
||||
highlight_color_c 0.898 0.753 0.482
|
||||
highlight_color_d 1.000 0.420 0.420
|
||||
highlight_color_e 0.776 0.471 0.867
|
||||
highlight_color_f 0.337 0.714 0.761
|
||||
highlight_color_g 0.941 0.820 0.592
|
||||
ui_background_color 0.071 0.071 0.071
|
||||
ui_selected_background_color 0.478 0.635 0.969
|
||||
status_bar_color 0.071 0.071 0.071
|
||||
status_bar_text_color 0.878 0.878 0.878
|
||||
startup_commands toggle_dark_mode
|
||||
|
|
@ -13,31 +13,40 @@ let
|
|||
enableSioyek = true;
|
||||
enableVesktop = true;
|
||||
enableNeovim = config.programs.neovim.enable;
|
||||
|
||||
sioyek-wrapped = pkgs.symlinkJoin {
|
||||
name = "sioyek";
|
||||
paths = [ pkgs.sioyek ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/sioyek \
|
||||
--set QT_QPA_PLATFORM xcb
|
||||
'';
|
||||
};
|
||||
|
||||
repoDir = "${config.home.homeDirectory}/.config/nix";
|
||||
in
|
||||
{
|
||||
home.sessionVariables =
|
||||
lib.optionalAttrs enableZen {
|
||||
BROWSER = "zen";
|
||||
}
|
||||
// lib.optionalAttrs enableClaude {
|
||||
CLAUDE_CONFIG_DIR = "${config.xdg.configHome}/claude";
|
||||
};
|
||||
home.sessionVariables = lib.mkMerge [
|
||||
(lib.mkIf enableZen { BROWSER = "zen"; })
|
||||
(lib.mkIf enableClaude { CLAUDE_CONFIG_DIR = "${config.xdg.configHome}/claude"; })
|
||||
];
|
||||
|
||||
programs.mpv.enable = true;
|
||||
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
home.packages = lib.mkMerge [
|
||||
(with pkgs; [
|
||||
signal-desktop
|
||||
slack
|
||||
bitwarden-desktop
|
||||
gemini-cli
|
||||
typst
|
||||
]
|
||||
++ lib.optionals enableClaude [ claude-code ]
|
||||
++ lib.optionals enableZen [ zen-browser.packages.${hostPlatform}.default ]
|
||||
++ lib.optionals enableSioyek [ sioyek ]
|
||||
++ lib.optionals enableVesktop [ vesktop ];
|
||||
])
|
||||
(lib.mkIf enableClaude [ pkgs.claude-code ])
|
||||
(lib.mkIf enableZen [ zen-browser.packages.${hostPlatform}.default ])
|
||||
(lib.mkIf enableSioyek [ sioyek-wrapped ])
|
||||
(lib.mkIf enableVesktop [ pkgs.vesktop ])
|
||||
];
|
||||
|
||||
xdg.configFile."claude/settings.json" = lib.mkIf enableClaude {
|
||||
text = builtins.toJSON {
|
||||
|
|
@ -53,21 +62,37 @@ in
|
|||
};
|
||||
|
||||
xdg.configFile."claude/CLAUDE.md" = lib.mkIf enableClaude {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/nix/config/claude/CLAUDE.md";
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${repoDir}/config/claude/CLAUDE.md";
|
||||
};
|
||||
|
||||
xdg.configFile."claude/rules" = lib.mkIf enableClaude {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/nix/config/claude/rules";
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${repoDir}/config/claude/rules";
|
||||
};
|
||||
|
||||
xdg.configFile."claude/skills" = lib.mkIf enableClaude {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/nix/config/claude/skills";
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${repoDir}/config/claude/skills";
|
||||
};
|
||||
|
||||
xdg.configFile."sioyek/keys_user.config" = lib.mkIf enableSioyek {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${repoDir}/config/sioyek/keys_user.config";
|
||||
};
|
||||
|
||||
xdg.configFile."sioyek/prefs_user.config" = lib.mkIf enableSioyek {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${repoDir}/config/sioyek/prefs_user.config";
|
||||
};
|
||||
|
||||
xdg.configFile."sioyek/themes/midnight.config" = lib.mkIf enableSioyek {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${repoDir}/config/sioyek/themes/midnight.config";
|
||||
};
|
||||
|
||||
xdg.configFile."sioyek/themes/daylight.config" = lib.mkIf enableSioyek {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${repoDir}/config/sioyek/themes/daylight.config";
|
||||
};
|
||||
|
||||
home.activation.linkZenProfile = lib.mkIf enableZen (
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
zen_config="$HOME/.zen"
|
||||
repo_zen="${config.home.homeDirectory}/.config/nix/config/zen"
|
||||
repo_zen="${repoDir}/config/zen"
|
||||
|
||||
if [ ! -d "$zen_config" ]; then
|
||||
exit 0
|
||||
|
|
@ -114,22 +139,22 @@ in
|
|||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications =
|
||||
{ }
|
||||
// lib.optionalAttrs enableZen {
|
||||
defaultApplications = lib.mkMerge [
|
||||
(lib.mkIf enableZen {
|
||||
"x-scheme-handler/http" = "zen.desktop";
|
||||
"x-scheme-handler/https" = "zen.desktop";
|
||||
"text/html" = "zen.desktop";
|
||||
}
|
||||
// lib.optionalAttrs enableNeovim {
|
||||
})
|
||||
(lib.mkIf enableNeovim {
|
||||
"text/plain" = "nvim.desktop";
|
||||
}
|
||||
// lib.optionalAttrs enableSioyek {
|
||||
})
|
||||
(lib.mkIf enableSioyek {
|
||||
"application/pdf" = "sioyek.desktop";
|
||||
"application/epub+zip" = "sioyek.desktop";
|
||||
}
|
||||
// lib.optionalAttrs enableVesktop {
|
||||
})
|
||||
(lib.mkIf enableVesktop {
|
||||
"x-scheme-handler/discord" = "vesktop.desktop";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ in
|
|||
$DRY_RUN_CMD ln -sf "$cfg/hypr/themes/$theme.conf" "$cfg/hypr/themes/theme.conf"
|
||||
$DRY_RUN_CMD ln -sf "$cfg/waybar/themes/$theme.css" "$cfg/waybar/themes/theme.css"
|
||||
$DRY_RUN_CMD ln -sf "$cfg/rofi/themes/$theme.rasi" "$cfg/rofi/themes/theme.rasi"
|
||||
$DRY_RUN_CMD ln -sf "$cfg/sioyek/themes/$theme.config" "$cfg/sioyek/themes/theme.config"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,10 +86,10 @@ parse() {
|
|||
V+=(${#sets[@]})
|
||||
sets+=("${OPTARG:1}")
|
||||
else
|
||||
((OPTARG >= 0 && OPTARG < ${#sets[@]})) && V+=($OPTARG)
|
||||
((OPTARG >= 0 && OPTARG < ${#sets[@]})) && V+=("$OPTARG")
|
||||
fi
|
||||
;;
|
||||
c) [[ $OPTARG =~ ^[0-7]$ ]] && C+=($OPTARG);;
|
||||
c) [[ $OPTARG =~ ^[0-7]$ ]] && C+=("$OPTARG");;
|
||||
f) ((f = (OPTARG > 19 && OPTARG < 101) ? OPTARG : f));;
|
||||
s) ((s = (OPTARG > 4 && OPTARG < 16) ? OPTARG : s));;
|
||||
r) ((r = (OPTARG >= 0) ? OPTARG : r));;
|
||||
|
|
@ -97,7 +97,7 @@ parse() {
|
|||
B) BOLD=0;;
|
||||
C) NOCOLOR=1;;
|
||||
K) KEEPCT=1;;
|
||||
h) echo -e "Usage: $(basename $0) [OPTION]..."
|
||||
h) echo -e "Usage: $(basename "$0") [OPTION]..."
|
||||
echo -e "Animated pipes terminal screensaver.\n"
|
||||
echo -e " -p [1-]\tnumber of pipes (D=1)."
|
||||
echo -e " -t [0-$((${#sets[@]} - 1))]\ttype of pipes, can be used more than once (D=0)."
|
||||
|
|
@ -115,6 +115,10 @@ parse() {
|
|||
exit 0;;
|
||||
v) echo "$(basename -- "$0") $VERSION"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
|
@ -128,7 +132,7 @@ parse() {
|
|||
|
||||
cleanup() {
|
||||
# clear out standard input
|
||||
read -t 0.001 && cat </dev/stdin>/dev/null
|
||||
read -r -t 0.001 && cat </dev/stdin>/dev/null
|
||||
|
||||
# terminal has no smcup and rmcup capabilities
|
||||
((FORCE_RESET)) && reset && exit 0
|
||||
|
|
@ -182,7 +186,7 @@ main() {
|
|||
# any key press exits the loop and this script
|
||||
trap 'break 2' INT
|
||||
while REPLY=; do
|
||||
read -t 0.0$((1000 / f)) -n 1 2>/dev/null
|
||||
read -r -t 0.0$((1000 / f)) -n 1 2>/dev/null
|
||||
case "$REPLY" in
|
||||
P) ((s = s < 15 ? s + 1 : s));;
|
||||
O) ((s = s > 3 ? s - 1 : s));;
|
||||
|
|
@ -210,7 +214,7 @@ main() {
|
|||
((n[i] = (n[i] < 0) ? 3 : n[i] % 4))
|
||||
|
||||
# Print:
|
||||
tput cup ${y[i]} ${x[i]}
|
||||
tput cup "${y[i]} ${x[i]}"
|
||||
echo -ne "\e[${BOLD}m"
|
||||
((NOCOLOR)) && echo -ne "\e[0m" || echo -ne "\e[3${c[i]}m"
|
||||
echo -n "${sets[v[i]]:l[i]*4+n[i]:1}"
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ require gsettings
|
|||
themes="daylight
|
||||
midnight"
|
||||
|
||||
# --- Selection ---
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
theme="$1"
|
||||
else
|
||||
|
|
@ -50,8 +48,6 @@ fi
|
|||
[ -z "$theme" ] && exit 1
|
||||
echo "$themes" | grep -Fxq "$theme" || exit 1
|
||||
|
||||
# --- Platform ---
|
||||
|
||||
case "$(uname)" in
|
||||
Linux)
|
||||
# GTK color scheme
|
||||
|
|
@ -60,7 +56,6 @@ Linux)
|
|||
daylight) gsettings set org.gnome.desktop.interface color-scheme 'prefer-light' ;;
|
||||
esac
|
||||
|
||||
# Hyprland: runtime border colors + waybar
|
||||
if [ "$XDG_CURRENT_DESKTOP" = "Hyprland" ] && command -v hyprctl >/dev/null 2>&1; then
|
||||
case "$theme" in
|
||||
midnight)
|
||||
|
|
@ -90,6 +85,11 @@ Linux)
|
|||
[ -f "$hypr_themes/$theme.conf" ] && {
|
||||
ln -sf "$hypr_themes/$theme.conf" "$hypr_themes/theme.conf"
|
||||
}
|
||||
|
||||
sioyek_themes="$cfg/sioyek/themes"
|
||||
[ -f "$sioyek_themes/$theme.config" ] && {
|
||||
ln -sf "$sioyek_themes/$theme.config" "$sioyek_themes/theme.config"
|
||||
}
|
||||
fi
|
||||
;;
|
||||
Darwin)
|
||||
|
|
@ -100,16 +100,12 @@ Darwin)
|
|||
;;
|
||||
esac
|
||||
|
||||
# --- Cross-platform ---
|
||||
|
||||
# Tmux
|
||||
if [ -n "$TMUX" ]; then
|
||||
tmux_themes="${XDG_CONFIG_HOME:-$HOME/.config}/tmux/themes"
|
||||
[ -f "$tmux_themes/$theme.conf" ] && tmux source "$tmux_themes/$theme.conf"
|
||||
tmux setenv -g THEME "$theme"
|
||||
fi
|
||||
|
||||
# Claude CLI
|
||||
if command -v claude >/dev/null 2>&1 && command -v jq >/dev/null 2>&1; then
|
||||
CLAUDE_CONFIG="${CLAUDE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/claude}/.claude.json"
|
||||
case "$theme" in
|
||||
|
|
@ -122,7 +118,6 @@ if command -v claude >/dev/null 2>&1 && command -v jq >/dev/null 2>&1; then
|
|||
}
|
||||
fi
|
||||
|
||||
# Neovim instances
|
||||
for socket in /run/user/"$(id -u)"/nvim.*.0 /tmp/nvim-*.sock; do
|
||||
[ -S "$socket" ] && nvim --server "$socket" --remote-expr "luaeval('require(\"config.fzf_reload\").reload()')" 2>/dev/null || true
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue