From f39251c1ff77bbed665dbb4023168037075a4f86 Mon Sep 17 00:00:00 2001 From: Xander Swan Date: Wed, 3 Dec 2025 10:00:42 -0500 Subject: switch to dwm --- .config/alacritty/alacritty.toml | 41 ---- .config/i3/config | 148 ----------- .config/nvim/colors/mine.vim | 26 +- .config/nvim/colors/some_vscode.vim | 61 +++++ .config/nvim/lua/opt.lua | 7 - .config/picom/picom.conf | 39 --- .config/polybar/config.ini | 226 ----------------- .config/polybar/launch.sh | 15 -- dmenu_config.h | 23 ++ dwm_config.h | 136 +++++++++++ st_config.h | 474 ++++++++++++++++++++++++++++++++++++ update.sh | 15 +- 12 files changed, 717 insertions(+), 494 deletions(-) delete mode 100644 .config/alacritty/alacritty.toml delete mode 100644 .config/i3/config create mode 100644 .config/nvim/colors/some_vscode.vim delete mode 100644 .config/picom/picom.conf delete mode 100644 .config/polybar/config.ini delete mode 100644 .config/polybar/launch.sh create mode 100644 dmenu_config.h create mode 100644 dwm_config.h create mode 100644 st_config.h diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml deleted file mode 100644 index dea1d44..0000000 --- a/.config/alacritty/alacritty.toml +++ /dev/null @@ -1,41 +0,0 @@ -[window] -dynamic_padding = true -opacity = 1 - -[font] -normal = {family="JetBrainsMono Nerd Font", style="Medium"} -bold = {family="JetBrainsMono Nerd Font", style="Bold"} -italic = {family="JetBrainsMono Nerd Font", style="Medium Italic"} -bold_italic = {family="JetBrainsMono Nerd Font", style="Bold Italic"} - -offset.x = 0 -offset.y = 0 - -size = 13.5 - -[colors] -draw_bold_text_with_bright_colors = true - -[colors.primary] -foreground = "#FFFFFF" -background = "#1A191C" - -[colors.normal] -black = "#333333" -red = "#990911" -green = "#099911" -yellow = "#CC9900" -blue = "#5511CC" -magenta = "#990966" -cyan = "#0077AA" -white = "#999999" - -[colors.bright] -black = "#666666" -red = "#ff2222" -green = "#22ff44" -yellow = "#ffff00" -blue = "#8833FF" -magenta = "#ff4499" -cyan = "#22ccff" -white = "#FFFFFF" diff --git a/.config/i3/config b/.config/i3/config deleted file mode 100644 index 86de9bd..0000000 --- a/.config/i3/config +++ /dev/null @@ -1,148 +0,0 @@ -set $mod Mod4 -set $left h -set $down j -set $up k -set $right l - -font pango:JetBrainsMono Nerd Font Medium 9 - -exec --no-startup-id xrandr --output HDMI-A-1 --primary --mode 1920x1080 --rate 240 -exec --no-startup-id dex --autostart --environment i3 -exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork -exec --no-startup-id nm-applet -exec --no-startup-id nitrogen --restore -exec --no-startup-id picom -exec --no-startup-id ~/xborders --border-radius 5 --border-red 255 --border-green 255 --border-blue 255 --border-width 3 -# exec --no-startup-id redshift -exec_always --no-startup-id sh ~/.config/polybar/launch.sh - -exec --no-startup-id discord -# I need to check my emails -exec --no-startup-id thunderbird - -set $refresh_i3status killall -SIGUSR1 i3status -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status -bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status -bindsym XF86AudioPause exec --no-startup-id playerctl play-pause && $refresh_i3status -bindsym XF86AudioNext exec --no-startup-id playerctl next && $refresh_i3status -bindsym XF86AudioPrev exec --no-startup-id playerctl previous && $refresh_i3status -# bindsym $mod+u exec --no-startup-id setxkbmap -layout us -option caps:super -# bindsym $mod+n exec --no-startup-id setxkbmap -layout fi -option caps:super - -bindsym Print exec --no-startup-id flameshot gui - -for_window [class="love"] floating enable -for_window [instance="Godot_Engine"] floating enable - -default_border pixel 0 -default_floating_border pixel 0 - -gaps outer 0 -gaps inner 10 - -floating_modifier $mod - -tiling_drag modifier titlebar - -bindsym $mod+Return exec i3-sensible-terminal - -bindsym $mod+Shift+q kill - -bindsym $mod+d exec --no-startup-id rofi -show drun -bindsym $mod+Shift+d exec --no-startup-id rofi -show window -bindsym $mod+$left focus left -bindsym $mod+$down focus down -bindsym $mod+$up focus up -bindsym $mod+$right focus right - -bindsym $mod+Shift+$left move left -bindsym $mod+Shift+$down move down -bindsym $mod+Shift+$up move up -bindsym $mod+Shift+$right move right - -bindsym $mod+g split h -bindsym $mod+v split v - -bindsym $mod+f fullscreen toggle - -bindsym $mod+y layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+p layout toggle split - -bindsym $mod+Shift+space floating toggle - -bindsym $mod+space focus mode_toggle - -bindsym $mod+i focus parent - -set $ws1 "1" -set $ws2 "2" -set $ws3 "3" -set $ws4 "4" -set $ws5 "5" -set $ws6 "6" -set $ws7 "7" -set $ws8 "8" -set $ws9 "9" -set $ws10 "10" - -bindsym $mod+1 workspace number $ws1 -bindsym $mod+2 workspace number $ws2 -bindsym $mod+3 workspace number $ws3 -bindsym $mod+4 workspace number $ws4 -bindsym $mod+5 workspace number $ws5 -bindsym $mod+6 workspace number $ws6 -bindsym $mod+7 workspace number $ws7 -bindsym $mod+8 workspace number $ws8 -bindsym $mod+9 workspace number $ws9 -bindsym $mod+0 workspace number $ws10 - -bindsym $mod+z workspace number $ws9 -bindsym $mod+x workspace number $ws10 -bindsym $mod+c workspace number $ws8 - -bindsym $mod+Shift+1 move container to workspace number $ws1 -bindsym $mod+Shift+2 move container to workspace number $ws2 -bindsym $mod+Shift+3 move container to workspace number $ws3 -bindsym $mod+Shift+4 move container to workspace number $ws4 -bindsym $mod+Shift+5 move container to workspace number $ws5 -bindsym $mod+Shift+6 move container to workspace number $ws6 -bindsym $mod+Shift+7 move container to workspace number $ws7 -bindsym $mod+Shift+8 move container to workspace number $ws8 -bindsym $mod+Shift+9 move container to workspace number $ws9 -bindsym $mod+Shift+0 move container to workspace number $ws10 - -bindsym $mod+Shift+z move container to workspace number $ws9 -bindsym $mod+Shift+x move container to workspace number $ws10 -bindsym $mod+Shift+c move container to workspace number $ws8 - -bindsym $mod+braceleft focus output left -bindsym $mod+braceright focus output right -bindsym $mod+shift+braceleft move workspace to output left -bindsym $mod+shift+braceright move workspace to output right - -bindsym $mod+Shift+t reload -bindsym $mod+Shift+r restart -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" - -# class border backgr. text indicator child_border -client.focused #E0E0E0 #E0E0E0 #000000 #E0E0E0 #E0E0E0 -client.focused_inactive #222222 #222222 #CACACA #222222 #222222 -client.unfocused #000000 #000000 #CACACA #000000 #000000 -client.urgent #ff0000 #ff0000 #000000 #900000 #ff0000 -client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c -client.background #ffffff - -mode "resize" { - bindsym $left resize shrink width 10 px or 10 ppt - bindsym $up resize grow height 10 px or 10 ppt bindsym $down resize shrink height 10 px or 10 ppt - bindsym $right resize grow width 10 px or 10 ppt - - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" -} - -# bindsym $mod+r mode "resize" diff --git a/.config/nvim/colors/mine.vim b/.config/nvim/colors/mine.vim index 25de0fb..5f7cff9 100644 --- a/.config/nvim/colors/mine.vim +++ b/.config/nvim/colors/mine.vim @@ -22,39 +22,39 @@ hi LineNr guifg=#666666 guibg=NONE gui=NONE hi LineNrAbove guifg=#888888 guibg=NONE gui=NONE hi LineNrBelow guifg=#888888 guibg=NONE gui=NONE hi MatchParen guifg=#FFFFFF guibg=#FF0000 gui=bold -hi Normal guifg=#AAAAAA guibg=#111111 gui=NONE +hi Normal guifg=#AAAAAA guibg=#1A191C gui=NONE hi Pmenu guifg=#FFFFFF guibg=#333333 gui=NONE hi PmenuSel guifg=#333333 guibg=#FFFFFF gui=bold,underdouble -hi Search guifg=#333333 guibg=#FFFF88 gui=bold,italic +hi Search guifg=#333333 guibg=#FFFF88 gui=bold hi Visual guifg=NONE guibg=#333333 gui=NONE -hi Comment guifg=#777777 guibg=NONE gui=italic +hi Comment guifg=#777777 guibg=NONE gui=NONE hi Constant guifg=#44FF99 guibg=NONE gui=NONE hi Number guifg=#44FF99 guibg=NONE gui=NONE -hi String guifg=#FFFF00 guibg=NONE gui=italic -hi Boolean guifg=#44FF99 guibg=NONE gui=italic +hi String guifg=#FFFF00 guibg=NONE gui=NONE +hi Boolean guifg=#44FF99 guibg=NONE gui=NONE hi Identifier guifg=#FFFFFF guibg=NONE gui=NONE hi Function guifg=#FF4499 guibg=NONE gui=NONE -hi Statement guifg=#FF9944 guibg=NONE gui=italic -hi Label guifg=#FF9944 guibg=NONE gui=italic +hi Statement guifg=#FF9944 guibg=NONE gui=NONE +hi Label guifg=#FF9944 guibg=NONE gui=NONE hi Operator guifg=#AAAABB guibg=NONE gui=NONE hi PreProc guifg=#FF4499 guibg=NONE gui=NONE -hi Typedef guifg=#997FFF guibg=NONE gui=italic -hi Type guifg=#997FFF guibg=NONE gui=italic -hi StorageClass guifg=#4499FF guibg=NONE gui=italic -hi Structure guifg=#4499FF guibg=NONE gui=bold,italic +hi Typedef guifg=#997FFF guibg=NONE gui=NONE +hi Type guifg=#997FFF guibg=NONE gui=NONE +hi StorageClass guifg=#4499FF guibg=NONE gui=NONE +hi Structure guifg=#4499FF guibg=NONE gui=bold hi Special guifg=#CCCCDD guibg=NONE gui=NONE -hi SpecialChar guifg=#ffffff guibg=NONE gui=bold,italic +hi SpecialChar guifg=#ffffff guibg=NONE gui=bold hi Error guifg=#ff4444 guibg=NONE gui=bold,undercurl -hi Todo guifg=#ffffff guibg=NONE gui=bold,italic,underline +hi Todo guifg=#ffffff guibg=NONE gui=bold,underline hi Added guifg=#44FF44 guibg=NONE gui=NONE hi Changed guifg=#FFFF44 guibg=NONE gui=NONE diff --git a/.config/nvim/colors/some_vscode.vim b/.config/nvim/colors/some_vscode.vim new file mode 100644 index 0000000..05fe46e --- /dev/null +++ b/.config/nvim/colors/some_vscode.vim @@ -0,0 +1,61 @@ +set background=dark + +hi clear +let g:colors_name = "mine" + +hi! link Terminal Normal +hi! link TermCursor Cursor +hi! link TermCursorNC Cursor +hi! link CurSearch Search +hi! link CursorLineFold CursorLine +hi! link CursorLineSign CursorLine +hi! link MessageWindow Pmenu +hi! link PopupNotification Todo +hi! link Character String + +hi ColorColumn guifg=#333333 guibg=#333333 gui=NONE +hi WinSeparator guifg=#222222 guibg=NONE gui=NONE +hi CursorLine guifg=NONE guibg=NONE gui=NONE +hi EndOfBuffer guifg=#222222 guibg=NONE gui=NONE +hi SignColumn guifg=NONE guibg=NONE gui=NONE +hi LineNr guifg=#666666 guibg=NONE gui=NONE +hi LineNrAbove guifg=#888888 guibg=NONE gui=NONE +hi LineNrBelow guifg=#888888 guibg=NONE gui=NONE +hi MatchParen guifg=#FFFFFF guibg=#FF0000 gui=bold +hi Normal guifg=#f8f8f0 guibg=#16171d gui=NONE +hi Pmenu guifg=#FFFFFF guibg=#333333 gui=NONE +hi PmenuSel guifg=#333333 guibg=#FFFFFF gui=bold,underdouble +hi Search guifg=#333333 guibg=#FFFF88 gui=bold,italic +hi Visual guifg=NONE guibg=#333333 gui=NONE + +hi Comment guifg=#777777 guibg=NONE gui=italic + +hi Constant guifg=#81f900 guibg=NONE gui=NONE +hi Number guifg=#e373ce guibg=NONE gui=NONE +hi String guifg=#ffca2e guibg=NONE gui=NONE +hi Boolean guifg=#e373ce guibg=NONE gui=italic + +hi Identifier guifg=#FFFFFF guibg=NONE gui=NONE +hi Function guifg=#81f900 guibg=NONE gui=NONE + +hi Statement guifg=#ff3f3a guibg=NONE gui=NONE +hi Label guifg=#ff3f3a guibg=NONE gui=NONE +hi Operator guifg=#ff3f3a guibg=NONE gui=NONE + +hi PreProc guifg=#81f900 guibg=NONE gui=NONE + +hi Typedef guifg=#00a0e4 guibg=NONE gui=italic +hi Type guifg=#00a0e4 guibg=NONE gui=italic +hi StorageClass guifg=#ff3f3a guibg=NONE gui=italic +hi Structure guifg=#19d1e5 guibg=NONE gui=bold,italic + +hi Special guifg=#CCCCDD guibg=NONE gui=NONE +hi SpecialChar guifg=#e373ce guibg=NONE gui=NONE + +hi Error guifg=#ff4444 guibg=NONE gui=bold,undercurl + +hi Todo guifg=#ffffff guibg=NONE gui=bold,italic,underline + +hi Added guifg=#44FF44 guibg=NONE gui=NONE +hi Changed guifg=#FFFF44 guibg=NONE gui=NONE +hi Removed guifg=#FF4444 guibg=NONE gui=NONE diff --git a/.config/nvim/lua/opt.lua b/.config/nvim/lua/opt.lua index a9e9ef0..56a9b84 100644 --- a/.config/nvim/lua/opt.lua +++ b/.config/nvim/lua/opt.lua @@ -23,10 +23,3 @@ vim.api.nvim_create_autocmd("TermOpen", { }) vim.cmd.colorscheme("mine") - -vim.cmd [[ - highlight Normal guibg=none - highlight NonText guibg=none - highlight Normal ctermbg=none - highlight NonText ctermbg=none -]] diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf deleted file mode 100644 index d1f994d..0000000 --- a/.config/picom/picom.conf +++ /dev/null @@ -1,39 +0,0 @@ -shadow = true; -shadow-radius = 30; -shadow-offset-x = -30; -shadow-offset-y = -30; -shadow-exclude = [ - "class_g = 'i3-frame' && argb", - "window_type = 'dropdown_menu'", - "window_type = 'menu'", - "window_type = 'popup_menu'", -]; - -fading = false; -inactive-opacity-override = false; - -focus-exclude = [ "class_g = 'Cairo-clock'" ]; - -corner-radius = 5 -rounded-corners-exclude = [ - "window_type = 'dock'", - "window_type = 'desktop'", -]; - -backend = "glx"; -dithered-present = false; -vsync = true; -mark-wmwin-focused = true; -mark-ovredir-focused = true; -detect-rounded-corners = true; -detect-client-opacity = true; -detect-transient = true; -use-damage = true; -log-level = "warn"; -wintypes: -{ - tooltip = { fade = true; shadow = true; focus = true; full-shadow = false; }; - dock = { shadow = false; clip-shadow-above = true; } - dnd = { shadow = false; } - i3-frame = {} -}; diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini deleted file mode 100644 index 1f6a4b3..0000000 --- a/.config/polybar/config.ini +++ /dev/null @@ -1,226 +0,0 @@ -;========================================================== -; -; -; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ -; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ -; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ -; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ -; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ -; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ -; -; -; To learn more about how to configure Polybar -; go to https://github.com/polybar/polybar -; -; The README contains a lot of information -; -;========================================================== - -[colors] -; background = #222222 -; background-alt = #333333 -; foreground = #CACACA -; primary = #FFFFFF -; secondary = #909090 -; alert = #A54242 -; disabled = #707880 - -background = #E0E0E0 -background-alt = #CACACA -foreground = #000000 -primary = #555555 -secondary = #CACACA -alert = #A54242 -disabled = #707880 - -[bar/primary] -width = 100% -height = 20pt - -background = ${colors.background} -foreground = ${colors.foreground} - -line-size = 3pt - -border-color = #FFFFFF -border-size = 0pt -border-top-size = 5pt - -padding-left = 0 -padding-right = 1 - -monitor = HDMI-A-1 -module-margin = 1 - -bottom = true - -separator = : -separator-foreground = ${colors.disabled} - -font-0 = JetBrainsMono Nerd Font:size=11:weight=Medium;1 - -modules-left = xwindow -modules-center = xworkspaces -modules-right = pulseaudio memory cpu date time - -cursor-click = pointer -cursor-scroll = ns-resize - -enable-ipc = true - -[bar/secondary] -width = 100% -height = 20pt - -background = ${colors.background} -foreground = ${colors.foreground} - -line-size = 3pt - -border-color = #00000000 -border-size = 0pt - -padding-left = 0 -padding-right = 1 - -monitor = DVI-D-0 -module-margin = 1 - -bottom = true - -separator = : -separator-foreground = ${colors.disabled} - -font-0 = MartianMono Nerd Font:size=11:weight=Medium;1 - -modules-left = user xworkspaces -modules-center = -modules-right = xwindow time - -cursor-click = pointer -cursor-scroll = ns-resize - -enable-ipc = true - -[module/user] -type = custom/script -exec = "echo `whoami`@`hostname`" - -label-foreground = ${colors.primary} - -[module/systray] -type = internal/tray - -format-margin = 8pt -tray-spacing = 16pt - -[module/xworkspaces] -type = internal/xworkspaces - -icon-0 = 1; -icon-1 = 2; -icon-2 = 3; -icon-3 = 4; -icon-4 = 5; -icon-5 = 6; -icon-6 = 7; -icon-7 = 8; -icon-8 = 9; -icon-9 = 10; - -icon-default = - -label-active = %icon% %name% -label-active-background = ${colors.background-alt} -label-active-padding = 1 -label-active-underline = ${colors.primary} - -label-occupied = %icon% %name% -label-occupied-padding = 1 -label-urgent = %name% -label-urgent-padding = 1 -label-empty = %name% -label-empty-padding = 1 - -pin-workspaces = true -group-by-monitor = true -enable-click = false -enable-scroll = false - -[module/xwindow] -type = internal/xwindow -label = %title:0:50:...% - -[module/filesystem] -type = internal/fs -interval = 25 - -mount-0 = / - -label-mounted = %{F#FFFFFF}%mountpoint%%{F-} %percentage_used%% - -label-unmounted = %mountpoint% not mounted -label-unmounted-foreground = ${colors.disabled} - -[module/pulseaudio] -type = internal/pulseaudio - -format-volume-prefix = "VOL " -format-volume-prefix-foreground = ${colors.primary} -format-volume = - -label-volume = %percentage%% - -label-muted = muted -label-muted-foreground = ${colors.disabled} - -[module/memory] -type = internal/memory -interval = 2 -format-prefix = "RAM " -format-prefix-foreground = ${colors.primary} -label = %percentage_used:2%% - -[module/cpu] -type = internal/cpu -interval = 2 -format-prefix = "CPU " -format-prefix-foreground = ${colors.primary} -label = %percentage:2%% - -[network-base] -type = internal/network -interval = 5 -format-connected = -format-disconnected = -label-disconnected = %{F#FFFFFF}%ifname%%{F#707880} disconnected - -[module/wlan] -inherit = network-base -interface-type = wireless -label-connected = %{F#FFFFFF}%ifname%%{F-} %essid% - -[module/time] -type = internal/date -interval = 1 - -time = %H.%M.%S - -label = %time% -label-foreground = ${colors.primary} - -[module/date] -type = internal/date -interval = 3600 - -date = %a %m.%d -date-alt = %b %Z - -label = %date% -label-foreground = ${colors.primary} - -[settings] -screenchange-reload = true -pseudo-transparency = true - -; vim:ft=dosini diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh deleted file mode 100644 index 83cf90a..0000000 --- a/.config/polybar/launch.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -# Terminate already running bar instances -# If all your bars have ipc enabled, you can use -polybar-msg cmd quit -# Otherwise you can use the nuclear option: -# killall -q polybar - -# Launch bar1 and bar2 -# echo "---" | tee -a /tmp/polybar1.log -# polybar bar1 2>&1 | tee -a /tmp/polybar1.log & disown -polybar --reload primary & -polybar --reload secondary & - -echo "Bars launched..." diff --git a/dmenu_config.h b/dmenu_config.h new file mode 100644 index 0000000..32ba787 --- /dev/null +++ b/dmenu_config.h @@ -0,0 +1,23 @@ +/* See LICENSE file for copyright and license details. */ +/* Default settings; can be overriden by command line. */ + +static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ +/* -fn option overrides fonts[0]; default X11 font or font set */ +static const char *fonts[] = { + "JetBrainsMono Nerd Font:size=10" +}; +static const char *prompt = NULL; /* -p option; prompt to the left of input field */ +static const char *colors[SchemeLast][2] = { + /* fg bg */ + [SchemeNorm] = { "#CACACA", "#222222" }, + [SchemeSel] = { "#000000", "#E0E0E0" }, + [SchemeOut] = { "#000000", "#00ffff" }, +}; +/* -l option; if nonzero, dmenu uses vertical list with given number of lines */ +static unsigned int lines = 0; + +/* + * Characters not considered part of a word while deleting words + * for example: " /?\"&[]" + */ +static const char worddelimiters[] = " "; diff --git a/dwm_config.h b/dwm_config.h new file mode 100644 index 0000000..ef26cc3 --- /dev/null +++ b/dwm_config.h @@ -0,0 +1,136 @@ +/* See LICENSE file for copyright and license details. */ + +#include + +/* appearance */ +static const unsigned int borderpx = 2; /* border pixel of windows */ +static const unsigned int snap = 32; /* snap pixel */ +static const int showbar = 1; /* 0 means no bar */ +static const int topbar = 1; /* 0 means bottom bar */ +static const char *fonts[] = { "JetBrainsMono Nerd Font:style=Medium:size=13" }; +static const char dmenufont[] = "JetBrainsMono Nerd Font:style=Medium:size=13"; + +static const char col_bg_active[] = "#E0E0E0"; +static const char col_fg_active[] = "#000000"; +static const char col_bg_inactive[] = "#222222"; +static const char col_fg_inactive[] = "#CACACA"; + +static const char *colors[][3] = { + /* fg bg border */ + [SchemeNorm] = { col_fg_inactive, col_bg_inactive, col_bg_inactive }, + [SchemeSel] = { col_fg_active, col_bg_active, col_bg_active }, +}; + +/* tagging */ +static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "Web", "Chat" }; + +static const Rule rules[] = { + /* xprop(1): + * WM_CLASS(STRING) = instance, class + * WM_NAME(STRING) = title + */ + /* class instance title tags mask isfloating monitor */ + // { "Gimp", NULL, NULL, 0, 1, -1 }, + { "Librewolf", NULL, NULL, 1 << 8, 0, -1 }, +}; + +/* layout(s) */ +static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ +static const int nmaster = 1; /* number of clients in master area */ +static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ +static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ + +static const Layout layouts[] = { + /* symbol arrange function */ + { "[]=", tile }, /* first entry is default */ + { "><>", NULL }, /* no layout function means floating behavior */ + { "[M]", monocle }, +}; + +/* key definitions */ +#define MODKEY Mod4Mask +#define TAGKEYS(KEY,TAG) \ + { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ + { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ + { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ + { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, + +/* helper for spawning shell commands in the pre dwm-5.0 fashion */ +#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } + +/* commands */ +static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ +static const char *dmenucmd[] = { "dmenu_run", NULL }; +static const char *termcmd[] = { "st", NULL }; +static const char *flameshotcmd[] = { "flameshot", "gui", NULL }; +static const char *pausecmd[] = { "playerctl", "play-pause", NULL }; +static const char *nextcmd[] = { "playerctl", "next", NULL }; +static const char *prevcmd[] = { "playerctl", "previous", NULL }; +static const char *volupcmd[] = { "pactl", "set-sink-volume @DEFAULT_SINK@ +5%", NULL }; +static const char *vollowcmd[] = { "pactl", "set-sink-volume @DEFAULT_SINK@ -5%", NULL }; +static const char *volmutecmd[] = { "pactl", "set-sink-mute @DEFAULT_SINK@ toggle", NULL }; + +static const Key keys[] = { + /* modifier key function argument */ + { MODKEY, XK_d, spawn, {.v = dmenucmd } }, + { MODKEY, XK_Return, spawn, {.v = termcmd } }, + { MODKEY|ShiftMask, XK_s, spawn, {.v = flameshotcmd } }, + { MODKEY, XK_b, togglebar, {0} }, + { MODKEY, XK_j, focusstack, {.i = +1 } }, + { MODKEY, XK_k, focusstack, {.i = -1 } }, + { MODKEY, XK_i, incnmaster, {.i = +1 } }, + { MODKEY, XK_u, incnmaster, {.i = -1 } }, + { MODKEY, XK_h, setmfact, {.f = -0.05} }, + { MODKEY, XK_l, setmfact, {.f = +0.05} }, + { 0, XF86XK_AudioPrev, spawn, {.v = prevcmd}}, + { 0, XF86XK_AudioNext, spawn, {.v = nextcmd}}, + { 0, XF86XK_AudioPlay, spawn, {.v = pausecmd}}, + { 0, XF86XK_AudioLowerVolume, spawn, {.v = vollowcmd}}, + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd}}, + { 0, XF86XK_AudioMute, spawn, {.v = volmutecmd}}, + { MODKEY, XK_s, zoom, {0} }, + { MODKEY, XK_Tab, view, {0} }, + { MODKEY|ShiftMask, XK_q, killclient, {0} }, + { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, + { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, + { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, + { MODKEY, XK_space, setlayout, {0} }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_0, view, {.ui = ~0 } }, + { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, + { MODKEY, XK_comma, focusmon, {.i = -1 } }, + { MODKEY, XK_period, focusmon, {.i = +1 } }, + { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, + { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, + TAGKEYS( XK_1, 0) + TAGKEYS( XK_2, 1) + TAGKEYS( XK_3, 2) + TAGKEYS( XK_4, 3) + TAGKEYS( XK_5, 4) + TAGKEYS( XK_6, 5) + TAGKEYS( XK_7, 6) + TAGKEYS( XK_8, 7) + TAGKEYS( XK_9, 8) + TAGKEYS( XK_c, 6) + TAGKEYS( XK_z, 7) + TAGKEYS( XK_x, 8) + { MODKEY|ShiftMask, XK_e, quit, {0} }, +}; + +/* button definitions */ +/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ +static const Button buttons[] = { + /* click event mask button function argument */ + { ClkLtSymbol, 0, Button1, setlayout, {0} }, + { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, + { ClkWinTitle, 0, Button2, zoom, {0} }, + { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, + { ClkClientWin, MODKEY, Button1, movemouse, {0} }, + { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, + { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, + { ClkTagBar, 0, Button1, view, {0} }, + { ClkTagBar, 0, Button3, toggleview, {0} }, + { ClkTagBar, MODKEY, Button1, tag, {0} }, + { ClkTagBar, MODKEY, Button3, toggletag, {0} }, +}; + diff --git a/st_config.h b/st_config.h new file mode 100644 index 0000000..234b94d --- /dev/null +++ b/st_config.h @@ -0,0 +1,474 @@ +/* See LICENSE file for copyright and license details. */ + +/* + * appearance + * + * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html + */ +static char *font = "JetBrainsMono Nerd Font:style=Medium:pixelsize=18:antialias=true:autohint=true"; +static int borderpx = 2; + +/* + * What program is execed by st depends of these precedence rules: + * 1: program passed with -e + * 2: scroll and/or utmp + * 3: SHELL environment variable + * 4: value of shell in /etc/passwd + * 5: value of shell in config.h + */ +static char *shell = "/bin/sh"; +char *utmp = NULL; +/* scroll program: to enable use a string like "scroll" */ +char *scroll = NULL; +char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; + +/* identification sequence returned in DA and DECID */ +char *vtiden = "\033[?6c"; + +/* Kerning / character bounding-box multipliers */ +static float cwscale = 1.0; +static float chscale = 1.0; + +/* + * word delimiter string + * + * More advanced example: L" `'\"()[]{}" + */ +wchar_t *worddelimiters = L" "; + +/* selection timeouts (in milliseconds) */ +static unsigned int doubleclicktimeout = 300; +static unsigned int tripleclicktimeout = 600; + +/* alt screens */ +int allowaltscreen = 1; + +/* allow certain non-interactive (insecure) window operations such as: + setting the clipboard text */ +int allowwindowops = 0; + +/* + * draw latency range in ms - from new content/keypress/etc until drawing. + * within this range, st draws when content stops arriving (idle). mostly it's + * near minlatency, but it waits longer for slow updates to avoid partial draw. + * low minlatency will tear/flicker more, as it can "detect" idle too early. + */ +static double minlatency = 2; +static double maxlatency = 33; + +/* + * blinking timeout (set to 0 to disable blinking) for the terminal blinking + * attribute. + */ +static unsigned int blinktimeout = 800; + +/* + * thickness of underline and bar cursors + */ +static unsigned int cursorthickness = 2; + +/* + * bell volume. It must be a value between -100 and 100. Use 0 for disabling + * it + */ +static int bellvolume = 0; + +/* default TERM value */ +char *termname = "st-256color"; + +/* + * spaces per tab + * + * When you are changing this value, don't forget to adapt the »it« value in + * the st.info and appropriately install the st.info in the environment where + * you use this st version. + * + * it#$tabspaces, + * + * Secondly make sure your kernel is not expanding tabs. When running `stty + * -a` »tab0« should appear. You can tell the terminal to not expand tabs by + * running following command: + * + * stty tabs + */ +unsigned int tabspaces = 8; + +/* Terminal colors (16 first used in escape sequence) */ +static const char *colorname[] = { + /* 8 normal colors */ + "#333333", + "#990911", + "#099911", + "#CC9900", + "#5511CC", + "#990966", + "#0077AA", + "#999999", + + /* 8 bright colors */ + "#666666", + "#FF2222", + "#22FF44", + "#FFFF00", + "#8833FF", + "#FF4499", + "#22CCFF", + "#FFFFFF", + + [255] = 0, + + /* more colors can be added after 255 to use with DefaultXX */ + "#cccccc", + "#555555", + "#FFFFFF", /* default foreground colour */ + "#1A191C", /* default background colour */ +}; + + +/* + * Default colors (colorname index) + * foreground, background, cursor, reverse cursor + */ +unsigned int defaultfg = 258; +unsigned int defaultbg = 259; +unsigned int defaultcs = 256; +static unsigned int defaultrcs = 257; + +/* + * Default shape of cursor + * 2: Block ("█") + * 4: Underline ("_") + * 6: Bar ("|") + * 7: Snowman ("☃") + */ +static unsigned int cursorshape = 2; + +/* + * Default columns and rows numbers + */ + +static unsigned int cols = 80; +static unsigned int rows = 24; + +/* + * Default colour and shape of the mouse cursor + */ +static unsigned int mouseshape = XC_xterm; +static unsigned int mousefg = 7; +static unsigned int mousebg = 0; + +/* + * Color used to display font attributes when fontconfig selected a font which + * doesn't match the ones requested. + */ +static unsigned int defaultattr = 11; + +/* + * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set). + * Note that if you want to use ShiftMask with selmasks, set this to an other + * modifier, set to 0 to not use it. + */ +static uint forcemousemod = ShiftMask; + +/* + * Internal mouse shortcuts. + * Beware that overloading Button1 will disable the selection. + */ +static MouseShortcut mshortcuts[] = { + /* mask button function argument release */ + { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, + { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, + { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, + { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, + { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, +}; + +/* Internal keyboard shortcuts. */ +#define MODKEY Mod1Mask +#define TERMMOD (ControlMask|ShiftMask) + +static Shortcut shortcuts[] = { + /* mask keysym function argument */ + { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, + { ControlMask, XK_Print, toggleprinter, {.i = 0} }, + { ShiftMask, XK_Print, printscreen, {.i = 0} }, + { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, + { TERMMOD, XK_Prior, zoom, {.f = +1} }, + { TERMMOD, XK_Next, zoom, {.f = -1} }, + { TERMMOD, XK_Home, zoomreset, {.f = 0} }, + { TERMMOD, XK_C, clipcopy, {.i = 0} }, + { TERMMOD, XK_V, clippaste, {.i = 0} }, + { TERMMOD, XK_Y, selpaste, {.i = 0} }, + { ShiftMask, XK_Insert, selpaste, {.i = 0} }, + { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, +}; + +/* + * Special keys (change & recompile st.info accordingly) + * + * Mask value: + * * Use XK_ANY_MOD to match the key no matter modifiers state + * * Use XK_NO_MOD to match the key alone (no modifiers) + * appkey value: + * * 0: no value + * * > 0: keypad application mode enabled + * * = 2: term.numlock = 1 + * * < 0: keypad application mode disabled + * appcursor value: + * * 0: no value + * * > 0: cursor application mode enabled + * * < 0: cursor application mode disabled + * + * Be careful with the order of the definitions because st searches in + * this table sequentially, so any XK_ANY_MOD must be in the last + * position for a key. + */ + +/* + * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF) + * to be mapped below, add them to this array. + */ +static KeySym mappedkeys[] = { -1 }; + +/* + * State bits to ignore when matching key or button events. By default, + * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored. + */ +static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; + +/* + * This is the huge key array which defines all compatibility to the Linux + * world. Please decide about changes wisely. + */ +static Key key[] = { + /* keysym mask string appkey appcursor */ + { XK_KP_Home, ShiftMask, "\033[2J", 0, -1}, + { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1}, + { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1}, + { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1}, + { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0}, + { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1}, + { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1}, + { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0}, + { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1}, + { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1}, + { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0}, + { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1}, + { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1}, + { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0}, + { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1}, + { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1}, + { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0}, + { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0}, + { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0}, + { XK_KP_End, ControlMask, "\033[J", -1, 0}, + { XK_KP_End, ControlMask, "\033[1;5F", +1, 0}, + { XK_KP_End, ShiftMask, "\033[K", -1, 0}, + { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0}, + { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0}, + { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0}, + { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0}, + { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0}, + { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0}, + { XK_KP_Insert, ControlMask, "\033[L", -1, 0}, + { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0}, + { XK_KP_Delete, ControlMask, "\033[M", -1, 0}, + { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0}, + { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0}, + { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, + { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0}, + { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0}, + { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0}, + { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0}, + { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0}, + { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0}, + { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0}, + { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0}, + { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0}, + { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0}, + { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0}, + { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0}, + { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0}, + { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0}, + { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0}, + { XK_Up, ShiftMask, "\033[1;2A", 0, 0}, + { XK_Up, Mod1Mask, "\033[1;3A", 0, 0}, + { XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0}, + { XK_Up, ControlMask, "\033[1;5A", 0, 0}, + { XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0}, + { XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0}, + { XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0}, + { XK_Up, XK_ANY_MOD, "\033[A", 0, -1}, + { XK_Up, XK_ANY_MOD, "\033OA", 0, +1}, + { XK_Down, ShiftMask, "\033[1;2B", 0, 0}, + { XK_Down, Mod1Mask, "\033[1;3B", 0, 0}, + { XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0}, + { XK_Down, ControlMask, "\033[1;5B", 0, 0}, + { XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0}, + { XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0}, + { XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0}, + { XK_Down, XK_ANY_MOD, "\033[B", 0, -1}, + { XK_Down, XK_ANY_MOD, "\033OB", 0, +1}, + { XK_Left, ShiftMask, "\033[1;2D", 0, 0}, + { XK_Left, Mod1Mask, "\033[1;3D", 0, 0}, + { XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0}, + { XK_Left, ControlMask, "\033[1;5D", 0, 0}, + { XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0}, + { XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0}, + { XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0}, + { XK_Left, XK_ANY_MOD, "\033[D", 0, -1}, + { XK_Left, XK_ANY_MOD, "\033OD", 0, +1}, + { XK_Right, ShiftMask, "\033[1;2C", 0, 0}, + { XK_Right, Mod1Mask, "\033[1;3C", 0, 0}, + { XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0}, + { XK_Right, ControlMask, "\033[1;5C", 0, 0}, + { XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0}, + { XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0}, + { XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0}, + { XK_Right, XK_ANY_MOD, "\033[C", 0, -1}, + { XK_Right, XK_ANY_MOD, "\033OC", 0, +1}, + { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0}, + { XK_Return, Mod1Mask, "\033\r", 0, 0}, + { XK_Return, XK_ANY_MOD, "\r", 0, 0}, + { XK_Insert, ShiftMask, "\033[4l", -1, 0}, + { XK_Insert, ShiftMask, "\033[2;2~", +1, 0}, + { XK_Insert, ControlMask, "\033[L", -1, 0}, + { XK_Insert, ControlMask, "\033[2;5~", +1, 0}, + { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0}, + { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0}, + { XK_Delete, ControlMask, "\033[M", -1, 0}, + { XK_Delete, ControlMask, "\033[3;5~", +1, 0}, + { XK_Delete, ShiftMask, "\033[2K", -1, 0}, + { XK_Delete, ShiftMask, "\033[3;2~", +1, 0}, + { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, + { XK_BackSpace, XK_NO_MOD, "\177", 0, 0}, + { XK_BackSpace, Mod1Mask, "\033\177", 0, 0}, + { XK_Home, ShiftMask, "\033[2J", 0, -1}, + { XK_Home, ShiftMask, "\033[1;2H", 0, +1}, + { XK_Home, XK_ANY_MOD, "\033[H", 0, -1}, + { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1}, + { XK_End, ControlMask, "\033[J", -1, 0}, + { XK_End, ControlMask, "\033[1;5F", +1, 0}, + { XK_End, ShiftMask, "\033[K", -1, 0}, + { XK_End, ShiftMask, "\033[1;2F", +1, 0}, + { XK_End, XK_ANY_MOD, "\033[4~", 0, 0}, + { XK_Prior, ControlMask, "\033[5;5~", 0, 0}, + { XK_Prior, ShiftMask, "\033[5;2~", 0, 0}, + { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0}, + { XK_Next, ControlMask, "\033[6;5~", 0, 0}, + { XK_Next, ShiftMask, "\033[6;2~", 0, 0}, + { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0}, + { XK_F1, XK_NO_MOD, "\033OP" , 0, 0}, + { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0}, + { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0}, + { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0}, + { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0}, + { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0}, + { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0}, + { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0}, + { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0}, + { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0}, + { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0}, + { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0}, + { XK_F3, XK_NO_MOD, "\033OR" , 0, 0}, + { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0}, + { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0}, + { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0}, + { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0}, + { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0}, + { XK_F4, XK_NO_MOD, "\033OS" , 0, 0}, + { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0}, + { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0}, + { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0}, + { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0}, + { XK_F5, XK_NO_MOD, "\033[15~", 0, 0}, + { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0}, + { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0}, + { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0}, + { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0}, + { XK_F6, XK_NO_MOD, "\033[17~", 0, 0}, + { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0}, + { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0}, + { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0}, + { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0}, + { XK_F7, XK_NO_MOD, "\033[18~", 0, 0}, + { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0}, + { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0}, + { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0}, + { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0}, + { XK_F8, XK_NO_MOD, "\033[19~", 0, 0}, + { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0}, + { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0}, + { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0}, + { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0}, + { XK_F9, XK_NO_MOD, "\033[20~", 0, 0}, + { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0}, + { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0}, + { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0}, + { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0}, + { XK_F10, XK_NO_MOD, "\033[21~", 0, 0}, + { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0}, + { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0}, + { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0}, + { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0}, + { XK_F11, XK_NO_MOD, "\033[23~", 0, 0}, + { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0}, + { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0}, + { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0}, + { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0}, + { XK_F12, XK_NO_MOD, "\033[24~", 0, 0}, + { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0}, + { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0}, + { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0}, + { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0}, + { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0}, + { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0}, + { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0}, + { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0}, + { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0}, + { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0}, + { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0}, + { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0}, + { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0}, + { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0}, + { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0}, + { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0}, + { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0}, + { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0}, + { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0}, + { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0}, + { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0}, + { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0}, + { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0}, + { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0}, + { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0}, + { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0}, + { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0}, +}; + +/* + * Selection types' masks. + * Use the same masks as usual. + * Button1Mask is always unset, to make masks match between ButtonPress. + * ButtonRelease and MotionNotify. + * If no match is found, regular selection is used. + */ +static uint selmasks[] = { + [SEL_RECTANGULAR] = Mod1Mask, +}; + +/* + * Printable characters in ASCII, used to estimate the advance width + * of single wide characters. + */ +static char ascii_printable[] = + " !\"#$%&'()*+,-./0123456789:;<=>?" + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~"; diff --git a/update.sh b/update.sh index 495d551..4a71812 100644 --- a/update.sh +++ b/update.sh @@ -2,8 +2,13 @@ rm -rf .config/ mkdir .config/ # Alacritty -cp -r ~/.config/alacritty .config -rm .config/alacritty/install.log +# cp -r ~/.config/alacritty .config +# rm .config/alacritty/install.log + +# st +cp ~/git/st/config.h ./st_config.h +cp ~/git/dwm/config.h ./dwm_config.h +cp ~/git/dmenu/config.h ./dmenu_config.h # Neovim cp -r ~/.config/nvim .config @@ -12,10 +17,10 @@ rm -rf .config/nvim/live-server rm .config/nvim/.luarc.json # i3 -cp -r ~/.config/i3 .config +# cp -r ~/.config/i3 .config # polybar -cp -r ~/.config/polybar .config +# cp -r ~/.config/polybar .config # picom -cp -r ~/.config/picom .config +# cp -r ~/.config/picom .config -- cgit v1.3-2-g0d8e