Adding fixing a few things.

This commit is contained in:
Derek Taylor
2020-11-15 06:16:21 -06:00
parent 3a124db7d7
commit d72c0e0842
9 changed files with 76 additions and 18 deletions

View File

@@ -15,6 +15,7 @@
- [[#default-widget-settings][Default Widget Settings]] - [[#default-widget-settings][Default Widget Settings]]
- [[#widgets][Widgets]] - [[#widgets][Widgets]]
- [[#screens][Screens]] - [[#screens][Screens]]
- [[#some-important-functions][Some Important Functions]]
- [[#drag-floating-windows][Drag floating windows]] - [[#drag-floating-windows][Drag floating windows]]
- [[#floating-windows][Floating windows]] - [[#floating-windows][Floating windows]]
- [[#startup-applications][Startup applications]] - [[#startup-applications][Startup applications]]
@@ -49,7 +50,6 @@ or substantial portions of the Software.
- Complete remote scriptability - write scripts to set up workspaces, manipulate windows, update status bar widgets and more. - Complete remote scriptability - write scripts to set up workspaces, manipulate windows, update status bar widgets and more.
- Qtile's remote scriptability makes it one of the most thoroughly unit-tested window managers around. - Qtile's remote scriptability makes it one of the most thoroughly unit-tested window managers around.
* Imports * Imports
These are python modules that must be imported for this config. These are python modules that must be imported for this config.
@@ -59,7 +59,7 @@ import os
import re import re
import socket import socket
import subprocess import subprocess
from libqtile.config import KeyChord. Key, Screen, Group, Drag, Click from libqtile.config import KeyChord, Key, Screen, Group, Drag, Click
from libqtile.command import lazy from libqtile.command import lazy
from libqtile import layout, bar, widget, hook from libqtile import layout, bar, widget, hook
from libqtile.lazy import lazy from libqtile.lazy import lazy
@@ -645,6 +645,37 @@ if __name__ in ["config", "__main__"]:
widgets_screen2 = init_widgets_screen2() widgets_screen2 = init_widgets_screen2()
#+END_SRC #+END_SRC
* Some Important Functions
#+begin_src python
def window_to_prev_group(qtile):
if qtile.currentWindow is not None:
i = qtile.groups.index(qtile.currentGroup)
qtile.currentWindow.togroup(qtile.groups[i - 1].name)
def window_to_next_group(qtile):
if qtile.currentWindow is not None:
i = qtile.groups.index(qtile.currentGroup)
qtile.currentWindow.togroup(qtile.groups[i + 1].name)
def window_to_previous_screen(qtile):
i = qtile.screens.index(qtile.current_screen)
if i != 0:
group = qtile.screens[i - 1].group.name
qtile.current_window.togroup(group)
def window_to_next_screen(qtile):
i = qtile.screens.index(qtile.current_screen)
if i + 1 != len(qtile.screens):
group = qtile.screens[i + 1].group.name
qtile.current_window.togroup(group)
def switch_screens(qtile):
i = qtile.screens.index(qtile.current_screen)
group = qtile.screens[i - 1].group
qtile.current_screen.set_group(group)
#+end_src
* Drag floating windows * Drag floating windows
Defining some mousebindings for use with floating windows. Defining some mousebindings for use with floating windows.

View File

@@ -3,9 +3,10 @@ import os
import re import re
import socket import socket
import subprocess import subprocess
from libqtile.config import Key, Screen, Group, Drag, Click from libqtile.config import KeyChord, Key, Screen, Group, Drag, Click
from libqtile.command import lazy from libqtile.command import lazy
from libqtile import layout, bar, widget, hook from libqtile import layout, bar, widget, hook
from libqtile.lazy import lazy
from typing import List # noqa: F401 from typing import List # noqa: F401
mod = "mod4" # Sets mod key to SUPER/WINDOWS mod = "mod4" # Sets mod key to SUPER/WINDOWS
@@ -144,7 +145,6 @@ keys = [
desc='Passmenu' desc='Passmenu'
), ),
Key(["mod1", "control"], "r", Key(["mod1", "control"], "r",
lazy.spawn("./.dmenu/dmenu-reddio.sh"),
desc='Dmenu reddio script' desc='Dmenu reddio script'
), ),
Key(["mod1", "control"], "s", Key(["mod1", "control"], "s",
@@ -388,9 +388,8 @@ def init_widgets_list():
background = colors[4], background = colors[4],
fontsize = 14 fontsize = 14
), ),
widget.CheckUpdates( widget.Pacman(
update_interval = 1800, update_interval = 1800,
distro = 'Arch',
foreground = colors[2], foreground = colors[2],
mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')}, mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
background = colors[4] background = colors[4]
@@ -517,6 +516,33 @@ if __name__ in ["config", "__main__"]:
widgets_screen1 = init_widgets_screen1() widgets_screen1 = init_widgets_screen1()
widgets_screen2 = init_widgets_screen2() widgets_screen2 = init_widgets_screen2()
def window_to_prev_group(qtile):
if qtile.currentWindow is not None:
i = qtile.groups.index(qtile.currentGroup)
qtile.currentWindow.togroup(qtile.groups[i - 1].name)
def window_to_next_group(qtile):
if qtile.currentWindow is not None:
i = qtile.groups.index(qtile.currentGroup)
qtile.currentWindow.togroup(qtile.groups[i + 1].name)
def window_to_previous_screen(qtile):
i = qtile.screens.index(qtile.current_screen)
if i != 0:
group = qtile.screens[i - 1].group.name
qtile.current_window.togroup(group)
def window_to_next_screen(qtile):
i = qtile.screens.index(qtile.current_screen)
if i + 1 != len(qtile.screens):
group = qtile.screens[i + 1].group.name
qtile.current_window.togroup(group)
def switch_screens(qtile):
i = qtile.screens.index(qtile.current_screen)
group = qtile.screens[i - 1].group
qtile.current_screen.set_group(group)
mouse = [ mouse = [
Drag([mod], "Button1", lazy.window.set_position_floating(), Drag([mod], "Button1", lazy.window.set_position_floating(),
start=lazy.window.get_position()), start=lazy.window.get_position()),

View File

@@ -3,8 +3,8 @@
-- you can find weather location codes here: http://weather.noaa.gov/index.html -- you can find weather location codes here: http://weather.noaa.gov/index.html
Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=true" Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=true"
, additionalFonts = [ "xft:SauceCodePro Nerd Font:pixelsize=11:antialias=true:hinting=true" , additionalFonts = [ "xft:Mononoki Nerd Font:pixelsize=11:antialias=true:hinting=true"
, "xft:SauceCodePro Nerd Font:pixelsize=16:antialias=true:hinting=true" , "xft:Mononoki Nerd Font:pixelsize=16:antialias=true:hinting=true"
, "xft:FontAwesome:pixelsize=13" , "xft:FontAwesome:pixelsize=13"
] ]
, bgColor = "#282c34" , bgColor = "#282c34"

View File

@@ -1,4 +1,4 @@
#! /bin/bash #! /bin/bash
mem="$(free -h | awk '/^Mem:/ {print $3 "/" $2}')" mem="$(free -h | awk '/^Mem:/ {print $3 "/" $2}')"
echo -e "$mem ram " echo -e "$mem "

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
cupd=$(checkupdates | wc -l) cupd=$(checkupdates | wc -l)
echo "$cupd updates" echo "$cupd available "

View File

@@ -1,4 +1,4 @@
#! /bin/bash #! /bin/bash
upt="$(uptime --pretty | sed -e 's/up //g' -e 's/ days/d/g' -e 's/ day/d/g' -e 's/ hours/h/g' -e 's/ hour/h/g' -e 's/ minutes/m/g' -e 's/, / /g')" upt="$(uptime --pretty | sed -e 's/up //g' -e 's/ days/d/g' -e 's/ day/d/g' -e 's/ hours/h/g' -e 's/ hour/h/g' -e 's/ minutes/m/g' -e 's/, / /g')"
echo -e "$upt uptime " echo -e "$upt "

View File

@@ -1,6 +1,7 @@
reddit.com/r/emacs/
distrowatch.com/
aur.archlinux.org/ aur.archlinux.org/
file:///home/dt/.surf/html/homepage.html file:///home/dt/.surf/html/homepage.html
distrowatch.com/
https://gitlab.com/dwt1 https://gitlab.com/dwt1
https://www.youtube.com/c/DistroTube/ https://www.youtube.com/c/DistroTube/
https://www.patreon.com/distrotube https://www.patreon.com/distrotube

View File

@@ -1,17 +1,17 @@
//Modify this file to change what commands output to your statusbar, and recompile using the make command. //Modify this file to change what commands output to your statusbar, and recompile using the make command.
static const Block blocks[] = { static const Block blocks[] = {
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
{" 🐧 ", "/home/dt/.local/bin/kernel", 360, 2}, {" Kernel: ", "/home/dt/.local/bin/kernel", 360, 2},
{" 🔺 ", "/home/dt/.local/bin/upt", 60, 2}, {" Uptime: ", "/home/dt/.local/bin/upt", 60, 2},
{" 📦 ", "/home/dt/.local/bin/pacupdate", 360, 9}, {" Updates: ", "/home/dt/.local/bin/pacupdate", 360, 9},
{" 💻 ", "/home/dt/.local/bin/memory", 6, 1}, {" Mem: ", "/home/dt/.local/bin/memory", 6, 1},
{" 🔊 ", "/home/dt/.local/bin/volume", 2, 10}, {" Vol: ", "/home/dt/.local/bin/volume", 2, 10},
{" 🕑 ", "/home/dt/.local/bin/clock", 5, 0}, {" Time: ", "/home/dt/.local/bin/clock", 5, 0},
}; };
//sets delimeter between status commands. NULL character ('\0') means no delimeter. //sets delimeter between status commands. NULL character ('\0') means no delimeter.

Binary file not shown.