From f76d84ce7e80bb83ea19735b7a191257d097ade7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czy=C5=BC?= Date: Mon, 30 Jun 2025 22:28:56 +0200 Subject: [PATCH] feat: new theming --- .config/btop/btop.conf | 4 +- .config/fish/config.fish | 10 ++++ .config/gtk-3.0/settings.ini | 6 +-- .config/gtk-4.0/settings.ini | 5 ++ .config/helix/config.toml | 71 +++++++++++++++++++++++++++- .config/mimeapps.list | 8 +++- .config/qt5ct/qt5ct.conf | 4 +- .config/wezterm/wezterm.lua | 2 +- .local/bin/dark | 89 +++++++++++++++++++++++++++++++++++ .local/bin/light | 90 ++++++++++++++++++++++++++++++++++++ .xinitrc | 5 ++ 11 files changed, 283 insertions(+), 11 deletions(-) create mode 100755 .local/bin/dark create mode 100755 .local/bin/light diff --git a/.config/btop/btop.conf b/.config/btop/btop.conf index 0b6efb5..9b4abd9 100644 --- a/.config/btop/btop.conf +++ b/.config/btop/btop.conf @@ -1,4 +1,4 @@ -#? Config file for btop v. 1.4.2 +#? Config file for btop v. 1.4.3 #* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. #* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" @@ -57,7 +57,7 @@ update_ms = 2000 #* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", #* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. -proc_sorting = "cpu lazy" +proc_sorting = "memory" #* Reverse sorting order, True or False. proc_reversed = False diff --git a/.config/fish/config.fish b/.config/fish/config.fish index bd4b322..799f3ac 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -63,3 +63,13 @@ alias hxd "hx ~/.files/" alias hxc "hx ~/code/" alias vim "nvim" alias vi "nvim" + +# pnpm +set -gx PNPM_HOME "/home/mike/.local/share/pnpm" +if not string match -q -- $PNPM_HOME $PATH + set -gx PATH "$PNPM_HOME" $PATH +end +# pnpm end + +# Created by `pipx` on 2025-06-04 15:36:28 +set PATH $PATH /home/mike/.local/bin diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini index e1032d5..c4f7c1a 100644 --- a/.config/gtk-3.0/settings.ini +++ b/.config/gtk-3.0/settings.ini @@ -4,10 +4,10 @@ gtk-icon-theme-name=Papirus-Dark gtk-font-name=Cantarell 11 gtk-cursor-theme-name=elementary gtk-cursor-theme-size=24 -gtk-toolbar-style=GTK_TOOLBAR_BOTH +gtk-toolbar-style=GTK_TOOLBAR_ICONS gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR -gtk-button-images=1 -gtk-menu-images=1 +gtk-button-images=0 +gtk-menu-images=0 gtk-enable-event-sounds=1 gtk-enable-input-feedback-sounds=0 gtk-xft-antialias=1 diff --git a/.config/gtk-4.0/settings.ini b/.config/gtk-4.0/settings.ini index 29322c1..9459f1f 100644 --- a/.config/gtk-4.0/settings.ini +++ b/.config/gtk-4.0/settings.ini @@ -1,2 +1,7 @@ [Settings] +gtk-theme-name=Rosepine-Dark +gtk-icon-theme-name=Papirus-Dark +gtk-font-name=Cantarell 11 +gtk-cursor-theme-name=elementary +gtk-cursor-theme-size=24 gtk-application-prefer-dark-theme=1 diff --git a/.config/helix/config.toml b/.config/helix/config.toml index 26b26f1..e7c276a 100755 --- a/.config/helix/config.toml +++ b/.config/helix/config.toml @@ -1,9 +1,78 @@ -theme = "gruvbox_dark_soft" +theme = "rose_pine" + +[editor] +mouse = true +auto-save = true +bufferline = "always" +cursorline = true +rulers = [80, 120] +true-color = true +end-of-line-diagnostics = "hint" + +[editor.inline-diagnostics] +cursor-line = "error" +other-lines = "disable" [editor.cursor-shape] insert = "bar" normal = "block" select = "underline" +[editor.soft-wrap] +enable = true +wrap-indicator = "↩ " + +[editor.whitespace.render] +space = "all" +tab = "all" +newline = "none" + +[editor.whitespace.characters] +space = " " +nbsp = "⍽" +tab = "→" +newline = "⏎" +tabpad = "·" + +[editor.indent-guides] +character = "╎" +render = true +skip-levels = 1 + [editor.file-picker] hidden = false + +[editor.lsp] +auto-signature-help = false +display-messages = true + +[editor.statusline] +left = [ "mode", "spinner", "diagnostics" ] +center = [ "file-name", "separator", "version-control", "separator" ] +right = [ "position", "position-percentage", "total-line-numbers" ] +separator = "│" +mode.normal = "NORMAL" +mode.insert = "INSERT" +mode.select = "SELECT" + +[keys.normal] +"A-," = "goto_previous_buffer" +"A-." = "goto_next_buffer" +"A-w" = ":buffer-close" +"A-/" = "repeat_last_motion" +"A-x" = "extend_to_line_bounds" +"X" = "select_line_above" +";" = "command_mode" +"C-tab" = ":buffer-previous" +"C-S-tab" = ":buffer-next" +"C-r" = ":config-reload" + +space.c = "toggle_comments" + +p = "paste_clipboard_before" +y = "yank_main_selection_to_clipboard" + +[keys.select] +"A-x" = "extend_to_line_bounds" +"X" = "select_line_above" + diff --git a/.config/mimeapps.list b/.config/mimeapps.list index 6f567e9..77f46d1 100644 --- a/.config/mimeapps.list +++ b/.config/mimeapps.list @@ -6,9 +6,11 @@ image/png=feh.desktop; text/html=vim.desktop; application/pdf=okularApplication_pdf.desktop; video/x-matroska=mpv.desktop; -x-scheme-handler/mailto=userapp-Evolution-ZIODU2.desktop;userapp-Evolution-RB4MU2.desktop; +x-scheme-handler/mailto=userapp-Thunderbird-EIOL62.desktop;userapp-Evolution-ZIODU2.desktop;userapp-Evolution-RB4MU2.desktop; x-scheme-handler/tonsite=org.telegram.desktop.desktop; text/markdown=dev.zed.Zed.desktop; +x-scheme-handler/mid=userapp-Thunderbird-EIOL62.desktop; +text/plain=dev.zed.Zed.desktop; [Default Applications] application/pdf=xreader.desktop; @@ -36,7 +38,7 @@ x-scheme-handler/spice=org.remmina.Remmina.desktop; x-scheme-handler/terminal=kitty.desktop; x-scheme-handler/vnc=org.remmina.Remmina.desktop; video/x-matroska=mpv.desktop -x-scheme-handler/mailto=userapp-Evolution-RB4MU2.desktop +x-scheme-handler/mailto=userapp-Thunderbird-EIOL62.desktop x-scheme-handler/tonsite=org.telegram.desktop.desktop x-scheme-handler/mailspring=Mailspring.desktop text/markdown=dev.zed.Zed.desktop @@ -46,3 +48,5 @@ x-scheme-handler/about=brave-browser.desktop x-scheme-handler/unknown=brave-browser.desktop x-scheme-handler/discord=equibop.desktop application/uproject=com.epicgames.UnrealEngineEditor.desktop +message/rfc822=userapp-Thunderbird-EIOL62.desktop +x-scheme-handler/mid=userapp-Thunderbird-EIOL62.desktop diff --git a/.config/qt5ct/qt5ct.conf b/.config/qt5ct/qt5ct.conf index 62acbed..f60c198 100644 --- a/.config/qt5ct/qt5ct.conf +++ b/.config/qt5ct/qt5ct.conf @@ -3,7 +3,7 @@ color_scheme_path=/usr/share/qt5ct/colors/airy.conf custom_palette=false icon_theme=Papirus-Light standard_dialogs=default -style=kvantum-dark +style=rose-pine [Fonts] fixed="Noto Sans,10,-1,5,50,0,0,0,0,0,Regular" @@ -25,7 +25,7 @@ underline_shortcut=1 wheel_scroll_lines=3 [SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\x1h\0\0\t\xd5\0\0\x6\xb3\0\0\0\0\0\0\x1h\0\0\t\xd5\0\0\x6\xb3\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\x1h\0\0\t\xd5\0\0\x6\xb3) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\r\x1\0\0\0\x34\0\0\x11`\0\0\x2\xda\0\0\r\x2\0\0\0\x35\0\0\x11_\0\0\x2\xd9\0\0\0\0\0\0\0\0\n\0\0\0\r\x2\0\0\0\x35\0\0\x11_\0\0\x2\xd9) [Troubleshooting] force_raster_widgets=1 diff --git a/.config/wezterm/wezterm.lua b/.config/wezterm/wezterm.lua index a0a02b2..6ea0eed 100644 --- a/.config/wezterm/wezterm.lua +++ b/.config/wezterm/wezterm.lua @@ -28,7 +28,7 @@ config.keys = { local theme = wezterm.plugin.require('https://github.com/neapsix/wezterm').main -- This is where you actually apply your config choices --- config.color_scheme = 'batman' +-- config.color_scheme = "rose-pine" -- the font is named 'Source Code Pro ExtraLight', but I actually use the DemiBold weight. looks awesome config.font = wezterm.font('Hack Nerd Font') config.colors = theme.colors() diff --git a/.local/bin/dark b/.local/bin/dark new file mode 100755 index 0000000..8c31efa --- /dev/null +++ b/.local/bin/dark @@ -0,0 +1,89 @@ +#!/bin/bash + +# Set theme environment variable +export THEME="dark" + +# Update GTK theme using gsettings (more reliable) +if command -v gsettings >/dev/null 2>&1; then + gsettings set org.gnome.desktop.interface gtk-theme "Rosepine-Dark" + gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" + gsettings set org.gnome.desktop.interface icon-theme "Papirus-Dark" +fi + +# Update GTK configuration files directly +mkdir -p "$HOME/.config/gtk-3.0" "$HOME/.config/gtk-4.0" + +# GTK 3 settings +cat > "$HOME/.config/gtk-3.0/settings.ini" << EOF +[Settings] +gtk-application-prefer-dark-theme=true +gtk-theme-name=Rosepine-Dark +gtk-icon-theme-name=Papirus-Dark +EOF + +# GTK 4 settings +cat > "$HOME/.config/gtk-4.0/settings.ini" << EOF +[Settings] +gtk-application-prefer-dark-theme=true +gtk-theme-name=Rosepine-Dark +gtk-icon-theme-name=Papirus-Dark +EOF + +# GTK 2 settings +cat > "$HOME/.gtkrc-2.0" << EOF +gtk-theme-name="Rosepine-Dark" +gtk-icon-theme-name="Papirus-Dark" +EOF + +# Update Qt6 theme using qt6ct +if command -v qt6ct >/dev/null 2>&1; then + export QT_QPA_PLATFORMTHEME=qt6ct + mkdir -p "$HOME/.config/qt6ct" + if [ -f "$HOME/.config/qt6ct/qt6ct.conf" ]; then + sed -i 's/^style=.*/style=rose-pine/' "$HOME/.config/qt6ct/qt6ct.conf" + sed -i 's/^color_scheme=.*/color_scheme=rose-pine/' "$HOME/.config/qt6ct/qt6ct.conf" + fi +fi + +# Update Qt5 theme using qt5ct +if command -v qt5ct >/dev/null 2>&1; then + export QT_QPA_PLATFORMTHEME=qt5ct + mkdir -p "$HOME/.config/qt5ct" + if [ -f "$HOME/.config/qt5ct/qt5ct.conf" ]; then + sed -i 's/^style=.*/style=rose-pine/' "$HOME/.config/qt5ct/qt5ct.conf" + sed -i 's/^color_scheme=.*/color_scheme=rose-pine/' "$HOME/.config/qt5ct/qt5ct.conf" + fi +fi + +# Update Rofi theme +if [ -f "$HOME/.config/rofi/config.rasi" ]; then + sed -i 's/@theme ".*"/@theme "rose-pine"/' "$HOME/.config/rofi/config.rasi" +elif [ -f "$HOME/.config/rofi/config" ]; then + sed -i 's/rofi.theme:.*/rofi.theme: rose-pine/' "$HOME/.config/rofi/config" +fi + +# Update Wezterm theme +if [ -f "$HOME/.config/wezterm/wezterm.lua" ]; then + sed -i 's/config.color_scheme = .*/config.color_scheme = "rose-pine"/' "$HOME/.config/wezterm/wezterm.lua" +elif [ -f "$HOME/.wezterm.lua" ]; then + sed -i 's/config.color_scheme = .*/config.color_scheme = "rose-pine"/' "$HOME/.wezterm.lua" +fi + +# Set environment variables for current session +export GTK_THEME="Rosepine-Dark:dark" + +# Reload applications that support theme changes +pkill -USR1 wezterm >/dev/null 2>&1 || true + +# Try to reload GTK applications via xsettingsd if available +if command -v xsettingsd >/dev/null 2>&1; then + pkill -HUP xsettingsd >/dev/null 2>&1 || true +fi + +# Restart GTK settings daemon if using GNOME +if pgrep -x "gnome-session" >/dev/null; then + dbus-send --session --type=method_call --dest=org.gnome.SettingsDaemon.Color /org/gnome/SettingsDaemon/Color org.gnome.SettingsDaemon.Color.ApplySettings >/dev/null 2>&1 || true +fi + +# Notify about theme change +echo "Switched to Rose Pine (dark) theme" diff --git a/.local/bin/light b/.local/bin/light new file mode 100755 index 0000000..54b4785 --- /dev/null +++ b/.local/bin/light @@ -0,0 +1,90 @@ +#!/bin/bash + +# Set theme environment variable +export THEME="light" + +# Update GTK theme using gsettings (more reliable) +if command -v gsettings >/dev/null 2>&1; then + gsettings set org.gnome.desktop.interface gtk-theme "Rosepine-Light" + gsettings set org.gnome.desktop.interface color-scheme "prefer-light" + gsettings set org.gnome.desktop.interface icon-theme "Papirus-Light" +fi + +# Update GTK configuration files directly +mkdir -p "$HOME/.config/gtk-3.0" "$HOME/.config/gtk-4.0" + +# GTK 3 settings +cat > "$HOME/.config/gtk-3.0/settings.ini" << EOF +[Settings] +gtk-application-prefer-dark-theme=false +gtk-theme-name=Rosepine-Light +gtk-icon-theme-name=Papirus-Light +EOF + +# GTK 4 settings +cat > "$HOME/.config/gtk-4.0/settings.ini" << EOF +[Settings] +gtk-application-prefer-dark-theme=false +gtk-theme-name=Rosepine-Light +gtk-icon-theme-name=Papirus-Light +EOF + +# GTK 2 settings +cat > "$HOME/.gtkrc-2.0" << EOF +gtk-theme-name="Rosepine-Light" +gtk-icon-theme-name="Papirus-Light" +EOF + +# Update Qt6 theme using qt6ct +if command -v qt6ct >/dev/null 2>&1; then + export QT_QPA_PLATFORMTHEME=qt6ct + mkdir -p "$HOME/.config/qt6ct" + if [ -f "$HOME/.config/qt6ct/qt6ct.conf" ]; then + sed -i 's/^style=.*/style=rose-pine-dawn/' "$HOME/.config/qt6ct/qt6ct.conf" + sed -i 's/^color_scheme=.*/color_scheme=rose-pine-dawn/' "$HOME/.config/qt6ct/qt6ct.conf" + fi +fi + +# Update Qt5 theme using qt5ct +if command -v qt5ct >/dev/null 2>&1; then + export QT_QPA_PLATFORMTHEME=qt5ct + mkdir -p "$HOME/.config/qt5ct" + if [ -f "$HOME/.config/qt5ct/qt5ct.conf" ]; then + sed -i 's/^style=.*/style=rose-pine-dawn/' "$HOME/.config/qt5ct/qt5ct.conf" + sed -i 's/^color_scheme=.*/color_scheme=rose-pine-dawn/' "$HOME/.config/qt5ct/qt5ct.conf" + fi +fi + +# Update Rofi theme +if [ -f "$HOME/.config/rofi/config.rasi" ]; then + sed -i 's/@theme ".*"/@theme "rose-pine-dawn"/' "$HOME/.config/rofi/config.rasi" +elif [ -f "$HOME/.config/rofi/config" ]; then + sed -i 's/rofi.theme:.*/rofi.theme: rose-pine-dawn/' "$HOME/.config/rofi/config" +fi + +# Update Wezterm theme +if [ -f "$HOME/.config/wezterm/wezterm.lua" ]; then + sed -i 's/config.color_scheme = .*/config.color_scheme = "rose-pine-dawn"/' "$HOME/.config/wezterm/wezterm.lua" +elif [ -f "$HOME/.wezterm.lua" ]; then + sed -i 's/config.color_scheme = .*/config.color_scheme = "rose-pine-dawn"/' "$HOME/.wezterm.lua" +fi + +# Set environment variables for current session +export GTK_THEME="" +unset GTK_THEME # Unset to use theme from config files + +# Reload applications that support theme changes +pkill -USR1 wezterm >/dev/null 2>&1 || true + +# Try to reload GTK applications via xsettingsd if available +if command -v xsettingsd >/dev/null 2>&1; then + pkill -HUP xsettingsd >/dev/null 2>&1 || true +fi + +# Restart GTK settings daemon if using GNOME +if pgrep -x "gnome-session" >/dev/null; then + dbus-send --session --type=method_call --dest=org.gnome.SettingsDaemon.Color /org/gnome/SettingsDaemon/Color org.gnome.SettingsDaemon.Color.ApplySettings >/dev/null 2>&1 || true +fi + +# Notify about theme change +echo "Switched to Rose Pine Dawn (light) theme" diff --git a/.xinitrc b/.xinitrc index 91aa734..b63c83a 100644 --- a/.xinitrc +++ b/.xinitrc @@ -66,6 +66,7 @@ setxkbmap pl & # xset -dpms & # xset s 900 & # Host-specific rules +bash $HOME/.config/screenlayout/main.sh & if [ "$(hostname)" = "zion" ]; then # Zion rules (Desktop) # screenlayout setup for odin @@ -149,6 +150,10 @@ flameshot & ## Caffeine-ng caffeine >/dev/null 2>&1 & +redshift & + +export THEME=dark + ## Ulauncher # ulauncher --hide-window --no-window-shadow >/dev/null 2>&1 &