foxygit / dotfiles Log in
commit 7c52af98f636dedaf1a0d302d0c9146f7f6aef4b
Author:     MrJensK <jens.se@icloud.com>
AuthorDate: Thu May 14 11:26:44 2026 +0200
Commit:     MrJensK <jens.se@icloud.com>
CommitDate: Thu May 14 11:26:44 2026 +0200

    Add configuration files for Kitty terminal, sxbar, and sxwm

    - Created `kitty.conf` for Kitty terminal with themes, font settings, and window management options.
    - Added `sxbarc` configuration for sxbar, including appearance settings and built-in modules for clock, date, battery, and volume.
    - Introduced `sxwmrc` for sxwm window manager, defining keybindings, window management options, and scratchpad functionality.
---
 BG/j9huwdxo1zzg1.jpeg   | Bin 0 -> 403376 bytes
 config/kitty/kitty.conf |  88 +++++++++++++++++++++++++++++++++
 config/sxbarc           |  39 +++++++++++++++
 config/sxwmrc           | 126 ++++++++++++++++++++++++++++++++++++++++++++++++
 install.sh              | 116 ++++++++++++++------------------------------
 5 files changed, 288 insertions(+), 81 deletions(-)

diff --git a/BG/j9huwdxo1zzg1.jpeg b/BG/j9huwdxo1zzg1.jpeg
new file mode 100644
index 0000000..e1c78ad
Binary files /dev/null and b/BG/j9huwdxo1zzg1.jpeg differ
diff --git a/config/kitty/kitty.conf b/config/kitty/kitty.conf
new file mode 100644
index 0000000..3c33b45
--- /dev/null
+++ b/config/kitty/kitty.conf
@@ -0,0 +1,88 @@
+#  _    _ _   _           _                      _             _
+# | | _(_) |_| |_ _   _  | |_ ___ _ __ _ __ ___ (_)_ __   __ _| |
+# | |/ / | __| __| | | | | __/ _ \ '__| '_ ` _ \| | '_ \ / _` | |
+# |   <| | |_| |_| |_| | | ||  __/ |  | | | | | | | | | | (_| | |
+# |_|\_\_|\__|\__|\__, |  \__\___|_|  |_| |_| |_|_|_| |_|\__,_|_|
+#                 |___/              _          _   _
+#   ___ _   _ ___| |_ ___  _ __ ___ (_)______ _| |_(_) ___  _ __
+#  / __| | | / __| __/ _ \| '_ ` _ \| |_  / _` | __| |/ _ \| '_ \
+# | (__| |_| \__ \ || (_) | | | | | | |/ / (_| | |_| | (_) | | | |
+#  \___|\__,_|___/\__\___/|_| |_| |_|_/___\__,_|\__|_|\___/|_| |_|
+
+##########################################################################
+
+# themes
+include GruvBox_DarkHard.conf
+#include Wryan.conf
+#include VSCode_Dark.conf
+
+# terminal opacity and blur
+background_opacity 1.0
+background_blur 1
+
+# advance
+term xterm-kitty
+
+# terminal bell
+enable_audio_bell no
+
+# os specific tweaks (Gnome window decoration for wayland)
+linux_display_server x11
+
+# font
+font_family        SauceCodePro Nerd Font
+bold_font          auto
+italic_font        auto
+bold_italic_font   auto
+font_size 12.0
+
+# font size management
+map ctrl+shift+backspace change_font_size all 0
+
+# cursor customization
+# block / beam / underline
+cursor_shape block
+cursor_blink_interval 0
+cursor_stop_blinking_after 0
+shell_integration no-cursor
+
+# scrollback
+scrollback_lines 5000
+wheel_scroll_multiplier 3.0
+
+# mouse
+mouse_hide_wait -1
+
+# window layout
+remember_window_size  no
+initial_window_width  1200
+initial_window_height 750
+window_border_width 1.5pt
+enabled_layouts tall
+window_padding_width 0
+window_margin_width 2
+hide_window_decorations no
+
+# window management
+map ctrl+shift+enter new_window
+map ctrl+shift+] next_window
+map ctrl+shift+[ previous_window
+
+# layout management
+map ctrl+shift+l next_layout
+map ctrl+alt+r goto_layout tall
+map ctrl+alt+s goto_layout stack
+
+# tab bar customization
+tab_bar_style powerline
+tab_powerline_style slanted
+tab_bar_edge bottom
+tab_bar_align left
+active_tab_font_style   bold
+inactive_tab_font_style normal
+
+# tab management
+map ctrl+shift+t new_tab
+map ctrl+shift+right next_tab
+map ctrl+shift+left previous_tab
+map ctrl+shift+q close_tab
diff --git a/config/sxbarc b/config/sxbarc
new file mode 100644
index 0000000..f3d8c61
--- /dev/null
+++ b/config/sxbarc
@@ -0,0 +1,39 @@
+# sxbar configuration
+# Format: key : value
+# Colours accept hex (#rrggbb) or X colour names
+
+# Global settings
+show_version         : false
+version_text         : poop
+
+# Appearance
+height              : 20
+bottom_bar          : false
+vertical_padding    : 5
+horizontal_padding  : 5
+text_padding        : 5
+border              : false
+border_width        : 1
+background_colour   : #000000
+foreground_colour   : #7abccd
+border_colour       : #ffffff
+font                : fixed
+
+# Built-in modules
+# module : name : enabled : refresh_interval_seconds
+# Available: clock, date, battery, volume, cpu
+module : clock   : true  : 1
+module : date    : true  : 60
+module : battery : true : 30
+module : volume  : false  : 5
+module : cpu     : false : 3
+
+# Custom script modules (like polybar exec)
+# Command must be quoted. Output is displayed in the bar.
+# custom : label : "command or script path" : refresh_interval_seconds
+#
+# Examples:
+# custom : temp     : "sensors | grep 'Package' | awk '{print $4}'" : 5
+# custom : mem      : "free -h | awk '/^Mem:/{print $3\"/\"$2}'" : 10
+# custom : network  : "~/.config/sxbar/scripts/network.sh" : 5
+# custom : updates  : "checkupdates | wc -l | tr -d ' '" : 300
diff --git a/config/sxwmrc b/config/sxwmrc
new file mode 100644
index 0000000..3530109
--- /dev/null
+++ b/config/sxwmrc
@@ -0,0 +1,126 @@
+# exec : "xrandr --dpi 96 --output eDP-1 --mode 1920x1080 --pos 680x1480 --primary --output DP-1 --mode 3440x1440 --pos 0x40"
+exec : "sxbar"
+exec : "feh --bg-scale /home/mrfox/BG/j9huwdxo1zzg1.jpeg"
+
+# Colour Themes:
+focused_border_colour    : #000000
+unfocused_border_colour  : #444444
+swap_border_colour       : #eeeeee
+
+# General Options:
+gaps                    : 10
+border_width            : 1
+master_width            : 60 # Percentage of screen width
+resize_master_amount    : 1
+resize_stack_amount     : 20
+move_window_amount      : 50
+resize_window_amount    : 50
+snap_distance           : 5
+motion_throttle         : 60 # Set to screen refresh rate for smoothest motions
+should_float            : "pcmanfm", "obs"
+new_win_focus           : true
+warp_cursor             : true
+floating_on_top         : true
+new_win_master          : false
+can_swallow             : "kitty"
+can_be_swallowed        : "mpv", "sxiv"
+start_fullscreen        : "mpv", "vlc"
+
+# Keybinds:
+# Commands must be surrounded with ""
+# Function calls don't need this
+mod_key : super
+
+# Application Launchers:
+bind : mod + Return : "kitty"
+bind : mod + b : "firefox"
+bind : mod + p : "dmenu_run"
+
+# Window Management:
+call : mod + shift + q : close_window
+call : mod + c : centre_window
+call : mod + shift + e : quit
+call : mod + m : toggle_monocle
+
+# Focus Movement:
+call : mod + j : focus_next
+call : mod + k : focus_prev
+
+# Monitor Focus:
+call : mod + comma : focus_prev_mon
+call : mod + period : focus_next_mon
+
+# Move Window Between Monitors:
+call : mod + shift + comma : move_prev_mon
+call : mod + shift + period : move_next_mon
+
+# Master/Stack Movement
+call : mod + shift + j : master_next
+call : mod + shift + k : master_prev
+
+# Master Area Resize
+call : mod + l : master_increase
+call : mod + h : master_decrease
+
+# Stack Window Resize
+call : mod + ctrl + l : stack_increase
+call : mod + ctrl + h : stack_decrease
+
+# Keyboard Window Management
+call : mod + Up : move_win_up
+call : mod + Down : move_win_down
+call : mod + Left : move_win_left
+call : mod + Right : move_win_right
+
+call : mod + shift + Up : resize_win_up
+call : mod + shift + Down : resize_win_down
+call : mod + shift + Left : resize_win_left
+call : mod + shift + Right : resize_win_right
+
+# Gaps
+call : mod + equal : increase_gaps
+call : mod + minus : decrease_gaps
+
+# Floating/Fullscreen
+call : mod + space : toggle_floating
+call : mod + shift + space : global_floating
+call : mod + shift + f : fullscreen
+
+# Reload Config
+call : mod + r : reload_config
+
+# Scratchpads
+scratchpad : mod + alt + 1 : create 1
+scratchpad : mod + alt + 2 : create 2
+scratchpad : mod + alt + 3 : create 3
+scratchpad : mod + alt + 4 : create 4
+
+scratchpad : mod + ctrl + 1 : toggle 1
+scratchpad : mod + ctrl + 2 : toggle 2
+scratchpad : mod + ctrl + 3 : toggle 3
+scratchpad : mod + ctrl + 4 : toggle 4
+
+scratchpad : mod + alt + shift + 1 : remove 1
+scratchpad : mod + alt + shift + 2 : remove 2
+scratchpad : mod + alt + shift + 3 : remove 3
+scratchpad : mod + alt + shift + 4 : remove 4
+
+# Workspaces (1-9)
+workspace : mod + 1          : move 1
+workspace : mod + shift + 1  : swap 1
+workspace : mod + 2          : move 2
+workspace : mod + shift + 2  : swap 2
+workspace : mod + 3          : move 3
+workspace : mod + shift + 3  : swap 3
+workspace : mod + 4          : move 4
+workspace : mod + shift + 4  : swap 4
+workspace : mod + 5          : move 5
+workspace : mod + shift + 5  : swap 5
+workspace : mod + 6          : move 6
+workspace : mod + shift + 6  : swap 6
+workspace : mod + 7          : move 7
+workspace : mod + shift + 7  : swap 7
+workspace : mod + 8          : move 8
+workspace : mod + shift + 8  : swap 8
+workspace : mod + 9          : move 9
+workspace : mod + shift + 9  : swap 9
diff --git a/install.sh b/install.sh
index 37deefb..8313a91 100644
--- a/install.sh
+++ b/install.sh
@@ -1,11 +1,12 @@
 #!/bin/bash
 set -e

+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 SXWM_REPO="https://github.com/uint23/sxwm.git"
 SXBAR_REPO="https://github.com/MrJensK/sxbar.git"
 BUILD_DIR="/tmp/sxwm-sxbar-build"

-echo "==> Installing dependencies..."
+echo "==> Installerar beroenden..."
 sudo apt-get update -qq
 sudo apt-get install -y \
     git \
@@ -13,110 +14,69 @@ sudo apt-get install -y \
     gcc \
     libx11-dev \
     libxinerama-dev \
+    libxrandr-dev \
     libxcursor-dev \
     xorg \
-    xinit
-    \
+    xinit \
+    firefox-esr \
+    dmenu \
+    kitty

 mkdir -p "$BUILD_DIR"
 cd "$BUILD_DIR"

-echo "==> Cloning sxwm..."
+echo "==> Klonar sxwm..."
 rm -rf sxwm
 git clone --depth=1 "$SXWM_REPO" sxwm

-echo "==> Building and installing sxwm..."
+echo "==> Applicerar sxwm-patch..."
 cd sxwm
+patch -p1 < "$SCRIPT_DIR/cursor-dpi-fix.patch"
+
+echo "==> Bygger och installerar sxwm..."
 make
 sudo make install
 cd "$BUILD_DIR"

-echo "==> Cloning sxbar..."
+echo "==> Klonar sxbar..."
 rm -rf sxbar
 git clone --depth=1 "$SXBAR_REPO" sxbar

-echo "==> Building and installing sxbar..."
+echo "==> Bygger och installerar sxbar..."
 cd sxbar
 make
 sudo make install
 cd "$BUILD_DIR"

-echo "==> Copying config files..."
-mkdir -p "$HOME/.config"
-
-if [ ! -f "$HOME/.config/sxwmrc" ]; then
-    cp "$BUILD_DIR/sxwm/default_sxwmrc" "$HOME/.config/sxwmrc"
-    echo "    sxwmrc  -> ~/.config/sxwmrc"
-else
-    echo "    sxwmrc  already exists, skipping (backup: ~/.config/sxwmrc.bak)"
-    cp "$HOME/.config/sxwmrc" "$HOME/.config/sxwmrc.bak"
-fi
-
-if [ ! -f "$HOME/.config/sxbarc" ]; then
-    cp "$BUILD_DIR/sxbar/default_sxbarc" "$HOME/.config/sxbarc"
-    echo "    sxbarc  -> ~/.config/sxbarc"
-else
-    echo "    sxbarc  already exists, skipping (backup: ~/.config/sxbarc.bak)"
-    cp "$HOME/.config/sxbarc" "$HOME/.config/sxbarc.bak"
-fi
-
-echo ""
-echo "==> Installera ytterligare paket"
-echo ""
-
-# Fråga om Firefox ESR
-read -p "Installera firefox-esr? (j/n) " -n 1 -r
-echo
-if [[ $REPLY =~ ^[Jj]$ ]]; then
-    echo "Installerar firefox-esr..."
-    sudo apt-get install -y firefox-esr
-fi
+echo "==> Kopierar konfigfiler..."
+mkdir -p "$HOME/.config/kitty"

-# Fråga om dmenu
-read -p "Installera dmenu? (j/n) " -n 1 -r
-echo
-if [[ $REPLY =~ ^[Jj]$ ]]; then
-    echo "Installerar dmenu..."
-    sudo apt-get install -y dmenu
-fi
+copy_config() {
+    local src="$SCRIPT_DIR/config/$1"
+    local dst="$HOME/.config/$1"
+    if [ -f "$dst" ]; then
+        cp "$dst" "$dst.bak"
+        echo "    $1 -> backup sparad: ~/.config/$1.bak"
+    fi
+    cp "$src" "$dst"
+    echo "    $1 -> ~/.config/$1"
+}

-# Fråga om terminal - st eller kitty
-echo ""
-echo "Välj terminal emulator:"
-echo "1) st"
-echo "2) kitty"
-read -p "Val (1 eller 2): " terminal_choice
-
-case $terminal_choice in
-    2)
-        echo "Installerar kitty..."
-        sudo apt-get install -y kitty
-        echo ""
-        echo "⚠️  VIKTIGT: Efter installationen måste du konfigurera kitty"
-        echo "   Redigera konfigfilen: ~/.config/kitty/kitty.conf"
-        echo "   Läs dokumentationen: https://sw.kovidgoyal.net/kitty/conf/"
-        ;;
-    1|*)
-        echo "Installerar st..."
-        sudo apt-get install -y stterm
-        ;;
-esac
+copy_config sxwmrc
+copy_config sxbarc
+copy_config kitty/kitty.conf

 echo ""
 echo "==> Konfigurering av ~/.xinitrc"
 echo ""

