1
Fork 0

Add i3 and i3status (old versions)

This commit is contained in:
Edgar P. Burkhart 2023-05-16 09:36:58 +02:00
parent b85cf3b580
commit 059606a01a
Signed by: edpibu
GPG Key ID: 9833D3C5A25BD227
4 changed files with 277 additions and 0 deletions

2
src/i3/README.md Normal file
View File

@ -0,0 +1,2 @@
# i3
Install to `~/.config/i3/config`.

243
src/i3/config Normal file
View File

@ -0,0 +1,243 @@
# 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
set $alt Mod1
font pango:sans 9
# 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.
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindcode Shift+196 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
bindcode Ctrl+196 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindcode 196 exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindcode Shift+197 exec --no-startup-id pactl set-sink-input-volume $(pactl list sink-inputs | tr '\n' ' ' | sed -En "s/Sink Input/\nSink Input/gp" | grep "WEBRTC" | sed -En "s/Sink Input #([0-9]+).*/\1/p") +5%
bindcode Ctrl+197 exec --no-startup-id pactl set-sink-input-volume $(pactl list sink-inputs | tr '\n' ' ' | sed -En "s/Sink Input/\nSink Input/gp" | grep "WEBRTC" | sed -En "s/Sink Input #([0-9]+).*/\1/p") -5%
bindcode 197 exec --no-startup-id pactl set-sink-input-mute $(pactl list sink-inputs | tr '\n' ' ' | sed -En "s/Sink Input/\nSink Input/gp" | grep "WEBRTC" | sed -En "s/Sink Input #([0-9]+).*/\1/p") toggle
bindsym $mod+XF86AudioMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
#bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+E exec thunar
bindsym $mod+W exec firefox-developer-edition
bindsym $mod+Shift+W exec firefox-developer-edition --private-window
bindsym $mod+M exec thunderbird
bindsym $mod+D exec discord-canary
bindsym $mod+G exec steam
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
# A more modern dmenu replacement is rofi:
bindsym $mod+space exec "rofi -show"
# 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+$alt+s layout stacking
bindsym $mod+t layout tabbed
bindsym $mod+s layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+$alt+space focus mode_toggle
bindsym $mod+Ctrl+space sticky toggle
# scratchpad
bindsym $mod+less scratchpad show
bindsym $mod+$alt+less [class="discord"] scratchpad show
bindsym $mod+Ctrl+less [class="^firefox"] scratchpad show
bindsym $mod+Shift+less move scratchpad
# 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 $ws0 "0"
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+Escape workspace number $ws0
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+Escape move container to workspace number $ws0
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 windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
#bindsym j resize shrink width 48px or 48ppt
#bindsym k resize grow height 48px or 48ppt
#bindsym l resize shrink height 48px or 48ppt
#bindsym semicolon resize grow width 48px or 48ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 48px or 5ppt
bindsym Down resize grow height 48px or 5ppt
bindsym Up resize shrink height 48px or 5ppt
bindsym Right resize grow width 48px or 5ppt
bindsym 1 resize set width 940px; mode "default"
bindsym 2 resize set width 1620px; mode "default"
bindsym s resize set width 1280px height 720px; mode "default"
bindsym x resize set width 640px height 720px; mode "default"
bindsym Shift+s resize set width 640px height 360px; mode "default"
bindsym $alt+s resize set width 1px height 1px; mode "default"
# 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"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
colors {
background #000000
statusline #ffffff
separator #ffffff
focused_workspace #66cc00 #66cc00 #000000
active_workspace #66cc00 #66cc00 #000000
inactive_workspace #000000 #000000 #ffffff
urgent_workspace #ff6600 #ff6600 #000000
}
}
default_border normal 0
hide_edge_borders smart
for_window [all] title_window_icon on
for_window [all] title_window_icon padding 8px
client.focused #66cc00 #66cc00 #000000 #66cc00 #66cc00
client.focused_inactive #131313 #000000 #ffffff #66cc00 #131313
client.unfocused #000000 #000000 #ffffff #66cc00 #000000
client.urgent #ff6600 #ff6600 #000000 #66cc00 #ff6600
client.placeholder #000000 #000000 #ffffff #66cc00 #0c0c0c
# Locking
exec --no-startup-id xss-lock xsecurelock
bindsym $mod+l exec "loginctl lock-session"
# Screenshots
bindsym Print exec "maim | tee ~/Screenshots/$(date +%Y%m%d_%H%M%S).png | xclip -selection clipboard -t image/png"
bindsym $mod+Print exec "maim -s | tee ~/Screenshots/$(date +%Y%m%d_%H%M%S).png | xclip -selection clipboard -t image/png"
# Autostart
exec --no-startup-id nitrogen --restore
exec --no-startup-id easyeffects --gapplication-service
exec --no-startup-id thunar --daemon
exec --no-startup-id xfce4-clipman
exec --no-startup-id blueman-applet
#exec discord-canary
assign [class="discord"] $ws1
for_window [title="^Figure"] floating enable

2
src/i3status/README.md Normal file
View File

@ -0,0 +1,2 @@
# i3status
Install to `~/.config/i3status/config`.

30
src/i3status/config Normal file
View File

@ -0,0 +1,30 @@
general {
colors = true
color_good = "#ffffff"
color_degraded = "#cccc00"
color_bad = "#cc6600"
interval = 5
}
order += "volume master"
order += "ethernet _first_"
order += "wireless _first_"
order += "tztime local"
volume master {
format = "%volume"
format_muted = "/%volume"
}
ethernet _first_ {
format_up = "E"
format_down = "E"
}
wireless _first_ {
format_up = "W"
format_down = "W"
}
tztime local {
format = "%Y-%m-%d %A %R %Z"
}