From 17a00c3fcd3394c723aba88d9685072195d004e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Kmie=C4=87?= Date: Tue, 23 Nov 2021 11:52:04 +0100 Subject: [PATCH] I3: split config into several files --- .config/i3/conf.d/binds.conf | 24 ++++++++++++++++ .config/i3/conf.d/exec.conf | 28 ++++++++++++++++++ .config/i3/config | 55 +++--------------------------------- 3 files changed, 56 insertions(+), 51 deletions(-) create mode 100644 .config/i3/conf.d/binds.conf create mode 100644 .config/i3/conf.d/exec.conf diff --git a/.config/i3/conf.d/binds.conf b/.config/i3/conf.d/binds.conf new file mode 100644 index 0000000..89da5e3 --- /dev/null +++ b/.config/i3/conf.d/binds.conf @@ -0,0 +1,24 @@ +# start a terminal +bindsym Mod4+t exec ~/.cargo/bin/alacritty + +# Use pulseaudio-ctl to adjust volume in PulseAudio. +bindsym XF86AudioRaiseVolume exec pulseaudio-ctl up && $refresh_i3status +bindsym XF86AudioLowerVolume exec pulseaudio-ctl down && $refresh_i3status +bindsym XF86AudioMute exec pulseaudio-ctl mute && $refresh_i3status +bindsym XF86AudioMicMute exec pulseaudio-ctl mute-input +bindsym XF86AudioPlay exec playerctl --ignore-player=chromium play-pause +bindsym XF86AudioPause exec playerctl --ignore-player=chromium play-pause +bindsym XF86AudioStop exec playerctl --ignore-player=chromium stop +bindsym XF86AudioNext exec playerctl --ignore-player=chromium next +bindsym XF86AudioPrev exec playerctl --ignore-player=chromium previous + +bindsym XF86Calculator exec --no-startup-id gnome-calculator + +# System state management +bindsym Pause exec systemctl suspend +bindsym Mod4+z exec i3lock -c 151515 -e -f + +# Screen brightness controls +bindsym Mod1+Up exec brightnessctl s 5\%+ +bindsym Mod1+Down exec brightnessctl s 5\%- + diff --git a/.config/i3/conf.d/exec.conf b/.config/i3/conf.d/exec.conf new file mode 100644 index 0000000..7cd6d06 --- /dev/null +++ b/.config/i3/conf.d/exec.conf @@ -0,0 +1,28 @@ +# Start XDG autostart .desktop files using dex. See also +# https://wiki.archlinux.org/index.php/XDG_Autostart +exec --no-startup-id dex --autostart --environment i3 + +# 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. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet + +exec setxkbmap pl +exec --no-startup-id dunst -config ~/.config/i3/dunst_config +exec --no-startup-id pasystray -m 100 +exec --no-startup-id blueman-applet +exec --no-startup-id xset b off +exec --no-startup-id flameshot +exec --no-startup-id autorandr -c +exec --no-startup-id wal -n -i ~/.config/i3/wallpaper.jpg +exec --no-startup-id feh --no-xinerama --bg-scale ~/.config/i3/wallpaper.jpg +exec --no-startup-id xdotool key --clearmodifiers Num_Lock +#exec --no-startup-id unclutter # generates some issues on work laptop +#exec --no-startup-id barriers -c ~/.config/barrier.conf --screen-change-script ~/.local/bin/switch_pc.sh +exec --no-startup-id barrierc 192.168.10.2:24800 diff --git a/.config/i3/config b/.config/i3/config index f919ed5..32384c5 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -23,54 +23,8 @@ font pango:Mensch 9 # text rendering and scalability on retina/hidpi displays (thanks to pango). #font pango:DejaVu Sans Mono 8 -# Start XDG autostart .desktop files using dex. See also -# https://wiki.archlinux.org/index.php/XDG_Autostart -exec --no-startup-id dex --autostart --environment i3 - -# 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. - -# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the -# screen before suspend. Use loginctl lock-session to lock your screen. -exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork - -# NetworkManager is the most popular way to manage wireless networks on Linux, -# and nm-applet is a desktop environment-independent system tray GUI for it. -exec --no-startup-id nm-applet - -exec setxkbmap pl -exec --no-startup-id dunst -config ~/.config/i3/dunst_config -exec --no-startup-id pasystray -m 100 -exec --no-startup-id blueman-applet -exec --no-startup-id xset b off -exec --no-startup-id flameshot -exec --no-startup-id wal -n -i ~/.config/i3/wallpaper.jpg -exec --no-startup-id feh --no-xinerama --bg-scale ~/.config/i3/wallpaper.jpg -exec --no-startup-id xdotool key --clearmodifiers Num_Lock -exec --no-startup-id unclutter -exec --no-startup-id barriers -c ~/.config/barrier.conf --screen-change-script ~/.local/bin/switch_pc.sh - -# Use pulseaudio-ctl to adjust volume in PulseAudio. -set $refresh_i3status killall -SIGUSR1 i3status-rs -bindsym XF86AudioRaiseVolume exec pulseaudio-ctl up && $refresh_i3status -bindsym XF86AudioLowerVolume exec pulseaudio-ctl down && $refresh_i3status -bindsym XF86AudioMute exec pulseaudio-ctl mute && $refresh_i3status -bindsym XF86AudioMicMute exec pulseaudio-ctl mute-input -bindsym XF86AudioPlay exec playerctl play-pause -bindsym XF86AudioPause exec playerctl play-pause -bindsym XF86AudioStop exec playerctl stop -bindsym XF86AudioNext exec playerctl next -bindsym XF86AudioPrev exec playerctl previous - -bindsym XF86Calculator exec --no-startup-id gnome-calculator - -# System state management -bindsym Pause exec systemctl suspend -bindsym Mod4+z exec i3lock -c 151515 -e -f - -# Screen brightness controls -bindsym Mod1+Up exec brightnessctl s 5\%+ -bindsym Mod1+Down exec brightnessctl s 5\%- +include conf.d/exec.conf +include conf.d/binds.conf # use these keys for focus, movement, and resize directions when reaching for # the arrows is not convenient @@ -82,9 +36,6 @@ set $right l # use Mouse+Mod4 to drag floating windows to their wanted position floating_modifier Mod4 -# start a terminal -bindsym Mod4+Return exec ~/.cargo/bin/alacritty - # kill focused window bindsym Mod4+Shift+q kill @@ -239,6 +190,8 @@ bindsym Mod1+Shift+8 move container to workspace number $ws18 bindsym Mod1+Shift+9 move container to workspace number $ws19 bindsym Mod1+Shift+0 move container to workspace number $ws20 +bindsym Mod4+n exec i3-new-workspace + # reload the configuration file bindsym Mod4+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)