def install(*args, **kwargs): # currently, notification center just consists of tweaking a few default values for the built in notifications plasmoid. # will hopefully change this soon to be better with a custom plasmoid # ========== START PLASMANOTIFYRC ========== configs = [] configs.append({ "group": "Notifications", "key": "LowPriorityHistory", "value": "true", }) configs.append({ "group": "Notifications", "key": "PopupPosition", "value": "TopRight", }) configs.append({ "group": "Notifications", "key": "PopupTimeout", "value": "5000", }) u.kwriteconfigs("~/.config/plasmanotifyrc", configs)
def configure(*args, **kwargs): style = kwargs.get("style", "light") if style == "light": color_scheme = "HelloLight" plasma_theme = "hellolight" elif style == "dark": # todo. not tested/working. color_scheme = "HelloDark" plasma_theme = "hellodark" # set plasma theme u.kwriteconfig({ "file": "~/.config/plasmarc", "group": "Theme", "key": "name", "value": plasma_theme, }) # set color scheme configs = [] configs.append({ "group": "General", "key": "Name", "value": color_scheme, }) configs.append({ "group": "General", "key": "ColorScheme", "value": color_scheme, }) u.kwriteconfigs("~/.config/kdeglobals", configs) # Style the titlebar buttons to add a little bit of margin on left & make it thinner. configs = [] configs.append({ "group": "Windeco", "key": "TitleBarHeightSpin", "value": 1, }) configs.append({ "group": "Windeco", "key": "ButtonMarginSpin", "value": 4, }) u.kwriteconfigs("~/.config/hellorc", configs) # Set the kwinrc to hello configs = [] configs.append({ "group": "org.kde.kdecoration2", "key": "library", "value": "org.kde.hello", }) configs.append({ "group": "org.kde.kdecoration2", "key": "theme", "value": "hello", }) u.kwriteconfigs("~/.config/kwinrc", configs)
def config(): configs = [] # Fonts configs.append({ "key": "fixed", "value": "'SF Mono,10,-1,5,50,0,0,0,0,0'", "group": "General", }) configs.append({ "key": "font", "value": "'SF Pro Text,10,-1,5,50,0,0,0,0,0'", "group": "General", }) configs.append({ "key": "menuFont", "value": "'SF Pro Text,10,-1,5,50,0,0,0,0,0'", "group": "General", }) configs.append({ "key": "smallestReadableFont", "value": "'SF Pro Text,8,-1,5,50,0,0,0,0,0'", "group": "General", }) configs.append({ "key": "toolBarFont", "value": "'SF Pro Text,10,-1,5,50,0,0,0,0,0'", "group": "General", }) configs.append({ "key": "activeFont", "value": "'SF Pro Text,10,-1,5,50,0,0,0,0,0'", "group": "WM", }) u.kwriteconfigs("~/.config/kdeglobals", configs)
def configure(*args, **kwargs): # ========== START KDEGLOBALS ========== configs = [] # widget style configs.append({ "group": "General", "key": "widgetStyle", "value": "Breeze", }) configs.append({ "group": "KDE", "key": "widgetStyle", "value": "Breeze", }) # Dolphin u.kwriteconfig({ "file": "~/.config/dolphinrc", "group": "General", "key": "ShowFullPath", "value": "true", }) # This is to change browsing dolphing to doubleclick rather than single. For some reason it's in globals and not dolphinrc. u.kwriteconfig({ "file": "~/.config/kdeglobals", "group": "KDE", "key": "SingleClick", "value": "false", }) # xsettingsd # not sure what this is, but seems important... someone please PR with a better explanation. xsettingsd_dir = Path("~/.config/xsettingsd").expanduser() xsettingsd_dir.mkdir(parents=True, exist_ok=True) xsettingsd_conf = xsettingsd_dir / Path("xsettingsd.conf") xsettingsd_template = u.get_template("xsettingsd/xsettingsd.conf") if xsettingsd_conf.is_file(): xsettingsd_conf.rename( xsettingsd_conf.with_name("{}.bak".format(xsettingsd_conf.name))) with xsettingsd_template.open() as f: content = f.read() # this should later be moved into a search/replace within the icons and cursors components respectively content = content.replace("$ICON_THEME", "Os-Catalina-icons").replace( "$CURSOR_THEME", "McMojave-cursors") with xsettingsd_conf.open("w") as f: f.write(content) xsettingsd_conf.chmod(0o664) # ========== START KWINRC ========== # Windows / Window Decorations configs = [] configs.append({ "group": "org.kde.kdecoration2", "key": "BorderSize", "value": "None", }) configs.append({ "group": "org.kde.kdecoration2", "key": "BorderSizeAuto", "value": "false", }) # This section moves the window buttons to the left. Some users might prefer it on the right so will have to add options later. configs.append({ "group": "org.kde.kdecoration2", "key": "ButtonsOnLeft", "value": "XIA", }) configs.append({ "group": "org.kde.kdecoration2", "key": "ButtonsOnRight", "value": "''", }) u.kwriteconfigs("~/.config/kwinrc", configs) # ========== END KWINRC ========== # Change splash screen back to breeze u.kwriteconfig({ "key": "Theme", "value": "org.kde.breeze.desktop", "group": "KSplash", "file": "~/.config/ksplashrc", }) u.restart_kwin() u.restart_plasma()
def configure(*args, **kwargs): options = kwargs.get("options", {}) style = options.get("style", "light") # https://userbase.kde.org/KDE_Connect/Tutorials/Useful_commands#Change_look_and_feel if style == "light": theme = "McMojave-light" color_scheme = "McMojaveLight" elif style == "dark": # todo. not tested/working. theme = "McMojave" color_scheme = "McMojave" # run the lookandfeeltool cmd = "lookandfeeltool -a 'com.github.vinceliuice.{}'".format(theme) u.run_shell(cmd, stderr_level=logging.DEBUG) u.stop_plasma() # ========== START KDEGLOBALS ========== configs = [] # widget style configs.append({ "key": "widgetStyle", "value": "Breeze", "group": "General", }) configs.append({ "key": "widgetStyle", "value": "Breeze", "group": "KDE", }) # colors configs.append({ "key": "Name", "value": color_scheme, "group": "General", }) configs.append({ "key": "ColorScheme", "value": color_scheme, "group": "General", }) # Fonts configs.append({ "key": "fixed", "value": "'SF Mono,10,-1,5,50,0,0,0,0,0'", "group": "General", }) configs.append({ "key": "font", "value": "'SF Pro Text,10,-1,5,50,0,0,0,0,0'", "group": "General", }) configs.append({ "key": "menuFont", "value": "'SF Pro Text,10,-1,5,50,0,0,0,0,0'", "group": "General", }) configs.append({ "key": "smallestReadableFont", "value": "'SF Pro Text,8,-1,5,50,0,0,0,0,0'", "group": "General", }) configs.append({ "key": "toolBarFont", "value": "'SF Pro Text,10,-1,5,50,0,0,0,0,0'", "group": "General", }) configs.append({ "key": "activeFont", "value": "'SF Pro Text,10,-1,5,50,0,0,0,0,0'", "group": "WM", }) # icons configs.append({ "key": "Theme", "value": "Os-Catalina-icons", "group": "Icons", }) u.kwriteconfigs("~/.config/kdeglobals", configs) # ========== END KDEGLOBALS ========== # plasma theme u.kwriteconfig({ "key": "name", "value": theme, "group": "Theme", "file": "~/.config/plasmarc", }) # Dolphin u.kwriteconfig({ "key": "ShowFullPath", "value": "true", "group": "General", "file": "~/.config/dolphinrc", }) # This is to change browsing dolphing to doubleclick rather than single. For some reason it's in globals and not dolphin. u.kwriteconfig({ "key": "SingleClick", "value": "false", "group": "KDE", "file": "~/.config/kdeglobals", }) # ========== START SDDM ========== # On KDE Neon, the file is at /etc/sddm.conf.d/kde_settings.conf # this might be different in other distros. u.kwriteconfig( { "key": "Current", "value": "plasma-chili", "group": "Theme", "file": "/etc/sddm.conf.d/kde_settings.conf", }, root=True, ) # ========== END SDDM ========== # xsettingsd # not sure what this is, but seems important... xsettingsd_conf = Path("~/.config/xsettingsd/xsettingsd.conf").expanduser() xsettingsd_template = u.get_template("xsettingsd/xsettingsd.conf") xsettingsd_conf.rename( xsettingsd_conf.with_name("{}.bak".format(xsettingsd_conf.name))) with xsettingsd_template.open() as f: content = f.read() content = content.replace("$ICON_THEME", "Os-Catalina-icons").replace( "$CURSOR_THEME", "McMojave-cursors") with xsettingsd_conf.open("w") as f: f.write(content) xsettingsd_conf.chmod(0o664) # ========== START KWINRC ========== # Windows / Window Decorations configs = [] configs.append({ "key": "BorderSize", "value": "None", "group": "org.kde.kdecoration2", }) configs.append({ "key": "BorderSizeAuto", "value": "false", "group": "org.kde.kdecoration2", }) configs.append({ "key": "ButtonsOnLeft", "value": "XIA", "group": "org.kde.kdecoration2", }) configs.append({ "key": "ButtonsOnRight", "value": "''", "group": "org.kde.kdecoration2", }) configs.append({ "key": "library", "value": "org.kde.hello", "group": "org.kde.kdecoration2", }) configs.append({ "key": "theme", "value": "hello", "group": "org.kde.kdecoration2", }) u.kwriteconfigs("~/.config/kwinrc", configs) # ========== END KWINRC ========== # ========== START PLASMANOTIFYRC ========== configs = [] configs.append({ "key": "LowPriorityHistory", "value": "true", "group": "Notifications", }) configs.append({ "key": "PopupPosition", "value": "TopRight", "group": "Notifications", }) configs.append({ "key": "PopupTimeout", "value": "5000", "group": "Notifications", }) u.kwriteconfigs("~/.config/plasmanotifyrc", configs) # ========== END PLASMANOTIFYRC ========== # Change splash screen back to breeze u.kwriteconfig({ "key": "Theme", "value": "org.kde.breeze.desktop", "group": "KSplash", "file": "~/.config/ksplashrc", }) # Configure wallpaper of lockscreen wallpaper = G["WALLPAPER_DIR"] / Path("kym-ellis-RPT3AjdXlZc-unsplash.jpg") u.kwriteconfig({ "key": "Image", "value": "file://{}".format(wallpaper), "group": ["Greeter", "Wallpaper", "org.kde.image", "General"], "file": "~/.config/kscreenlockerrc", }) u.start_plasma() u.restart_kwin()