This commit is contained in:
Julian Ospald 2022-07-28 00:13:51 +08:00
parent a9a3ecce2c
commit 77fcdd926b
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
2 changed files with 74 additions and 58 deletions

128
config
View File

@ -10,15 +10,17 @@
# Please see http://i3wm.org/docs/userguide.html for a complete reference! # Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4 set $mod Mod4
set $mod2 Mod1 set $mod2 Control
set $right DVI-D-0 set $left DP-0.3
set $left DVI-I-1 set $right DP-0.2
set $lap DP-2
# Font for window titles. Will also be used by the bar unless a different font # Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. ISO 10646 = Unicode # is used in the bar {} block below. ISO 10646 = Unicode
#font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 #font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
font pango:DejaVu Sans Mono 11 font pango:DejaVu Sans Mono 10
# font pango:DejaVu Sans Mono 12
# The font above is very space-efficient, that is, it looks good, sharp and # The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, if you need a lot of unicode glyphs or # clear in small sizes. However, if you need a lot of unicode glyphs or
# right-to-left text rendering, you should instead use pango for rendering and # right-to-left text rendering, you should instead use pango for rendering and
@ -30,20 +32,20 @@ floating_modifier $mod
# start a terminal # start a terminal
# bindsym $mod+Return exec i3-sensible-terminal # bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec alacritty -e fish bindsym $mod+Return exec alacritty
# keepassxc # keepassxc
bindsym $mod+k exec keepmenu bindsym $mod+k exec /home/hasufell/.local/bin/keepmenu
# kill focused window # kill focused window
bindsym $mod+$mod2+q kill bindsym $mod+$mod2+x kill
# start dmenu (a program launcher) # start dmenu (a program launcher)
bindsym $mod+$mod2+w exec --no-startup-id rofi -show window bindsym $mod+$mod2+t exec --no-startup-id rofi -show window
bindsym $mod+d exec --no-startup-id rofi -show run bindsym $mod+Mod1+s exec --no-startup-id rofi -show run
bindsym $mod+$mod2+d exec --no-startup-id rofi -show drun bindsym $mod+$mod2+s exec --no-startup-id rofi -show drun
bindsym $mod+$mod2+l exec --no-startup-id systemctl suspend bindsym $mod+$mod2+l exec --no-startup-id systemctl suspend
# bindsym $mod+l exec --no-startup-id i3lock -c 000000 bindsym $mod+l exec --no-startup-id i3lock -c 000000
# bindsym $mod+$mod2+d exec dmenu_run # bindsym $mod+$mod2+d exec dmenu_run
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# bindsym $mod+d exec --no-startup-id xfce4-popup-whiskermenu # bindsym $mod+d exec --no-startup-id xfce4-popup-whiskermenu
@ -58,11 +60,6 @@ bindsym $mod+e focus down
bindsym $mod+o focus up bindsym $mod+o focus up
bindsym $mod+i focus right bindsym $mod+i focus right
bindsym $mod+KP_Prior focus left
bindsym $mod+KP_Down focus down
bindsym $mod+KP_Up focus up
bindsym $mod+KP_Next focus right
# alternatively, you can use the cursor keys: # alternatively, you can use the cursor keys:
bindsym $mod+Left focus left bindsym $mod+Left focus left
bindsym $mod+Down focus down bindsym $mod+Down focus down
@ -80,10 +77,6 @@ bindsym $mod+$mod2+e move down
bindsym $mod+$mod2+o move up bindsym $mod+$mod2+o move up
bindsym $mod+$mod2+i move right bindsym $mod+$mod2+i move right
bindsym $mod+$mod2+KP_Prior move left
bindsym $mod+$mod2+KP_Down move down
bindsym $mod+$mod2+KP_Up move up
bindsym $mod+$mod2+KP_Next move right
# split in horizontal orientation # split in horizontal orientation
bindsym $mod+h split v bindsym $mod+h split v
@ -92,11 +85,11 @@ bindsym $mod+h split v
bindsym $mod+v split h bindsym $mod+v split h
# enter fullscreen mode for the focused container # enter fullscreen mode for the focused container
bindsym $mod+f fullscreen bindsym $mod+Mod1+f fullscreen
# change container layout (stacked, tabbed, toggle split) # change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed bindsym $mod+Mod1+w layout tabbed
bindsym $mod+t layout toggle split bindsym $mod+t layout toggle split
# toggle tiling / floating # toggle tiling / floating
@ -133,7 +126,7 @@ workspace 6 output $right
workspace 7 output $left workspace 7 output $left
workspace 8 output $right workspace 8 output $right
workspace 9 output $left workspace 9 output $left
workspace 10 output $right workspace 10 output $lap
# workspace cycling # workspace cycling
# bindsym $mod+Tab workspace next # bindsym $mod+Tab workspace next
@ -152,17 +145,27 @@ bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8 bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9 bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10 bindsym $mod+0 workspace number 10
bindsym $mod+q workspace number 1
bindsym $mod+d workspace number 2
bindsym $mod+r workspace number 3
bindsym $mod+w workspace number 4
bindsym $mod+b workspace number 5
bindsym $mod+j workspace number 6
bindsym $mod+f workspace number 7
bindsym $mod+u workspace number 8
bindsym $mod+p workspace number 9
bindsym $mod+colon workspace number 10
bindsym $mod+KP_1 workspace number 1 bindsym $mod+KP_End workspace number 1
bindsym $mod+KP_2 workspace number 2 bindsym $mod+KP_Down workspace number 2
bindsym $mod+KP_3 workspace number 3 bindsym $mod+KP_Next workspace number 3
bindsym $mod+KP_4 workspace number 4 bindsym $mod+KP_Left workspace number 4
bindsym $mod+KP_5 workspace number 5 bindsym $mod+KP_Begin workspace number 5
bindsym $mod+KP_6 workspace number 6 bindsym $mod+KP_Right workspace number 6
bindsym $mod+KP_7 workspace number 7 bindsym $mod+KP_Home workspace number 7
bindsym $mod+KP_8 workspace number 8 bindsym $mod+KP_Up workspace number 8
bindsym $mod+KP_9 workspace number 9 bindsym $mod+KP_Prior workspace number 9
bindsym $mod+KP_0 workspace number 10 bindsym $mod+KP_Insert workspace number 10
workspace_auto_back_and_forth yes workspace_auto_back_and_forth yes
@ -177,24 +180,35 @@ bindsym $mod+$mod2+7 move container to workspace number 7
bindsym $mod+$mod2+8 move container to workspace number 8 bindsym $mod+$mod2+8 move container to workspace number 8
bindsym $mod+$mod2+9 move container to workspace number 9 bindsym $mod+$mod2+9 move container to workspace number 9
bindsym $mod+$mod2+0 move container to workspace number 10 bindsym $mod+$mod2+0 move container to workspace number 10
bindsym $mod+$mod2+q move container to workspace number 1
bindsym $mod+$mod2+d move container to workspace number 2
bindsym $mod+$mod2+r move container to workspace number 3
bindsym $mod+$mod2+w move container to workspace number 4
bindsym $mod+$mod2+b move container to workspace number 5
bindsym $mod+$mod2+j move container to workspace number 6
bindsym $mod+$mod2+f move container to workspace number 7
bindsym $mod+$mod2+u move container to workspace number 8
bindsym $mod+$mod2+p move container to workspace number 9
bindsym $mod+$mod2+colon move container to workspace number 10
bindsym $mod+$mod2+KP_End move container to workspace 1
bindsym $mod+$mod2+KP_Down move container to workspace 2
bindsym $mod+$mod2+KP_Next move container to workspace 3
bindsym $mod+$mod2+KP_Left move container to workspace 4
bindsym $mod+$mod2+KP_Begin move container to workspace 5
bindsym $mod+$mod2+KP_Right move container to workspace 6
bindsym $mod+$mod2+KP_Home move container to workspace 7
bindsym $mod+$mod2+KP_Up move container to workspace 8
bindsym $mod+$mod2+KP_Prior move container to workspace 9
bindsym $mod+$mod2+KP_Insert move container to workspace 10
bindsym $mod+$mod2+KP_1 move container to workspace number 1
bindsym $mod+$mod2+KP_2 move container to workspace number 2
bindsym $mod+$mod2+KP_3 move container to workspace number 3
bindsym $mod+$mod2+KP_4 move container to workspace number 4
bindsym $mod+$mod2+KP_5 move container to workspace number 5
bindsym $mod+$mod2+KP_6 move container to workspace number 6
bindsym $mod+$mod2+KP_7 move container to workspace number 7
bindsym $mod+$mod2+KP_8 move container to workspace number 8
bindsym $mod+$mod2+KP_9 move container to workspace number 9
bindsym $mod+$mod2+KP_0 move container to workspace number 10
# reload the configuration file # reload the configuration file
bindsym $mod+$mod2+c reload bindsym $mod+$mod2+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+$mod2+r restart bindsym $mod+$mod2+Shift+r restart
# exit i3 (logs you out of your X session) # exit i3 (logs you out of your X session)
bindsym $mod+$mod2+x 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'" # bindsym $mod+$mod2+x 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'"
# programs # programs
#bindsym $mod+$mod2+f exec firefox #bindsym $mod+$mod2+f exec firefox
@ -202,16 +216,16 @@ bindsym $mod+$mod2+x exec "i3-nagbar -t warning -m 'You pressed the exit shortcu
#bindsym $mod+$mod2+g exec gmusicbrowser #bindsym $mod+$mod2+g exec gmusicbrowser
#bindsym $mod+$mod2+p exec pidgin #bindsym $mod+$mod2+p exec pidgin
bindsym $mod+BackSpace exec spacefm bindsym $mod+BackSpace exec spacefm
bindsym $mod+plus exec gvim bindsym $mod+equal exec ~/.local/bin/gvim
# focus binding # focus binding
bindsym $mod+$mod2+f [class="Torbrowser" instance="Navigator"] focus # bindsym $mod+$mod2+f [class="Torbrowser" instance="Navigator"] focus
bindsym $mod+$mod2+t [class="Thunderbird" instance="Mail"] focus # bindsym $mod+$mod2+t [class="Thunderbird" instance="Mail"] focus
bindsym $mod+$mod2+g [class="Gmusicbrowser"] focus # bindsym $mod+$mod2+g [class="Gmusicbrowser"] focus
bindsym $mod+$mod2+p [class="Pidgin" window_role="conversation"] focus # bindsym $mod+$mod2+p [class="Pidgin" window_role="conversation"] focus
bindsym $mod+$mod2+s [class="Terminator" instance="Terminator-root"] focus # bindsym $mod+$mod2+s [class="Terminator" instance="Terminator-root"] focus
bindsym $mod+$mod2+m [class="Mumble" instance="mumble"] focus # bindsym $mod+$mod2+m [class="Mumble" instance="mumble"] focus
bindcode 180 [class="Terminator" instance="Terminator-root"] focus # bindcode 180 [class="Terminator" instance="Terminator-root"] focus
# sound # sound
#bindcode 122 exec --no-startup-id amixer sset Master 3- #bindcode 122 exec --no-startup-id amixer sset Master 3-
@ -307,7 +321,7 @@ mode "resize" {
bindsym Escape mode "default" bindsym Escape mode "default"
} }
bindsym $mod+r mode "resize" bindsym $mod+Mod1+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status # Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available) # finds out, if available)
@ -326,8 +340,8 @@ mode "num" {
#bindsym Num_Lock mode "num" #bindsym Num_Lock mode "num"
#exec_always --no-startup-id ~/.config/polybar/autoname_workspaces.py --norenumber_workspaces --icon_list_format mathematician #exec_always --no-startup-id ~/.config/polybar/autoname_workspaces.py --norenumber_workspaces --icon_list_format mathematician
exec_always --no-startup-id autoname_workspaces -i superscript #exec_always --no-startup-id /home/hasufell/.cargo/bin/autoname_workspaces -i superscript
exec_always --no-startup-id ~/.config/polybar/launch.sh exec_always --no-startup-id ~/.config/polybar/launch.sh &> /tmp/out
exec --no-startup-id ~/.config/i3/focus exec --no-startup-id ~/.config/i3/focus
# exec xrandr --output DVI-I-1 --auto --right-of DVI-D-0 # exec xrandr --output DVI-I-1 --auto --right-of DVI-D-0
exec picom --config ~/.config/picom.config # exec picom --config ~/.config/picom.config

2
focus
View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
export PATH="$HOME/.local/bin:$PATH"
# epochMillis: print the amount of millis since epoch time on the std output stream. # epochMillis: print the amount of millis since epoch time on the std output stream.
epochMillis(){ epochMillis(){
echo $(($(date +%s%N)/1000000)) echo $(($(date +%s%N)/1000000))