GithubHelp home page GithubHelp logo

chx / fakeslice Goto Github PK

View Code? Open in Web Editor NEW

This project forked from n4ru/fakeslice

0.0 2.0 0.0 7 KB

Discharge USB-C Power Banks before internal battery on newer ThinkPads.

Batchfile 19.52% C# 80.48%

fakeslice's Introduction

FakeSlice

Discharge USB-C Power Banks instead of charging internal battery on newer ThinkPads, allowing them to function as a swappable "Slice Battery".

Dependencies

This application requires Lenovo Vantage to be installed, but doesn't require you to have it running. More specifically, the System Interface Package that comes bundled with Lenovo Vantage is required. You will also need two specific DLLs that come with the application. Since these files are proprietary code, they cannot be included. However, the included CopyDLLs.bat script should copy the dependencies from their default installation location to the directory it is ran from.

Build

This step is optional, you can use the provided release.

Just throw FakeSlice.cs into your favorite C# compiler, target .NET Framework 4.5, and add the two required references - Plugins.Battery.Think.Native.dll & Lenovo.Modern.Portable.Battery.dll, then compile as Windows Application.

Alternatively, change to the directory where the DLLs and FakeSlice.cs are and run the following: \Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /platform:x86 FakeSlice.cs /r:Lenovo.Modern.Portable.Battery.dll /r:Plugins.Battery.Think.Native.dll.

Run

Running the application with the argument on will turn the FakeSlice "on" - which will disable charging and run off your Power Bank. Running the application with the argument off will turn the FakeSlice "off" and charge the internal battery. Running the application without any commandline arguments will toggle your setting when launched. This should allow you to use FakeSlice in your scripts with ease, and without any arguments FakeSlice works great when bound to a hotkey (like Fn + F12) using Lenovo Vantage.

Credits to Ciastix for helping expose Lenovo's proprietary interface.

fakeslice's People

Contributors

chx avatar n4ru avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.