Improve i3 configs

+ Use `pulsemixer` for audion volume control
+ Update polybar configs to not use sudo when running commands
+ Add Logout to polybar menu foor logging out of system user
+ Add brightness module to polybar to show backlight percentage 0-100
This commit is contained in:
Shaun Reed 2021-12-21 00:17:25 -05:00
parent 574cc7802a
commit b00f64def5
7 changed files with 73 additions and 66 deletions

View File

@ -243,9 +243,9 @@ exec --no-startup-id xbindkeys --poll-rc
exec --no-startup-id $HOME/.local/bin/i3scripts/start_konky exec --no-startup-id $HOME/.local/bin/i3scripts/start_konky
exec --no-startup-id sh ~/.fehbg exec --no-startup-id sh ~/.fehbg
exec --no-startup-id xautolock -time 10 -locker blurlock exec --no-startup-id xautolock -time 10 -locker blurlock
exec --no-startup-id wicd-client -t #exec --no-startup-id wicd-client -t
exec --no-startup-id xfce4-power-manager #exec --no-startup-id xfce4-power-manager
exec --no-startup-id google-drive-ocamlfuse ~/gdrive #exec --no-startup-id google-drive-ocamlfuse ~/gdrive
# Application keybinds # Application keybinds

View File

@ -2,15 +2,14 @@
DefaultProfile=Kapper.profile DefaultProfile=Kapper.profile
[Favorite Profiles] [Favorite Profiles]
Favorites=Kapper.profile Favorites=
[KonsoleWindow] [KonsoleWindow]
ShowMenuBarByDefault=false ShowMenuBarByDefault=false
[MainWindow] [MainWindow]
Height 1200=1200 Height 1200=1135
MenuBar=Disabled MenuBar=Disabled
State=AAAA/wAAAAD9AAAAAAAAB3wAAAR/AAAABAAAAAQAAAAIAAAACPwAAAAA State=AAAA/wAAAAD9AAAAAAAAA8AAAARvAAAABAAAAAQAAAAIAAAACPwAAAAA
ToolBarsMovable=Disabled ToolBarsMovable=Disabled
Width 1920=1920 Width 1920=960
Window-Maximized 1200x1920=true

View File

@ -34,7 +34,7 @@ font-2 = Noto Sans Mono:size=10;0
; Modules ; Modules
modules-left = powermenu weather modules-left = powermenu weather
modules-center = ki3 modules-center = ki3
modules-right = volume date modules-right = brightness volume date
; Set the cursor to display pointer / resize is interaction available ; Set the cursor to display pointer / resize is interaction available
cursor-click = pointer cursor-click = pointer
@ -114,6 +114,14 @@ exec = ~/.local/bin/i3scripts/weathermap
interval = 600 interval = 600
;label-font = Font Awesome 5 Free Solid:size=40;0 ;label-font = Font Awesome 5 Free Solid:size=40;0
; Brightness
;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/brightness]
type = custom/script
exec = echo " $(brightnessctl -P g)%"
tail = true
; Type Speed ; Type Speed
;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/info-hackspeed] [module/info-hackspeed]
@ -325,20 +333,20 @@ format-padding = 0
format = <label-toggle> <menu> format = <label-toggle> <menu>
label-open = " " label-open = " "
label-close = " " label-close = " "
menu-0-0 = "  pkill poly " menu-0-0 = " Restart i3 |"
menu-0-0-foreground = #fba922 menu-0-0-foreground = #fba922
menu-0-0-exec = pkill -f polybar ;menu-0-0-background = #141414
menu-0-1 = " i3 restart " menu-0-0-exec = i3 restart
menu-0-1 = " Logout |"
menu-0-1-foreground = #fba922 menu-0-1-foreground = #fba922
;menu-0-1-background = #141414 menu-0-1-exec = pkill -KILL -u kapper
menu-0-1-exec = i3 restart menu-0-2 = " Reboot |"
menu-0-2 = " Reboot "
menu-0-2-foreground = #fba922 menu-0-2-foreground = #fba922
menu-0-2-exec = sudo reboot menu-0-2-exec = reboot
menu-0-3 = " Power off " menu-0-3 = " Power off |"
menu-0-3-foreground = #fba922 menu-0-3-foreground = #fba922
menu-0-3-exec = sudo poweroff menu-0-3-exec = poweroff
menu-0-4 = " Lock " menu-0-4 = " Lock |"
menu-0-4-foreground = #fba922 menu-0-4-foreground = #fba922
menu-0-4-exec = i3lock -c 000000 menu-0-4-exec = i3lock -c 000000

View File

@ -40,7 +40,3 @@ switch-to-session-9=none
toggle-session-keyboard-input=none toggle-session-keyboard-input=none
toggle-session-prevent-closing=none toggle-session-prevent-closing=none
toggle-window-state=Meta+z toggle-window-state=Meta+z
[Window]
Height=40
Width=80

View File

@ -20,3 +20,4 @@ TrimTrailingSpacesInSelectedText=true
[Scrolling] [Scrolling]
HistoryMode=2 HistoryMode=2
ScrollBarPosition=2 ScrollBarPosition=2
ScrollFullPage=1

