Compare commits

...

5 commits

7 changed files with 99 additions and 46 deletions

View file

@ -7,4 +7,4 @@ set FZF_ALT_C_COMMAND "
command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' \\) -prune \
-o -type d -print 2> /dev/null | sed 's@^\./@@'"
fzf_key_bindings
bind \cr history-pager
# bind \cr history-pager

View file

@ -1,10 +1,8 @@
if ! "$REMOTE" && test "$(tty)" = /dev/tty1
doas mkdir -p /run/user
doas chmod 755 /run/user
set -gx XDG_RUNTIME_DIR "/run/user/$(id -u)"
doas mkdir -p "$XDG_RUNTIME_DIR"
doas chmod 700 "$XDG_RUNTIME_DIR"
doas chown "$(id -u):$(id -g)" "$XDG_RUNTIME_DIR"
run_sway
end
function run_sway
mkdir -p "$HOME/.local/share/sway"
set log "$HOME/.local/share/sway/$(date +%Y-%m-%d@%H:%M:%S).log"
@ -14,7 +12,6 @@ if ! "$REMOTE" && test "$(tty)" = /dev/tty1
end
exec env \
XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" \
XDG_CURRENT_DESKTOP=sway \
XDG_SESSION_DESKTOP=sway \
dbus-run-session sway >"$log" 2>&1

View file

@ -1,6 +1,7 @@
# theme = "monokai_pro"
# theme = "everforest_light"
theme = "autumn_night"
theme = "emacs"
[editor.lsp]
display-messages = true
[keys.normal]
C-r = [":config-reload"]

View file

@ -12,10 +12,7 @@ formatter = { command = 'prettier', args = ["--parser=typescript"] }
[[language]]
name = "html"
formatter = { command = 'prettier', args = ["--parser=html"] }
[[language]]
name = "html"
auto-format = false
formatter = { command = 'prettier', args = ["--parser=html"] }
[[language]]

View file

@ -9,51 +9,50 @@ map ctrl+shift+n new_os_window_with_cwd
## license: MIT
## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine.conf
## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist
foreground #e0def4
background #191724
selection_foreground #e0def4
selection_background #403d52
cursor #524f67
cursor_text_color #e0def4
url_color #c4a7e7
active_tab_foreground #e0def4
active_tab_background #26233a
inactive_tab_foreground #6e6a86
inactive_tab_background #191724
# foreground #e0def4
# background #191724
# selection_foreground #e0def4
# selection_background #403d52
# cursor #524f67
# cursor_text_color #e0def4
# url_color #c4a7e7
# active_tab_foreground #e0def4
# active_tab_background #26233a
# inactive_tab_foreground #6e6a86
# inactive_tab_background #191724
# black
color0 #26233a
color8 #6e6a86
# color0 #26233a
# color8 #6e6a86
# red
color1 #eb6f92
color9 #eb6f92
# color1 #eb6f92
# color9 #eb6f92
# green
color2 #31748f
color10 #31748f
# color2 #31748f
# color10 #31748f
# yellow
color3 #f6c177
color11 #f6c177
# color3 #f6c177
# color11 #f6c177
# blue
color4 #9ccfd8
color12 #9ccfd8
# color4 #9ccfd8
# color12 #9ccfd8
# magenta
color5 #c4a7e7
color13 #c4a7e7
# color5 #c4a7e7
# color13 #c4a7e7
# cyan
color6 #ebbcba
color14 #ebbcba
# color6 #ebbcba
# color14 #ebbcba
# white
color7 #e0def4
color15 #e0def4
# color7 #e0def4
# color15 #e0def4
include themes.conf

50
.local/bin/watch-dconf Executable file
View file

@ -0,0 +1,50 @@
#!/bin/sh
. ~/.profile
dconf_color_path=/org/gnome/desktop/interface/color-scheme
dconf_message_path=/org/gnome/shell/extensions/simple-message/message
switch_helix() {
sed -i 's/theme = ".*"/theme = "'$1'"/' ~/.config/helix/config.toml
}
switch_kitty() {
kitty +kitten themes --reload-in=all --config-file-name=themes.conf "$1"
}
light() {
switch_helix "emacs"
switch_kitty "Modus Operandi"
}
dark() {
switch_helix "autumn_night"
switch_kitty "Modus Vivendi"
}
switch_from_dconf() {
if test "$1" = prefer-dark; then
dark
else
light
fi
}
switch_from_dconf "$(dconf read "$dconf_color_path")"
(dconf watch "$dconf_color_path" | while read -r line; do
theme="$(echo "$line" | grep -E "'.*'" | sed "s/'//g")"
test -z "$theme" && continue
switch_from_dconf "$theme"
done) &
update_zeit() {
dconf write "$dconf_message_path" "'$(zeit tracking --no-colors)'"
echo updated zeit
}
update_zeit
(busybox inotifyd - "$ZEIT_DB":c | while read -r; do
update_zeit
done) &
while true; do
sleep 30
update_zeit
done

View file

@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0
Name=watch-dconf
Exec=watch-dconf
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true