Added app WS mapping

This commit is contained in:
Rain Clark 2021-09-30 21:04:59 -04:00
parent cd5565cb50
commit 7a1fed42ef

View File

@ -74,7 +74,7 @@ keys = [
Key([mod, "shift"], "Return", lazy.spawn("pcmanfm")), Key([mod, "shift"], "Return", lazy.spawn("pcmanfm")),
Key( Key(
[mod, "shift"], [mod, "shift"],
"d", "s",
lazy.spawn( lazy.spawn(
"dmenu_run -i -nb '#191919' -nf '#fea63c' -sb '#fea63c' -sf '#191919' -fn 'NotoMonoRegular:bold:pixelsize=14'" "dmenu_run -i -nb '#191919' -nf '#fea63c' -sb '#fea63c' -sf '#191919' -fn 'NotoMonoRegular:bold:pixelsize=14'"
), ),
@ -566,37 +566,85 @@ dgroups_app_rules = []
######################################################### #########################################################
################ assgin apps to groups ################## ################ assgin apps to groups ##################
######################################################### #########################################################
# @hook.subscribe.client_new @hook.subscribe.client_new
# def assign_app_group(client): def assign_app_group(client):
# d = {} d = {}
# ######################################################### # #########################################################
# ################ assgin apps to groups ################## # ################ assgin apps to groups ##################
# ######################################################### # #########################################################
# d["1"] = ["Navigator", "Firefox", "Vivaldi-stable", "Vivaldi-snapshot", "Chromium", "Google-chrome", "Brave", "Brave-browser", d["1"] = [
# "navigator", "firefox", "vivaldi-stable", "vivaldi-snapshot", "chromium", "google-chrome", "brave", "brave-browser", ] "Kitty",
# d["2"] = [ "Atom", "Subl3", "Geany", "Brackets", "Code-oss", "Code", "TelegramDesktop", "Discord", "kitty",
# "atom", "subl3", "geany", "brackets", "code-oss", "code", "telegramDesktop", "discord", ] "Tilix",
# d["3"] = ["Inkscape", "Nomacs", "Ristretto", "Nitrogen", "Feh", "tilix",
# "inkscape", "nomacs", "ristretto", "nitrogen", "feh", ] ]
# d["4"] = ["Gimp", "gimp" ] d["2"] = [
# d["5"] = ["Meld", "meld", "org.gnome.meld" "org.gnome.Meld" ] "Waterfox",
# d["6"] = ["Vlc","vlc", "Mpv", "mpv" ] "Firedragon",
# d["7"] = ["VirtualBox Manager", "VirtualBox Machine", "Vmplayer", "Chromium",
# "virtualbox manager", "virtualbox machine", "vmplayer", ] "waterfox",
# d["8"] = ["pcmanfm", "Nemo", "Caja", "Nautilus", "org.gnome.Nautilus", "Pcmanfm", "Pcmanfm-qt", "firedragon",
# "pcmanfm", "nemo", "caja", "nautilus", "org.gnome.nautilus", "pcmanfm", "pcmanfm-qt", ] "chromium",
# d["9"] = ["Evolution", "Geary", "Mail", "Thunderbird", "qutebrowser",
# "evolution", "geary", "mail", "thunderbird" ] ]
# d["0"] = ["Spotify", "Pragha", "Clementine", "Deadbeef", "Audacious", d["3"] = [
# "spotify", "pragha", "clementine", "deadbeef", "audacious" ] "Neovide",
# ########################################################## "Neovim",
# wm_class = client.window.get_wm_class()[0] "VSCodium",
# "Notepadqq",
# for i in range(len(d)): "neovide",
# if wm_class in list(d.values())[i]: "neovim",
# group = list(d.keys())[i] "vscodium",
# client.togroup(group) "notepadqq",
# client.group.cmd_toscreen() ]
d["4"] = [
"Pcmanfm",
"Pcmanfm-qt",
"pcmanfm",
"Thunar",
"thunar",
]
d["5"] = [
"Vlc",
"vlc",
"Mpv",
"mpv",
"SMPlayer",
"smplayer",
]
d["6"] = [
"Inkscape",
"Nomacs",
"Ristretto",
"Nitrogen",
"Feh",
"Gimp",
" Krita",
"inkscape",
"nomacs",
"ristretto",
"nitrogen",
"feh",
"gimp",
"krita",
]
d["8"] = [
"Thunderbird",
"Fluffychat",
"thunderbird",
"fluffychat",
]
# d["0"] = ["Spotify", "Pragha", "Clementine", "Deadbeef", "Audacious",
# "spotify", "pragha", "clementine", "deadbeef", "audacious" ]
# ##########################################################
wm_class = client.window.get_wm_class()[0]
#
for i in range(len(d)):
if wm_class in list(d.values())[i]:
group = list(d.keys())[i]
client.togroup(group)
client.group.cmd_toscreen()
# END # END
# ASSIGN APPLICATIONS TO A SPECIFIC GROUPNAME # ASSIGN APPLICATIONS TO A SPECIFIC GROUPNAME