View File

@ -37,12 +37,12 @@
# These settings are for a Dell XPS 13 9310 # These settings are for a Dell XPS 13 9310
#Volume Up #Volume Up
"amixer set Master 5%+" "pulsemixer --change-volume +5 --max-volume 125"
m:0x0 + c:123 m:0x0 + c:123
XF86AudioRaiseVolume XF86AudioRaiseVolume
#Volume Down #Volume Down
"amixer set Master 1%-" "pulsemixer --change-volume -5"
m:0x0 + c:122 m:0x0 + c:122
XF86AudioLowerVolume XF86AudioLowerVolume

View File

@ -6,7 +6,7 @@ These configs were created and tested on Kubuntu 20.04 using i3-gaps, and should
First, grab some packages used for status bar and desktop overlay First, grab some packages used for status bar and desktop overlay
```bash ```bash
sudo apt install conky golang-go inxi python3 python3-pip jq tmux xbindkeys sudo apt install conky golang-go inxi python3 python3-pip jq tmux xbindkeys xautolock pulsemixer
sudo pip3 install powerline-shell sudo pip3 install powerline-shell
go get -u github.com/arl/gitmux go get -u github.com/arl/gitmux
``` ```
@ -27,7 +27,49 @@ sudo ./configure && sudo make install
sudo usermod -aG video <YOUR_USERNAME> sudo usermod -aG video <YOUR_USERNAME>
``` ```
Optionally, you can modify the following keybinds in `.xbindkeysrc`. I wrote some addiitonal comments in the file and also you can check out [Linux Admin/i3](https://knoats.com/books/linux-admin/page/i3#bkmrk-xkeybinds) for more help if needed. Then install i3-gaps from speed-ricer PPA
```bash
sudo add-apt-repository ppa:kgilmer/speed-rice
sudo apt install i3-gaps
```
Last, install these dotfiles to configure all of these applications by cloning repository into home directory and running `stow .` -
```bash
git clone -b kubuntu-i3 --recursive https://github.com/shaunrd0/dot ~/dot
cd ~/dot/
stow .
```
If you'd rather clone elsewhere you can
```bash
git clone -b kubuntu-i3 --recursive https://github.com/shaunrd0/dot /path/to/dot
cd /path/to/dot/
stow -t ~ .
```
If you forgot to clone recursively
```bash
cd ~/dot/
git submodule update --init
```
To configure tap to click on laptop touchpads, run the following commands
```bash
sudo mkdir /etc/X11/xorg.conf.d
sudoedit /etc/X11/xorg.conf.d/90-touchpad.conf
```
And input the following lines into the `90-touchpad.conf` file. Save, exit, then run `sudo pkill -KILL -u <YOUR_USERNAME>` to logout of your user and log back in to apply the changes.
```
Section "InputClass"
Identifier "touchpad"
MatchIsTouchpad "on"
Driver "libinput"
Option "Tapping" "on"
EndSection
```
Optionally, you can also modify the following keybinds in `.xbindkeysrc`. I wrote some addiitonal comments in the file and also you can check out [Linux Admin/i3](https://knoats.com/books/linux-admin/page/i3#bkmrk-xkeybinds) for more help if needed.
``` ```
# SETUP INSTRUCTIONS: # SETUP INSTRUCTIONS:
# Run `xbindkeys --key` and press a key to get the output # Run `xbindkeys --key` and press a key to get the output
@ -61,47 +103,8 @@ Optionally, you can modify the following keybinds in `.xbindkeysrc`. I wrote som
XF86MonBrightnessDown XF86MonBrightnessDown
``` ```
Then install i3-gaps from speed-ricer PPA
```bash
sudo add-apt-repository ppa:kgilmer/speed-rice
sudo apt install i3-gaps
```
Last, install these dotfiles to configure all of these applications by cloning repository into home directory and running `stow .` -
```bash
git clone -b ubuntu-i3 --recursive https://github.com/shaunrd0/dot ~/dot
cd ~/dot/
stow .
```
If you'd rather clone elsewhere you can
```bash
git clone -b ubuntu-i3 --recursive https://github.com/shaunrd0/dot /path/to/dot
cd /path/to/dot/
stow -t ~ .
```
If you forgot to clone recursively
```bash
cd ~/dot/
git submodule update --init
```
To configure tap to click on laptop touchpads, run the following commands
```bash
sudo mkdir /etc/X11/xorg.conf.d
sudoedit /etc/X11/xorg.conf.d/90-touchpad.conf
```
And input the following lines into the `90-touchpad.conf` file. Save, exit, then run `sudo pkill -KILL -u <YOUR_USERNAME>` to logout of your user and log back in to apply the changes.
```
Section "InputClass"
Identifier "touchpad"
MatchIsTouchpad "on"
Driver "libinput"
Option "Tapping" "on"
EndSection
```
`stow --adopt .` can be used to install conflicting files, but doing so will result in the loss of your local configurations. If you want to keep them, back up the conflicting files output in the error message before running this command. `stow --adopt .` can be used to install conflicting files, but doing so will result in the loss of your local configurations. If you want to keep them, back up the conflicting files output in the error message before running this command.