This commit is contained in:
Pavel Korytov 2020-05-06 10:00:06 +03:00
parent db54f66d8c
commit 35bc4fcd99
2 changed files with 293 additions and 0 deletions

208
i3/config Normal file
View file

@ -0,0 +1,208 @@
set $mod Mod4
font pango:monospace 10
hide_edge_borders both
#
# 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 dmenu_run
# 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 orientation
bindsym $mod+s 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+w layout stacking
bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+f 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
# switch to workspace
set $w1 "1: Terminal"
set $w2 "2: Browser"
set $w3 "3: Chat"
set $w4 "4: Dev"
set $w9 "9: Music"
set $w10 "Z: Misc"
bindsym $mod+1 workspace $w1
bindsym $mod+2 workspace $w2
bindsym $mod+3 workspace $w3
bindsym $mod+4 workspace $w4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace $w9
bindsym $mod+0 workspace $w10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $w1
bindsym $mod+Shift+2 move container to workspace $w2
bindsym $mod+Shift+3 move container to workspace $w3
bindsym $mod+Shift+4 move container to workspace $w4
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 $w9
bindsym $mod+Shift+0 move container to workspace $w10
# Cycle workspaces
bindsym $mod+comma workspace prev
bindsym $mod+period workspace next
assign [class="X-terminal-emulator"] $w1
assign [class="qutebrowser"] $w2
assign [class="VK"] $w3
assign [class="Slack"] $w3
assign [class="Postman"] $w4
assign [class="Chromium-browse"] $w4
assign [class="Google Play Music Desktop Player"] $w9
assign [class="jetbrains-datagrip"] $w4
for_window [class="cinnamon-settings*"] floating enable
# 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 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
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
exec ulauncher
bindsym $mod+Shift+x exec "i3lock -f -i /home/pavel/Pictures/lock-wallpaper.png"
# Colors
set $bg-color #292d3e
set $inactive-bg-color #434758
set $text-color #f3f4f5
set $inactive-text-color #aaaaaa
set $urgent-bg-color #f07178
# window colors
# border background text indicator
client.focused $bg-color $bg-color $text-color #00ff00
client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
client.urgent $urgent-bg-color $urgent-bg-color $text-color #00ff00
# bar
bar {
status_command i3blocks -c ~/.config/i3/i3blocks.conf
colors {
background $bg-color
separator #757575
# border background text
focused_workspace $bg-color $bg-color $text-color
inactive_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color
urgent_workspace $urgent-bg-color $urgent-bg-color $text-color
}
}
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/Scripts/vol.sh volume +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id ~/Scripts/vol.sh volume -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id ~/Scripts/vol.sh mute # mute sound
# Media player controls
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# Screenshots
bindsym --release Shift+Print exec --no-startup-id "shutter -s"
bindsym --release Print exec "shutter -f"
bindsym --release Ctrl+Shift+Print exec "shutter -w"
for_window [class="Shutter" instance="shutter"] floating enable
# Sudo
exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
# Wallpaper
exec_always "feh --bg-scale ~/Pictures/wallpaper.jpg"
# Compton
exec_always compton
exec_always setxkbmap -layout us,ru
exec_always setxkbmap -model pc105 -option 'grp:win_space_toggle' -option 'grp:alt_shift_toggle'

85
i3/i3blocks.conf Normal file
View file

@ -0,0 +1,85 @@
# List of valid properties:
#
# align
# color
# command
# full_text
# instance
# interval
# label
# min_width
# name
# separator
# separator_block_width
# short_text
# signal
# urgent
command=/usr/share/i3blocks/$BLOCK_NAME
separator_block_width=15
markup=none
[volume]
label=♪
instance=Master
interval=1
signal=10
command=/usr/share/i3blocks/volume 5 pulse
[memory]
label=
separator=false
color=#82aaff
interval=10
[memory]
label=
color=#ffcb6b
instance=swap
separator=false
interval=10
[temperature]
label=
color=#f07178
# separator=false
interval=10
[cpu_usage]
label=CPU
interval=10
[wifi]
# instance=wlp3s0
interval=10
separator=false
[bandwidth]
#instance=eth0
# INLABEL=IN
color=#c3e88d
separator=false
interval=1
# [openvpn]
# LABEL=kek
# interval=20
[battery]
label=BAT
interval=30
[time]
command=date '+%H:%M'
interval=10
# Generic media player support
#
# This displays "ARTIST - SONG" if a music is playing.
# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others.
#[mediaplayer]
#instance=spotify
#interval=5
#signal=10