ab95163c5b5012c8e0b1ad3494ee315ebbd700a8

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Add sway config

Diff

This diff is truncated to protect this page.

  1diff --git a/dot_config/bumblebee-status/top.toml.tmpl b/dot_config/bumblebee-status/top.toml.tmpl
  2index ca2af01533e77371e3d8e7a3b1fb2f15cc4b2a24..739bbcc809ad95d8f59456aca5415dc4e74b1f54 100644
  3--- a/dot_config/bumblebee-status/top.toml.tmpl
  4+++ b/dot_config/bumblebee-status/top.toml.tmpl
  5@@ -1,5 +1,5 @@
  6 [core]
  7-modules=playerctl, dunst, {{ .i3.bumblebee.modules }} sensors, pulsein, pulseout, date, time
  8+modules=playerctl, dunst, {{ .bumblebee.modules }} sensors, pulsein, pulseout, date, time
  9 autohide=#comma-separated list of modules to hide, unless in warning/error state
 10 theme=gruvbox-powerline
 11 
 12@@ -24,5 +24,5 @@ date.format=%a, %Y-%m-%d
 13 date.interval=30
 14 time.format=%H:%M:%S
 15 time.interval=1
 16-{{ range $_, $param := .i3.bumblebee.parameters -}}{{ $param.key }}={{ $param.value }}
 17+{{ range $_, $param := .bumblebee.parameters -}}{{ $param.key }}={{ $param.value }}
 18 {{end}}
 19diff --git a/dot_config/sway/autoname-workspaces.py b/dot_config/sway/autoname-workspaces.py
 20new file mode 100644
 21index 0000000000000000000000000000000000000000..e1522b6d53efeab29362e6a3b9d85ab4ce32e9f3
 22--- /dev/null
 23+++ b/dot_config/sway/autoname-workspaces.py
 24@@ -0,0 +1,238 @@
 25+#!/usr/bin/env python3
 26+
 27+# This script listens for i3 events and updates workspace names to show icons
 28+# for running programs. It contains icons for a few programs, but more can
 29+# easily be added by inserting them into WINDOW_ICONS below.
 30+#
 31+# Dependencies: xorg-xprop i3ipc fontawesome
 32+#
 33+# Installation:
 34+# Add "exec_always ~/.config/i3/i3-autoname-workspaces.py &" to the i3 config
 35+#
 36+# Configuration:
 37+# The default i3 config's keybingings reference workspaces by name, which is an
 38+# issue when using this script because the "names" are constantaly changing to
 39+# show window icons. Instead, you'll need to change the keybindings to
 40+# reference workspaces by number. Change lines like:
 41+#   bindsym $mod+1 workspace 1
 42+# To:
 43+#   bindsym $mod+1 workspace number 1
 44+
 45+import re
 46+import signal
 47+import subprocess as proc
 48+from types import FrameType
 49+from typing import Any, Callable
 50+
 51+import nerdfonts as nf
 52+from i3ipc import Connection
 53+
 54+# Add icons here for common programs you use. The keys are the X window class
 55+# (WM_CLASS) names (lower-cased) and the icons can be any text you want to
 56+# display.
 57+#
 58+# These icons are from the Nerd Font patch set.
 59+# You can find a list of all here: https://www.nerdfonts.com/cheat-sheet
 60+#
 61+# If you're not sure what the WM_CLASS is for your application, you can use
 62+# xprop (https://linux.die.net/man/1/xprop). Run `xprop | grep WM_CLASS`
 63+# then click on the application you want to inspect.
 64+WINDOW_ICONS: dict[str, str] = {
 65+    'alacritty': nf.icons['fa_terminal'],
 66+    'blender': nf.icons['fa_cube'],
 67+    'blueman-manager': nf.icons['fa_bluetooth'],
 68+    'brave-browser': nf.icons['fa_globe'],
 69+    'calibre-gui': nf.icons['fa_book'],
 70+    'chromium': nf.icons['fa_chrome'],
 71+    'cities.x64': nf.icons['md_city'],
 72+    'clonehero': nf.icons['md_guitar_electric'],
 73+    'code-oss': nf.icons['fa_code'],
 74+    'vscodium': nf.icons['fa_code'],
 75+    'cutter': nf.icons['fa_bug'],
 76+    'darktable': nf.icons['md_camera'],
 77+    'discord': nf.icons['fa_comment'],
 78+    'dwarf_fortress': nf.icons['fa_fort_awesome'],
 79+    'easyeffects': nf.icons['fa_music'],
 80+    'evince': nf.icons['fa_file_pdf_o'],
 81+    'factorio': nf.icons['fa_cog'],
 82+    'feh': nf.icons['md_image'],
 83+    'firefox': nf.icons['fa_firefox'],
 84+    'firefoxdeveloperedition': nf.icons['fa_firefox'],
 85+    'ghb': nf.icons['md_video'],
 86+    'gimp': nf.icons['fa_paint_brush'],
 87+    'gimp-2.10': nf.icons['fa_paint_brush'],
 88+    'gparted': nf.icons['fa_hdd_o'],
 89+    'gsmartcontrol': nf.icons['fa_hdd_o'],
 90+    'hoppscotch-app': nf.icons['md_ufo'],
 91+    'inkscape': nf.icons['md_fountain_pen_tip'],
 92+    'insomnium': nf.icons['md_graphql'],
 93+    'kcharselect': nf.icons['fa_font'],
 94+    'kicad': nf.icons['fa_microchip'],
 95+    'ksp.x86_64': nf.icons['fa_space_shuttle'],
 96+    'ledger live': nf.icons['md_wallet'],
 97+    'libreoffice-calc': nf.icons['fa_file_excel_o'],
 98+    'libreoffice-impress': nf.icons['fa_file_powerpoint_o'],
 99+    'libreoffice-writer': nf.icons['fa_file_word_o'],
100+    'lutris': nf.icons['fa_gamepad'],
101+    'mpv': nf.icons['md_video'],
102+    'polymc': nf.icons['md_minecraft'],
103+    'minecraft': nf.icons['md_minecraft'],
104+    'mupdf': nf.icons['fa_file_pdf_o'],
105+    'nemiver': nf.icons['fa_bug'],
106+    'nm-connection-editor': nf.icons['fa_wifi'],
107+    'obs': nf.icons['md_video'],
108+    'openlens': nf.icons['md_kubernetes'],
109+    'org.gnome.nautilus': nf.icons['fa_folder'],
110+    'pavucontrol': nf.icons['fa_volume_up'],
111+    'picard': nf.icons['fa_music'],
112+    'qbittorrent': nf.icons['fa_download'],
113+    'qtcreator': nf.icons['fa_code'],
114+    'seahorse': nf.icons['fa_lock'],
115+    'simplescreenrecorder': nf.icons['md_video'],
116+    'slack': nf.icons['fa_slack'],
117+    'spotify': nf.icons['fa_spotify'],
118+    'sqlitebrowser': nf.icons['fa_database'],
119+    'steam': nf.icons['md_steam'],
120+    'steam_app_671860': nf.icons['md_pistol'],  # battlebit
121+    'steam_app_1336490': nf.icons['fae_storm'],  # against the storm
122+    'surviving mars': nf.icons['fa_rocket'],
123+    'telegram-desktop': nf.icons['fa_telegram'],
124diff --git a/dot_config/sway/config.tmpl b/dot_config/sway/config.tmpl
125new file mode 100644
126index 0000000000000000000000000000000000000000..28727887180d365b177b767c17a854effa4926d6
127--- /dev/null
128+++ b/dot_config/sway/config.tmpl
129@@ -0,0 +1,264 @@
130+# vim: ft=swayconfig ts=4 sts=4 sw=4 noet
131+
132+set $foreground	#ebdbb2
133+set $background	#282828
134+set $color0		#1d2021
135+set $color1		#cc241d
136+set $color2		#98971a
137+set $color3		#d79921
138+set $color4		#458588
139+set $color5		#b16286
140+set $color6		#689d6a
141+set $color7		#a89984
142+set $color8		#665c54
143+set $color9		#fb4934
144+set $color10	#b8bb26
145+set $color11	#fabd2f
146+set $color12	#83a598
147+set $color13	#d3869b
148+set $color14	#8ec07c
149+set $color15	#fbf1c7
150+set $color16	#d65d0e
151+set $color17	#fe8019
152+
153+set $mod Mod4
154+set $left h
155+set $down n
156+set $up e
157+set $right i
158+
159+set $telegram ""
160+set $firefox ""
161+set $thunderbird ""
162+
163+# Font for window titles. Will also be used by the bar unless a different font
164+# is used in the bar {} block below.
165+font pango:MonoFont {{ .sway.font_size }}
166+
167+#class						background		border			text			split
168+client.focused				$color8			$color8			$foreground		$color7
169+client.focused_inactive		$background		$background		$color7			$color0
170+client.unfocused			$color0			$background		$color8			$color0
171+client.urgent				$color1			$color1			$foreground		$color1
172+client.background			$background
173+
174+# Use Mouse+$mod to drag floating windows to their wanted position
175+floating_modifier $mod
176+
177+# kill focused window
178+bindsym $mod+Shift+q kill
179+
180+# change focus
181+bindsym $mod+$left focus left
182+bindsym $mod+$down focus down
183+bindsym $mod+$up focus up
184+bindsym $mod+$right focus right
185+
186+# move focused window
187+bindsym $mod+Shift+$left move left
188+bindsym $mod+Shift+$down move down
189+bindsym $mod+Shift+$up move up
190+bindsym $mod+Shift+$right move right
191+
192+# move workspace to other outputs
193+bindsym $mod+Control+$left move workspace to output left
194+bindsym $mod+Control+$down move workspace to output down
195+bindsym $mod+Control+$up move workspace to output up
196+bindsym $mod+Control+$right move workspace to output right
197+
198+# split in horizontal orientation
199+bindsym $mod+c split h
200+
201+# split in vertical orientation
202+bindsym $mod+v split v
203+
204+# enter fullscreen mode for the focused container
205+bindsym $mod+f fullscreen toggle
206+
207+# change container layout (tabbed, toggle split)
208+bindsym $mod+s layout toggle split
209+bindsym $mod+t layout tabbed
210+
211+# toggle tiling / floating
212+bindsym $mod+Shift+space floating toggle
213+bindsym $mod+Shift+BackSpace floating toggle
214+bindsym $mod+g focus mode_toggle
215+bindsym $mod+a focus parent
216+
217+bindsym $mod+Tab workspace next
218+bindsym $mod+Shift+Tab workspace prev
219+
220+# switch to workspace
221+bindsym $mod+1 workspace number 1
222+bindsym $mod+2 workspace number 2
223+bindsym $mod+3 workspace number 3
224+bindsym $mod+4 workspace number 4
225+bindsym $mod+5 workspace number 5
226+bindsym $mod+6 workspace number 6
227+bindsym $mod+7 workspace number 7
228+bindsym $mod+8 workspace number 8