From 3fade8914b81f7973246ce2ea6fd95b7e76b20ea Mon Sep 17 00:00:00 2001 From: Adam Shamblin Date: Tue, 15 Mar 2022 18:20:58 -0600 Subject: [PATCH] Update for X and i3wm --- Brewfile.bak | 56 ------------- Makefile | 17 +++- dotbash_profile | 1 + dotxmodmaprc | 6 ++ dotxprofile | 6 ++ i3/i3.conf | 214 +++++++++++++++++++++++++++++++++++++++++++++++ i3/i3status.conf | 53 ++++++++++++ 7 files changed, 295 insertions(+), 58 deletions(-) delete mode 100644 Brewfile.bak create mode 100644 dotxmodmaprc create mode 100644 dotxprofile create mode 100644 i3/i3.conf create mode 100644 i3/i3status.conf diff --git a/Brewfile.bak b/Brewfile.bak deleted file mode 100644 index 9647ba4..0000000 --- a/Brewfile.bak +++ /dev/null @@ -1,56 +0,0 @@ -tap "caskroom/cask" -tap "homebrew/cask-versions" -tap "homebrew/bundle" -tap "homebrew/cask" -tap "homebrew/core" -brew "bash" -brew "expat" -brew "ghostscript" -brew "git" -brew "python" -brew "python@2" -brew "gnu-sed" -brew "go" -brew "htmldoc" -brew "imagemagick" -brew "jq" -brew "libxslt" -brew "ruby" -brew "make" -brew "md5sha1sum" -brew "minicom" -brew "minimodem" -brew "mitmproxy" -brew "ncftp" -brew "ncurses" -brew "nmap" -brew "node" -brew "nvm" -brew "openvpn" -brew "siege" -brew "telnet" -brew "watch" -brew "wget" -brew "wireguard-tools" -brew "zeromq" -cask "balenaetcher" -cask "docker" -cask "gimp" -cask "google-chrome" -cask "insomnia" -cask "java" -cask "java11" -cask "keybase" -cask "libreoffice" -cask "minikube" -cask "osxfuse" -cask "owasp-zap" -cask "postgres" -cask "rowanj-gitx" -cask "signal" -cask "transmission" -cask "tunnelblick" -cask "veracrypt" -cask "virtualbox" -cask "virtualbox-extension-pack" -cask "vlc" diff --git a/Makefile b/Makefile index 9fc0521..61fc46a 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,15 @@ -all: clean build +all: clean install clean: rm -rf ~/.bash_profile + rm -rf ~/.xprofile + rm -rf ~/.xmodmaprc rm -rf ~/.vimrc rm -rf ~/.vim + rm -rf ~/.config/i3 + rm -rf ~/.config/i3status -build: +install: xorg i3 git submodule init git submodule update ln -s $(CURDIR)/dotbash_profile ~/.bash_profile @@ -14,5 +18,14 @@ build: mkdir -p ~/env mkdir -p ~/.saves +xorg: + ln -s $(CURDIR)/dotxprofile ~/.xprofile + ln -s $(CURDIR)/doxmodmaprc ~/.xmodmaprc + +i3: + mkdir -p ~/.config/i3 ~/.config/i3status + ln -s $(CURDIR)/i3/i3.conf ~/.config/i3/config + ln -s $(CURDIR)/i3/i3status.conf ~/.config/i3status/config + brew: brew bundle diff --git a/dotbash_profile b/dotbash_profile index 43ffd4f..5de6b57 100644 --- a/dotbash_profile +++ b/dotbash_profile @@ -4,6 +4,7 @@ # ################################################## +export TERMINAL=tilix ################################################## # diff --git a/dotxmodmaprc b/dotxmodmaprc new file mode 100644 index 0000000..92e0cbe --- /dev/null +++ b/dotxmodmaprc @@ -0,0 +1,6 @@ +remove Lock = Caps_Lock +remove Control = Control_R +keysym Control_R = Caps_Lock +keysym Caps_Lock = Control_R +add Lock = Caps_Lock +add Control = Control_R diff --git a/dotxprofile b/dotxprofile new file mode 100644 index 0000000..84c8a17 --- /dev/null +++ b/dotxprofile @@ -0,0 +1,6 @@ +#!/bin/sh + +xrandr --newmode "2560x1080_68.00" 264.25 2560 2736 3008 3456 1080 1083 1093 1126 -hsync +vsync +xrandr --addmode HDMI-1 2560x1080_68.00 +xrandr --output eDP-1 --mode 1366x768 --pos 0x0 --rotate normal --output VGA-1 --off --output DP-1 --off --output HDMI-1 --primary --mode 2560x1080_68.00 --pos 1366x0 --rotate normal --output DP-2 --off --output HDMI-2 --off +xinput set-prop "Logitech USB Optical Mouse" "libinput Natural Scrolling Enabled" 1 diff --git a/i3/i3.conf b/i3/i3.conf new file mode 100644 index 0000000..f1ea828 --- /dev/null +++ b/i3/i3.conf @@ -0,0 +1,214 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +#font pango:Exo 2:style=Regular 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet + +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +set $default_sink alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo +exec --no-startup-id pactl set-default-sink $default_sink && $refresh_i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $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 + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec i3-sensible-terminal + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +bindsym $mod+d exec --no-startup-id dmenu_run +# A more modern dmenu replacement is rofi: +# bindcode $mod+40 exec "rofi -modi drun,run -show drun" +# There also is i3-dmenu-desktop which only displays applications shipping a +# .desktop file. It is a wrapper around dmenu, so you need that installed. +# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon 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+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon 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 orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# 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+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +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" + +# switch to workspace +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 + +# move focused container to workspace +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 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +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'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon 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 or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Theming, ala Gruvbox +font pango:Exo 2:style=Regular 8 + +set $gruv_bg #282828 +set $gruv_bg1 #3c3836 +set $gruv_fg #ebdbb2 +set $gruv_fg0 #fbf1c7 +set $gruv_fg1 #ebdbb2 +set $gruv_fg4 #a89984 +set $gruv_red #cc241d +set $gruv_blue #076678 +set $gruv_green #b8bb26 + +client.focused $gruv_bg $gruv_bg $gruv_fg $gruv_bg $gruv_bg +client.unfocused $gruv_bg1 $gruv_bg1 $gruv_fg1 $gruv_bg1 $gruv_bg1 +client.focused_inactive $gruv_bg1 $gruv_bg1 $gruv_fg1 $gruv_bg1 $gruv_bg1 +client.background $gruv_bg +hide_edge_borders smart + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command i3status + colors { + background $gruv_bg + statusline $gruv_fg0 + separator $gruv_blue + focused_workspace $gruv_fg1 $gruv_blue $gruv_fg1 + active_workspace $gruv_fg4 $gruv_bg1 $gruv_fg4 + urgent_workspace $gruv_fg $gruv_red $gruv_fg + } +} + +# Apply xmodmap +exec --no-startup-id /usr/bin/xmodmap /home/signal9/.xmodmaprc diff --git a/i3/i3status.conf b/i3/i3status.conf new file mode 100644 index 0000000..35ebf31 --- /dev/null +++ b/i3/i3status.conf @@ -0,0 +1,53 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + colors = true + interval = 5 +} + +order += "ipv6" +order += "wireless _first_" +order += "ethernet _first_" +order += "battery 0" +order += "disk /" +order += "load" +order += "memory" +order += "tztime local" + +wireless _first_ { + format_up = "W: (%quality at %essid) %ip" + format_down = "W: down" +} + +ethernet _first_ { + format_up = "E: %ip (%speed)" + format_down = "E: down" +} + +battery 0 { + format = "%status %percentage %remaining" +} + +disk "/" { + format = "%avail" +} + +load { + format = "%1min" +} + +memory { + format = "%used | %available" + threshold_degraded = "1G" + format_degraded = "MEMORY < %available" +} + +tztime local { + format = "%Y-%m-%d %I:%M" +} -- 2.39.5