
from __future__ import unicode_literals

import envoy
import logging


logger = logging.getLogger(__name__)


class KdeWindowManager(object):

    def __init__(self, workspace=6):
        self.prev_workspace = 1
        self.workspace = 6

    def show(self):
        envoy.run('qdbus org.kde.kwin /KWin org.kde.KWin.setCurrentDesktop 6',
                  timeout=2)
        # envoy.run('killall firefox', timeout=2)
        # envoy.connect('firefox http://standup-backend.herokuapp.com/?room=12')

    def hide(self):
        envoy.run(('qdbus org.kde.kwin /KWin '
                  'org.kde.KWin.setCurrentDesktop {}')
                      .format(self.prev_workspace),
                  timeout=2)
        # envoy.run('killall firefox', timeout=2)


from __future__ import unicode_literals

import envoy
import logging


logger = logging.getLogger(__name__)


class KdeWindowManager(object):

    def __init__(self, workspace=6):
        self.prev_workspace = 1
        self.workspace = 6

    def show(self):
        logger.info('kde show')
        envoy.run('qdbus org.kde.kwin /KWin org.kde.KWin.setCurrentDesktop 6',
                  timeout=2)
        # envoy.run('killall firefox', timeout=2)
        # envoy.connect('firefox http://standup-backend.herokuapp.com/?room=12')

    def hide(self):
        logger.info('kde hide')
        envoy.run(('qdbus org.kde.kwin /KWin '
                  'org.kde.KWin.setCurrentDesktop {}')
                      .format(self.prev_workspace),
                  timeout=2)
        # envoy.run('killall firefox', timeout=2)

Add KDE show & hide logging
Add KDE show & hide logging

  
  from __future__ import unicode_literals
  
  import envoy
  import logging
  
  
  logger = logging.getLogger(__name__)
  
  
  class KdeWindowManager(object):
  
      def __init__(self, workspace=6):
          self.prev_workspace = 1
          self.workspace = 6
  
      def show(self):
+         logger.info('kde show')
          envoy.run('qdbus org.kde.kwin /KWin org.kde.KWin.setCurrentDesktop 6',
                    timeout=2)
          # envoy.run('killall firefox', timeout=2)
          # envoy.connect('firefox http://standup-backend.herokuapp.com/?room=12')
  
      def hide(self):
+         logger.info('kde hide')
          envoy.run(('qdbus org.kde.kwin /KWin '
                    'org.kde.KWin.setCurrentDesktop {}')
                        .format(self.prev_workspace),
                    timeout=2)
          # envoy.run('killall firefox', timeout=2)
  
Add KDE show & hide logging
## Code Before:

from __future__ import unicode_literals

import envoy
import logging


logger = logging.getLogger(__name__)


class KdeWindowManager(object):

    def __init__(self, workspace=6):
        self.prev_workspace = 1
        self.workspace = 6

    def show(self):
        envoy.run('qdbus org.kde.kwin /KWin org.kde.KWin.setCurrentDesktop 6',
                  timeout=2)
        # envoy.run('killall firefox', timeout=2)
        # envoy.connect('firefox http://standup-backend.herokuapp.com/?room=12')

    def hide(self):
        envoy.run(('qdbus org.kde.kwin /KWin '
                  'org.kde.KWin.setCurrentDesktop {}')
                      .format(self.prev_workspace),
                  timeout=2)
        # envoy.run('killall firefox', timeout=2)

## Instruction:
Add KDE show & hide logging
## Code After:

from __future__ import unicode_literals

import envoy
import logging


logger = logging.getLogger(__name__)


class KdeWindowManager(object):

    def __init__(self, workspace=6):
        self.prev_workspace = 1
        self.workspace = 6

    def show(self):
        logger.info('kde show')
        envoy.run('qdbus org.kde.kwin /KWin org.kde.KWin.setCurrentDesktop 6',
                  timeout=2)
        # envoy.run('killall firefox', timeout=2)
        # envoy.connect('firefox http://standup-backend.herokuapp.com/?room=12')

    def hide(self):
        logger.info('kde hide')
        envoy.run(('qdbus org.kde.kwin /KWin '
                  'org.kde.KWin.setCurrentDesktop {}')
                      .format(self.prev_workspace),
                  timeout=2)
        # envoy.run('killall firefox', timeout=2)
