returns the window title of the active window
167544
def get_active_title():
    ''''''
    if os.name == 'posix':
        cmd = ['xdotool','getactivewindow','getwindowname']
        proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        title = proc.communicate()[0].decode('utf-8')
    else:
        raise NotImplementedError
    return title
1310576
def switch_to_window(self, window_name=None, title=None, url=None):
        
        if window_name:
            self.switch_to.window(window_name)
            return

        if url:
            url = self.get_url(path=url)

        for window_handle in self.window_handles:
            self.switch_to.window(window_handle)
            if title and self.title == title:
                return
            if url and self.current_url == url:
                return
        raise selenium_exc.NoSuchWindowException('Window (title=%s, url=%s) not found.' % (title, url))
444660
private int getCurrentWindowIndex()
    {
        long currentTime = System.currentTimeMillis();
        long currentWindow =((currentTime - startTime) / windowDurationInMs);
        return (int) currentWindow%(numKeys/windowSize);
    }
444897
def get_widget_title(tab_label_text):
    
    title = ''
    title_list = tab_label_text.split('_')
    for word in title_list:
        title += word.upper() + ' '
    title.strip()
    return title
646353
def title(self):
        
        with switch_window(self._browser, self.name):
            return self._browser.title
284076
def Title(self):
        
        titlefield = self.Schema().getField('title')
        if titlefield.widget.visible:
            return safe_unicode(self.title).encode('utf-8')
        else:
            return safe_unicode(self.id).encode('utf-8')
1049974
def get_overlay_window(self):
    

    return GetOverlayWindow(display = self.display,
                              opcode = self.display.get_extension_major(extname),
                              window = self)
862940
def get_title():
    ''' 
    '''
    MAX_LEN = 256
    buffer_ = create_unicode_buffer(MAX_LEN)
    kernel32.GetConsoleTitleW(buffer_, MAX_LEN)
    log.debug('%s', buffer_.value)
    return buffer_.value
1242512
def get_titles():
    ''''''
    if os.name == 'posix':
        for proc in get_processes():
            cmd = ['xdotool','search','--name', proc]
            proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
            window_ids = proc.communicate()[0].decode('utf-8')
            if window_ids:
                for window_id in window_ids.split('\n'):
                    cmd = ['xdotool','getwindowname',window_id]
                    proc = subprocess.Popen(cmd,
                                        stdout=subprocess.PIPE,
                                        stderr=subprocess.PIPE)
                    title = proc.communicate()[0].decode('utf-8')
                    try:
                        if title[-1] == '\n':
                            title = title[:-1]
                        yield title
                    except IndexError:
                        pass
    else:
        raise NotImplementedError
888482
def setWindowTitle(self, newTitle=''):
        """"""
        title = 'Rampage - ' + newTitle
        super(MainWindow, self).setWindowTitle(title)
88523
def active_pt_window(self):
        "  "
        if self.active_tab:
            w = self.active_tab.active_window
            if w:
                return w.pt_window
399881
def topWindow():
    
    import_qt(globals())
    
    window = QtGui.QApplication.instance().activeWindow()
    if not window:
        return None
    
    parent = window.parent()
    
    while parent:
        window = parent
        parent = window.parent()
        
    return window
1160737
def getWindow(self):
        
        if self.getPID() != -1:
            return PlatformManager.getWindowTitle(PlatformManager.getWindowByPID(self.getPID()))
        else:
            return ""
1296565
def title( self ):
        
        if ( self.currentMode() == XCalendarScene.Mode.Day ):
            return self.currentDate().toString('dddd, MMMM dd, yyyy')
        
        elif ( self.currentMode() == XCalendarScene.Mode.Week ):
            title = nativestring(self.minimumDate().toString('dddd, MMMM dd'))
            title += ' - '
            title += nativestring(self.maximumDate().toString('dddd, MMMM dd, yyyy'))
            return title
        
        elif ( self.currentMode() == XCalendarScene.Mode.Month ):
            return self.currentDate().toString('MMMM yyyy')
        
        else:
            return ''
232183
private static String getTitle()
    {
        final StringBuilder builder = new StringBuilder(Constant.BYTE_4);
        if (Engine.isStarted())
        {
            builder.append(Engine.getProgramName()).append(Constant.SPACE).append(Engine.getProgramVersion());
        }
        else
        {
            builder.append(Constant.ENGINE_NAME).append(Constant.SPACE).append(Constant.ENGINE_VERSION);
        }
        return builder.toString();
    }
722270
def active_editor_buffer(self):
        
        if self.active_tab and self.active_tab.active_window:
            return self.active_tab.active_window.editor_buffer
168226
def get_active_window_pos():
    '''
    '''
    # http://stackoverflow.com/questions/26050788/in-bash-on-ubuntu-14-04-unity-how-can-i-get-the-total-size-of-an-open-window-i/26060527#26060527
    cmd = ['xdotool','getactivewindow', 'getwindowgeometry']
    res = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr= subprocess.PIPE).communicate()
    stdout = res[0].decode('utf-8').splitlines()
    pos = stdout[1].split(':')[1].split(',')
    geo = stdout[2].split(':')[1].split('x')
    x, y = int(pos[0].strip()), int(pos[1].split('(')[0].strip())
    w, h = int(geo[0].strip()), int(geo[1].strip())

    # get the window decorations
    window_id = get_window_id()
    cmd = ['xprop', '_NET_FRAME_EXTENTS', '-id', window_id]
    res = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr= subprocess.PIPE).communicate()
    decos = res[0].decode('utf-8').split('=')[1].split(',')
    l, r = int(decos[0].strip()), int(decos[1].strip())
    t, b = int(decos[2].strip()), int(decos[3].strip())

    return x-l, y-t