We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
widget.Pacman needs a non existing file:'checkupdates'
```
2020-03-30 07:09:12,582 ERROR libqtile base.py:worker():L478 problem polling to update widget pacman
Traceback (most recent call last):
  File "/home/parsrch/.local/lib/python3.8/site-packages/libqtile/widget/base.py", line 474, in worker
    text = self.poll()
  File "/home/parsrch/.local/lib/python3.8/site-packages/libqtile/widget/pacman.py", line 49, in poll
    pacman = self.call_process(['checkupdates'])
  File "/home/parsrch/.local/lib/python3.8/site-packages/libqtile/widget/base.py", line 266, in call_process
    output = subprocess.check_output(command, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'checkupdates'
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `libqtile/widget/pacman.py`
Content:
```
1 # -*- coding:utf-8 -*-
2 #
3 # Copyright (C) 2012, Maximilian Köhl <linuxmaxi@googlemail.com>
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 import subprocess
19 
20 from libqtile.log_utils import logger
21 from libqtile.widget import base
22 
23 
24 class Pacman(base.ThreadedPollText):
25     """Shows number of available updates
26 
27     Needs the pacman package manager installed. So will only work in Arch Linux
28     installation.
29     """
30     orientations = base.ORIENTATION_HORIZONTAL
31     defaults = [
32         ('unavailable', 'ffffff', 'Unavailable Color - no updates.'),
33         ('execute', None, 'Command to execute on click'),
34         ('update_interval', 60, "The update interval."),
35     ]
36 
37     def __init__(self, **config):
38         logger.warning("Pacman is deprecated, please use CheckUpdates")
39         base.ThreadedPollText.__init__(self, **config)
40         self.add_defaults(Pacman.defaults)
41 
42     def draw(self):
43         if self.text == '0':
44             self.layout.colour = self.unavailable
45         else:
46             self.layout.colour = self.foreground
47         base.ThreadedPollText.draw(self)
48 
49     def poll(self):
50         pacman = self.call_process(['checkupdates'])
51         return str(len(pacman.splitlines()))
52 
53     def button_press(self, x, y, button):
54         base.ThreadedPollText.button_press(self, x, y, button)
55         if button == 1 and self.execute is not None:
56             subprocess.Popen([self.execute], shell=True)
57
```

Path: `libqtile/widget/__init__.py`
Content:
```
1 # Copyright (c) 2014 Rock Neurotiko
2 # Copyright (c) 2014 roger
3 # Copyright (c) 2015 David R. Andersen
4 #
5 # Permission is hereby granted, free of charge, to any person obtaining a copy
6 # of this software and associated documentation files (the "Software"), to deal
7 # in the Software without restriction, including without limitation the rights
8 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 # copies of the Software, and to permit persons to whom the Software is
10 # furnished to do so, subject to the following conditions:
11 #
12 # The above copyright notice and this permission notice shall be included in
13 # all copies or substantial portions of the Software.
14 #
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 # SOFTWARE.
22 
23 from libqtile.utils import safe_import as safe_import_
24 # only directly import widgets that do not have any third party dependencies
25 # other than those required by qtile, otherwise use the same import function
26 from libqtile.widget.base import Mirror  # noqa: F401
27 from libqtile.widget.chord import Chord  # noqa: F401
28 from libqtile.widget.clock import Clock  # noqa: F401
29 from libqtile.widget.currentlayout import (  # noqa: F401
30     CurrentLayout,
31     CurrentLayoutIcon,
32 )
33 from libqtile.widget.groupbox import AGroupBox, GroupBox  # noqa: F401
34 from libqtile.widget.import_error import make_error
35 from libqtile.widget.prompt import Prompt  # noqa: F401
36 from libqtile.widget.quick_exit import QuickExit  # noqa: F401
37 from libqtile.widget.systray import Systray  # noqa: F401
38 from libqtile.widget.textbox import TextBox  # noqa: F401
39 from libqtile.widget.windowname import WindowName  # noqa: F401
40 
41 
42 def safe_import(module_name, class_name):
43     safe_import_(
44         (".widget", module_name), class_name, globals(), fallback=make_error
45     )
46 
47 
48 safe_import("backlight", "Backlight")
49 safe_import("battery", ["Battery", "BatteryIcon"])
50 safe_import("currentscreen", "CurrentScreen")
51 safe_import("debuginfo", "DebugInfo")
52 safe_import(
53     "graph",
54     [
55         "CPUGraph",
56         "MemoryGraph",
57         "SwapGraph",
58         "NetGraph",
59         "HDDGraph",
60         "HDDBusyGraph",
61     ],
62 )
63 safe_import("maildir", "Maildir")
64 safe_import("notify", "Notify")
65 safe_import("sensors", "ThermalSensor")
66 safe_import("sep", "Sep")
67 safe_import("she", "She")
68 safe_import("spacer", "Spacer")
69 safe_import("generic_poll_text", ["GenPollText", "GenPollUrl"])
70 safe_import("volume", "Volume")
71 safe_import("windowtabs", "WindowTabs")
72 safe_import("keyboardlayout", "KeyboardLayout")
73 safe_import("df", "DF")
74 safe_import("image", "Image")
75 safe_import("gmail_checker", "GmailChecker")
76 safe_import("clipboard", "Clipboard")
77 safe_import("countdown", "Countdown")
78 safe_import("tasklist", "TaskList")
79 safe_import("pacman", "Pacman")
80 safe_import("launchbar", "LaunchBar")
81 safe_import("canto", "Canto")
82 safe_import("mpriswidget", "Mpris")
83 safe_import("mpris2widget", "Mpris2")
84 safe_import("mpd2widget", "Mpd2")
85 safe_import("yahoo_weather", "YahooWeather")
86 safe_import("bitcoin_ticker", "BitcoinTicker")
87 safe_import("wlan", "Wlan")
88 safe_import("khal_calendar", "KhalCalendar")
89 safe_import("imapwidget", "ImapWidget")
90 safe_import("net", "Net")
91 safe_import("keyboardkbdd", "KeyboardKbdd")
92 safe_import("cmus", "Cmus")
93 safe_import("wallpaper", "Wallpaper")
94 safe_import("check_updates", "CheckUpdates")
95 safe_import("moc", "Moc")
96 safe_import("memory", "Memory")
97 safe_import("cpu", "CPU")
98 safe_import("idlerpg", "IdleRPG")
99 safe_import("pomodoro", "Pomodoro")
100 safe_import("stock_ticker", "StockTicker")
101 safe_import("caps_num_lock_indicator", "CapsNumLockIndicator")
102 safe_import("quick_exit", "QuickExit")
103 safe_import("pulse_volume", "PulseVolume")
104 safe_import("chord", "Chord")
105
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/libqtile/widget/__init__.py b/libqtile/widget/__init__.py
--- a/libqtile/widget/__init__.py
+++ b/libqtile/widget/__init__.py
@@ -76,7 +76,6 @@
 safe_import("clipboard", "Clipboard")
 safe_import("countdown", "Countdown")
 safe_import("tasklist", "TaskList")
