Minor edits.

This commit is contained in:
Derek Taylor
2020-07-11 11:37:20 -05:00
parent 06924eaefe
commit 4680c2e1ec
8 changed files with 427 additions and 767 deletions

View File

@@ -40,36 +40,34 @@ myConfig = "/home/dt/.config/qtile/config.py" # The Qtile config file locatio
##### KEYBINDINGS #####
keys = [
### The essentials
Key(
[mod], "Return",
lazy.spawn(myTerm+" -e fish"),
desc='Launches My Terminal With Fish Shell'
Key([mod], "Return",
lazy.spawn(myTerm),
desc='Launches My Terminal'
),
Key(
[mod, "shift"], "Return",
Key([mod, "shift"], "Return",
lazy.spawn("dmenu_run -p 'Run: '"),
desc='Dmenu Run Launcher'
),
Key(
[mod], "Tab",
Key([mod], "Tab",
lazy.next_layout(),
desc='Toggle through layouts'
),
Key(
[mod, "shift"], "c",
Key([mod, "shift"], "c",
lazy.window.kill(),
desc='Kill active window'
),
Key(
[mod, "shift"], "r",
Key([mod, "shift"], "r",
lazy.restart(),
desc='Restart Qtile'
),
Key(
[mod, "shift"], "q",
Key([mod, "shift"], "q",
lazy.shutdown(),
desc='Shutdown Qtile'
),
Key(["control", "shift"], "e",
lazy.spawn("emacsclient -c -a emacs"),
desc='Doom Emacs'
),
### Switch focus to specific monitor (out of three)
Key([mod], "w",
lazy.to_screen(0),
@@ -102,169 +100,141 @@ keys = [
desc='Move down a section in treetab'
),
### Window controls
Key(
[mod], "k",
Key([mod], "k",
lazy.layout.down(),
desc='Move focus down in current stack pane'
),
Key(
[mod], "j",
Key([mod], "j",
lazy.layout.up(),
desc='Move focus up in current stack pane'
),
Key(
[mod, "shift"], "k",
Key([mod, "shift"], "k",
lazy.layout.shuffle_down(),
desc='Move windows down in current stack'
),
Key(
[mod, "shift"], "j",
Key([mod, "shift"], "j",
lazy.layout.shuffle_up(),
desc='Move windows up in current stack'
),
Key(
[mod], "h",
Key([mod], "h",
lazy.layout.grow(),
lazy.layout.increase_nmaster(),
desc='Expand window (MonadTall), increase number in master pane (Tile)'
),
Key(
[mod], "l",
Key([mod], "l",
lazy.layout.shrink(),
lazy.layout.decrease_nmaster(),
desc='Shrink window (MonadTall), decrease number in master pane (Tile)'
),
Key(
[mod], "n",
Key([mod], "n",
lazy.layout.normalize(),
desc='normalize window size ratios'
),
Key(
[mod], "m",
Key([mod], "m",
lazy.layout.maximize(),
desc='toggle window between minimum and maximum sizes'
),
Key(
[mod, "shift"], "f",
Key([mod, "shift"], "f",
lazy.window.toggle_floating(),
desc='toggle floating'
),
Key([mod, "shift"], "m",
lazy.window.toggle_fullscreen(),
desc='toggle fullscreen'
),
### Stack controls
Key(
[mod, "shift"], "space",
Key([mod, "shift"], "space",
lazy.layout.rotate(),
lazy.layout.flip(),
desc='Switch which side main pane occupies (XmonadTall)'
),
Key(
[mod], "space",
Key([mod], "space",
lazy.layout.next(),
desc='Switch window focus to other pane(s) of stack'
),
Key(
[mod, "control"], "Return",
Key([mod, "control"], "Return",
lazy.layout.toggle_split(),
desc='Toggle between split and unsplit sides of stack'
),
### Dmenu scripts launched with ALT + CTRL + KEY
Key(
["mod1", "control"], "e",
Key(["mod1", "control"], "e",
lazy.spawn("./.dmenu/dmenu-edit-configs.sh"),
desc='Dmenu script for editing config files'
),
Key(
["mod1", "control"], "m",
Key(["mod1", "control"], "m",
lazy.spawn("./.dmenu/dmenu-sysmon.sh"),
desc='Dmenu system monitor script'
),
Key(
["mod1", "control"], "p",
Key(["mod1", "control"], "p",
lazy.spawn("passmenu"),
desc='Passmenu'
),
Key(
["mod1", "control"], "r",
Key(["mod1", "control"], "r",
lazy.spawn("./.dmenu/dmenu-reddio.sh"),
desc='Dmenu reddio script'
),
Key(
["mod1", "control"], "s",
Key(["mod1", "control"], "s",
lazy.spawn("./.dmenu/dmenu-surfraw.sh"),
desc='Dmenu surfraw script'
),
Key(
["mod1", "control"], "t",
Key(["mod1", "control"], "t",
lazy.spawn("./.dmenu/dmenu-trading.sh"),
desc='Dmenu trading programs script'
),
Key(
["mod1", "control"], "i",
Key(["mod1", "control"], "i",
lazy.spawn("./.dmenu/dmenu-scrot.sh"),
desc='Dmenu scrot script'
),
### My applications launched with SUPER + ALT + KEY
Key(
[mod, "mod1"], "b",
Key([mod, "mod1"], "b",
lazy.spawn("tabbed -r 2 surf -pe x '.surf/html/homepage.html'"),
desc='lynx browser'
),
Key(
[mod, "mod1"], "l",
Key([mod, "mod1"], "l",
lazy.spawn(myTerm+" -e lynx gopher://distro.tube"),
desc='lynx browser'
),
Key(
[mod, "mod1"], "n",
Key([mod, "mod1"], "n",
lazy.spawn(myTerm+" -e newsboat"),
desc='newsboat'
),
Key(
[mod, "mod1"], "r",
Key([mod, "mod1"], "r",
lazy.spawn(myTerm+" -e rtv"),
desc='reddit terminal viewer'
),
Key(
[mod, "mod1"], "e",
Key([mod, "mod1"], "e",
lazy.spawn(myTerm+" -e neomutt"),
desc='neomutt'
),
Key(
[mod, "mod1"], "m",
Key([mod, "mod1"], "m",
lazy.spawn(myTerm+" -e sh ./scripts/toot.sh"),
desc='toot mastodon cli'
),
Key(
[mod, "mod1"], "t",
Key([mod, "mod1"], "t",
lazy.spawn(myTerm+" -e sh ./scripts/tig-script.sh"),
desc='tig'
),
Key(
[mod, "mod1"], "f",
Key([mod, "mod1"], "f",
lazy.spawn(myTerm+" -e sh ./.config/vifm/scripts/vifmrun"),
desc='vifm'
),
Key(
[mod, "mod1"], "j",
Key([mod, "mod1"], "j",
lazy.spawn(myTerm+" -e joplin"),
desc='joplin'
),
Key(
[mod, "mod1"], "c",
Key([mod, "mod1"], "c",
lazy.spawn(myTerm+" -e cmus"),
desc='cmus'
),
Key(
[mod, "mod1"], "i",
Key([mod, "mod1"], "i",
lazy.spawn(myTerm+" -e irssi"),
desc='irssi'
),
Key(
[mod, "mod1"], "y",
Key([mod, "mod1"], "y",
lazy.spawn(myTerm+" -e youtube-viewer"),
desc='youtube-viewer'
),
Key(
[mod, "mod1"], "a",
Key([mod, "mod1"], "a",
lazy.spawn(myTerm+" -e ncpamixer"),
desc='ncpamixer'
),
@@ -326,7 +296,7 @@ layouts = [
]
##### COLORS #####
colors = [["#282a36", "#282a36"], # panel background
colors = [["#292d3e", "#292d3e"], # panel background
["#434758", "#434758"], # background for current screen tab
["#ffffff", "#ffffff"], # font color for group names
["#ff5555", "#ff5555"], # border line color for current tab
@@ -350,89 +320,90 @@ extension_defaults = widget_defaults.copy()
def init_widgets_list():
widgets_list = [
widget.Sep(
linewidth = 0,
padding = 6,
foreground = colors[2],
background = colors[0]
),
widget.Image(
filename = "~/.config/qtile/icons/python.png",
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn('dmenu_run')}
),
widget.GroupBox(font="Ubuntu Bold",
fontsize = 9,
margin_y = 3,
margin_x = 0,
padding_y = 5,
padding_x = 3,
borderwidth = 3,
active = colors[2],
inactive = colors[2],
rounded = False,
highlight_color = colors[1],
highlight_method = "line",
this_current_screen_border = colors[3],
this_screen_border = colors [4],
other_current_screen_border = colors[0],
other_screen_border = colors[0],
foreground = colors[2],
background = colors[0]
),
widget.Prompt(
prompt=prompt,
font="Ubuntu Mono",
padding=10,
foreground = colors[3],
background = colors[1]
),
widget.Sep(
linewidth = 0,
padding = 40,
foreground = colors[2],
background = colors[0]
),
widget.WindowName(
foreground = colors[6],
background = colors[0],
padding = 0
),
widget.TextBox(
text='',
background = colors[0],
foreground = colors[4],
padding=0,
fontsize=37
),
widget.Sep(
linewidth = 0,
padding = 6,
foreground = colors[2],
background = colors[0]
),
widget.Image(
filename = "~/.config/qtile/icons/python.png",
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn('dmenu_run')}
),
widget.GroupBox(
font = "Ubuntu Bold",
fontsize = 9,
margin_y = 3,
margin_x = 0,
padding_y = 5,
padding_x = 3,
borderwidth = 3,
active = colors[2],
inactive = colors[2],
rounded = False,
highlight_color = colors[1],
highlight_method = "line",
this_current_screen_border = colors[3],
this_screen_border = colors [4],
other_current_screen_border = colors[0],
other_screen_border = colors[0],
foreground = colors[2],
background = colors[0]
),
widget.Prompt(
prompt = prompt,
font = "Ubuntu Mono",
padding = 10,
foreground = colors[3],
background = colors[1]
),
widget.Sep(
linewidth = 0,
padding = 40,
foreground = colors[2],
background = colors[0]
),
widget.WindowName(
foreground = colors[6],
background = colors[0],
padding = 0
),
widget.TextBox(
text="",
text = '',
background = colors[0],
foreground = colors[4],
padding = 0,
foreground=colors[2],
background=colors[4],
fontsize=12
fontsize = 37
),
widget.TextBox(
text = "",
padding = 0,
foreground = colors[2],
background = colors[4],
fontsize = 12
),
widget.BitcoinTicker(
foreground=colors[2],
background=colors[4],
foreground = colors[2],
background = colors[4],
padding = 5
),
widget.TextBox(
text='',
text = '',
background = colors[4],
foreground = colors[5],
padding=0,
fontsize=37
padding = 0,
fontsize = 37
),
widget.TextBox(
text=" 🌡",
text = " 🌡",
padding = 2,
foreground=colors[2],
background=colors[5],
fontsize=11
foreground = colors[2],
background = colors[5],
fontsize = 11
),
widget.ThermalSensor(
foreground=colors[2],
background=colors[5],
foreground = colors[2],
background = colors[5],
threshold = 90,
padding = 5
),
@@ -440,122 +411,122 @@ def init_widgets_list():
text='',
background = colors[5],
foreground = colors[4],
padding=0,
fontsize=37
padding = 0,
fontsize = 37
),
widget.TextBox(
text = "",
padding = 2,
foreground = colors[2],
background = colors[4],
fontsize = 14
),
widget.Pacman(
update_interval = 1800,
foreground = colors[2],
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
background = colors[4]
),
widget.TextBox(
text = "Updates",
padding = 5,
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
foreground = colors[2],
background = colors[4]
),
widget.TextBox(
text = '',
background = colors[4],
foreground = colors[5],
padding = 0,
fontsize = 37
),
widget.TextBox(
text = " 🖬",
foreground = colors[2],
background = colors[5],
padding = 0,
fontsize = 14
),
widget.Memory(
foreground = colors[2],
background = colors[5],
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e htop')},
padding = 5
),
widget.TextBox(
text='',
background = colors[5],
foreground = colors[4],
padding = 0,
fontsize = 37
),
widget.Net(
interface = "enp6s0",
format = '{down} ↓↑ {up}',
foreground = colors[2],
background = colors[4],
padding = 5
),
widget.TextBox(
text = '',
background = colors[4],
foreground = colors[5],
padding = 0,
fontsize = 37
),
widget.TextBox(
text = " Vol:",
foreground = colors[2],
background = colors[5],
padding = 0
),
widget.Volume(
foreground = colors[2],
background = colors[5],
padding = 5
),
widget.TextBox(
text = '',
background = colors[5],
foreground = colors[4],
padding = 0,
fontsize = 37
),
widget.CurrentLayoutIcon(
custom_icon_paths = [os.path.expanduser("~/.config/qtile/icons")],
foreground = colors[0],
background = colors[4],
padding = 0,
scale = 0.7
),
widget.CurrentLayout(
foreground = colors[2],
background = colors[4],
padding = 5
),
widget.TextBox(
text = '',
background = colors[4],
foreground = colors[5],
padding = 0,
fontsize = 37
),
widget.Clock(
foreground = colors[2],
background = colors[5],
format = "%A, %B %d [ %H:%M ]"
),
widget.Sep(
linewidth = 0,
padding = 10,
foreground = colors[0],
background = colors[5]
),
widget.Systray(
background = colors[0],
padding = 5
),
widget.TextBox(
text="",
padding = 2,
foreground=colors[2],
background=colors[4],
fontsize=14
),
widget.Pacman(
update_interval = 1800,
foreground = colors[2],
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
background = colors[4]
),
widget.TextBox(
text="Updates",
padding = 5,
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
foreground=colors[2],
background=colors[4]
),
widget.TextBox(
text='',
background = colors[4],
foreground = colors[5],
padding=0,
fontsize=37
),
widget.TextBox(
text=" 🖬",
foreground=colors[2],
background=colors[5],
padding = 0,
fontsize=14
),
widget.Memory(
foreground = colors[2],
background = colors[5],
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e htop')},
padding = 5
),
widget.TextBox(
text='',
background = colors[5],
foreground = colors[4],
padding=0,
fontsize=37
),
widget.Net(
interface = "enp6s0",
format = '{down} ↓↑ {up}',
foreground = colors[2],
background = colors[4],
padding = 5
),
widget.TextBox(
text='',
background = colors[4],
foreground = colors[5],
padding=0,
fontsize=37
),
widget.TextBox(
text=" Vol:",
foreground=colors[2],
background=colors[5],
padding = 0
),
widget.Volume(
foreground = colors[2],
background = colors[5],
padding = 5
),
widget.TextBox(
text='',
background = colors[5],
foreground = colors[4],
padding=0,
fontsize=37
),
widget.CurrentLayoutIcon(
custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
foreground = colors[0],
background = colors[4],
padding = 0,
scale=0.7
),
widget.CurrentLayout(
foreground = colors[2],
background = colors[4],
padding = 5
),
widget.TextBox(
text='',
background = colors[4],
foreground = colors[5],
padding=0,
fontsize=37
),
widget.Clock(
foreground = colors[2],
background = colors[5],
format="%A, %B %d [ %H:%M ]"
),
widget.Sep(
linewidth = 0,
padding = 10,
foreground = colors[0],
background = colors[5]
),
widget.Systray(
background=colors[0],
padding = 5
),
]
return widgets_list
@@ -570,9 +541,9 @@ def init_widgets_screen2():
return widgets_screen2 # Monitor 2 will display all widgets in widgets_list
def init_screens():
return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), opacity=0.95, size=20)),
Screen(top=bar.Bar(widgets=init_widgets_screen2(), opacity=0.95, size=20)),
Screen(top=bar.Bar(widgets=init_widgets_screen1(), opacity=0.95, size=20))]
return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), opacity=1.0, size=20)),
Screen(top=bar.Bar(widgets=init_widgets_screen2(), opacity=1.0, size=20)),
Screen(top=bar.Bar(widgets=init_widgets_screen1(), opacity=1.0, size=20))]
if __name__ in ["config", "__main__"]:
screens = init_screens()