fix(sioyek,fuzzel): inline configs

This commit is contained in:
Barrett Ruth 2026-02-14 23:19:40 -05:00
parent d5f0ec9d24
commit c1dd316a9a
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
7 changed files with 124 additions and 108 deletions

View file

@ -1,30 +0,0 @@
include=~/.config/fuzzel/themes/theme.ini
[main]
font=SF Pro Display:size=12,Symbols Nerd Font:size=12
prompt=""
width=50
lines=10
horizontal-pad=24
vertical-pad=20
inner-pad=12
line-height=24
letter-spacing=0
icons-enabled=yes
icon-theme=Papirus
image-size-ratio=0.5
layer=overlay
anchor=center
match-mode=fzf
dpi-aware=auto
hide-before-typing=no
match-counter=no
[border]
width=2
radius=0
selection-radius=0
[dmenu]
mode=text
exit-immediately-if-empty=no

View file

@ -1,19 +0,0 @@
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

View file

@ -1,10 +0,0 @@
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

View file

@ -1,21 +0,0 @@
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

View file

@ -1,22 +0,0 @@
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

View file

@ -17,6 +17,63 @@ let
claude = true;
signal = true;
hexDigit =
c:
{
"0" = 0; "1" = 1; "2" = 2; "3" = 3; "4" = 4;
"5" = 5; "6" = 6; "7" = 7; "8" = 8; "9" = 9;
"a" = 10; "b" = 11; "c" = 12; "d" = 13; "e" = 14; "f" = 15;
}
.${c};
hexByte = hex: offset:
hexDigit (builtins.substring offset 1 hex) * 16
+ hexDigit (builtins.substring (offset + 1) 1 hex);
pad3 =
n:
if n < 10 then "00${toString n}"
else if n < 100 then "0${toString n}"
else toString n;
byteToFloat =
n:
let
scaled = (n * 1000 + 127) / 255;
in
"${toString (scaled / 1000)}.${pad3 (scaled - (scaled / 1000) * 1000)}";
hexToRgb =
hex:
"${byteToFloat (hexByte hex 1)} ${byteToFloat (hexByte hex 3)} ${byteToFloat (hexByte hex 5)}";
mkSioyekTheme =
palette: isDark:
''
background_color ${hexToRgb palette.bg}
custom_background_color ${hexToRgb palette.bg}
text_highlight_color ${hexToRgb palette.bgAlt}
visual_mark_color ${hexToRgb palette.bgAlt} 1.0
custom_text_color ${hexToRgb palette.fg}
ui_text_color ${hexToRgb palette.fg}
ui_selected_text_color ${hexToRgb palette.fg}
link_highlight_color ${hexToRgb palette.accent}
search_highlight_color ${hexToRgb palette.accent}
synctex_highlight_color ${hexToRgb palette.accent}
highlight_color_a ${hexToRgb palette.blue}
highlight_color_b ${hexToRgb palette.green}
highlight_color_c ${hexToRgb palette.yellow}
highlight_color_d ${hexToRgb palette.red}
highlight_color_e ${hexToRgb palette.magenta}
highlight_color_f ${hexToRgb palette.cyan}
highlight_color_g ${hexToRgb palette.yellow}
ui_background_color ${hexToRgb palette.bg}
ui_selected_background_color ${hexToRgb palette.accent}
status_bar_color ${hexToRgb palette.bg}
status_bar_text_color ${hexToRgb palette.fg}
''
+ lib.optionalString isDark "startup_commands toggle_dark_mode\n";
sioyek-wrapped = pkgs.symlinkJoin {
name = "sioyek";
paths = [ pkgs.sioyek ];
@ -81,19 +138,50 @@ in
};
xdg.configFile."sioyek/keys_user.config" = lib.mkIf sioyek {
source = config.lib.file.mkOutOfStoreSymlink "${repoDir}/config/sioyek/keys_user.config";
text = ''
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
'';
};
xdg.configFile."sioyek/prefs_user.config" = lib.mkIf sioyek {
source = config.lib.file.mkOutOfStoreSymlink "${repoDir}/config/sioyek/prefs_user.config";
text = ''
wheel_zoom_on_cursor 1
startup_commands toggle_presentation_mode; show_statusbar 0
page_separator_width 10
should_launch_new_window 1
source ${config.xdg.configHome}/sioyek/themes/theme.config
font_size 18
status_bar_font_size 18
'';
};
xdg.configFile."sioyek/themes/midnight.config" = lib.mkIf sioyek {
source = config.lib.file.mkOutOfStoreSymlink "${repoDir}/config/sioyek/themes/midnight.config";
text = mkSioyekTheme config.palettes.midnight true;
};
xdg.configFile."sioyek/themes/daylight.config" = lib.mkIf sioyek {
source = config.lib.file.mkOutOfStoreSymlink "${repoDir}/config/sioyek/themes/daylight.config";
text = mkSioyekTheme config.palettes.daylight false;
};
home.activation.linkZenProfile = lib.mkIf (zen && hostConfig.isLinux) (

View file

@ -311,8 +311,38 @@ in
xdg.configFile."waybar/themes/midnight.css".text = mkWaybarTheme config.palettes.midnight;
xdg.configFile."waybar/themes/daylight.css".text = mkWaybarTheme config.palettes.daylight;
xdg.configFile."fuzzel/fuzzel.ini".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/nix/config/fuzzel/fuzzel.ini";
xdg.configFile."fuzzel/fuzzel.ini".text = ''
include=${config.xdg.configHome}/fuzzel/themes/theme.ini
[main]
font=SF Pro Display:size=12,Symbols Nerd Font:size=12
prompt=""
width=50
lines=10
horizontal-pad=24
vertical-pad=20
inner-pad=12
line-height=24
letter-spacing=0
icons-enabled=yes
icon-theme=Papirus
image-size-ratio=0.5
layer=overlay
anchor=center
match-mode=fzf
dpi-aware=auto
hide-before-typing=no
match-counter=no
[border]
width=2
radius=0
selection-radius=0
[dmenu]
mode=text
exit-immediately-if-empty=no
'';
xdg.configFile."fuzzel/themes/midnight.ini".text = mkFuzzelTheme config.palettes.midnight;
xdg.configFile."fuzzel/themes/daylight.ini".text = mkFuzzelTheme config.palettes.daylight;