-safe_import("pacman", "Pacman")
 safe_import("launchbar", "LaunchBar")
 safe_import("canto", "Canto")
 safe_import("mpriswidget", "Mpris")
diff --git a/libqtile/widget/pacman.py b/libqtile/widget/pacman.py
deleted file mode 100644
--- a/libqtile/widget/pacman.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# -*- coding:utf-8 -*-
-#
-# Copyright (C) 2012, Maximilian Köhl <linuxmaxi@googlemail.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-import subprocess
-
-from libqtile.log_utils import logger
-from libqtile.widget import base
-
-
-class Pacman(base.ThreadedPollText):
-    """Shows number of available updates
-
-    Needs the pacman package manager installed. So will only work in Arch Linux
-    installation.
-    """
-    orientations = base.ORIENTATION_HORIZONTAL
-    defaults = [
-        ('unavailable', 'ffffff', 'Unavailable Color - no updates.'),
-        ('execute', None, 'Command to execute on click'),
-        ('update_interval', 60, "The update interval."),
-    ]
-
-    def __init__(self, **config):
-        logger.warning("Pacman is deprecated, please use CheckUpdates")
-        base.ThreadedPollText.__init__(self, **config)
-        self.add_defaults(Pacman.defaults)
-
-    def draw(self):
-        if self.text == '0':
-            self.layout.colour = self.unavailable
-        else:
-            self.layout.colour = self.foreground
-        base.ThreadedPollText.draw(self)
-
-    def poll(self):
-        pacman = self.call_process(['checkupdates'])
-        return str(len(pacman.splitlines()))
-
-    def button_press(self, x, y, button):
-        base.ThreadedPollText.button_press(self, x, y, button)
-        if button == 1 and self.execute is not None:
-            subprocess.Popen([self.execute], shell=True)

{"golden_diff": "diff --git a/libqtile/widget/__init__.py b/libqtile/widget/__init__.py\n--- a/libqtile/widget/__init__.py\n+++ b/libqtile/widget/__init__.py\n@@ -76,7 +76,6 @@\n safe_import(\"clipboard\", \"Clipboard\")\n safe_import(\"countdown\", \"Countdown\")\n safe_import(\"tasklist\", \"TaskList\")\n-safe_import(\"pacman\", \"Pacman\")\n safe_import(\"launchbar\", \"LaunchBar\")\n safe_import(\"canto\", \"Canto\")\n safe_import(\"mpriswidget\", \"Mpris\")\ndiff --git a/libqtile/widget/pacman.py b/libqtile/widget/pacman.py\ndeleted file mode 100644\n--- a/libqtile/widget/pacman.py\n+++ /dev/null\n@@ -1,56 +0,0 @@\n-# -*- coding:utf-8 -*-\n-#\n-# Copyright (C) 2012, Maximilian K\u00f6hl <linuxmaxi@googlemail.com>\n-#\n-# This program is free software: you can redistribute it and/or modify\n-# it under the terms of the GNU General Public License as published by\n-# the Free Software Foundation, either version 3 of the License, or\n-# (at your option) any later version.\n-#\n-# This program is distributed in the hope that it will be useful,\n-# but WITHOUT ANY WARRANTY; without even the implied warranty of\n-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-# GNU General Public License for more details.\n-#\n-# You should have received a copy of the GNU General Public License\n-# along with this program. If not, see <http://www.gnu.org/licenses/>.\n-\n-import subprocess\n-\n-from libqtile.log_utils import logger\n-from libqtile.widget import base\n-\n-\n-class Pacman(base.ThreadedPollText):\n-    \"\"\"Shows number of available updates\n-\n-    Needs the pacman package manager installed. So will only work in Arch Linux\n-    installation.\n-    \"\"\"\n-    orientations = base.ORIENTATION_HORIZONTAL\n-    defaults = [\n-        ('unavailable', 'ffffff', 'Unavailable Color - no updates.'),\n-        ('execute', None, 'Command to execute on click'),\n-        ('update_interval', 60, \"The update interval.\"),\n-    ]\n-\n-    def __init__(self, **config):\n-        logger.warning(\"Pacman is deprecated, please use CheckUpdates\")\n-        base.ThreadedPollText.__init__(self, **config)\n-        self.add_defaults(Pacman.defaults)\n-\n-    def draw(self):\n-        if self.text == '0':\n-            self.layout.colour = self.unavailable\n-        else:\n-            self.layout.colour = self.foreground\n-        base.ThreadedPollText.draw(self)\n-\n-    def poll(self):\n-        pacman = self.call_process(['checkupdates'])\n-        return str(len(pacman.splitlines()))\n-\n-    def button_press(self, x, y, button):\n-        base.ThreadedPollText.button_press(self, x, y, button)\n-        if button == 1 and self.execute is not None:\n-            subprocess.Popen([self.execute], shell=True)\n", "issue": "widget.Pacman needs a non existing file:'checkupdates'\n```\r\n2020-03-30 07:09:12,582 ERROR libqtile base.py:worker():L478 problem polling to update widget pacman\r\nTraceback (most recent call last):\r\n  File \"/home/parsrch/.local/lib/python3.8/site-packages/libqtile/widget/base.py\", line 474, in worker\r\n    text = self.poll()\r\n  File \"/home/parsrch/.local/lib/python3.8/site-packages/libqtile/widget/pacman.py\", line 49, in poll\r\n    pacman = self.call_process(['checkupdates'])\r\n  File \"/home/parsrch/.local/lib/python3.8/site-packages/libqtile/widget/base.py\", line 266, in call_process\r\n    output = subprocess.check_output(command, **kwargs)\r\n  File \"/usr/lib/python3.8/subprocess.py\", line 411, in check_output\r\n    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,\r\n  File \"/usr/lib/python3.8/subprocess.py\", line 489, in run\r\n    with Popen(*popenargs, **kwargs) as process:\r\n  File \"/usr/lib/python3.8/subprocess.py\", line 854, in __init__\r\n    self._execute_child(args, executable, preexec_fn, close_fds,\r\n  File \"/usr/lib/python3.8/subprocess.py\", line 1702, in _execute_child\r\n    raise child_exception_type(errno_num, err_msg, err_filename)\r\nFileNotFoundError: [Errno 2] No such file or directory: 'checkupdates'\r\n```\n", "before_files": [{"content": "# -*- coding:utf-8 -*-\n#\n# Copyright (C) 2012, Maximilian K\u00f6hl <linuxmaxi@googlemail.com>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program. If not, see <http://www.gnu.org/licenses/>.\n\nimport subprocess\n\nfrom libqtile.log_utils import logger\nfrom libqtile.widget import base\n\n\nclass Pacman(base.ThreadedPollText):\n    \"\"\"Shows number of available updates\n\n    Needs the pacman package manager installed. So will only work in Arch Linux\n    installation.\n    \"\"\"\n    orientations = base.ORIENTATION_HORIZONTAL\n    defaults = [\n        ('unavailable', 'ffffff', 'Unavailable Color - no updates.'),\n        ('execute', None, 'Command to execute on click'),\n        ('update_interval', 60, \"The update interval.\"),\n    ]\n\n    def __init__(self, **config):\n        logger.warning(\"Pacman is deprecated, please use CheckUpdates\")\n        base.ThreadedPollText.__init__(self, **config)\n        self.add_defaults(Pacman.defaults)\n\n    def draw(self):\n        if self.text == '0':\n            self.layout.colour = self.unavailable\n        else:\n            self.layout.colour = self.foreground\n        base.ThreadedPollText.draw(self)\n\n    def poll(self):\n        pacman = self.call_process(['checkupdates'])\n        return str(len(pacman.splitlines()))\n\n    def button_press(self, x, y, button):\n        base.ThreadedPollText.button_press(self, x, y, button)\n        if button == 1 and self.execute is not None:\n            subprocess.Popen([self.execute], shell=True)\n", "path": "libqtile/widget/pacman.py"}, {"content": "# Copyright (c) 2014 Rock Neurotiko\n# Copyright (c) 2014 roger\n# Copyright (c) 2015 David R. Andersen\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\nfrom libqtile.utils import safe_import as safe_import_\n# only directly import widgets that do not have any third party dependencies\n# other than those required by qtile, otherwise use the same import function\nfrom libqtile.widget.base import Mirror  # noqa: F401\nfrom libqtile.widget.chord import Chord  # noqa: F401\nfrom libqtile.widget.clock import Clock  # noqa: F401\nfrom libqtile.widget.currentlayout import (  # noqa: F401\n    CurrentLayout,\n    CurrentLayoutIcon,\n)\nfrom libqtile.widget.groupbox import AGroupBox, GroupBox  # noqa: F401\nfrom libqtile.widget.import_error import make_error\nfrom libqtile.widget.prompt import Prompt  # noqa: F401\nfrom libqtile.widget.quick_exit import QuickExit  # noqa: F401\nfrom libqtile.widget.systray import Systray  # noqa: F401\nfrom libqtile.widget.textbox import TextBox  # noqa: F401\nfrom libqtile.widget.windowname import WindowName  # noqa: F401\n\n\ndef safe_import(module_name, class_name):\n    safe_import_(\n        (\".widget\", module_name), class_name, globals(), fallback=make_error\n    )\n\n\nsafe_import(\"backlight\", \"Backlight\")\nsafe_import(\"battery\", [\"Battery\", \"BatteryIcon\"])\nsafe_import(\"currentscreen\", \"CurrentScreen\")\nsafe_import(\"debuginfo\", \"DebugInfo\")\nsafe_import(\n    \"graph\",\n    [\n        \"CPUGraph\",\n        \"MemoryGraph\",\n        \"SwapGraph\",\n        \"NetGraph\",\n        \"HDDGraph\",\n        \"HDDBusyGraph\",\n    ],\n)\nsafe_import(\"maildir\", \"Maildir\")\nsafe_import(\"notify\", \"Notify\")\nsafe_import(\"sensors\", \"ThermalSensor\")\nsafe_import(\"sep\", \"Sep\")\nsafe_import(\"she\", \"She\")\nsafe_import(\"spacer\", \"Spacer\")\nsafe_import(\"generic_poll_text\", [\"GenPollText\", \"GenPollUrl\"])\nsafe_import(\"volume\", \"Volume\")\nsafe_import(\"windowtabs\", \"WindowTabs\")\nsafe_import(\"keyboardlayout\", \"KeyboardLayout\")\nsafe_import(\"df\", \"DF\")\nsafe_import(\"image\", \"Image\")\nsafe_import(\"gmail_checker\", \"GmailChecker\")\nsafe_import(\"clipboard\", \"Clipboard\")\nsafe_import(\"countdown\", \"Countdown\")\nsafe_import(\"tasklist\", \"TaskList\")\nsafe_import(\"pacman\", \"Pacman\")\nsafe_import(\"launchbar\", \"LaunchBar\")\nsafe_import(\"canto\", \"Canto\")\nsafe_import(\"mpriswidget\", \"Mpris\")\nsafe_import(\"mpris2widget\", \"Mpris2\")\nsafe_import(\"mpd2widget\", \"Mpd2\")\nsafe_import(\"yahoo_weather\", \"YahooWeather\")\nsafe_import(\"bitcoin_ticker\", \"BitcoinTicker\")\nsafe_import(\"wlan\", \"Wlan\")\nsafe_import(\"khal_calendar\", \"KhalCalendar\")\nsafe_import(\"imapwidget\", \"ImapWidget\")\nsafe_import(\"net\", \"Net\")\nsafe_import(\"keyboardkbdd\", \"KeyboardKbdd\")\nsafe_import(\"cmus\", \"Cmus\")\nsafe_import(\"wallpaper\", \"Wallpaper\")\nsafe_import(\"check_updates\", \"CheckUpdates\")\nsafe_import(\"moc\", \"Moc\")\nsafe_import(\"memory\", \"Memory\")\nsafe_import(\"cpu\", \"CPU\")\nsafe_import(\"idlerpg\", \"IdleRPG\")\nsafe_import(\"pomodoro\", \"Pomodoro\")\nsafe_import(\"stock_ticker\", \"StockTicker\")\nsafe_import(\"caps_num_lock_indicator\", \"CapsNumLockIndicator\")\nsafe_import(\"quick_exit\", \"QuickExit\")\nsafe_import(\"pulse_volume\", \"PulseVolume\")\nsafe_import(\"chord\", \"Chord\")\n", "path": "libqtile/widget/__init__.py"}], "after_files": [{"content": null, "path": "libqtile/widget/pacman.py"}, {"content": "# Copyright (c) 2014 Rock Neurotiko\n# Copyright (c) 2014 roger\n# Copyright (c) 2015 David R. Andersen\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\nfrom libqtile.utils import safe_import as safe_import_\n# only directly import widgets that do not have any third party dependencies\n# other than those required by qtile, otherwise use the same import function\nfrom libqtile.widget.base import Mirror  # noqa: F401\nfrom libqtile.widget.chord import Chord  # noqa: F401\nfrom libqtile.widget.clock import Clock  # noqa: F401\nfrom libqtile.widget.currentlayout import (  # noqa: F401\n    CurrentLayout,\n    CurrentLayoutIcon,\n)\nfrom libqtile.widget.groupbox import AGroupBox, GroupBox  # noqa: F401\nfrom libqtile.widget.import_error import make_error\nfrom libqtile.widget.prompt import Prompt  # noqa: F401\nfrom libqtile.widget.quick_exit import QuickExit  # noqa: F401\nfrom libqtile.widget.systray import Systray  # noqa: F401\nfrom libqtile.widget.textbox import TextBox  # noqa: F401\nfrom libqtile.widget.windowname import WindowName  # noqa: F401\n\n\ndef safe_import(module_name, class_name):\n    safe_import_(\n        (\".widget\", module_name), class_name, globals(), fallback=make_error\n    )\n\n\nsafe_import(\"backlight\", \"Backlight\")\nsafe_import(\"battery\", [\"Battery\", \"BatteryIcon\"])\nsafe_import(\"currentscreen\", \"CurrentScreen\")\nsafe_import(\"debuginfo\", \"DebugInfo\")\nsafe_import(\n    \"graph\",\n    [\n        \"CPUGraph\",\n        \"MemoryGraph\",\n        \"SwapGraph\",\n        \"NetGraph\",\n        \"HDDGraph\",\n        \"HDDBusyGraph\",\n    ],\n)\nsafe_import(\"maildir\", \"Maildir\")\nsafe_import(\"notify\", \"Notify\")\nsafe_import(\"sensors\", \"ThermalSensor\")\nsafe_import(\"sep\", \"Sep\")\nsafe_import(\"she\", \"She\")\nsafe_import(\"spacer\", \"Spacer\")\nsafe_import(\"generic_poll_text\", [\"GenPollText\", \"GenPollUrl\"])\nsafe_import(\"volume\", \"Volume\")\nsafe_import(\"windowtabs\", \"WindowTabs\")\nsafe_import(\"keyboardlayout\", \"KeyboardLayout\")\nsafe_import(\"df\", \"DF\")\nsafe_import(\"image\", \"Image\")\nsafe_import(\"gmail_checker\", \"GmailChecker\")\nsafe_import(\"clipboard\", \"Clipboard\")\nsafe_import(\"countdown\", \"Countdown\")\nsafe_import(\"tasklist\", \"TaskList\")\nsafe_import(\"launchbar\", \"LaunchBar\")\nsafe_import(\"canto\", \"Canto\")\nsafe_import(\"mpriswidget\", \"Mpris\")\nsafe_import(\"mpris2widget\", \"Mpris2\")\nsafe_import(\"mpd2widget\", \"Mpd2\")\nsafe_import(\"yahoo_weather\", \"YahooWeather\")\nsafe_import(\"bitcoin_ticker\", \"BitcoinTicker\")\nsafe_import(\"wlan\", \"Wlan\")\nsafe_import(\"khal_calendar\", \"KhalCalendar\")\nsafe_import(\"imapwidget\", \"ImapWidget\")\nsafe_import(\"net\", \"Net\")\nsafe_import(\"keyboardkbdd\", \"KeyboardKbdd\")\nsafe_import(\"cmus\", \"Cmus\")\nsafe_import(\"wallpaper\", \"Wallpaper\")\nsafe_import(\"check_updates\", \"CheckUpdates\")\nsafe_import(\"moc\", \"Moc\")\nsafe_import(\"memory\", \"Memory\")\nsafe_import(\"cpu\", \"CPU\")\nsafe_import(\"idlerpg\", \"IdleRPG\")\nsafe_import(\"pomodoro\", \"Pomodoro\")\nsafe_import(\"stock_ticker\", \"StockTicker\")\nsafe_import(\"caps_num_lock_indicator\", \"CapsNumLockIndicator\")\nsafe_import(\"quick_exit\", \"QuickExit\")\nsafe_import(\"pulse_volume\", \"PulseVolume\")\nsafe_import(\"chord\", \"Chord\")\n", "path": "libqtile/widget/__init__.py"}]}