UPDATE
This commit is contained in:
parent
3e28390476
commit
cf1f74c0bd
6 changed files with 91 additions and 51 deletions
|
|
@ -1,6 +1,7 @@
|
|||
theme = "gruvbox"
|
||||
|
||||
[editor]
|
||||
cursorline = true
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
normal = "block"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ from qtile_extras import widget
|
|||
from qtile_extras.widget import UPowerWidget
|
||||
from qtile_extras.widget.decorations import PowerLineDecoration
|
||||
|
||||
|
||||
from qutils import get_num_screens, get_network_interface, get_batteries, Colors
|
||||
|
||||
mod = "mod4" # Sets mod key to SUPER/WINDOWS
|
||||
|
|
@ -27,17 +26,24 @@ update_distro_key = "Ubuntu"
|
|||
keys = [
|
||||
# ## The essentials
|
||||
Key([mod], "Return", lazy.spawn(myTerm), desc='Launches My Terminal'),
|
||||
Key([mod, "shift"], "Return", lazy.spawn("rofi -show run"), desc='Run Launcher'),
|
||||
Key([mod], "space", lazy.spawn("rofi -show run"), desc='Run Launcher'),
|
||||
Key([mod], "b", lazy.spawn(myBrowser), desc='Qutebrowser'),
|
||||
Key([mod], "l", lazy.spawn("cinnamon-screensaver-command -a"), desc='Qutebrowser'),
|
||||
Key([mod], "Tab", lazy.next_layout(), desc='Toggle through layouts'),
|
||||
Key([mod, "shift"], "c", lazy.window.kill(), desc='Kill active window'),
|
||||
Key([mod, "shift"], "r", lazy.restart(), desc='Restart Qtile'),
|
||||
Key([mod, "shift"], "q", lazy.shutdown(), desc='Shutdown Qtile'),
|
||||
Key([mod, "shift"], "p", lazy.spawn("""rofi -show p -modi p:'rofi-power-menu \\
|
||||
--symbols-font \"Symbols Nerd Font Mono\" \\
|
||||
--choices=shutdown/reboot/suspend/logout' \\
|
||||
-theme-str 'window {width: 12em;} listview {lines: 4;}'"""),
|
||||
desc='Run Shutdown Menu'),
|
||||
|
||||
Key([mod], "period", lazy.spawn("rofimoji"), desc='Emoji Picker'),
|
||||
|
||||
# ## Switch focus of monitors
|
||||
Key([mod], "period", lazy.next_screen(), desc='Move focus to next monitor'),
|
||||
Key([mod], "comma", lazy.prev_screen(), desc='Move focus to prev monitor'),
|
||||
Key([mod, "control"], "Right", lazy.next_screen(), desc='Move focus to next monitor'),
|
||||
Key([mod, "control"], "Left", lazy.prev_screen(), desc='Move focus to prev monitor'),
|
||||
# ## Window controls
|
||||
Key([mod], "Up", lazy.layout.up(), desc='Move focus up'),
|
||||
Key([mod], "Down", lazy.layout.down(), desc='Move focus down'),
|
||||
|
|
@ -57,10 +63,10 @@ keys = [
|
|||
desc='Expand window (MonadTall), increase number in master pane (Tile)'),
|
||||
# Grow windows. If current window is on the edge of screen and direction
|
||||
# will be to screen edge - window would shrink.
|
||||
Key([mod, "control"], "Up", lazy.layout.grow_up(), desc="Grow window up"),
|
||||
Key([mod, "control"], "Down", lazy.layout.grow_down(), desc="Grow window down"),
|
||||
Key([mod, "control"], "Left", lazy.layout.grow_left(), desc="Grow window to the left"),
|
||||
Key([mod, "control"], "Right", lazy.layout.grow_right(), desc="Grow window to the right"),
|
||||
# Key([mod, "control"], "Up", lazy.layout.grow_up(), desc="Grow window up"),
|
||||
# Key([mod, "control"], "Down", lazy.layout.grow_down(), desc="Grow window down"),
|
||||
# Key([mod, "control"], "Left", lazy.layout.grow_left(), desc="Grow window to the left"),
|
||||
# Key([mod, "control"], "Right", lazy.layout.grow_right(), desc="Grow window to the right"),
|
||||
|
||||
Key([mod], "n", lazy.layout.normalize(), desc='normalize window size ratios'),
|
||||
Key([mod], "m", lazy.layout.maximize(), desc='toggle window between minimum and maximum sizes'),
|
||||
|
|
@ -69,20 +75,26 @@ keys = [
|
|||
Key([mod], "f", lazy.window.toggle_fullscreen(), desc='toggle fullscreen'),
|
||||
|
||||
# ## Stack controls
|
||||
Key([mod, "shift"], "Tab", lazy.layout.rotate(), lazy.layout.flip(),
|
||||
desc='Switch which side main pane occupies (XmonadTall)'),
|
||||
Key([mod], "space", lazy.layout.next(), desc='Switch window focus to other pane(s) of stack'),
|
||||
Key([mod, "shift"], "space", lazy.layout.toggle_split(),
|
||||
desc='Toggle between split and unsplit sides of stack'),
|
||||
# Key([mod, "shift"], "Tab", lazy.layout.rotate(), lazy.layout.flip(),
|
||||
# desc='Switch which side main pane occupies (XmonadTall)'),
|
||||
# Key([mod], "space", lazy.layout.next(), desc='Switch window focus to other pane(s) of stack'),
|
||||
# Key([mod, "shift"], "space", lazy.layout.toggle_split(),
|
||||
# desc='Toggle between split and unsplit sides of stack'),
|
||||
]
|
||||
|
||||
groups = [Group("CHT", layout='max', matches=[Match(wm_class=('microsoft teams - preview'))]),
|
||||
Group("WWW", layout='monadtall', matches=[Match(wm_class=['Firefox', 'firefox', 'firefox-bin', 'Chromium', 'Google-chrome', 'google-chrome'])]),
|
||||
Group("DEV", layout='max'),
|
||||
Group("SYS", layout='monadtall'),
|
||||
Group("REF", layout='monadtall'),
|
||||
Group("DOC", layout='monadtall', matches=[Match(wm_class=['obsidian'])]),
|
||||
Group("DMP", layout='monadtall')]
|
||||
groups = [Group("CHT", matches=[Match(wm_class=('microsoft teams - preview'))]),
|
||||
Group("WWW",
|
||||
matches=[Match(wm_class=['Firefox',
|
||||
'firefox',
|
||||
'firefox-bin',
|
||||
'Chromium',
|
||||
'Google-chrome',
|
||||
'google-chrome'])]),
|
||||
Group("DEV"),
|
||||
Group("SYS"),
|
||||
Group("REF"),
|
||||
Group("DOC", matches=[Match(wm_class=['obsidian'])]),
|
||||
Group("DMP")]
|
||||
|
||||
# Allow MODKEY+[0 through 9] to bind to groups, see https://docs.qtile.org/en/stable/manual/config/groups.html
|
||||
# MOD4 + index Number : Switch to Group[index]
|
||||
|
|
@ -108,14 +120,17 @@ keys.extend([
|
|||
layout_theme = {"border_width": 2,
|
||||
"margin": 8,
|
||||
"border_focus": Colors.green,
|
||||
"border_normal": Colors.grey
|
||||
"border_normal": Colors.grey,
|
||||
"ratio": 0.6180469715698392,
|
||||
"new_client_position": "bottom",
|
||||
}
|
||||
|
||||
layouts = [
|
||||
layout.MonadTall(**layout_theme),
|
||||
layout.MonadWide(**layout_theme),
|
||||
layout.Max(**layout_theme),
|
||||
layout.RatioTile(**layout_theme),
|
||||
# layout.MonadThreeCol(main_centered=False, **layout_theme),
|
||||
# layout.RatioTile(**layout_theme),
|
||||
# layout.TreeTab(
|
||||
# font = "Ubuntu",
|
||||
# fontsize = 10,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
picom --xrender-sync-fence & # option for nvidia driver to avoid error
|
||||
volumeicon & # Systray volume Icon
|
||||
volumeicon & # Systray Volume Icon
|
||||
nm-applet & # Systray Network Icon
|
||||
|
||||
nitrogen --restore & #wallpaper
|
||||
# nitrogen --restore & #wallpaper
|
||||
# feh --no-fehbg --image-bg '#1A1421' --bg-max -z ~/Pictures/wallpapers/abstract/windy_desert/*
|
||||
~/.fehbg
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
import subprocess
|
||||
|
||||
|
||||
def get_num_screens():
|
||||
from Xlib import display as xdisplay
|
||||
|
||||
|
|
@ -18,13 +19,24 @@ def get_num_screens():
|
|||
preferred = monitor.num_preferred
|
||||
if preferred:
|
||||
num_monitors += 1
|
||||
except:
|
||||
except Exception:
|
||||
raise
|
||||
return 1
|
||||
else:
|
||||
return num_monitors
|
||||
|
||||
|
||||
def get_batteries():
|
||||
try:
|
||||
proc_upower = subprocess.Popen(['upower', '-e'], stdout=subprocess.PIPE)
|
||||
proc_grep = subprocess.check_output(['grep', 'BAT'], stdin=proc_upower.stdout)
|
||||
proc_upower.stdout.close()
|
||||
txt = proc_grep.decode('utf-8')
|
||||
return [line.split('_')[-1] for line in txt.splitlines(keepends=False)]
|
||||
except Exception:
|
||||
return []
|
||||
|
||||
|
||||
def get_network_interface():
|
||||
proc_ip = subprocess.Popen(['ip', 'route', 'get', '8.8.8.8'], stdout=subprocess.PIPE)
|
||||
proc_awk = subprocess.check_output(['awk', '--', "{printf $5}"], stdin=proc_ip.stdout)
|
||||
|
|
|
|||
|
|
@ -31,3 +31,8 @@ export EDITOR='hx'
|
|||
export VISUAL='hx'
|
||||
|
||||
setxkbmap eu
|
||||
if [ -d "/opt/pycharm/bin" ] ; then
|
||||
PATH="/opt/pycharm/bin:$PATH"
|
||||
fi
|
||||
|
||||
alias xcd='cd "$(xplr --print-pwd-as-result)"'
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ source $ZSH/oh-my-zsh.sh
|
|||
# Example aliases
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
alias checkupdates="aptitude search '~U'"
|
||||
|
||||
if [ "$TERM" = "linux" ]; then
|
||||
echo -en "\e]P01d2021" #black
|
||||
|
|
@ -120,3 +121,8 @@ if [ "$TERM" = "linux" ]; then
|
|||
echo -en "\e]PFfbf1c7" #white
|
||||
clear #for background artifacting
|
||||
fi
|
||||
|
||||
tere() {
|
||||
local result=$(command tere "$@")
|
||||
[ -n "$result" ] && cd -- "$result"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue