Multifunctional porous carbon materials are the key to a clean, safe, and sustainable working environment and energy storage devices because they can be reused, recycled, and repurposed. Here, unprecedented electronically conjugated nanoporous covalent triazine frameworks (CTFs) containing 4-(Dicyanomethylene)-2,6-dimethyl-4H-pyran (DDP) surface functionalities is designed for the selective adsorption of carbon dioxide (CO2) over nitrogen (N-2) gas under ambient conditions; materials are repurposed to form an active electrode material for the fabrication of dimensionally stable high energy density solid-state flexible supercapacitors (SFSC). The functional 4H-pyran unit of DDP in-resonance with the triazine frameworks enriches the overall surface polarities for improved selective gas adsorption and serves as charge storage and/or discharge pockets during electrochemical switching. Consequently, DDP-based CTFs show an optimum CO2 adsorption of 154.0 mg g(-1) and record CO2/N-2 selectivity of 185.8 at 273 K under atmospheric pressure. In addition, an eminent energy density of 147.5 Wh kg(-1) at a power density of 750 W kg(-1) is accomplished with the fabricated SFSC. This material demonstrates no loss of capacitive performance under mechanical bending of 140 degrees for long cycles and can power a commercial light emitting diode easily.