-# Fråga om rensning
-read -p "Vill du rensa gammal konfiguration från ~/.xinitrc? (j/n) " -n 1 -r
+read -p "Vill du skriva över ~/.xinitrc? (j/n) " -n 1 -r
 echo
 if [[ $REPLY =~ ^[Jj]$ ]]; then
-    echo "Rensar gammal konfiguration..."
-    # Backa upp befintlig xinitrc
     if [ -f "$HOME/.xinitrc" ]; then
         cp "$HOME/.xinitrc" "$HOME/.xinitrc.bak"
         echo "    Backup skapad: ~/.xinitrc.bak"
     fi
-    # Skapa ny xinitrc
     cat > "$HOME/.xinitrc" << 'EOF'
 #!/bin/bash
 # Stänga av skärmarna efter 5 min
@@ -127,24 +87,18 @@ xset dpms 300 300 300
 setxkbmap se

 # Jens SXbar
-sxbar &
 exec sxwm
 EOF
     chmod +x "$HOME/.xinitrc"
-    echo "    ~/.xinitrc skapad med nya inställningar"
+    echo "    ~/.xinitrc skapad"
 else
     echo "Lägg manuellt till i ~/.xinitrc:"
     echo ""
-    echo "# Stänga av skärmarna efter 5 min"
-    echo "xset s 300 300"
-    echo "xset dpms 300 300 300"
-    echo "# Svenskt tangentbord"
-    echo "setxkbmap se"
-    echo "# Jens SXbar"
-    echo "sxbar &"
-    echo "exec sxwm"
+    echo "  xset s 300 300"
+    echo "  xset dpms 300 300 300"
+    echo "  setxkbmap se"
+    echo "  exec sxwm"
 fi

 echo ""
 echo "Installation slutförd!"
-