Skip to content

Commit

Permalink
Merge pull request #16 from friberk/master
Browse files Browse the repository at this point in the history
Changed dummy import to the original one
  • Loading branch information
suvari authored Apr 3, 2021
2 parents 8fa3c9d + d54f611 commit f3ad978
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kaptan/kaptan.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import sys
from PyQt5 import QtWidgets
from libkaptan import *
from kaptan.libkaptan import *


class Kaptan(QtWidgets.QWizard):
Expand Down
13 changes: 10 additions & 3 deletions kaptan/libkaptan/ui_mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
QSpacerItem, QSizePolicy, QButtonGroup
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import *
import os

from os.path import join

Expand Down Expand Up @@ -118,9 +119,9 @@ def folderClick(self, button):

def mouseButton(self, button):
if button == self.radiobutton3:
self.mouseButtonMap = "RightHanded"
self.mouseButtonMap = "false"
else:
self.mouseButtonMap = "LeftHanded"
self.mouseButtonMap = "true"

def reverseScroll(self):
if self.checkbox.isChecked():
Expand All @@ -132,9 +133,15 @@ def execute(self):
settings1 = QSettings(join(QDir.homePath(), ".config", "kcminputrc"), QSettings.IniFormat)
settings2 = QSettings(join(QDir.homePath(), ".config", "kdeglobals"), QSettings.IniFormat)

settings1.setValue("Mouse/MouseButtonMapping", self.mouseButtonMap)
settings1.setValue("Mouse/XLbInptLeftHanded", self.mouseButtonMap)
settings1.setValue("Mouse/ReverseScrollPolarity", self.reverseScrollPolarity)
settings1.sync()

if self.mouseButtonMap == "false":
os.system('xmodmap -e "pointer = 3 2 1"')
else:
os.system('xmodmap -e "pointer = 1 2 3"')


settings2.setValue("KDE/SingleClick", self.folderSingleClick)
settings2.sync()

0 comments on commit f3ad978

Please sign in to comment.