Last active
December 5, 2024 14:42
-
-
Save DovgaNik/eec1c88519411e992005d86ab2cf7450 to your computer and use it in GitHub Desktop.
Arch linux + i3 + polybar configurations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/X11/xorg.conf.d/00-keyboard.conf | |
Section "InputClass" | |
Identifier "system-keyboard" | |
MatchIsKeyboard "on" | |
Option "XkbLayout" "us,ru" | |
Option "XkbModel" "pc105" | |
Option "XkbVariant" "qwerty" | |
Option "XkbOptions" "grp:caps_toggle" | |
EndSection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Must be at /etc/X11/xorg.conf.d/10-synaptics.conf | |
Section "InputClass" | |
Identifier "touchpad" | |
Driver "synaptics" | |
MatchIsTouchpad "on" | |
Option "TapButton1" "1" | |
Option "TapButton2" "3" | |
Option "TapButton3" "2" | |
EndSection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Put to ~/.config/i3/config | |
client.focused #4A4A4A #4A4A4A #e5e5e5 #4A4A4A | |
client.unfocused #4A4A4A #222222 #aaaaaa #222222 | |
client.focused_inactive #4A4A4A #222222 #a9a9a9 #222222 | |
font Pango | |
exec --no-startup-id feh --bg-scale ~/.config/wp.jpg | |
exec_always --no-startup-id $HOME/.config/polybar/launch.sh | |
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. ISO 10646 = Unicode | |
#font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 | |
# 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 | |
# right-to-left text rendering, you should instead use pango for rendering and | |
# chose a FreeType font, such as: | |
# font pango:DejaVu Sans Mono 10 | |
# 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 | |
# There also is the (new) i3-dmenu-desktop which only displays applications | |
# shipping a .desktop file. It is a wrapper around dmenu, so you need that | |
# installed. | |
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop | |
# 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+g split h | |
# split in vertical orientation | |
bindsym $mod+v split v | |
# enter fullscreen mode for the focused container | |
bindsym $mod+f fullscreen | |
# 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+c focus child | |
# move focused container to workspace | |
bindsym $mod+Shift+1 move container to workspace 1 | |
bindsym $mod+Shift+2 move container to workspace 2 | |
bindsym $mod+Shift+3 move container to workspace 3 | |
bindsym $mod+Shift+4 move container to workspace 4 | |
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 9 | |
bindsym $mod+Shift+0 move container to workspace 10 | |
# 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 h resize shrink width 10 px or 10 ppt | |
bindsym j resize grow height 10 px or 10 ppt | |
bindsym k resize shrink height 10 px or 10 ppt | |
bindsym l 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" | |
#workspace "1" output LVDS1 | |
#workspace "2" output LVDS1 | |
#workspace "3" output LVDS1 | |
#workspace "4" output LVDS1 | |
#workspace "5" output LVDS1 | |
#workspace "6" output LVDS1 | |
#workspace "7" output LVDS1 | |
bindsym $mod+1 workspace 1 | |
bindsym $mod+2 workspace 2 | |
bindsym $mod+3 workspace 3 | |
bindsym $mod+4 workspace 4 | |
bindsym $mod+5 workspace 5 | |
bindsym $mod+6 workspace 6 | |
bindsym $mod+7 workspace 7 | |
bindsym $mod+8 workspace 8 | |
bindsym $mod+9 workspace 9 | |
bindsym $mod+0 workspace 10 | |
#workspace "9:Presentation" output HDMI1 | |
#workspace "9:Presentation" output DP1 | |
#workspace "9:Presentation" output VGA1 | |
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown | |
mode "$mode_system" { | |
bindsym l exec --no-startup-id i3exit lock, mode "default" | |
bindsym e exec --no-startup-id i3exit logout, mode "default" | |
bindsym s exec --no-startup-id i3exit suspend, mode "default" | |
bindsym h exec --no-startup-id i3exit hibernate, mode "default" | |
bindsym r exec --no-startup-id i3exit reboot, mode "default" | |
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default" | |
bindsym Return mode "default" | |
bindsym Escape mode "default" | |
} | |
bindsym $mod+Pause mode "$mode_system" | |
#exec --no-startup-id xset dpms 300 | |
#bindsym XF86AudioMute exec "pamixer --toggle-mute && killall -USR1 i3status" | |
#bindsym XF86AudioRaiseVolume exec "pamixer --increase 5 --allow-boost && killall -USR1 i3status" | |
#bindsym XF86AudioLowerVolume exec "pamixer --decrease 5 --allow-boost && killall -USR1 i3status" | |
bindsym $mod+< move workspace to output left | |
bindsym $mod+> move workspace to output right |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Must be at /bin/i3exit | |
lock() { | |
i3lock -c 000000 | |
} | |
case "$1" in | |
lock) | |
lock | |
;; | |
logout) | |
i3-msg exit | |
;; | |
suspend) | |
lock && systemctl suspend | |
;; | |
hibernate) | |
lock && systemctl hibernate | |
;; | |
reboot) | |
systemctl reboot | |
;; | |
shutdown) | |
systemctl poweroff | |
;; | |
*) | |
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}" | |
exit 2 | |
esac | |
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Must be at ~/.config/polybar/config | |
;this is config from polybar docs | |
;========================================================== | |
; | |
; | |
; βββββββ βββββββ βββ βββ ββββββββββ ββββββ βββββββ | |
; ββββββββββββββββββββ ββββ ββββββββββββββββββββββββββββ | |
; βββββββββββ ββββββ βββββββ ββββββββββββββββββββββββ | |
; βββββββ βββ ββββββ βββββ ββββββββββββββββββββββββ | |
; βββ ββββββββββββββββββββ βββββββββββ ββββββ βββ | |
; βββ βββββββ βββββββββββ βββββββ βββ ββββββ βββ | |
; | |
; | |
; To learn more about how to configure Polybar | |
; go to https://github.com/jaagr/polybar | |
; | |
; The README contains alot of information | |
; | |
;========================================================== | |
[colors] | |
;background = ${xrdb:color0:#222} | |
background = #222 | |
background-alt = #444 | |
;foreground = ${xrdb:color7:#222} | |
foreground = #dfdfdf | |
foreground-alt = #555 | |
primary = #ffb52a | |
secondary = #e60053 | |
alert = #bd2c40 | |
[bar/example] | |
;monitor = ${env:MONITOR:HDMI-1} | |
width = 100% | |
height = 27 | |
;offset-x = 1% | |
;offset-y = 1% | |
radius = 6.0 | |
fixed-center = false | |
background = ${colors.background} | |
foreground = ${colors.foreground} | |
line-size = 3 | |
line-color = #f00 | |
padding-left = 0 | |
padding-right = 0 | |
module-margin-left = 1 | |
module-margin-right = 1 | |
font-0 = fixed:pixelsize=10;1 | |
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 | |
font-2 = siji:pixelsize=10;1 | |
modules-left = bspwm i3 | |
modules-center = | |
modules-right = filesystem xkeyboard memory cpu eth battery temperature date powermenu | |
tray-position = right | |
tray-padding = 2 | |
;tray-background = #0063ff | |
;wm-restack = bspwm | |
;wm-restack = i3 | |
;override-redirect = true | |
;scroll-up = bspwm-desknext | |
;scroll-down = bspwm-deskprev | |
;scroll-up = i3wm-wsnext | |
;scroll-down = i3wm-wsprev | |
cursor-click = pointer | |
cursor-scroll = ns-resize | |
[module/xwindow] | |
type = internal/xwindow | |
label = %title:0:30:...% | |
[module/xkeyboard] | |
type = internal/xkeyboard | |
blacklist-0 = num lock | |
format-prefix = "ξ― " | |
format-prefix-foreground = ${colors.foreground-alt} | |
format-prefix-underline = ${colors.secondary} | |
label-layout = %layout% | |
label-layout-underline = ${colors.secondary} | |
label-indicator-padding = 2 | |
label-indicator-margin = 1 | |
label-indicator-background = ${colors.secondary} | |
label-indicator-underline = ${colors.secondary} | |
[module/filesystem] | |
type = internal/fs | |
interval = 25 | |
mount-0 = / | |
mount-1 = /home | |
mount-2 = /mnt/usb | |
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% | |
label-unmounted = %mountpoint% not mounted | |
label-unmounted-foreground = ${colors.foreground-alt} | |
[module/bspwm] | |
type = internal/bspwm | |
label-focused = %index% | |
label-focused-background = ${colors.background-alt} | |
label-focused-underline= ${colors.primary} | |
label-focused-padding = 1 | |
label-occupied = %index% | |
label-occupied-padding = 1 | |
label-urgent = %index%! | |
label-urgent-background = ${colors.alert} | |
label-urgent-padding = 1 | |
label-empty = %index% | |
label-empty-foreground = ${colors.foreground-alt} | |
label-empty-padding = 2 | |
; Separator in between workspaces | |
; label-separator = | | |
[module/i3] | |
type = internal/i3 | |
format = <label-state> <label-mode> | |
index-sort = true | |
wrapping-scroll = false | |
; Only show workspaces on the same output as the bar | |
;pin-workspaces = true | |
label-mode-padding = 2 | |
label-mode-foreground = #000 | |
label-mode-background = ${colors.primary} | |
; focused = Active workspace on focused monitor | |
label-focused = %index% | |
label-focused-background = ${module/bspwm.label-focused-background} | |
label-focused-underline = ${module/bspwm.label-focused-underline} | |
label-focused-padding = ${module/bspwm.label-focused-padding} | |
; unfocused = Inactive workspace on any monitor | |
label-unfocused = %index% | |
label-unfocused-padding = ${module/bspwm.label-occupied-padding} | |
; visible = Active workspace on unfocused monitor | |
label-visible = %index% | |
label-visible-background = ${self.label-focused-background} | |
label-visible-underline = ${self.label-focused-underline} | |
label-visible-padding = ${self.label-focused-padding} | |
; urgent = Workspace with urgency hint set | |
label-urgent = %index% | |
label-urgent-background = ${module/bspwm.label-urgent-background} | |
label-urgent-padding = ${module/bspwm.label-urgent-padding} | |
; Separator in between workspaces | |
; label-separator = | | |
[module/mpd] | |
type = internal/mpd | |
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next> | |
icon-prev = ξ | |
icon-stop = ξ | |
icon-play = ξ | |
icon-pause = ξ | |
icon-next = ξ | |
label-song-maxlen = 25 | |
label-song-ellipsis = true | |
[module/xbacklight] | |
type = internal/xbacklight | |
format = <label> <bar> | |
label = BL | |
bar-width = 10 | |
bar-indicator = | | |
bar-indicator-foreground = #fff | |
bar-indicator-font = 2 | |
bar-fill = β | |
bar-fill-font = 2 | |
bar-fill-foreground = #9f78e1 | |
bar-empty = β | |
bar-empty-font = 2 | |
bar-empty-foreground = ${colors.foreground-alt} | |
[module/backlight-acpi] | |
inherit = module/xbacklight | |
type = internal/backlight | |
card = intel_backlight | |
[module/cpu] | |
type = internal/cpu | |
interval = 2 | |
format-prefix = "ξ¦ " | |
format-prefix-foreground = ${colors.foreground-alt} | |
format-underline = #f90000 | |
label = %percentage:2%% | |
[module/memory] | |
type = internal/memory | |
interval = 2 | |
format-prefix = "ξ¨ " | |
format-prefix-foreground = ${colors.foreground-alt} | |
format-underline = #4bffdc | |
label = %percentage_used%% | |
[module/wlan] | |
type = internal/network | |
interface = net1 | |
interval = 3.0 | |
format-connected = <ramp-signal> <label-connected> | |
format-connected-underline = #9f78e1 | |
label-connected = %essid% | |
format-disconnected = | |
;format-disconnected = <label-disconnected> | |
;format-disconnected-underline = ${self.format-connected-underline} | |
;label-disconnected = %ifname% disconnected | |
;label-disconnected-foreground = ${colors.foreground-alt} | |
ramp-signal-0 = ξ | |
ramp-signal-1 = ξ | |
ramp-signal-2 = ξ | |
ramp-signal-3 = ξ | |
ramp-signal-4 = ξ | |
ramp-signal-foreground = ${colors.foreground-alt} | |
[module/eth] | |
type = internal/network | |
interface = enp3s0 | |
interval = 3.0 | |
format-connected-underline = #55aa55 | |
format-connected-prefix = "ξ " | |
format-connected-prefix-foreground = ${colors.foreground-alt} | |
label-connected = %local_ip% | |
format-disconnected = | |
;format-disconnected = <label-disconnected> | |
;format-disconnected-underline = ${self.format-connected-underline} | |
;label-disconnected = %ifname% disconnected | |
;label-disconnected-foreground = ${colors.foreground-alt} | |
[module/date] | |
type = internal/date | |
interval = 5 | |
date = | |
date-alt = " %Y-%m-%d" | |
time = %H:%M | |
time-alt = %H:%M:%S | |
format-prefix = ξ | |
format-prefix-foreground = ${colors.foreground-alt} | |
format-underline = #0a6cf5 | |
label = %date% %time% | |
[module/pulseaudio] | |
type = internal/pulseaudio | |
format-volume = <label-volume> <bar-volume> | |
label-volume = VOL %percentage%% | |
label-volume-foreground = ${root.foreground} | |
label-muted = π muted | |
label-muted-foreground = #666 | |
bar-volume-width = 10 | |
bar-volume-foreground-0 = #55aa55 | |
bar-volume-foreground-1 = #55aa55 | |
bar-volume-foreground-2 = #55aa55 | |
bar-volume-foreground-3 = #55aa55 | |
bar-volume-foreground-4 = #55aa55 | |
bar-volume-foreground-5 = #f5a70a | |
bar-volume-foreground-6 = #ff5555 | |
bar-volume-gradient = false | |
bar-volume-indicator = | | |
bar-volume-indicator-font = 2 | |
bar-volume-fill = β | |
bar-volume-fill-font = 2 | |
bar-volume-empty = β | |
bar-volume-empty-font = 2 | |
bar-volume-empty-foreground = ${colors.foreground-alt} | |
[module/alsa] | |
type = internal/alsa | |
format-volume = <label-volume> <bar-volume> | |
label-volume = VOL | |
label-volume-foreground = ${root.foreground} | |
format-muted-prefix = "ξ " | |
format-muted-foreground = ${colors.foreground-alt} | |
label-muted = sound muted | |
bar-volume-width = 10 | |
bar-volume-foreground-0 = #55aa55 | |
bar-volume-foreground-1 = #55aa55 | |
bar-volume-foreground-2 = #55aa55 | |
bar-volume-foreground-3 = #55aa55 | |
bar-volume-foreground-4 = #55aa55 | |
bar-volume-foreground-5 = #f5a70a | |
bar-volume-foreground-6 = #ff5555 | |
bar-volume-gradient = false | |
bar-volume-indicator = | | |
bar-volume-indicator-font = 2 | |
bar-volume-fill = β | |
bar-volume-fill-font = 2 | |
bar-volume-empty = β | |
bar-volume-empty-font = 2 | |
bar-volume-empty-foreground = ${colors.foreground-alt} | |
[module/battery] | |
type = internal/battery | |
battery = BAT0 | |
adapter = ADP1 | |
full-at = 98 | |
format-charging = <animation-charging> <label-charging> | |
format-charging-underline = #ffb52a | |
format-discharging = <animation-discharging> <label-discharging> | |
format-discharging-underline = ${self.format-charging-underline} | |
format-full-prefix = "ξΊ " | |
format-full-prefix-foreground = ${colors.foreground-alt} | |
format-full-underline = ${self.format-charging-underline} | |
ramp-capacity-0 = ξΆ | |
ramp-capacity-1 = ξ· | |
ramp-capacity-2 = ξΈ | |
ramp-capacity-foreground = ${colors.foreground-alt} | |
animation-charging-0 = ξΆ | |
animation-charging-1 = ξ· | |
animation-charging-2 = ξΈ | |
animation-charging-foreground = ${colors.foreground-alt} | |
animation-charging-framerate = 750 | |
animation-discharging-0 = ξΈ | |
animation-discharging-1 = ξ· | |
animation-discharging-2 = ξΆ | |
animation-discharging-foreground = ${colors.foreground-alt} | |
animation-discharging-framerate = 750 | |
[module/temperature] | |
type = internal/temperature | |
thermal-zone = 0 | |
warn-temperature = 60 | |
format = <ramp> <label> | |
format-underline = #f50a4d | |
format-warn = <ramp> <label-warn> | |
format-warn-underline = ${self.format-underline} | |
label = %temperature-c% | |
label-warn = %temperature-c% | |
label-warn-foreground = ${colors.secondary} | |
ramp-0 = ξ | |
ramp-1 = ξ | |
ramp-2 = ξ | |
ramp-foreground = ${colors.foreground-alt} | |
[module/powermenu] | |
type = custom/menu | |
expand-right = true | |
format-spacing = 1 | |
label-open = ξ | |
label-open-foreground = ${colors.secondary} | |
label-close = ξ₯ cancel | |
label-close-foreground = ${colors.secondary} | |
label-separator = | | |
label-separator-foreground = ${colors.foreground-alt} | |
menu-0-0 = reboot | |
menu-0-0-exec = menu-open-1 | |
menu-0-1 = power off | |
menu-0-1-exec = menu-open-2 | |
menu-1-0 = cancel | |
menu-1-0-exec = menu-open-0 | |
menu-1-1 = reboot | |
menu-1-1-exec = sudo reboot | |
menu-2-0 = power off | |
menu-2-0-exec = sudo poweroff | |
menu-2-1 = cancel | |
menu-2-1-exec = menu-open-0 | |
[settings] | |
screenchange-reload = true | |
;compositing-background = xor | |
;compositing-background = screen | |
;compositing-foreground = source | |
;compositing-border = over | |
;pseudo-transparency = false | |
[global/wm] | |
margin-top = 5 | |
margin-bottom = 5 | |
; vim:ft=dosini |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Must be at ~/.config/polybar/config/launch.sh | |
# Terminate already running bar instances | |
killall -q polybar | |
# Wait until the processes have been shut down | |
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done | |
# Launch Polybar, using default config location ~/.config/polybar/config | |
polybar example & | |
echo "Polybar launched..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment