summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-08-02 22:13:57 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-08-02 22:13:57 -0400
commit3bad8f5d64170ab0ed582a37838e120bec87fb90 (patch)
treeaebe3af0b9f2020533f2e8b7e9d1607923ee400c
parent9df360b86c31398348e66ef9c3dc77b2d84ff3bd (diff)
downloaddotfiles-3bad8f5d64170ab0ed582a37838e120bec87fb90.tar.gz
add x11 and i3 stuff
-rw-r--r--i3/.config/i3/config138
-rw-r--r--i3/.config/i3status/config56
-rw-r--r--sh/.shrc4
-rw-r--r--x11/.Xresources66
-rw-r--r--x11/.xinitrc24
-rw-r--r--x11/.xsession4
6 files changed, 292 insertions, 0 deletions
diff --git a/i3/.config/i3/config b/i3/.config/i3/config
new file mode 100644
index 0000000..4ab317f
--- /dev/null
+++ b/i3/.config/i3/config
@@ -0,0 +1,138 @@
+# use windows key as modifier
+set $mod Mod4
+
+# font
+set_from_resource $font i3wm.font -xos4-terminus-medium-r-normal-*-12-*-*-*-*-*-iso10646-*
+set_from_resource $xft_font i3wm.xft_font Terminus:pixelsize=12:encoding=iso10646
+font $font
+
+# use windows key + drag to move/resize windows
+floating_modifier $mod
+
+# kill focused window
+bindsym $mod+w kill
+
+# change focus
+bindsym $mod+h focus left
+bindsym $mod+j focus down
+bindsym $mod+k focus up
+bindsym $mod+l focus right
+
+# alternatively, you can use the cursor keys:
+bindsym $mod+Left focus left
+bindsym $mod+Down focus down
+bindsym $mod+Up focus up
+bindsym $mod+Right focus right
+
+# move focused window
+bindsym $mod+Shift+h move left
+bindsym $mod+Shift+j move down
+bindsym $mod+Shift+k move up
+bindsym $mod+Shift+l move right
+
+# alternatively, you can use the cursor keys:
+bindsym $mod+Shift+Left move left
+bindsym $mod+Shift+Down move down
+bindsym $mod+Shift+Up move up
+bindsym $mod+Shift+Right move right
+
+# split in horizontal/vertical orientation
+bindsym $mod+b split h
+bindsym $mod+v split v
+
+# enter fullscreen mode for the focused container
+bindsym $mod+f fullscreen toggle
+
+# toggle showing window on all workspaces
+bindsym $mod+s sticky toggle
+
+# cycle through layouts for container (stacked, tabbed, split)
+bindsym $mod+x layout toggle
+
+# toggle tiling / floating
+bindsym $mod+Shift+space floating toggle
+
+# change focus between tiling / floating windows
+bindsym $mod+space focus mode_toggle
+
+# focus the parent container
+bindsym $mod+a focus parent
+
+# focus the child container
+bindsym $mod+c focus child
+
+# switch to workspace
+bindsym $mod+1 workspace 1
+bindsym $mod+2 workspace 2
+bindsym $mod+3 workspace 3
+bindsym $mod+4 workspace 4
+bindsym $mod+5 workspace 5
+bindsym $mod+6 workspace 6
+bindsym $mod+7 workspace 7
+bindsym $mod+8 workspace 8
+bindsym $mod+9 workspace 9
+bindsym $mod+0 workspace 10
+
+# move focused container to workspace
+bindsym $mod+Shift+1 move container to workspace 1
+bindsym $mod+Shift+2 move container to workspace 2
+bindsym $mod+Shift+3 move container to workspace 3
+bindsym $mod+Shift+4 move container to workspace 4
+bindsym $mod+Shift+5 move container to workspace 5
+bindsym $mod+Shift+6 move container to workspace 6
+bindsym $mod+Shift+7 move container to workspace 7
+bindsym $mod+Shift+8 move container to workspace 8
+bindsym $mod+Shift+9 move container to workspace 9
+bindsym $mod+Shift+0 move container to workspace 10
+
+# move window to the scratchpad
+bindsym $mod+Shift+minus move scratchpad
+
+# show the scratchpad
+bindsym $mod+minus scratchpad show
+
+# reload the configuration file
+bindsym $mod+Shift+c reload
+
+# restart i3 inplace
+bindsym $mod+Shift+r restart
+
+# exit i3
+bindsym $mod+Shift+e exec --no-startup-id "i3-nagbar -f '$font' -t warning -m 'Exit i3?' -b 'yes' 'i3-msg exit'"
+
+# resize window (you can also use the mouse for that)
+mode "resize" {
+ bindsym h resize shrink width 10 px or 10 ppt
+ bindsym j resize grow height 10 px or 10 ppt
+ bindsym k resize shrink height 10 px or 10 ppt
+ bindsym l resize grow width 10 px or 10 ppt
+
+ # same bindings, but for the arrow keys
+ bindsym Left resize shrink width 10 px or 10 ppt
+ bindsym Down resize grow height 10 px or 10 ppt
+ bindsym Up resize shrink height 10 px or 10 ppt
+ bindsym Right resize grow width 10 px or 10 ppt
+
+ # back to normal: Enter or Escape
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
+}
+bindsym $mod+r mode "resize"
+
+# i3status in bar, with system tray
+bar {
+ font $font
+ status_command i3status
+}
+
+# windows to automatically float
+for_window[class="XClock"] floating enable
+
+# Application keybindings
+bindsym $mod+Return exec --no-startup-id xterm
+bindsym Control+Mod1+l exec --no-startup-id pkill -USR1 xidle
+bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu='dmenu -b -i -fn $xft_font'
+bindsym --release $mod+Shift+q exec --no-startup-id xkill
+bindsym XF86AudioLowerVolume exec --no-startup-id mixer vol.volume=-5% && pkill -USR1 i3status
+bindsym XF86AudioRaiseVolume exec --no-startup-id mixer vol.volume=+5% && pkill -USR1 i3status
+bindsym XF86AudioMute exec --no-startup-id mixer vol.mute=toggle && pkill -USR1 i3status
diff --git a/i3/.config/i3status/config b/i3/.config/i3status/config
new file mode 100644
index 0000000..86504f1
--- /dev/null
+++ b/i3/.config/i3status/config
@@ -0,0 +1,56 @@
+general {
+ colors = true
+ interval = 5
+ output_format = "i3bar"
+}
+
+ethernet _first_ {
+ format_up = "eth %ip"
+ format_down = ""
+}
+
+wireless _first_ {
+ format_up = "%essid %ip"
+ format_down = ""
+}
+
+tztime local {
+ format = "%A %Y-%m-%d %H:%M"
+}
+
+volume master {
+ format = "♪ %volume"
+ format_muted = "♪ MUTE"
+}
+
+battery all {
+ format = "%status %percentage"
+ format_down = ""
+ low_threshold = 15
+ integer_battery_capacity = true
+}
+
+load {
+ format = "%1min"
+}
+
+memory {
+ format = "%available"
+ threshold_degraded = "25%"
+ threshold_critical = "10%"
+}
+
+disk "/" {
+ format = "/ %avail"
+ low_threshold = 10
+ threshold_type = percentage_free
+}
+
+order += "ethernet _first_"
+order += "wireless _first_"
+order += "disk /"
+order += "load"
+order += "memory"
+order += "volume master"
+order += "battery all"
+order += "tztime local"
diff --git a/sh/.shrc b/sh/.shrc
index ee2d5ac..402c592 100644
--- a/sh/.shrc
+++ b/sh/.shrc
@@ -23,3 +23,7 @@ bind ^[[A ed-search-prev-history
bind ^[[B ed-search-next-history
bind "\\e[1;5C" em-next-word
bind "\\e[1;5D" ed-prev-word
+
+if [ "$(tty)" = /dev/ttyv0 ]; then
+ startx
+fi
diff --git a/x11/.Xresources b/x11/.Xresources
new file mode 100644
index 0000000..bfac7a0
--- /dev/null
+++ b/x11/.Xresources
@@ -0,0 +1,66 @@
+#ifndef FONT
+#define FONT -xos4-terminus-medium-r-normal-*-12-*-*-*-*-*-iso10646-*
+#endif
+
+#ifndef XFT_FONT
+#define XFT_FONT Terminus:pixelsize=12:encoding=iso10646
+#endif
+
+#ifndef DPI
+#define DPI 96
+#endif
+
+Xft.dpi: DPI
+Xft.autohint: 0
+Xft.lcdfilter: lcddefault
+Xft.hintstyle: hintslight
+Xft.hinting: 1
+Xft.antialias: 1
+Xft.rgba: rgb
+
+*font: FONT
+i3wm.xft_font: XFT_FONT
+
+! zenburn
+XTerm*background: #3a3a3a
+XTerm*foreground: #dcdccc
+XTerm*cursorColor: #ffffff
+XTerm*colorUL: #366060
+XTerm*underlineColor: #dfaf8f
+XTerm*color0: #1e2320
+XTerm*color1: #d78787
+XTerm*color2: #60b48a
+XTerm*color3: #dfaf8f
+XTerm*color4: #506070
+XTerm*color5: #dc8cc3
+XTerm*color6: #8cd0d3
+XTerm*color7: #dcdccc
+XTerm*color8: #709080
+XTerm*color9: #dca3a3
+XTerm*color10: #c3bf9f
+XTerm*color11: #f0dfaf
+XTerm*color12: #94bff3
+XTerm*color13: #ec93d3
+XTerm*color14: #93e0e3
+XTerm*color15: #ffffff
+XTerm*borderWidth: 0
+XTerm*internalBorder: 2
+XTerm*termName: xterm-256color
+XTerm*utf8: true
+XTerm*vt100.utf8: true
+XTerm*vt100.locale: false
+XTerm*vt100.metaSendsEscape: true
+XTerm*vt100.saveLines: 10240
+XTerm*vt100.scrollBar: false
+XTerm*vt100.bellIsUrgent: true
+XTerm*vt100.translations: #override \
+ Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\
+ Ctrl Shift <Key>C: copy-selection(CLIPBOARD)
+XTerm*allowBoldFonts: false
+XTerm*scrollKey: true
+XTerm*scrollTtyOutput: false
+XTerm*fullscreen: never
+XTerm*cutToBeginningOfLine: false
+XTerm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
+XTerm*on2Clicks: word
+XTerm*on3Clicks: line
diff --git a/x11/.xinitrc b/x11/.xinitrc
new file mode 100644
index 0000000..5a1c4fc
--- /dev/null
+++ b/x11/.xinitrc
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+dpi=96
+bg_color=696969
+font_size=12
+xidle_timeout=900
+
+case $(hostname -s) in
+ rlaptop1)
+ font_size=16
+ ;;
+esac
+
+font="-xos4-terminus-medium-r-normal-*-${font_size}-*-*-*-*-*-iso10646-*"
+xft_font="Terminus:pixelslize=${font_size}:encoding=iso10646"
+
+xrdb -DDPI="$dpi" -DFONT="$font" -DXFT_FONT="$xft_font" -merge "${HOME}/.Xresources"
+xsetroot -solid "#${bg_color}"
+xset b off
+setxkbmap -option ctrl:nocaps
+xidle -program "$(which i3lock) -e -c ${bg_color}" -timeout "$xidle_timeout" &
+sudo -n networkmgr &
+
+exec i3
diff --git a/x11/.xsession b/x11/.xsession
new file mode 100644
index 0000000..25bc758
--- /dev/null
+++ b/x11/.xsession
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+. "${HOME}/.profile"
+. "${HOME}/.xinitrc"