Add i3 config

This commit is contained in:
Oystein Kristoffer Tveit 2021-06-28 12:34:57 +02:00
parent 6cd0743094
commit ddef19597b
2 changed files with 71 additions and 17 deletions

View File

@ -9,6 +9,9 @@
# #
# Please see https://i3wm.org/docs/userguide.html for a complete reference! # Please see https://i3wm.org/docs/userguide.html for a complete reference!
exec "sh ~/.env"
exec "sh ~/.aliases"
set $mod Mod4 set $mod Mod4
set $term alacritty set $term alacritty
@ -35,18 +38,17 @@ exec --no-startup-id nm-applet
exec --no-startup-id feh --bg-fill pictures/Wallpapers/paper_bg/Megumin_minimal.jpg exec --no-startup-id feh --bg-fill pictures/Wallpapers/paper_bg/Megumin_minimal.jpg
##### KEYS ##### ##### KEYS #####
# Use pactl to adjust volume in PulseAudio. # Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $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 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 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 # bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
bindsym XF86MonBrightnessUp exec "light -A 5" # bindsym XF86MonBrightnessUp exec "light -A 5"
bindsym XF86MonBrightnessDown exec "light -U 5" # bindsym XF86MonBrightnessDown exec "light -U 5"
# Use Mouse+$mod to drag floating windows to their wanted position # Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod floating_modifier $mod
@ -54,13 +56,16 @@ floating_modifier $mod
# start a terminal # start a terminal
bindsym $mod+Return exec $term bindsym $mod+Return exec $term
# start emacs
# bindsym $mod+e exec "emacs"
# kill focused window # kill focused window
bindsym $mod+BackSpace kill bindsym $mod+BackSpace kill
# start dmenu (a program launcher) # start dmenu (a program launcher)
# bindsym $mod+d exec --no-startup-id dmenu_run # bindsym $mod+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi: # A more modern dmenu replacement is rofi:
bindsym $mod+r exec "rofi -show drun" # bindsym $mod+r exec "rofi -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a # 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. # .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop # bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
@ -69,7 +74,7 @@ bindsym $mod+r exec "rofi -show drun"
# bindsym $mod+h split h # bindsym $mod+h split h
# split in vertical orientation # split in vertical orientation
bindsym $mod+v split v # bindsym $mod+v split v
# enter fullscreen mode for the focused container # enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle bindsym $mod+f fullscreen toggle
@ -81,14 +86,14 @@ bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle bindsym $mod+space focus mode_toggle
# focus the parent container # focus the parent container
bindsym $mod+a focus parent # bindsym $mod+a focus parent
# focus the child container # focus the child container
#bindsym $mod+d focus child #bindsym $mod+d focus child
bindsym $mod+b exec "fcitx-remote -s mozc" # bindsym $mod+b exec "fcitx-remote -s mozc"
bindsym $mod+n exec "fcitx-remote -s fcitx-keyboard-no" # bindsym $mod+n exec "fcitx-remote -s fcitx-keyboard-no"
bindsym $mod+m exec "fcitx-remote -s fcitx-keyboard-us" # bindsym $mod+m exec "fcitx-remote -s fcitx-keyboard-us"
# reload the configuration file # reload the configuration file
@ -98,10 +103,10 @@ bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session) # exit i3 (logs you out of your X session)
bindsym $mod+Shift+c 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+Shift+c 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+q exec "alacritty --title ncmpcppScratchpad -e ncmpcpp" # bindsym $mod+q exec "alacritty --title ncmpcppScratchpad -e ncmpcpp"
bindsym $mod+p exec "mpc toggle" # bindsym $mod+p exec "mpc toggle"
bindsym $mod+F7 exec "amixer set Master 2%-" # bindsym $mod+F7 exec "amixer set Master 2%-"
bindsym $mod+F8 exec "amixer set Master 2%+" # bindsym $mod+F8 exec "amixer set Master 2%+"
##### COMMANDS ##### ##### COMMANDS #####

View File

@ -0,0 +1,49 @@
general {
output_format = "i3bar"
colors = false
markup = pango
interval = 5
color_good = '#2f343f'
color_degraded = '#ebcb8b'
color_bad = '#ba5e57'
}
order += "wireless wlp59s0"
order += "disk /"
order += "volume master"
order += "battery 0"
order += "tztime local"
wireless wlp59s0 {
format_up = "<span background='#5b3278' color='#ffffff'> %essid </span>"
format_down = "<span background='#5b3278' color='#ffffff'> ✗ </span>"
}
disk "/" {
format = "<span background='#f0801e' color='#ffffff'>  %avail/%total </span>"
}
volume master {
format = "<span background='#478dbf'> V %volume </span>"
format_muted = "<span background='#478dbf'> ℣ %volume </span>"
device = "default"
mixer = "Master"
mixer_idx = 0
}
battery 0 {
last_full_capacity = true
format = "<span background='#8abf47'> %status %percentage </span>"
format_down = "No Battery"
status_chr = "🔌"
status_bat = "🗲"
status_unk = "???"
status_full = "✔"
path = "/sys/class/power_supply/BAT%d/uevent"
low_threshold = 10
}
tztime local {
format = "<span background='#bf4747'> %time </span>"
format_time = " %a %-d %b %H:%M"
}