switched to automatic laptop/desktop config
This commit is contained in:
@@ -18,7 +18,7 @@ font:
|
||||
family: UbuntuMonoNerdFont
|
||||
style: Bold Italic
|
||||
|
||||
size: 14
|
||||
size: 11
|
||||
|
||||
# Colors (Gruvbox dark)
|
||||
colors:
|
||||
|
||||
-1
Submodule git/zippey deleted from f037ce9e9b
@@ -1,71 +0,0 @@
|
||||
|
||||
from powerline_shell.themes.default import DefaultColor
|
||||
|
||||
|
||||
class Color(DefaultColor):
|
||||
USERNAME_FG = 230
|
||||
USERNAME_BG = 240
|
||||
USERNAME_ROOT_BG = 124
|
||||
|
||||
HOSTNAME_FG = 230
|
||||
HOSTNAME_BG = 238
|
||||
|
||||
HOME_SPECIAL_DISPLAY = True
|
||||
HOME_BG = 4 # blueish
|
||||
HOME_FG = 15 # white
|
||||
PATH_BG = 237 # dark grey
|
||||
PATH_FG = 250 # light grey
|
||||
CWD_FG = 254 # nearly-white grey
|
||||
SEPARATOR_FG = 244
|
||||
|
||||
READONLY_BG = 124
|
||||
READONLY_FG = 254
|
||||
|
||||
SSH_BG = 166 # medium orange
|
||||
SSH_FG = 254
|
||||
|
||||
REPO_CLEAN_BG = 148 # a light green color
|
||||
REPO_CLEAN_FG = 0 # black
|
||||
REPO_DIRTY_BG = 161 # pink/red
|
||||
REPO_DIRTY_FG = 15 # white
|
||||
|
||||
JOBS_FG = 39
|
||||
JOBS_BG = 238
|
||||
|
||||
CMD_PASSED_BG = 236
|
||||
CMD_PASSED_FG = 15
|
||||
CMD_FAILED_BG = 161
|
||||
CMD_FAILED_FG = 15
|
||||
|
||||
SVN_CHANGES_BG = 148
|
||||
SVN_CHANGES_FG = 22 # dark green
|
||||
|
||||
GIT_AHEAD_BG = 240
|
||||
GIT_AHEAD_FG = 250
|
||||
GIT_BEHIND_BG = 240
|
||||
GIT_BEHIND_FG = 250
|
||||
GIT_STAGED_BG = 22
|
||||
GIT_STAGED_FG = 15
|
||||
GIT_NOTSTAGED_BG = 130
|
||||
GIT_NOTSTAGED_FG = 15
|
||||
GIT_UNTRACKED_BG = 52
|
||||
GIT_UNTRACKED_FG = 15
|
||||
GIT_CONFLICTED_BG = 9
|
||||
GIT_CONFLICTED_FG = 15
|
||||
|
||||
GIT_STASH_BG = 221
|
||||
GIT_STASH_FG = 0
|
||||
|
||||
VIRTUAL_ENV_BG = 35 # a mid-tone green
|
||||
VIRTUAL_ENV_FG = 00
|
||||
|
||||
BATTERY_NORMAL_BG = 22
|
||||
BATTERY_NORMAL_FG = 7
|
||||
BATTERY_LOW_BG = 196
|
||||
BATTERY_LOW_FG = 7
|
||||
|
||||
AWS_PROFILE_FG = 39
|
||||
AWS_PROFILE_BG = 238
|
||||
|
||||
TIME_FG = 250
|
||||
TIME_BG = 238
|
||||
@@ -1,19 +1,19 @@
|
||||
from libqtile import widget, bar
|
||||
|
||||
from defines import base_color
|
||||
from defines import blue_color
|
||||
from defines import base_color, blue_color
|
||||
from defines import ChassisType, chassis_type
|
||||
from Widgets import Left_widgets, volume_widget, System_widgets, end_widgets, Laptop_widgets
|
||||
|
||||
widget_defaults = dict(
|
||||
background=base_color,
|
||||
font='Ubuntu Mono',
|
||||
fontsize=18,
|
||||
padding=3,
|
||||
padding=1 if chassis_type == ChassisType.LAPTOP else 3,
|
||||
)
|
||||
extension_defaults = widget_defaults.copy()
|
||||
|
||||
main_bar_fontsize=22
|
||||
main_bar_height=28
|
||||
main_bar_height=24 if chassis_type == ChassisType.LAPTOP else 28
|
||||
secondary_bar_height=24
|
||||
secondary_bar_fontsize=18
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from libqtile.config import Key, Drag, Click
|
||||
from libqtile.command import lazy
|
||||
|
||||
from defines import mod, term
|
||||
from defines import mod, term, ChassisType, chassis_type
|
||||
|
||||
keys = [
|
||||
#screen lock & hibernation
|
||||
@@ -56,11 +56,11 @@ keys = [
|
||||
Key([mod],'Return',lazy.spawn("rofi -show drun -show-icons -modi drun"),desc="launch rofi (drun)"),
|
||||
|
||||
# audio hotkeys
|
||||
Key([], 'XF86AudioRaiseVolume', lazy.spawn('pulseaudio-ctl up 1'), desc="increase speaker volume"),
|
||||
Key([], 'XF86AudioLowerVolume', lazy.spawn('pulseaudio-ctl down 1'), desc="decrease speaker volume"),
|
||||
Key([], 'XF86AudioRaiseVolume', lazy.spawn(f'pulseaudio-ctl up {5 if chassis_type == ChassisType.LAPTOP else 1}'), desc="increase speaker volume"),
|
||||
Key([], 'XF86AudioLowerVolume', lazy.spawn(f'pulseaudio-ctl down {5 if chassis_type == ChassisType.LAPTOP else 1}'), desc="decrease speaker volume"),
|
||||
Key([], 'XF86AudioMute', lazy.spawn('pulseaudio-ctl mute'), desc="toggle speaker mute"),
|
||||
Key(['control'], 'XF86AudioRaiseVolume', lazy.spawn('amixer set Capture 1%+'), desc="increase mic volume"),
|
||||
Key(['control'], 'XF86AudioLowerVolume', lazy.spawn('amixer set Capture 1%-'), desc="decrease mic volume"),
|
||||
Key(['control'], 'XF86AudioRaiseVolume', lazy.spawn(f'amixer set Capture {5 if chassis_type == ChassisType.LAPTOP else 1}%+'), desc="increase mic volume"),
|
||||
Key(['control'], 'XF86AudioLowerVolume', lazy.spawn(f'amixer set Capture {5 if chassis_type == ChassisType.LAPTOP else 1}%-'), desc="decrease mic volume"),
|
||||
Key(['control'], 'XF86AudioMute', lazy.spawn('amixer set Capture toggle'), desc="toggle mic mute"),
|
||||
Key([], 'XF86AudioMicMute', lazy.spawn('amixer set Capture toggle'), desc="toggle mic mute"),
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ sleep 1&
|
||||
nitrogen --restore &
|
||||
/usr/lib/geoclue-2.0/demos/agent&
|
||||
bash .screenlayout/layout.sh &
|
||||
# pulseaudio-ctl set 50 &
|
||||
pulseaudio-ctl set 50 &
|
||||
dunst &
|
||||
nextcloud &
|
||||
timeshift &
|
||||
@@ -16,3 +16,17 @@ blueman-applet &
|
||||
thunderbird &
|
||||
fcitx5 -d&
|
||||
emacs --daemon &
|
||||
# Use hostnamectl to get system information
|
||||
chassis_type=$(hostnamectl status | grep "Chassis:" | awk '{print $2}')
|
||||
|
||||
# Check if the chassis type is "laptop"
|
||||
if [ "$chassis_type" == "laptop" ]; then
|
||||
xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1
|
||||
xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Natural Scrolling Enabled" 1
|
||||
cbatticon &
|
||||
# set font size for alacritty
|
||||
sed -i 's/size: [0-9][0-9]/size: 11/' ~/.config/alacritty/alacritty.yml
|
||||
else
|
||||
# set font size for alacritty
|
||||
sed -i 's/size: [0-9][0-9]/size: 14/' ~/.config/alacritty/alacritty.yml
|
||||
fi
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
from enum import Enum
|
||||
import subprocess
|
||||
|
||||
term = 'alacritty'
|
||||
focus_color = '#076678'
|
||||
border_width = 2
|
||||
@@ -7,6 +10,23 @@ hotkey_file='/home/paul/Hotkeys'
|
||||
main_screen_res = [3440,1440]
|
||||
top_screen_res = [1440,900]
|
||||
|
||||
#region chassis type detection
|
||||
class ChassisType(Enum):
|
||||
DESKTOP = 0
|
||||
LAPTOP = 1
|
||||
|
||||
def detect_chassis_type() -> ChassisType:
|
||||
try:
|
||||
output = subprocess.check_output(["hostnamectl", "status"], universal_newlines=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("Error running hostnamectl:", e)
|
||||
exit(1)
|
||||
return ChassisType.LAPTOP if "Chassis: laptop" in output else ChassisType.DESKTOP
|
||||
|
||||
chassis_type = detect_chassis_type()
|
||||
#endregion
|
||||
|
||||
|
||||
#region colors
|
||||
light_foreground_color = ['#fbf1c7','#fbf1c7']
|
||||
dark_foreground_color = ['#282828','#282828']
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
xrandr --output DVI-I-1 --primary --mode 1440x900 --pos 2080x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --mode 3440x1440 --pos 1080x900 --rotate normal --output HDMI-1 --mode 1920x1080 --pos 0x571 --rotate left
|
||||
Reference in New Issue
Block a user